/* Foxy's Little Christmas Village. Pudgy-style toy-box UI: chunky rounded type, white panels with thick navy outlines
   and a hard drop shadow, snow caps, ice-brick and candy-cane details. Flat colours only. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@500;600;700;800&display=swap');
:root {
  --navy: #1d2f6f; --ink: #1d2f6f; --ink-2: #5a6a9c; --blue: #4a8ff0; --blue-d: #2f6fd6; --sky: #d6ecff; --ice: #eef7ff;
  --pink: #ff9cc0; --pink-l: #ffe1ec; --red: #e5484d; --red-d: #c23238; --green: #2e9c69; --green-l: #dff3e8; --gold: #f5b941; --gold-l: #fff1cf;
  --white: #fff; --line: 3px solid var(--navy); --pop: 0 5px 0 var(--navy); --pop-s: 0 3px 0 var(--navy);
  --head: 'Fredoka', 'Baloo 2', system-ui, sans-serif; --body: 'Nunito', system-ui, sans-serif;
  --sheet: 440px;
  --snow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 0H120V9C116 9 115 15 111 15S106 8 101 9 97 19 92 19 88 10 83 10 79 14 74 14 70 8 65 9 61 17 56 17 52 10 47 10 43 15 38 15 34 9 29 9 25 18 20 18 16 10 11 10 7 14 3 13 1 10 0 9Z' fill='%23fff' stroke='%231d2f6f' stroke-width='2.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28'%3E%3Crect width='56' height='28' fill='%23bfe0ff'/%3E%3Cg fill='%23d9edff' stroke='%23a6d0f7' stroke-width='1.5'%3E%3Crect x='2' y='2' width='24' height='10' rx='3'/%3E%3Crect x='30' y='2' width='24' height='10' rx='3'/%3E%3Crect x='-12' y='16' width='24' height='10' rx='3'/%3E%3Crect x='16' y='16' width='24' height='10' rx='3'/%3E%3Crect x='44' y='16' width='24' height='10' rx='3'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b1f36; color: var(--ink); font: 600 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
#stage, #stage canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
a { color: var(--blue-d); }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---- HUD ---- */
.brand { position: fixed; left: 16px; top: 18px; display: flex; align-items: center; gap: 4px; background: var(--white); border: var(--line); box-shadow: var(--pop); border-radius: 22px; padding: 8px 18px 9px 74px; }
.brand::before { content: ''; position: absolute; left: -4px; right: -4px; top: -11px; height: 18px; background: var(--snow) top / 100% 100% no-repeat; }
.brand img { position: absolute; left: 6px; bottom: -6px; width: 66px; height: 72px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 2px 0 rgba(29,47,111,.25)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-3deg); } }
.brand .t { font: 700 19px/1.05 var(--head); color: var(--navy); }
.brand .t em { font-style: normal; color: var(--red); display: block; font-size: 22px; }
.brand small { display: block; font: 800 10px/1.3 var(--body); color: var(--blue-d); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }

.stats { position: fixed; right: 16px; top: 18px; display: flex; gap: 8px; transition: right .35s ease; }
.stats span { display: flex; align-items: center; gap: 6px; background: var(--white); border: var(--line); box-shadow: var(--pop-s); border-radius: 999px; padding: 4px 12px 4px 5px; font: 600 13px var(--head); color: var(--ink-2); white-space: nowrap; }
.stats span i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--navy); }
.stats span i svg { width: 14px; height: 14px; }
.stats b { color: var(--navy); font-weight: 700; font-size: 15px; }
body.has-sheet .stats { right: calc(var(--sheet) + 30px); }

