/* shared/ui-kit.css: fruityfly's one set of UI parts (rules: docs/areas/ui-kit.md). Static, linked before a page's own CSS by the app and every game.
   Tokens are --ff-*. The older names (--gold, --gw-font, --display...) are aliases of these for now, in app/app.css and g/_kit/kit.css. Parts are .ui-*. The app's old part names (.gw-win, .gw-btn, .gw-tabs, .pop-x) are aliases in the same rules, so all its windows inherit them; about 440 strings use them, new code uses .ui-*. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../fonts/fredoka.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(../fonts/fredoka-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/lilita-one-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/lilita-one-400-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ff-tokens begin: site/index.html and site/lander-login.css hold a copy of this block (the front page can't name the game's folder); server/test/lint.test.js keeps them equal */
:root {
  --ff-night: #0d0c18; --ff-glass: rgba(24, 23, 38, .92); --ff-glass2: #1d1c30; --ff-line: rgba(255, 255, 255, .09);
  --ff-gold: #f6c24a; --ff-gold2: #d99a2b; --ff-gold-d: #7d500c; --ff-gold-line: #c9a24a; --ff-hair: rgba(246, 194, 74, .55); --ff-honey: #ffe08a; --ff-cream: #f8ebcd; --ff-dim: #c9bb9a;
  --ff-ruby: #e23c64; --ff-ruby2: #8f1f3c; --ff-green: #52c070; --ff-sky: #74c4ff; --ff-pink: #ff86b0; --ff-red: #ff6b6b;
  --ff-r-common: #b9bccb; --ff-r-ripe: #7fd67b; --ff-r-juicy: #ff9a3d; --ff-r-overripe: #c58cff; --ff-r-fermented: #ffd34a;
  --ff-font: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif; --ff-title: 'Lilita One', 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
}
/* ff-tokens end */
:root { --ff-gem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%23ffe08a'/%3E%3Cstop offset='1' stop-color='%23b87a14'/%3E%3C/linearGradient%3E%3CradialGradient id='b' cx='.35' cy='.3' r='.8'%3E%3Cstop stop-color='%23ff9fb8'/%3E%3Cstop offset='.45' stop-color='%23e23c64'/%3E%3Cstop offset='1' stop-color='%237a1530'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath fill='url(%23a)' d='M6 0h8l6 6v8l-6 6H6l-6-6V6z'/%3E%3Cpath fill='url(%23b)' d='M7.2 3h5.6L17 7.2v5.6L12.8 17H7.2L3 12.8V7.2z'/%3E%3C/svg%3E"); }

/* the window frame: navy glass, a gold hairline, a ruby gem in each corner (in the background, so they stay put while a tall window scrolls), the ruby ribbon for its title */
.ui-win, .gw-win { box-sizing: border-box; isolation: isolate; color: var(--ff-cream); border: 2px solid var(--ff-gold-line); border-radius: 14px; scrollbar-width: thin; scrollbar-color: #8a7a5a transparent;
  background: var(--ff-gem) 3px 3px / 15px no-repeat, var(--ff-gem) right 3px top 3px / 15px no-repeat, var(--ff-gem) left 3px bottom 3px / 15px no-repeat, var(--ff-gem) right 3px bottom 3px / 15px no-repeat, linear-gradient(180deg, #2a2840, #1a192b);
  box-shadow: 0 0 0 1px #000, 0 24px 70px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 40px rgba(0, 0, 0, .35); }
/* a frame that doesn't scroll itself (every app window: its body scrolls) wears them bigger, on the corners */
.gw-win { background: linear-gradient(180deg, #2a2840, #1a192b); }
.gw-win::before { content: ''; position: absolute; inset: -10px; z-index: 3; pointer-events: none; background: var(--ff-gem) 0 0 / 20px no-repeat, var(--ff-gem) right 0 top 0 / 20px no-repeat, var(--ff-gem) left 0 bottom 0 / 20px no-repeat, var(--ff-gem) right 0 bottom 0 / 20px no-repeat; }
.ui-ribbon { position: relative; display: table; box-sizing: border-box; max-width: calc(100% - 40px); margin: 0 auto 10px; padding: 5px 16px 6px; border: 2px solid #4a0f1c; border-radius: 6px; background: linear-gradient(#cf4656, #962638);
  box-shadow: 0 3px 0 #4a1020, inset 0 1px 0 rgba(255, 255, 255, .3); font: 400 15px/1.1 var(--ff-title); letter-spacing: 1.2px; text-transform: uppercase; color: #fff1c8; text-shadow: 0 2px 0 #5a1424; }
.ui-ribbon::before, .ui-ribbon::after { content: ''; position: absolute; top: 7px; width: 20px; height: 100%; z-index: -1; background: linear-gradient(#8f2132, #6a1626); border: 2px solid #4a0f1c; box-sizing: border-box; }
.ui-ribbon::before { left: -14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); } .ui-ribbon::after { right: -14px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }
.ui-ribbon:empty { display: none; }
/* a window's big ribbon: hung over the top edge with its round icon, the title in an h2 */
.ui-ribbon h2 { margin: 0; font: inherit; letter-spacing: inherit; }
.ui-ribbon.big { display: flex; align-items: center; gap: 10px; max-width: none; margin: 0; padding: 4px 30px 5px 8px; } .ui-ribbon.big h2 { font-size: 21px; letter-spacing: 1.5px; white-space: nowrap; }
.ui-ribbon.big::before, .ui-ribbon.big::after { top: 8px; width: 30px; } .ui-ribbon.big::before { left: -22px; } .ui-ribbon.big::after { right: -22px; }
@media (max-width: 420px) { .ui-ribbon { font-size: 13px; letter-spacing: .6px; padding: 5px 10px 6px; text-wrap: balance; } }
.ui-panel { background: var(--ff-glass); border: 2px solid var(--ff-gold-line); border-radius: 12px; box-shadow: 0 0 0 1px #000, 0 6px 20px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1); }

/* buttons. .ui-btn is the green main action (one a view), .spend the orange one that spends or commits, .quiet the dark utility one, .danger the one that destroys. .wide fills its card.
   The app's .gw-btn is the same button under its old colour names: plain is .spend, .green is .ui-btn, .ghost is .quiet; it stays inline-block, as its 440 strings are written for that */
.ui-btn, .gw-btn { box-sizing: border-box; padding: 8px 18px; border: 2px solid #14341c; border-radius: 10px; cursor: pointer; font: 400 15px var(--ff-title); letter-spacing: .6px; box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .08s ease-out, filter .12s; }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; line-height: 1; }
.ui-btn, .gw-btn.green { --lip: #1f5a30; border-color: #14341c; color: #f1ffe8; text-shadow: 0 1px 0 rgba(10, 50, 20, .7); background: linear-gradient(#66d484, #2f9650); }
.ui-btn.spend, .gw-btn { --lip: #8a3a0c; border-color: #4a1f08; color: #fff3d6; text-shadow: 0 1px 0 rgba(60, 20, 0, .5); background: linear-gradient(#ffb25a, #e8661e); }
.ui-btn.quiet, .gw-btn.ghost { --lip: #15142a; border-color: #000; color: var(--ff-cream); text-shadow: 0 1px 0 rgba(0, 0, 0, .5); background: linear-gradient(#4a476a, #35334f); box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, .18); }
.ui-btn.danger, .gw-btn.danger:not(.ghost) { --lip: #6a1a16; border-color: #4a0f0c; color: #fff0ee !important; text-shadow: 0 1px 0 rgba(60, 0, 0, .6); background: linear-gradient(#e8665a, #a8302a); }
.ui-btn.wide, .gw-btn.wide { width: 100%; padding: 11px 18px; font-size: 19px; letter-spacing: .8px; } .ui-btn.wide { display: flex; }
.ui-btn svg, .gw-btn svg { width: 17px; height: 17px; flex: none; }
.ui-btn:hover:not(:disabled), .gw-btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.ui-btn:active:not(:disabled), .gw-btn:active:not(:disabled) { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 var(--lip); }
.ui-btn:disabled, .gw-btn:disabled { filter: grayscale(.85) brightness(.6); cursor: not-allowed; }
.ui-btn[hidden] { display: none; }

/* Back: one part everywhere: the gold arrow and 'Back To <place>'. A phone shows the arrow alone, the whole wording in aria-label; only .armed (a running match's 'Leave? Lose Your Pay') keeps its words there: <span class="ui-back-ic">arrow</span><span>Back To Juice Valley</span> */
.ui-back { --lip: #15142a; display: inline-flex; align-items: center; gap: 7px; box-sizing: border-box; min-height: calc(44px / var(--ui, 1)); min-width: calc(44px / var(--ui, 1)); max-width: 100%; padding: 5px 13px 6px 6px; border: 2px solid var(--ff-gold-line); border-radius: 10px; cursor: pointer; font: 400 15px/1 var(--ff-title); letter-spacing: .6px; white-space: nowrap; color: var(--ff-cream); text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
  background: linear-gradient(#4a476a, #35334f); box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .08s ease-out, filter .12s; }
.ui-back-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(var(--ff-honey), var(--ff-gold2)); box-shadow: 0 1px 0 var(--ff-gold-d), inset 0 1px 0 rgba(255, 255, 255, .6); color: #3a2204; transition: translate .12s; }
.ui-back-ic svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ui-back:hover { filter: brightness(1.15); } .ui-back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
body:not(.no-fx) .ui-back:hover .ui-back-ic { translate: -2px 0; }
@media (max-width: 640px), (max-height: 480px) and (orientation: landscape) { .ui-back:not(.armed) > :not(.ui-back-ic) { display: none; } .ui-back:not(.armed) { justify-content: center; padding: 5px 6px 6px; gap: 0; } }

/* a square button that is only a drawn icon (Pause) and the round ruby × of a window (top right corner; a window has one, a page has Back) */
.ui-iconbtn { --lip: #15142a; display: grid; place-items: center; box-sizing: border-box; width: calc(44px / var(--ui, 1)); height: calc(44px / var(--ui, 1)); padding: 0; border: 2px solid #000; border-radius: 10px; cursor: pointer; color: var(--ff-cream); background: linear-gradient(#4a476a, #35334f); box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .08s ease-out, filter .12s; }
.ui-iconbtn svg { width: 20px; height: 20px; fill: currentColor; }
.ui-iconbtn:hover { filter: brightness(1.15); } .ui-iconbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip); }
.ui-x, .pop-x { position: absolute; top: -12px; right: -12px; z-index: 5; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid var(--ff-gold); color: #fff; font: 400 17px/1 var(--ff-title); cursor: pointer; background: radial-gradient(circle at 35% 30%, #ff9fb0, #d6304f 55%, #7a1530); box-shadow: 0 0 0 2px #1a192b, 0 3px 0 #4a0f1c; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); transition: transform .08s; }
.ui-x:hover, .pop-x:hover { filter: brightness(1.15); } .ui-x:active, .pop-x:active { transform: translateY(2px); }
.ui-btn:focus-visible, .ui-back:focus-visible, .ui-iconbtn:focus-visible, .ui-x:focus-visible, .ui-tabs button:focus-visible { outline: 2px solid var(--ff-honey); outline-offset: 2px; }

/* numbers on a dark pill, readable on any background: a score, a clock, a place */
.ui-stat { box-sizing: border-box; padding: 4px 14px 6px; border: 2px solid var(--ff-gold-line); border-radius: 14px; background: rgba(14, 12, 28, .74); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, .1); font: 400 24px/1 var(--ff-title); letter-spacing: 1px; color: #fff1c8; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .55); font-variant-numeric: tabular-nums; pointer-events: none; }

/* the wallet: one pill per currency (the icon, then the number); .sm in a list */
.ui-wallet { display: flex; align-items: center; gap: 6px; flex: none; }
.ui-cur { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 4px; border: 2px solid var(--ff-gold-line); border-radius: 20px; background: var(--ff-glass); box-shadow: 0 0 0 1px #000, 0 4px 12px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1); font: 700 16px/1 var(--ff-font); color: var(--ff-honey); font-variant-numeric: tabular-nums; }
.ui-cur svg { width: 26px; height: 26px; flex: none; margin: -2px 0; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.ui-cur.sm { gap: 4px; padding: 1px 9px 1px 2px; font-size: 13.5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } .ui-cur.sm svg { width: 20px; height: 20px; margin: 0; }

/* tabs: one row that scrolls sideways on a phone; the open one has the gold underline */
.ui-tabs, .gw-tabs { display: flex; gap: 2px; padding: 9px 4px 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ui-tabs button, .gw-tabs button { position: relative; flex: none; margin: 0; min-height: 40px; padding: 7px 14px 9px; white-space: nowrap; font: 400 15px var(--ff-title); letter-spacing: .6px; color: var(--ff-dim); background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; cursor: pointer; }
.ui-tabs button:hover, .gw-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.ui-tabs button.on, .gw-tabs button.on { color: var(--ff-honey); background: linear-gradient(180deg, rgba(246, 194, 74, 0), rgba(246, 194, 74, .16)); border-bottom-color: var(--ff-gold); }
.ui-tabs button:focus-visible, .gw-tabs button:focus-visible { outline-offset: -3px; }

/* a note: an honest state, calm, not an error (an icon, a title, a line). An empty state: nothing here yet (an icon, a line, maybe one button) */
.ui-note { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--ff-line); border-radius: 10px; background: rgba(8, 7, 18, .38); }
.ui-note > svg { width: 30px; height: 30px; flex: none; }
.ui-note b { display: block; font: 400 16px/1.15 var(--ff-title); letter-spacing: .4px; color: var(--ff-cream); } .ui-note p { margin: 2px 0 0; font-size: 13px; line-height: 1.25; color: var(--ff-dim); }
.ui-empty { display: grid; justify-items: center; gap: 8px; padding: 26px 10px; text-align: center; color: var(--ff-dim); font-size: 14px; }
.ui-empty > svg { width: 40px; height: 40px; opacity: .6; filter: grayscale(.35) drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); } .ui-empty p { margin: 0; max-width: 40ch; }

/* a touch control in a game: a dark ring over the world, gold while held */
.ui-touch { pointer-events: auto; touch-action: none; display: grid; place-items: center; box-sizing: border-box; padding: 0; border: 2px solid rgba(248, 235, 205, .45); border-radius: 50%; background: rgba(14, 12, 28, .6); color: var(--ff-cream); font: 400 15px/1 var(--ff-title); letter-spacing: .6px; text-shadow: 0 2px 0 rgba(0, 0, 0, .7); -webkit-user-select: none; user-select: none; }
.ui-touch.on { background: rgba(255, 201, 74, .5); border-color: var(--ff-gold); }

@media (prefers-reduced-motion: reduce) { .ui-back-ic, .ui-btn, .ui-back, .ui-iconbtn, .ui-x { transition: none; } .ui-back:hover .ui-back-ic { translate: none !important; } }
