/* Game skin for the Hearth and Brightpath phone apps.
   The same world as the kitchen wall (wall/wall.css): a night-purple ground,
   chunky white cards that sit on a darker edge like a button you could press,
   heavy rounded type, bright green for go, yellow for "you".

   Loaded after each app's own stylesheet, and only does looks. Class names
   are still the apps' own. The phones run a current Safari, so this file is
   free to use modern CSS; the wall's Safari 10 rules do not apply here. */

body.game {
  --night: #231F54;
  --night-2: #3A2F8F;
  --g-ink: #1B1640;
  --g-muted: #6B6790;
  --g-edge: #CFCBEF;
  --g-shadow: rgba(8, 6, 32, 0.45);
  --g-yellow: #FFC928; --g-yellow-2: #D99A00;
  --g-green: #17A85B;  --g-green-2: #0E7A40; --g-green-hi: #2FD27A;
  --g-blue: #2F9BFF;   --g-blue-2: #1868C9;
  --g-pink: #FF4F8B;   --g-pink-2: #C8285F;
  --g-purple: #8C5BFF; --g-purple-2: #5A2FD1;
  --g-red: #E53935;

  /* the apps' own tokens, pointed at the game palette */
  --ground: #F1EFFF; --paper: #FFFFFF; --ink: var(--g-ink); --muted: var(--g-muted);
  --line: #E6E3F7; --surface: #FFFFFF;
  --coral: var(--g-green); --coral-deep: var(--g-purple-2); --coral-ink: #FFFFFF; --coral-soft: #ECE6FF;
  --sage-soft: #DDF7EA; --butter-soft: #FFF4D6; --blush-soft: #FFE6EE; --sky-soft: #E6F6FF;
  --lilac-soft: #EFE9FF; --lavender-soft: #EFE9FF; --sun-soft: #FFF4D6; --mint-soft: #DDF7EA;
  --peach-soft: #FFEBDD; --forest: #FFFFFF; --plum: #FFFFFF;
  --accent: var(--g-green); --accent-ink: #FFFFFF;
  --r-card: 24px; --r-inner: 16px;
  --shadow: 0 6px 0 var(--g-shadow);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
}