.nav { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; background: var(--white); border: var(--line); box-shadow: var(--pop); border-radius: 26px; padding: 7px; transition: transform .35s ease; }
.nav::before { content: ''; position: absolute; left: 14px; right: 14px; top: -10px; height: 16px; background: var(--snow) top / 100% 100% no-repeat; pointer-events: none; }
body.has-sheet .nav { transform: translateX(calc(-50% - var(--sheet) / 2 - 12px)); }
.nav button { display: flex; align-items: center; gap: 8px; border: 2.5px solid transparent; background: none; border-radius: 18px; padding: 6px 14px 6px 6px; font: 600 15px var(--head); color: var(--navy); transition: transform .12s; }
.nav button:hover { background: var(--ice); transform: translateY(-2px); }
.nav button.on { background: var(--sky); border-color: var(--navy); }
.nav .ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; border: 2.5px solid var(--navy); background: var(--c); }
.nav .ic svg { width: 20px; height: 20px; }

#tip { position: fixed; pointer-events: none; background: var(--white); color: var(--navy); font: 500 13.5px var(--head); padding: 6px 12px; border: 2.5px solid var(--navy); box-shadow: var(--pop-s); border-radius: 12px; transform: translate(-50%, -140%); opacity: 0; transition: opacity .15s; white-space: nowrap; z-index: 5; }
#tip b { font-weight: 700; }
#toast { position: fixed; left: 50%; top: 18px; display: flex; align-items: center; gap: 8px; transform: translate(-50%, -110px); background: var(--white); color: var(--navy); border: var(--line); box-shadow: var(--pop); padding: 8px 16px 8px 8px; border-radius: 18px; font: 600 15px var(--head); transition: transform .4s cubic-bezier(.2, 1.5, .4, 1); z-index: 20; }
#toast img { width: 34px; height: 34px; }
#toast.show { transform: translate(-50%, 0); }

/* ---- the sheet ---- */
#sheet { position: fixed; top: 22px; right: 16px; bottom: 16px; width: var(--sheet); background: var(--white); border: var(--line); box-shadow: 0 6px 0 var(--navy); border-radius: 28px; transform: translateX(120%); transition: transform .45s cubic-bezier(.2, 1.1, .3, 1); z-index: 10; display: flex; flex-direction: column; }
#sheet::before { content: ''; position: absolute; left: 10px; right: 10px; top: -12px; height: 22px; background: var(--snow) top / 100% 100% no-repeat; z-index: 3; pointer-events: none; }
#sheet.open { transform: none; }
#sheet-close { position: absolute; right: 14px; top: 16px; width: 38px; height: 38px; border: var(--line); box-shadow: var(--pop-s); border-radius: 50%; background: var(--white); font: 700 22px/1 var(--head); color: var(--navy); z-index: 4; display: grid; place-items: center; }
#sheet-close:hover { background: var(--pink-l); }
#sheet-body { overflow-y: auto; padding: 0 24px 34px; flex: 1; overscroll-behavior: contain; border-radius: 25px; }
/* the header band: ice bricks, eyebrow pill and title */
.hd { margin: 0 -24px 16px; padding: 30px 24px 18px; background: var(--bricks); border-bottom: var(--line); position: relative; }
.hd.pink { background: var(--pink-l); } .hd.green { background: var(--green-l); } .hd.gold { background: var(--gold-l); }
.hd .foxy { position: absolute; right: 64px; bottom: -3px; width: 70px; }
.hd:has(.foxy) h2 { padding-right: 132px !important; }
#sheet h2 { font: 700 27px/1.08 var(--head); margin: 8px 0 0; color: var(--navy); padding-right: 72px; }
#sheet h3 { font: 700 21px/1.2 var(--head); margin: 8px 0 10px; color: var(--navy); }
.eyebrow { display: inline-block; font: 600 12px var(--head); letter-spacing: .04em; text-transform: uppercase; color: var(--navy); background: var(--white); border: 2.5px solid var(--navy); border-radius: 999px; padding: 2px 10px; margin: 0; }
.lede { color: var(--ink-2); margin: 0 0 14px; font-weight: 600; }
.meta { color: var(--ink-2); font-size: 13.5px; margin: 8px 0; }
.story { font: 600 16.5px/1.55 var(--body); margin: 4px 0 16px; color: var(--navy); }
.pull { font: 600 20px/1.3 var(--head); color: var(--red); margin: 0 0 10px; }
.center { text-align: center; justify-content: center; }
.hint { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.err { color: var(--red-d); font-size: 14px; font-weight: 800; margin: 0; }
.err:empty { display: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back { border: 0; background: none; padding: 0; color: var(--blue-d); font: 600 14px var(--head); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: var(--line); background: var(--blue); color: var(--white); border-radius: 999px; padding: 10px 20px; font: 600 16px var(--head); text-decoration: none; box-shadow: var(--pop-s); transition: transform .1s, box-shadow .1s; }
.btn:hover { background: var(--blue-d); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--navy); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.red { background: var(--red); } .btn.red:hover { background: var(--red-d); }
.btn.ghost { background: var(--white); color: var(--navy); } .btn.ghost:hover { background: var(--ice); }
.btn.big { width: 100%; padding: 13px 20px; font-size: 18px; }

/* forms */
.form { display: grid; gap: 15px; }
.form label, .find label { display: grid; gap: 6px; font: 600 14px var(--head); color: var(--navy); }
input, textarea { font: 700 15px var(--body); color: var(--navy); background: var(--white); border: var(--line); border-radius: 14px; padding: 9px 12px; width: 100%; }
input::placeholder, textarea::placeholder { color: #9aa6cc; font-weight: 600; }
input:focus, textarea:focus { outline: none; background: var(--ice); box-shadow: 0 0 0 3px var(--sky); }
input[type=file] { padding: 7px; font-size: 13px; }
textarea { resize: vertical; }
.at { position: relative; display: block; }
.at::before { content: '@'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--blue-d); font: 700 15px var(--head); }
.at input { padding-left: 30px; }
.row > input, .row > .at { flex: 1; min-width: 0; width: auto; }
.row > .btn { flex: none; padding: 8px 16px; }
.find .row, .pick-in .row { flex-wrap: nowrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font: 600 14px var(--head); color: var(--navy); margin-bottom: 6px; padding: 0; }
.seg { display: flex; gap: 4px; background: var(--ice); border: var(--line); border-radius: 16px; padding: 4px; }
.seg label { flex: 1; display: block !important; }
.seg input, .gift-o input, .wrap-o input { position: absolute; opacity: 0; width: 1px; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 7px 4px; border-radius: 11px; font: 600 14px var(--head); cursor: pointer; color: var(--ink-2); }
.seg input:checked + span { background: var(--blue); color: var(--white); box-shadow: inset 0 0 0 2.5px var(--navy); }
.seg input:focus-visible + span, .gift-o:has(input:focus-visible), .wrap-o:has(input:focus-visible) { outline: 3px solid var(--pink); }
.pick { display: flex; gap: 14px; align-items: center; }
.pick-in { flex: 1; display: grid; gap: 6px; }

/* a bauble: picture in a gold-capped ball on a hook */
.bauble { position: relative; width: 104px; height: 122px; flex: none; display: grid; align-items: end; justify-items: center; }
.bauble::before { content: ''; position: absolute; top: 0; left: 50%; width: 2.5px; height: 14px; background: var(--navy); }
.bauble .cap { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 26px; height: 14px; background: var(--gold); border: 2.5px solid var(--navy); border-radius: 5px 5px 3px 3px; z-index: 1; }
.bauble .ball { width: 100px; height: 100px; border-radius: 50%; border: var(--line); background: var(--sky); overflow: hidden; display: grid; place-items: center; box-shadow: inset 0 -8px 0 rgba(29,47,111,.12); }
.bauble .ball img { width: 100%; height: 100%; object-fit: cover; }
.bauble .ball span { font: 600 12px var(--head); color: var(--ink-2); text-align: center; padding: 10px; }
.bauble.big { width: 190px; height: 220px; margin: 0 auto; animation: swing 2.8s ease-in-out infinite; transform-origin: 50% 0; }
.bauble.big::before { height: 22px; }
.bauble.big .cap { top: 18px; width: 42px; height: 20px; }
.bauble.big .ball { width: 180px; height: 180px; border-width: 4px; }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.find { margin-top: 22px; padding-top: 18px; border-top: 3px dashed var(--sky); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip-o { display: inline-flex; align-items: center; gap: 6px; border: 2.5px solid var(--navy); background: var(--white); border-radius: 999px; padding: 2px 11px 2px 2px; font: 600 13.5px var(--head); color: var(--navy); }
.chip-o img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--navy); }
.chip-o:hover { background: var(--ice); }

/* ornament card */
.orn-card { display: grid; gap: 6px; padding-top: 4px; }
.orn-card h2 { padding: 0 !important; text-align: center; }
.orn-card h2 a { text-decoration: none; color: var(--navy); }
.wish { font: 600 19px/1.4 var(--head); color: var(--navy); margin: 10px 0; padding: 16px 18px; background: var(--gold-l); border: var(--line); box-shadow: var(--pop-s); border-radius: 18px; text-align: center; }
.wish.mine { background: var(--ice); border-style: dashed; }
.sealed { display: flex; gap: 10px; align-items: center; justify-content: center; background: var(--ice); color: var(--navy); border: var(--line); border-radius: 18px; padding: 14px; margin: 10px 0; font: 600 15px var(--head); }
.sealed svg { width: 22px; height: 22px; flex: none; }
.sealed.big { padding: 22px; font-size: 16px; }

/* doors: little cottages */
.cal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; margin: 6px 0 10px; }
.cal-d { position: relative; border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 3px; transition: transform .15s; }
.cal-d svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 4px 0 var(--navy)); }
.cal-d:hover { transform: translateY(-4px) rotate(-1.5deg); }
.cal-d .t { font: 600 12.5px/1.2 var(--head); color: var(--navy); text-align: center; min-height: 30px; }
.cal-d .day { font: 700 11px var(--head); letter-spacing: .05em; text-transform: uppercase; color: var(--white); background: var(--navy); border-radius: 999px; padding: 1px 8px; }
.cal-d.locked .day { background: var(--ink-2); }
.cal-d.today .day { background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.cal-d.locked svg { filter: drop-shadow(0 4px 0 var(--navy)) saturate(.55) brightness(1.06); }
.cal-d .stamp { position: absolute; right: -2px; top: 26%; width: 34px; height: 34px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--navy); display: grid; place-items: center; transform: rotate(10deg); }
.cal-d .stamp svg { width: 18px; filter: none; }
.stamps { display: flex; align-items: center; gap: 10px; background: var(--ice); border: var(--line); border-radius: 18px; padding: 10px 14px; font: 600 14px var(--head); color: var(--navy); }
.stamps .bar { flex: 1; height: 14px; border: 2.5px solid var(--navy); border-radius: 99px; overflow: hidden; background: var(--white); }
.stamps .bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, var(--white) 8px 16px); }
.door-hero { display: grid; place-items: center; margin: 0 0 12px; }
.door-hero svg { width: 150px; filter: drop-shadow(0 5px 0 var(--navy)); overflow: visible; }
.stamp-big { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--head); color: var(--green); border: 2.5px solid var(--green); border-radius: 10px; padding: 3px 10px; transform: rotate(-4deg); }
.task { background: var(--gold-l); border: var(--line); border-radius: 18px; padding: 12px 15px; margin: 0 0 16px; }
.task b { font: 700 12px var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.task p { margin: 3px 0 0; font-weight: 700; color: var(--navy); }

/* post office */
.tabs { display: flex; gap: 4px; background: var(--ice); border: var(--line); border-radius: 18px; padding: 4px; margin: 0 0 16px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 13px; padding: 8px; font: 600 14.5px var(--head); color: var(--ink-2); }
.tabs button.on { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 2.5px var(--navy); }
.gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift-o { display: grid !important; justify-items: center; gap: 2px !important; padding: 8px 2px 7px; border-radius: 16px; background: var(--white); border: 2.5px solid var(--sky); cursor: pointer; font: 600 12px/1.1 var(--head) !important; text-align: center; color: var(--ink-2) !important; transition: transform .12s; }
.gift-o svg { width: 44px; height: 44px; }
.gift-o:hover { transform: translateY(-2px); }
.gift-o:has(input:checked) { background: var(--sky); border-color: var(--navy); color: var(--navy) !important; box-shadow: var(--pop-s); }
.wraps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wrap-o { display: grid !important; justify-items: center; gap: 4px !important; font: 600 12.5px var(--head) !important; color: var(--ink-2) !important; text-transform: capitalize; cursor: pointer; padding: 6px 4px; border-radius: 16px; border: 2.5px solid var(--sky); }
.wrap-o svg { width: 44px; height: 44px; }
.wrap-o:has(input:checked) { background: var(--sky); border-color: var(--navy); color: var(--navy) !important; box-shadow: var(--pop-s); }

.sent { text-align: center; display: grid; justify-items: center; gap: 4px; padding-top: 4px; }
.sent .stage { position: relative; width: 230px; height: 190px; }
.sent .box { position: absolute; left: 40px; bottom: 0; width: 150px; animation: drop .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.sent .box svg { width: 100%; overflow: visible; }
.sent .foxy { position: absolute; right: -14px; bottom: -4px; width: 78px; animation: hop .6s ease-in-out .5s 3 both; }
.sent .tag { position: absolute; left: 0; top: 20px; transform: rotate(-12deg); background: var(--white); border: 2.5px solid var(--navy); border-radius: 8px 14px 14px 8px; padding: 3px 12px; font: 700 14px var(--head); color: var(--red); box-shadow: var(--pop-s); animation: pop .5s .6s both cubic-bezier(.2, 1.6, .4, 1); }
.sent .spark-note { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-l); border: 2.5px solid var(--navy); border-radius: 999px; padding: 4px 12px; font: 600 14px var(--head); }
.sent .spark-note svg { width: 18px; }
@keyframes drop { from { transform: translateY(-160px) rotate(-14deg); opacity: 0; } 30% { opacity: 1; } }
@keyframes hop { 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes pop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.parcels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; margin: 10px 0; }
.parcel-b { border: 0; background: none; padding: 0; display: grid; justify-items: center; gap: 4px; }
.parcel-b svg { width: 84px; overflow: visible; transition: transform .2s; }
.parcel-b:hover svg { transform: rotate(-6deg) scale(1.06); }
.parcel-b.wiggle svg { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(8deg); } 75% { transform: rotate(-8deg); } }
.parcel-b .lab { font: 600 12.5px var(--head); color: var(--navy); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parcel-b.opened .lab { color: var(--ink-2); }
/* the postcard that comes out of an opened gift */
.postcard { position: relative; background: var(--white); border-radius: 16px; padding: 18px 18px 18px; margin-top: 8px; text-align: left; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
  border: 8px solid transparent; background: linear-gradient(var(--white), var(--white)) padding-box, repeating-linear-gradient(-45deg, var(--red) 0 12px, var(--white) 12px 22px, var(--blue) 22px 34px, var(--white) 34px 44px) border-box; box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy); }