html:has(body.game) { background: #231F54; }
body.game {
  background: #231F54 linear-gradient(160deg, #2B2468 0%, #231F54 45%, #33287E 100%) fixed;
  color: #FFFFFF;
  font-weight: 700;
}

/* ------------------------------------------------ type on the night ground */

body.game main h1,
body.game .heading h1 { color: #FFFFFF; font-weight: 900; letter-spacing: -0.5px; }
body.game .heading .subtitle,
body.game main > .subtitle,
body.game main > p,
body.game main > .muted,
body.game main > .quiet,
body.game main > small { color: #CFCBEF; }
body.game main > .eyebrow,
body.game .heading .eyebrow,
body.game main > .sub-head,
body.game .section-title,
body.game .group,
body.game main > h2,
body.game main > h3,
body.game .calendar-date { color: #FFFFFF; }
body.game main > .eyebrow,
body.game .heading .eyebrow,
body.game main > .sub-head { color: var(--g-yellow); letter-spacing: 1px; }
body.game .group .dot { box-shadow: 0 0 0 3px rgba(255,255,255,0.18); }

/* Quiet text that sits straight on the night ground, not inside a card. */
body.game main :is(.muted, .quiet, small, .small, .subtitle, .tiny):not(:is(.card, .stat, .hero, dialog, .tile, .banner, .note, .soft, .points-hero, .sun-card, .bag-card, .scan-result, .empty, .kid-chip, .reader-option, .daybox, .period, .warn-note, .locked-note) *) { color: #CFCBEF; }
body.game main .eyebrow:not(:is(.card, .stat, .hero, dialog, .tile, .banner, .note, .soft, .points-hero, .sun-card, .bag-card, .scan-result, .empty) *) { color: var(--g-yellow); }
body.game main :is(.card, .stat, .tile, .banner, .note, .soft, .points-hero, .sun-card, .bag-card, dialog) .eyebrow { color: var(--g-purple-2); }

/* Everything that sits on a surface goes back to dark ink. */
body.game .card, body.game .stat, body.game .hero, body.game dialog, body.game .tile,
body.game .banner, body.game .note, body.game .soft, body.game .scan-result,
body.game .points-hero, body.game .sun-card, body.game .bag-card, body.game .more-menu,
body.game .kid-chip, body.game .reader-option, body.game .daybox, body.game .period,
body.game .empty, body.game .warn-note, body.game .locked-note, body.game #notice,
body.game .form-footer {
  color: var(--g-ink);
}

/* --------------------------------------------------------------- chrome */

body.game .sidebar,
body.game[data-app=brightpath] > aside { background: transparent; color: #FFFFFF; }
body.game .brand, body.game[data-app=hearth] .brand,
body.game[data-app=brightpath] .brand, body.game[data-app=brightpath] .brand span { color: #FFFFFF; }
body.game .brand small, body.game .brand span small { color: #CFCBEF; }
body.game .brand img { background: #FFFFFF; border-radius: 14px; box-shadow: 0 4px 0 var(--g-shadow); }
body.game .back, body.game .aside-bottom a { color: #CFCBEF; }
body.game header, body.game #household, body.game #date-title, body.game #sync { color: #CFCBEF; }
body.game #sync.sync-bad { color: #FF9C9C; }
body.game footer { color: #CFCBEF; border-top-color: rgba(255,255,255,0.12); }
body.game .family label { color: #CFCBEF; }

/* sidebar nav on bigger screens */
body.game .sidebar nav button,
body.game[data-app=brightpath] > aside nav button { color: #FFFFFF; background: transparent; border-color: transparent; }
body.game .sidebar nav button:hover,
body.game[data-app=brightpath] > aside nav button:hover { background: rgba(255,255,255,0.1); }
body.game .sidebar nav button.active,
body.game[data-app=brightpath] > aside nav button.active {
  background: var(--g-yellow); color: var(--g-ink); box-shadow: 0 4px 0 var(--g-yellow-2);
}

/* phone bottom bar */
body.game .mobile-dock,
body.game[data-app=hearth] .mobile-dock,
body.game[data-app=brightpath] .mobile-dock {
  background: #17133C; border-top: 0;
  box-shadow: 0 -6px 0 rgba(8,6,32,0.35);
}
body.game .mobile-dock button,
body.game[data-app=brightpath] .mobile-dock button { color: #CFCBEF; background: transparent; font-weight: 800; }
body.game .mobile-dock button.active,
body.game[data-app=hearth] .mobile-dock button.active,
body.game[data-app=brightpath] .mobile-dock button.active {
  background: var(--g-yellow); color: var(--g-ink); box-shadow: 0 4px 0 var(--g-yellow-2);
}
body.game[data-app=brightpath] .mobile-dock button.active span { background: transparent; color: inherit; }
body.game .more-menu { background: #FFFFFF; }
body.game .more-grid button { color: var(--g-ink); }
body.game .more-grid button.active,
body.game[data-app=hearth] .more-grid button.active,
body.game[data-app=brightpath] .more-grid button.active { background: var(--g-purple-2); color: #FFFFFF; }

/* the pills in the header */
body.game .parent-pill,
body.game #unlock,
body.game[data-app=brightpath] .aside-bottom button {
  background: rgba(255,255,255,0.14); color: #FFFFFF; border: 0;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25); font-weight: 800;
}
body.game #unlock.on, body.game[data-app=brightpath] .aside-bottom button.on { background: var(--g-green); }
body.game #unlock.has-waiting,
body.game[data-app=brightpath] .aside-bottom button.has-waiting { background: var(--g-pink); }
body.game header .avatar, body.game #who {
  background: var(--g-yellow); color: var(--g-ink); box-shadow: 0 4px 0 var(--g-yellow-2); font-weight: 900;
}
body.game header button:not(.avatar):not(.parent-pill) {
  background: rgba(255,255,255,0.14); color: #FFFFFF; border: 0; box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}
body.game #child, body.game .family select {
  background: rgba(255,255,255,0.14); color: #FFFFFF; border: 0; font-weight: 800;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}
body.game #child option { color: var(--g-ink); }

/* ------------------------------------------------------------- surfaces */

body.game .card, body.game .stat, body.game .tile, body.game .points-hero,
body.game .sun-card, body.game .banner, body.game .scan-result, body.game .empty {
  border: 0;
  border-radius: var(--r-card);
  box-shadow: 0 6px 0 var(--g-shadow);
}
body.game .card { background: #FFFFFF; }
body.game .card.warn, body.game .banner-warn, body.game .hero-warn { background: #FFF4D6; }
body.game .banner-good, body.game .hero-good { background: #DDF7EA; }
body.game .hero {
  background: #FFF4D6;
  border-radius: var(--r-card);
  box-shadow: 0 6px 0 var(--g-shadow);
}
body.game .hero .eyebrow { color: #8A5E00; letter-spacing: 1px; }
body.game .hero h2, body.game .hero h1 { color: var(--g-ink); font-weight: 900; }
body.game .hero .art.hero-art { filter: drop-shadow(0 6px 0 rgba(8,6,32,0.25)); }
body.game .row { border-bottom-color: #EEEBFA; }

/* the four number tiles become coloured game tiles */
body.game .stat { background: #FFFFFF; }
body.game .stat strong { font-weight: 900; }
body.game .stat.sage   { background: #DDF7EA; }
body.game .stat.butter { background: #FFF4D6; }
body.game .stat.blush  { background: #FFE6EE; }
body.game .stats .stat:nth-child(1) strong { color: var(--g-green-2); }
body.game .stats .stat:nth-child(2) strong { color: #B07F00; }
body.game .stats .stat:nth-child(3) strong { color: var(--g-pink-2); }

/* soft tints inside cards */
body.game .tint-sun, body.game .badge.sun { background: #FFF4D6; }
body.game .tint-sky { background: #E6F6FF; }
body.game .tint-peach { background: #FFEBDD; }
body.game .note, body.game .soft { background: #F1EFFF; }

/* ---------------------------------------------------------------- buttons
   Every button sits on its edge and drops onto it when pressed. */

body.game button, body.game .btn, body.game .button-link {
  font-weight: 800;
  border-radius: 16px;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
body.game main button:where(:not(.link, .icon, .tick, .stat, .tile, .mini)),
body.game dialog button:where(:not(.link, .icon, .tick, .mini)),
body.game .btn, body.game .button-link {
  background: #FFFFFF; color: var(--g-ink);
  border: 2px solid var(--g-edge);
  box-shadow: 0 4px 0 var(--g-edge);
}
body.game main button.primary, body.game main button.orange,
body.game dialog button.primary, body.game dialog button.orange,
body.game .bag-card .row button.primary {
  background: var(--g-green); color: #FFFFFF; border-color: var(--g-green-2);
  box-shadow: 0 5px 0 var(--g-green-2);
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
body.game main button.primary:hover, body.game dialog button.primary:hover { background: #149A53; }
body.game main button.danger-btn, body.game dialog button.danger-btn {
  background: var(--g-red); color: #FFFFFF; border-color: #A52622; box-shadow: 0 5px 0 #A52622;
}
body.game main button:active:not(:disabled),
body.game dialog button:active:not(:disabled),
body.game .btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--g-edge);
  opacity: 1;
}
body.game main button.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--g-green-2); }
body.game button.link { color: var(--g-purple-2); }
body.game main > .actions button.link,
body.game .heading button.link { color: var(--g-yellow); }
body.game .icon { color: var(--g-muted); }

/* the stat tiles and pantry tiles are buttons too */
body.game .stat:active, body.game .tile:active, body.game .card[role=button]:active {
  transform: translateY(4px); box-shadow: 0 2px 0 var(--g-shadow);
}

/* tabs and segmented controls: yellow is where you are */
body.game .tabs, body.game .seg { background: rgba(255,255,255,0.12); border-radius: 18px; padding: 4px; }
body.game .tabs button, body.game .seg button {
  background: transparent !important; color: #FFFFFF !important; border: 0 !important; box-shadow: none !important;
}
body.game .tabs button.active, body.game .seg button.on {
  background: var(--g-yellow) !important; color: var(--g-ink) !important;
  box-shadow: 0 4px 0 var(--g-yellow-2) !important;
}
body.game .card .tabs, body.game .card .seg, body.game dialog .tabs, body.game dialog .seg { background: #EEEBFA; }
body.game .card .tabs button, body.game .card .seg button,
body.game dialog .tabs button, body.game dialog .seg button { color: var(--g-ink) !important; }

/* badges and chips */
body.game .badge { font-weight: 800; border-radius: 10px; }
body.game .badge.green, body.game .badge-btn.green { background: #DDF7EA; color: var(--g-green-2); }
body.game .badge.warn, body.game .badge.bad, body.game .danger-badge { background: #FFE6EE; color: var(--g-pink-2); }

/* ticks: a big green check you want to press */
body.game .tick { border: 3px solid var(--g-edge); background: #FFFFFF; box-shadow: 0 3px 0 var(--g-edge); }
body.game .tick.on { background: var(--g-green); border-color: var(--g-green-2); color: #FFFFFF; box-shadow: 0 3px 0 var(--g-green-2); }
body.game input[type=checkbox] { accent-color: var(--g-green); }

/* bars */
body.game .progress { background: #E6E3F7; border-radius: 8px; }
body.game .progress i { background: var(--g-green-hi); border-radius: 8px; }

/* inputs */
body.game input:not([type=checkbox]):not([type=radio]):not([type=color]),
body.game select, body.game textarea {
  border: 2px solid var(--g-edge); border-radius: 14px; background: #FFFFFF; color: var(--g-ink); font-weight: 700;
}
body.game input:focus, body.game select:focus, body.game textarea:focus { border-color: var(--g-purple); outline: none; }
body.game main > .toolbar input, body.game main > .toolbar select { box-shadow: 0 4px 0 var(--g-shadow); border-color: transparent; }

/* dialogs */
body.game dialog { border: 0; border-radius: 26px; box-shadow: 0 8px 0 var(--g-shadow); background: #FFFFFF; }
body.game dialog::backdrop { background: rgba(23, 19, 60, 0.72); }
body.game dialog h2 { font-weight: 900; }

/* notices and toasts */
body.game #notice:not(:empty) { background: var(--g-yellow); color: var(--g-ink); box-shadow: 0 5px 0 var(--g-yellow-2); border-radius: 18px; }
body.game #notice.bad:not(:empty) { background: #FFE6EE; color: #8E1B3F; box-shadow: 0 5px 0 var(--g-pink-2); }
body.game #toast { background: var(--g-ink); color: #FFFFFF; border-radius: 18px; box-shadow: 0 5px 0 #000; font-weight: 800; }
body.game #toast.good { background: var(--g-green); box-shadow: 0 5px 0 var(--g-green-2); }
body.game #toast.bad { background: var(--g-pink); box-shadow: 0 5px 0 var(--g-pink-2); }

/* ================================================================== HUD
   The player bar: who you are, your level, your XP, your place this week. */

.g-hud {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin: 4px 18px 6px; padding: 10px 14px 12px 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, #4A3DB0 0%, #3A2F8F 100%);
  box-shadow: 0 6px 0 rgba(8,6,32,0.55), inset 0 2px 0 rgba(255,255,255,0.14);
  color: #FFFFFF;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
.g-hud:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(8,6,32,0.55); }
.g-hud .g-avatar { flex: 0 0 auto; font-size: 11px; width: 4.4em; height: 5.2em; }
.g-hud-main { flex: 1 1 auto; min-width: 0; }
.g-hud-top { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.g-hud-name { font-size: 18px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; }
.g-lvl {
  flex: 0 0 auto;
  padding: 1px 8px; border-radius: 9px;
  background: var(--g-yellow, #FFC928); color: #1B1640;
  font-size: 13px; font-weight: 900; letter-spacing: 0.5px;
  box-shadow: 0 2px 0 #D99A00;
}
.g-xp { position: relative; height: 14px; margin-top: 7px; border-radius: 8px; background: rgba(0,0,0,0.3); overflow: hidden; }
.g-xp i {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px;
  background: linear-gradient(180deg, #5BF0A0 0%, #2FD27A 55%, #1FB764 100%);
  transition: width 0.9s cubic-bezier(.2,.9,.3,1.2);
}
.g-hud-sub { margin-top: 4px; font-size: 13px; color: #CFCBEF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-rank {
  flex: 0 0 auto; text-align: center;
  min-width: 58px; padding: 6px 8px 5px; border-radius: 16px;
  background: rgba(0,0,0,0.25);
}
.g-rank b { display: block; font-size: 22px; line-height: 1; font-weight: 900; }
.g-rank span { display: block; margin-top: 3px; font-size: 11px; color: #CFCBEF; font-weight: 800; letter-spacing: 0.4px; }
.g-rank.first { background: var(--g-yellow, #FFC928); color: #1B1640; box-shadow: 0 3px 0 #D99A00; }
.g-rank.first span { color: #5A3E00; }
.g-hud.join .g-hud-name { font-size: 17px; }
.g-hud.join .g-rank { background: #17A85B; box-shadow: 0 3px 0 #0E7A40; }

/* house jobs under the player bar */
.g-jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; margin: 10px 18px 4px; padding-bottom: 6px; }
.g-jobs:empty { display: none; }
.g-job {
  min-width: 0; display: flex; align-items: center; gap: 7px;
  min-height: 52px; padding: 6px 12px 6px 9px; border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(255,255,255,0.12); color: #FFFFFF; box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  font: 800 14px/1.15 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; text-align: left;
}
.g-job:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.g-job.is-done { background: #DDF7EA; color: #1B1640; box-shadow: 0 4px 0 #0E7A40; }
.g-job-art { font-size: 20px; line-height: 1; }
.g-job-words { min-width: 0; }
.g-job-words b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-job-words small { display: block; font-size: 12px; font-weight: 700; color: #CFCBEF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-job.is-done .g-job-words small { color: #0E7A40; }
@media (min-width: 761px) { .g-jobs { grid-template-columns: repeat(4, 1fr); margin: 10px 40px 4px; max-width: 760px; } }

/* floating +XP, the level-up screen, confetti */
.g-float {
  position: fixed; left: 50%; top: 22%; z-index: 90;
  transform: translate(-50%, 0);
  padding: 10px 18px; border-radius: 18px;
  background: #FFC928; color: #1B1640; box-shadow: 0 5px 0 #D99A00;
  font: 900 20px/1.2 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  white-space: nowrap; pointer-events: none;
  animation: g-rise 1.9s ease-out forwards;
}
.g-float small { display: block; font-size: 13px; font-weight: 800; color: #5A3E00; text-align: center; }
.g-float.rank { background: #8C5BFF; color: #FFFFFF; box-shadow: 0 5px 0 #5A2FD1; top: 30%; }
.g-float.rank small { color: #E9E1FF; }
.g-float.lost { background: #FF4F8B; box-shadow: 0 5px 0 #C8285F; color: #FFFFFF; }
.g-float.lost small { color: #FFE3EC; }
@keyframes g-rise {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(0.7); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  25% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -30px); }
  100% { opacity: 0; transform: translate(-50%, -60px); }
}
.g-bit { position: fixed; z-index: 95; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; }

.g-over {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(23, 19, 60, 0.78);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: g-fade 0.2s ease-out;
}
.g-over.middle { align-items: center; }
@keyframes g-fade { from { opacity: 0; } to { opacity: 1; } }
.g-sheet {
  width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); overflow-y: auto;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #231F54 linear-gradient(170deg, #2B2468 0%, #231F54 60%);
  color: #FFFFFF;
  box-shadow: 0 -6px 0 rgba(0,0,0,0.25);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  animation: g-up 0.28s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes g-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.g-sheet h2 { margin: 0 0 4px; font-size: 26px; font-weight: 900; color: #FFFFFF; letter-spacing: -0.3px; }
.g-sheet .g-say { margin: 0 0 16px; font-size: 14px; color: #CFCBEF; font-weight: 700; }
.g-sheet .g-label { margin: 22px 0 10px; font-size: 13px; font-weight: 900; letter-spacing: 1px; color: #FFC928; text-transform: uppercase; }
.g-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.g-x {
  flex: 0 0 auto; width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 14px; background: rgba(255,255,255,0.14); color: #FFFFFF;
  font-size: 24px; font-weight: 900; box-shadow: 0 4px 0 rgba(0,0,0,0.25); cursor: pointer;
}

.g-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 8px 12px 8px 8px;
  border-radius: 18px; background: #FFFFFF; color: #1B1640;
  box-shadow: 0 5px 0 rgba(8,6,32,0.45);
}
.g-row.me { background: #FFF4D6; box-shadow: 0 5px 0 #D99A00; }
.g-row .g-place {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  background: #EEEBFA; color: #5A2FD1; font-size: 17px; font-weight: 900; line-height: 34px; text-align: center;
}
.g-row .g-place.p1 { background: #FFC928; color: #5A3E00; box-shadow: 0 3px 0 #D99A00; }
.g-row .g-place.p2 { background: #DDE3F0; color: #3F4B66; }
.g-row .g-place.p3 { background: #F6D7BD; color: #7A4520; }
.g-row .g-avatar { flex: 0 0 auto; font-size: 8.5px; width: 4.4em; height: 5.4em; }
.g-row-main { flex: 1 1 auto; min-width: 0; }
.g-row-name { font-size: 17px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-row-sub { font-size: 13px; color: #6B6790; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-row-bar { height: 8px; margin-top: 5px; border-radius: 4px; background: #EEEBFA; overflow: hidden; }
.g-row-bar i { display: block; height: 100%; border-radius: 4px; background: #2F9BFF; }
.g-row.me .g-row-bar i, .g-row .g-row-bar i.lead { background: #2FD27A; }
.g-row-xp { flex: 0 0 auto; font-size: 18px; font-weight: 900; color: #1868C9; }
.g-row-xp small { font-size: 12px; color: #6B6790; }

.g-champ {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255,201,40,0.16); color: #FFE8A3; font-size: 14px; font-weight: 800;
}
.g-champ b { color: #FFFFFF; }

.g-rules { margin: 0; padding: 0; list-style: none; }
.g-rules li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; margin-bottom: 8px; border-radius: 14px;
  background: rgba(255,255,255,0.08); font-size: 15px; font-weight: 800; color: #FFFFFF;
}
.g-rules li span { color: #E4E0FF; }
.g-rules li b { flex: 0 0 auto; color: #5BF0A0; white-space: nowrap; }
.g-rules li small { display: block; color: #9E99C8; font-size: 12px; font-weight: 700; }

.g-go, .g-alt {
  display: block; width: 100%; min-height: 56px; margin-top: 12px; padding: 12px 18px;
  border: 0; border-radius: 18px; cursor: pointer;
  font: 900 18px/1.2 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
.g-go { background: #17A85B; color: #FFFFFF; box-shadow: 0 6px 0 #0E7A40; text-shadow: 0 1px 0 rgba(0,0,0,0.2); }
.g-alt { background: rgba(255,255,255,0.14); color: #FFFFFF; box-shadow: 0 5px 0 rgba(0,0,0,0.25); }
.g-go:active, .g-alt:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.g-go:disabled { opacity: 0.5; }

.g-people { display: flex; flex-wrap: wrap; gap: 12px; }
.g-person {
  flex: 1 1 calc(50% - 6px); min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px 10px; border: 0; border-radius: 20px; cursor: pointer;
  background: #FFFFFF; color: #1B1640; box-shadow: 0 6px 0 rgba(8,6,32,0.45);
  font: 900 18px/1.2 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}
.g-person:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(8,6,32,0.45); }
.g-person .g-avatar { font-size: 12px; }
.g-person small { margin-top: 2px; font-size: 12px; color: #6B6790; font-weight: 800; }
.g-new { display: flex; gap: 10px; margin-top: 14px; }
.g-new input {
  flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 10px 14px;
  border: 0; border-radius: 16px; font: 800 17px ui-rounded, "Nunito", system-ui, sans-serif; color: #1B1640;
}
.g-new .g-go { width: auto; margin: 0; min-height: 52px; }
.g-error { margin-top: 10px; color: #FFB3C8; font-size: 14px; font-weight: 800; }

/* the look picker */
.g-stage { display: flex; justify-content: center; padding: 8px 0 4px; }
.g-stage .g-avatar { font-size: 26px; }
.g-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.g-sw {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 14px; cursor: pointer;
  border: 3px solid rgba(255,255,255,0.2); box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.g-sw.on { border-color: #FFC928; box-shadow: 0 0 0 3px #FFC928, 0 4px 0 rgba(0,0,0,0.3); }
.g-things { display: flex; flex-wrap: wrap; gap: 10px; }
.g-thing {
  position: relative; flex: 0 0 calc(33.333% - 7px); min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px 8px; border: 3px solid transparent; border-radius: 18px; cursor: pointer;
  background: #FFFFFF; color: #1B1640; box-shadow: 0 5px 0 rgba(8,6,32,0.45);
  font: 900 13px/1.15 ui-rounded, "Nunito", system-ui, sans-serif;
}
.g-thing .g-avatar { font-size: 9px; }
.g-thing.on { border-color: #FFC928; background: #FFF4D6; }
.g-thing.locked { background: #CFCBEF; cursor: default; }
.g-thing.locked .g-avatar { opacity: 0.55; filter: grayscale(0.6); }
.g-thing .g-lock {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  padding: 1px 8px; border-radius: 9px; background: #1B1640; color: #FFFFFF;
  font-size: 11px; white-space: nowrap;
}

/* the level-up card */
.g-level {
  width: calc(100% - 40px); max-width: 380px; padding: 22px 20px 20px; text-align: center;
  border-radius: 28px; background: #FFFFFF; color: #1B1640; box-shadow: 0 8px 0 rgba(8,6,32,0.55);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  animation: g-pop 0.5s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes g-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.g-level .g-burst { font-size: 15px; font-weight: 900; letter-spacing: 2px; color: #8C5BFF; text-transform: uppercase; }
.g-level h2 { margin: 2px 0 6px; font-size: 44px; font-weight: 900; letter-spacing: -1px; color: #1B1640; }
.g-level .g-avatar { font-size: 22px; margin: 6px auto 4px;  }
.g-level p { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: #6B6790; }
.g-level p b { color: #1B1640; }

/* ---------------------------------------------------------------- avatar
   The same blocky player as the kitchen wall, drawn in em so the wrapper's
   font size sets the scale. Copied from wall/wall.css under .g-avatar so the
   phone apps never collide with their own class names. */
.g-avatar { position: relative; display: block; width: 4.4em; height: 6.5em; }
.g-avatar .av, .g-avatar .hat, .g-avatar .av-head, .g-avatar .av-body { display: block; }
.g-avatar .av { position: relative; width: 4.4em; height: 5.6em; margin-top: 0.9em; }
.g-avatar .av-head { position: absolute; left: 0.7em; top: 0.9em; width: 3em; height: 3em; border-radius: 0.4em; box-shadow: inset 0 -0.25em 0 rgba(0,0,0,0.12); }
.g-avatar .av-body { position: absolute; left: 0.35em; top: 4.05em; width: 3.7em; height: 1.55em; border-radius: 0.45em 0.45em 0.2em 0.2em; box-shadow: inset 0 -0.22em 0 rgba(0,0,0,0.18); }
.g-avatar .av-body i { position: absolute; left: 1.55em; top: 0; width: 0.6em; height: 0.5em; border-radius: 0 0 0.3em 0.3em; background: rgba(255,255,255,0.35); }
.g-avatar .eye { position: absolute; top: 1.05em; width: 0.42em; height: 0.55em; border-radius: 0.1em; background: #1B1640; }
.g-avatar .eye.l { left: 0.72em; } .g-avatar .eye.r { right: 0.72em; }
.g-avatar .mouth { position: absolute; left: 0.95em; top: 1.85em; width: 1.1em; height: 0.45em; border: 0.17em solid #1B1640; border-top: 0; border-radius: 0 0 0.6em 0.6em; }
.g-avatar .face-grin .mouth { left: 0.75em; width: 1.5em; height: 0.62em; top: 1.75em; border: 0; background: #1B1640; border-radius: 0.1em 0.1em 0.75em 0.75em; }
.g-avatar .face-grin .mouth:after { content: ""; position: absolute; left: 0.2em; right: 0.2em; top: 0; height: 0.2em; background: #FFFFFF; }
.g-avatar .face-wink .eye.r { height: 0.16em; top: 1.3em; }
.g-avatar .face-cool .eye { display: none; }
.g-avatar .shades { display: none; }
.g-avatar .face-cool .shades { display: block; position: absolute; left: 0.4em; top: 0.95em; width: 2.2em; height: 0.62em; border-radius: 0.15em 0.15em 0.4em 0.4em; background: #1B1640; box-shadow: inset 0.3em 0.12em 0 rgba(255,255,255,0.2); }
.g-avatar .stars { display: none; }
.g-avatar .face-star .eye { display: none; }
.g-avatar .face-star .stars { display: block; }
.g-avatar .stars i { position: absolute; top: 0.72em; font-style: normal; font-size: 0.9em; color: #FFC928; text-shadow: 0 0.05em 0 #B07F00; }
.g-avatar .stars i.l { left: 0.5em; } .g-avatar .stars i.r { right: 0.5em; }
.g-avatar .cheek { position: absolute; top: 1.7em; width: 0.45em; height: 0.28em; border-radius: 0.2em; background: rgba(255,90,120,0.28); }
.g-avatar .cheek.l { left: 0.3em; } .g-avatar .cheek.r { right: 0.3em; }
.g-avatar .hat { position: absolute; left: 0; top: 0; width: 4.4em; height: 2em; }
.g-avatar .hat i, .g-avatar .hat b { position: absolute; display: block; }
.g-avatar .hat-none { display: none; }
.g-avatar .hat-cap i { left: 0.6em; top: 0.45em; width: 3.2em; height: 1.05em; border-radius: 1.6em 1.6em 0.12em 0.12em; background: #FF4D4D; box-shadow: inset 0 -0.18em 0 rgba(0,0,0,0.15); }
.g-avatar .hat-cap b { left: 2.7em; top: 1.28em; width: 1.9em; height: 0.36em; border-radius: 0.2em; background: #C42525; }
.g-avatar .hat-beanie i { left: 0.55em; top: 0.2em; width: 3.3em; height: 1.4em; border-radius: 1.7em 1.7em 0.1em 0.1em; background: #2F9BFF; }
.g-avatar .hat-beanie i:after { content: ""; position: absolute; left: 1.35em; top: -0.35em; width: 0.6em; height: 0.6em; border-radius: 50%; background: #FFFFFF; }
.g-avatar .hat-beanie b { left: 0.45em; top: 1.3em; width: 3.5em; height: 0.55em; border-radius: 0.2em; background: #1868C9; }
.g-avatar .hat-headphones i { left: 0.3em; top: 0.35em; width: 3.8em; height: 2.4em; border: 0.3em solid #1B1640; border-bottom: 0; border-radius: 2em 2em 0 0; }
.g-avatar .hat-headphones b { left: 0.12em; top: 1.9em; width: 0.8em; height: 1.25em; border-radius: 0.3em; background: #FF4F8B; }
.g-avatar .hat-headphones b:after { content: ""; position: absolute; left: 3.36em; top: 0; width: 0.8em; height: 1.25em; border-radius: 0.3em; background: #FF4F8B; }
.g-avatar .hat-party i { left: 1.45em; top: -0.95em; width: 0; height: 0; border-left: 0.75em solid transparent; border-right: 0.75em solid transparent; border-bottom: 1.95em solid #8C5BFF; }
.g-avatar .hat-party b { left: 1.93em; top: -1.2em; width: 0.55em; height: 0.55em; border-radius: 50%; background: #FFC928; }
.g-avatar .hat-tophat i { left: 1.05em; top: -0.8em; width: 2.3em; height: 1.75em; border-radius: 0.15em; background: #1B1640; }
.g-avatar .hat-tophat i:after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.1em; height: 0.35em; background: #FF4D4D; }
.g-avatar .hat-tophat b { left: 0.45em; top: 0.85em; width: 3.5em; height: 0.4em; border-radius: 0.2em; background: #1B1640; }
.g-avatar .hat-crown i { left: 0.85em; top: -1.05em; width: 2.7em; height: 2em; font-style: normal; font-size: 1em; text-align: center; }
.g-avatar .hat-crown i:after { content: "\1F451"; font-size: 2.3em; line-height: 1; }
.g-avatar .hat-crown b { display: none; }
.g-avatar .hat-viking i { left: 0.6em; top: 0.3em; width: 3.2em; height: 1.25em; border-radius: 1.6em 1.6em 0.1em 0.1em; background: #9AA3B5; box-shadow: inset 0 -0.2em 0 #6F778A; }
.g-avatar .hat-viking i:before, .g-avatar .hat-viking i:after { content: ""; position: absolute; top: -0.55em; width: 0.75em; height: 1.2em; background: #F4EBD8; box-shadow: inset -0.12em -0.12em 0 #D9CCB0; }
.g-avatar .hat-viking i:before { left: -0.45em; border-radius: 0.8em 0.1em 0.3em 0.3em; transform: rotate(-28deg); }
.g-avatar .hat-viking i:after { right: -0.45em; border-radius: 0.1em 0.8em 0.3em 0.3em; transform: rotate(28deg); }
.g-avatar .hat-viking b { left: 1.95em; top: 0.35em; width: 0.5em; height: 1.2em; background: #6F778A; border-radius: 0.1em; }
.g-avatar .hat-halo i { left: 0.95em; top: -0.35em; width: 2.5em; height: 0.75em; border: 0.22em solid #FFD84D; border-radius: 50%; box-shadow: 0 0 0.4em rgba(255,216,77,0.9); }
.g-avatar .hat-halo b { display: none; }
.g-avatar .av > .hat { top: 0; }
/* hair and beards, the same drawing as the kitchen wall */
.g-avatar .hairb, .g-avatar .hairf { position: absolute; left: 0; top: 0; width: 4.4em; height: 5.6em; }
.g-avatar .hairb i, .g-avatar .hairb b, .g-avatar .hairf i, .g-avatar .hairf b { position: absolute; display: block; background: currentColor; }
.g-avatar .hair-none { display: none; }
.g-avatar .hairf i { left: 0.62em; top: 0.7em; width: 3.16em; height: 1.05em; border-radius: 1.3em 1.3em 0.25em 0.25em; box-shadow: inset 0 -0.14em 0 rgba(0,0,0,0.18); }
.g-avatar .hairf b { display: none; }
.g-avatar .hairb i, .g-avatar .hairb b { display: none; }
.g-avatar .hair-buzz.hairf i { left: 0.7em; top: 0.9em; width: 3em; height: 0.62em; border-radius: 0.4em 0.4em 0.1em 0.1em; opacity: 0.6; box-shadow: none; }
.g-avatar .hair-short.hairf b { display: block; left: 0.6em; top: 1.45em; width: 0.34em; height: 0.75em; border-radius: 0 0 0.2em 0.2em; }
.g-avatar .hair-spiky.hairf b { display: block; left: 1.15em; top: 0.42em; width: 0.8em; height: 0.8em; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.g-avatar .hair-spiky.hairb i { display: block; left: 2.05em; top: 0.28em; width: 0.8em; height: 0.8em; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.g-avatar .hair-spiky.hairb b { display: block; left: 2.85em; top: 0.45em; width: 0.75em; height: 0.75em; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.g-avatar .hair-curly.hairb i { display: block; left: 0.2em; top: 0.25em; width: 4em; height: 3.4em; border-radius: 50%; }
.g-avatar .hair-curly.hairf i { border-radius: 1.6em 1.6em 0.6em 0.6em; height: 1.15em; }
.g-avatar .hair-long.hairb i { display: block; left: 0.42em; top: 0.68em; width: 3.56em; height: 3.95em; border-radius: 1.4em 1.4em 0.5em 0.5em; }
.g-avatar .hair-ponytail.hairb i { display: block; left: 3.3em; top: 1.15em; width: 0.95em; height: 2.4em; border-radius: 0.5em; }
.g-avatar .hair-pigtails.hairb i { display: block; left: 0.08em; top: 1.55em; width: 0.9em; height: 1.85em; border-radius: 0.45em; }
.g-avatar .hair-pigtails.hairb b { display: block; left: 3.42em; top: 1.55em; width: 0.9em; height: 1.85em; border-radius: 0.45em; }
.g-avatar .hair-bun.hairb i { display: block; left: 1.62em; top: 0.02em; width: 1.16em; height: 1.16em; border-radius: 50%; }
.g-avatar .beard { position: absolute; display: block; background: currentColor; }
.g-avatar .beard-stubble { left: 0; top: 1.55em; width: 3em; height: 1.45em; opacity: 0.3; border-radius: 0 0 0.4em 0.4em; }
.g-avatar .beard-full { left: -0.1em; top: 1.42em; width: 3.2em; height: 1.95em; border-radius: 0.2em 0.2em 1.2em 1.2em; }
.g-avatar .beard-moustache { left: 0.78em; top: 1.56em; width: 1.44em; height: 0.36em; border-radius: 0.3em 0.3em 0.1em 0.1em; }
.g-avatar .beard-goatee { left: 1.1em; top: 2.3em; width: 0.8em; height: 0.8em; border-radius: 0.1em 0.1em 0.45em 0.45em; }
.g-avatar .has-full .mouth { border-color: rgba(255,255,255,0.9); }
.g-avatar .has-full.face-grin .mouth { background: rgba(255,255,255,0.9); }
.g-avatar .has-full .cheek { display: none; }
.g-avatar .pet { position: absolute; left: -0.45em; top: 2.55em; z-index: 3; font-size: 1.45em; line-height: 1; font-style: normal; }
.g-avatar .aura { position: absolute; display: block; left: -0.5em; top: 0.1em; width: 5.4em; height: 5.4em; border-radius: 50%; }
.g-avatar .aura-gold { background: radial-gradient(circle, rgba(255,214,64,0.95) 0%, rgba(255,201,40,0.45) 45%, rgba(255,201,40,0) 70%); }
.g-avatar .aura-ice { background: radial-gradient(circle, rgba(170,230,255,0.95) 0%, rgba(47,155,255,0.45) 45%, rgba(47,155,255,0) 70%); }
.g-avatar .aura-fire { background: radial-gradient(circle, rgba(255,230,120,0.95) 0%, rgba(255,120,40,0.6) 40%, rgba(229,57,53,0.35) 55%, rgba(229,57,53,0) 70%); }
.g-avatar .aura-rainbow { background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,201,40,0.7) 22%, rgba(47,210,122,0.6) 34%, rgba(47,155,255,0.55) 46%, rgba(140,91,255,0.5) 56%, rgba(255,79,139,0.35) 64%, rgba(255,79,139,0) 72%); }
.g-title { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 8px; background: #8C5BFF; color: #FFFFFF; font-size: 12px; line-height: 20px; vertical-align: 2px; }

@media (min-width: 761px) {
  .g-hud { margin: 6px 40px 10px; max-width: 760px; }
  .g-over { align-items: center; }
  .g-sheet { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-float, .g-sheet, .g-level, .g-over { animation: none; }
  .g-bit { display: none; }
}

/* The apps give every button a light hover; the game's own buttons keep their colour. */
body.game .g-job:hover { background: rgba(255,255,255,0.12); }
body.game .g-job.is-done:hover { background: #DDF7EA; }
body.game .g-x:hover, body.game .g-alt:hover { background: rgba(255,255,255,0.14); }
body.game .g-go:hover { background: #17A85B; }
body.game .g-person:hover, body.game .g-thing:hover { background: #FFFFFF; }
body.game .g-thing.on:hover { background: #FFF4D6; }
body.game .g-thing.locked:hover { background: #CFCBEF; }

/* ======================================================== the one bottom bar
   Home, Kitchen, Shop, Kids, More: the same on every page of the house app. */
.mobile-dock { display: none !important; }
body.has-hh-dock { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.hh-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #17133C; box-shadow: 0 -6px 0 rgba(8,6,32,0.35);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}
.hh-dock button {
  min-width: 0; min-height: 58px; padding: 5px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: 16px; background: transparent; color: #CFCBEF;
  font-size: 11px; font-weight: 800; line-height: 1.1; cursor: pointer; box-shadow: none;
}
.hh-dock button span { font-size: 22px; line-height: 24px; }
.hh-dock button:hover { background: rgba(255,255,255,0.06); }
.hh-dock button.active { background: #FFC928; color: #1B1640; box-shadow: 0 4px 0 #D99A00; }
.hh-dock button:active { transform: translateY(3px); }
@media (min-width: 761px) {
  .hh-dock { left: 50%; right: auto; bottom: 16px; width: 520px; transform: translateX(-50%);
             border-radius: 24px; padding: 8px; box-shadow: 0 6px 0 rgba(8,6,32,0.55); }
}
.hh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hh-tile {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px;
  border: 0; border-radius: 16px; background: #FFFFFF; color: #1B1640; text-align: left;
  font: 800 15px/1.2 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  box-shadow: 0 5px 0 rgba(8,6,32,0.45); cursor: pointer;
}
.hh-tile span { font-size: 22px; }
.hh-tile.on { background: #FFF4D6; box-shadow: 0 5px 0 #D99A00; }
body.game .hh-tile:hover { background: #FFFFFF; }
body.game .hh-tile.on:hover { background: #FFF4D6; }