.postcard .pc-top { display: flex; gap: 12px; align-items: center; }
.postcard .pc-top svg { width: 64px; height: 64px; flex: none; }
.postcard .stampbox { position: absolute; right: 10px; top: 10px; width: 46px; height: 54px; border: 2.5px dashed var(--navy); border-radius: 6px; display: grid; place-items: center; background: var(--pink-l); transform: rotate(4deg); }
.postcard .stampbox img { width: 38px; }
.postcard .from { font: 600 14px var(--head); color: var(--ink-2); margin: 0; padding-right: 50px; }
.postcard .what { font: 700 18px var(--head); color: var(--navy); margin: 0; }
.postcard .note { font: 600 18px/1.45 var(--head); color: var(--navy); margin: 12px 0 0; padding-top: 10px; border-top: 2.5px dashed var(--sky); }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 6px 10px 6px 6px; border: 2.5px solid var(--sky); border-radius: 14px; font-size: 13.5px; }
.feed li svg { width: 34px; flex: none; overflow: visible; }
.feed b { color: var(--navy); font-family: var(--head); font-weight: 600; }
.feed time { margin-left: auto; color: var(--ink-2); font-size: 12px; white-space: nowrap; }

/* quiz */
.prog { height: 16px; background: var(--white); border: 2.5px solid var(--navy); border-radius: 99px; overflow: hidden; }
.prog span { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--red) 0 8px, var(--white) 8px 16px); transition: width .3s; border-right: 2.5px solid var(--navy); }
.answers { display: grid; gap: 10px; }
.answers.inline { grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.ans { text-align: left; border: var(--line); background: var(--white); box-shadow: var(--pop-s); border-radius: 18px; padding: 12px 16px; font: 600 15.5px var(--head); color: var(--navy); transition: transform .1s; }
.answers.inline .ans { text-align: center; font-size: 24px; }
.ans:hover { background: var(--sky); transform: translateY(-2px); }
.ans:active { transform: translateY(2px); box-shadow: none; }
.ans.right { background: var(--green); color: var(--white); }
.ans.wrong { background: var(--red); color: var(--white); }
.result-gift { display: grid; place-items: center; margin: 2px 0 8px; }
.result-gift svg { width: 120px; overflow: visible; filter: drop-shadow(0 4px 0 var(--navy)); }
.bars { display: grid; gap: 6px; margin: 10px 0; }
.bar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 8px; align-items: center; font: 600 13px var(--head); color: var(--ink-2); }
.bar .b { height: 14px; background: var(--white); border: 2.5px solid var(--navy); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sky); }
.bar.me { color: var(--navy); }
.bar.me i { background: repeating-linear-gradient(-45deg, var(--red) 0 7px, #ff7a7f 7px 14px); }
.bar .p { text-align: right; }

.nojs { position: fixed; inset: 0; display: grid; place-items: center; color: var(--white); font: 600 18px var(--head); }

/* ---- phones: bottom sheet, compact HUD ---- */
@media (max-width: 760px) {
  :root { --sheet: 100vw; }
  .brand { left: 10px; top: 14px; padding: 6px 12px 7px 58px; border-radius: 18px; }
  .brand img { width: 52px; height: 58px; }
  .brand .t { font-size: 15px; } .brand .t em { font-size: 17px; }
  .stats { top: auto; right: auto; left: 10px; top: 82px; flex-wrap: wrap; gap: 6px; }
  .stats span { font-size: 12px; padding: 2px 9px 2px 3px; } .stats span i { width: 20px; height: 20px; }
  #countdown { display: none !important; }
  body.has-sheet .stats { right: auto; }
  .nav { width: calc(100% - 20px); justify-content: space-between; bottom: max(12px, env(safe-area-inset-bottom)); }
  body.has-sheet .nav { transform: translateX(-50%) translateY(160%); }
  .nav button { flex-direction: column; gap: 2px; padding: 4px 2px; font-size: 12px; flex: 1; }
  #sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 80vh; transform: translateY(115%); }
  #sheet.open.peek { transform: translateY(calc(100% - 120px)); }
  #sheet-body { padding: 0 16px 30px; }
  .hd { margin: 0 -16px 14px; padding: 26px 16px 14px; }
  #sheet h2 { font-size: 23px; }
}
#countdown small{font:600 13px var(--head);color:var(--ink-2)}
