:root {
  --wine: #7d1d1d; --wine-2: #5b1414; --gold: #c9a15a; --gold-2: #f2c66b; --cream: #efe4cf; --card: #fffdf7;
  --ink: #3a2a20; --ink-2: #6b5646; --rule: #e6d6b8; --ok: #2e8b57; --warn: #c2410c;
  --shadow: 0 6px 0 rgba(58, 42, 32, .18), 0 12px 28px rgba(58, 42, 32, .16);
  --radius: 22px; --serif: "DM Serif Display", Georgia, serif; --sans: "Nunito", system-ui, -apple-system, Segoe UI, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2e1119; color: var(--ink); font-family: var(--sans); }
body.day { background: #F4E9D6; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
#app { position: fixed; inset: 0; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
#map.dragging { cursor: grabbing; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#base { display: block; user-select: none; pointer-events: none; }
#layer { position: absolute; inset: 0; }
.mk { position: absolute; transform: translate(-50%, -100%) scale(var(--inv, 1)); transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; }
.mk .lbl { margin-top: -2px; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 2px solid var(--ink); font-weight: 800; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.mk.venue { cursor: pointer; }
.mk.venue .art { position: relative; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); transition: transform .15s; }
.mk.venue:active .art { transform: scale(.94); }
.mk.venue.claimable .art::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px dashed var(--gold-2); animation: spin 8s linear infinite; }
.mk.venue.claimable .lbl { background: var(--gold-2); }
.mk .halo { position: absolute; left: 50%; top: 55%; width: 180px; height: 180px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(242, 198, 107, .75) 0%, rgba(242, 198, 107, .25) 40%, rgba(242, 198, 107, 0) 70%); animation: breathe 3.2s ease-in-out infinite; }
.mk .halo.bright { width: 260px; height: 260px; }
.mk .halo.blazing { width: 360px; height: 360px; background: radial-gradient(circle, rgba(255, 210, 122, .95) 0%, rgba(255, 140, 90, .35) 40%, rgba(255, 140, 90, 0) 70%); }
.mk.landmark { pointer-events: none; opacity: .95; }
.mk.landmark .lbl { background: transparent; border: 0; box-shadow: none; font-family: var(--serif); font-weight: 400; color: var(--wine); font-size: 13px; text-shadow: 0 0 4px var(--cream), 0 0 4px var(--cream); }
body.night .mk.landmark .lbl { color: #E9CF9B; text-shadow: 0 0 4px #2e1119, 0 0 4px #2e1119; }
.mk.drop { cursor: pointer; z-index: 5; }
.mk.drop .bubble { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; background: var(--wine); color: #fff; border: 3px solid var(--ink); border-radius: 999px; box-shadow: var(--shadow); animation: bob 1.8s ease-in-out infinite; }
.mk.drop .bubble b { font-size: 15px; } .mk.drop .bubble small { display: block; font-size: 11px; opacity: .85; }
.mk.drop.soon .bubble { background: var(--ink-2); animation: none; }
.mk.drop .tail { width: 0; height: 0; border: 9px solid transparent; border-top-color: var(--ink); margin-top: -1px; }
.mk.danfo { pointer-events: none; transform: translate(-50%, -50%) scale(var(--inv, 1)); transition: left 6s linear, top 6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- chrome ---------- */
#top { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-t)) 12px 8px; display: flex; align-items: center; gap: 8px; pointer-events: none; z-index: 20; }
#top > * { pointer-events: auto; }
.brand { flex: none; background: var(--wine); color: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 5px 12px 6px; box-shadow: var(--shadow); line-height: 1; }
.brand .logo { font-family: var(--serif); font-size: 22px; letter-spacing: .4px; display: block; }
.brand .by { font-size: 8px; letter-spacing: 1.4px; text-transform: uppercase; opacity: .85; }
.me-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: var(--card); box-shadow: var(--shadow); overflow: hidden; padding: 0; }
.me-btn svg { width: 100%; height: 100%; display: block; }

#lightBar { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 14px; border-radius: 999px; border: 3px solid var(--ink); background: var(--card); font-weight: 900; box-shadow: var(--shadow); font-size: 14px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.pill .ring { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--ink-2); flex: none; }
.pill .till { font-weight: 700; font-size: 12px; color: var(--ink-2); }
.pill.on { background: linear-gradient(180deg, #ffd27a, var(--gold)); }
.pill .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,139,87,.25); animation: pulse 1.6s infinite; }
.pill button { padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(46,139,87,0); } }

#outsideNow { display: none; }
.bph { display: block; width: auto; aspect-ratio: 3 / 5; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); background: #f3f2ec; }
.item .bt.ph { width: auto; height: auto; background: none; border: 0; }
.item.bag { align-items: flex-start; }
.reveal { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 8px; }
.reveal .bph { border-width: 3px; border-radius: 18px; box-shadow: var(--shadow); }
.reveal .wn { font-family: var(--serif); font-size: 24px; color: var(--wine); text-align: center; line-height: 1.1; }
.reveal .wn small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 800; color: var(--ink-2); margin-top: 4px; }
.wine .bph { margin: 0 auto 4px; }
.item.lit { background: #fff3d6; }
.bt.av { position: relative; }
.bt.av i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--card); box-shadow: 0 0 0 3px rgba(46,139,87,.25), 0 0 12px rgba(242,198,107,.9); }
#dock b.lit { background: var(--ok); color: #fff; }
.qrbox { width: min(78vw, 300px); margin: 6px auto 0; padding: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; }
.qrbox svg { display: block; width: 100%; height: auto; }
.qrtxt { text-align: center; font-family: var(--serif); font-size: 30px; letter-spacing: 8px; color: var(--wine); margin: 6px 0 2px; }

#ticketBar { position: absolute; left: 14px; right: 14px; bottom: calc(96px + var(--safe-b)); z-index: 21; }

#dock { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 35; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: var(--card); border: 3px solid var(--ink); border-radius: 26px; padding: 8px; box-shadow: var(--shadow); }
#dock button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 18px; font-weight: 800; font-size: 12px; }
#dock button .ic svg { width: 26px; height: 26px; display: block; }
#dock button.primary { background: var(--wine); color: #fff; }
#dock button.active:not(.primary) { background: var(--cream); }
#dock b { position: absolute; top: 2px; right: 14%; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold-2); border: 2px solid var(--ink); font-size: 11px; line-height: 16px; }
#dock b:empty { display: none; }
.legal { position: absolute; left: 0; right: 0; bottom: calc(2px + var(--safe-b)); text-align: center; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.55); z-index: 1; pointer-events: none; }
body.day .legal { color: rgba(58,42,32,.55); }

/* ---------- sheet ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 3px solid var(--ink); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25);
  max-height: 82vh; max-height: 82dvh; transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.9,.3,1.1); display: flex; flex-direction: column; padding-bottom: calc(96px + var(--safe-b)); }
.sheet.open { transform: translateY(0); }
.sheet .grab { width: 54px; height: 6px; border-radius: 3px; background: var(--rule); margin: 10px auto 2px; flex: none; }
#sheetBody { overflow-y: auto; padding: 6px 18px 18px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 6px 0 4px; color: var(--wine); }
h3 { font-size: 15px; font-weight: 900; margin: 18px 0 8px; letter-spacing: .3px; }
p { margin: 6px 0; line-height: 1.45; }
.muted { color: var(--ink-2); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.item .bt { flex: none; width: 34px; display: flex; justify-content: center; }
.item h4 { margin: 0; font-size: 16px; font-weight: 900; }
.item .sub { font-size: 13px; color: var(--ink-2); }
.item .note { font-family: var(--serif); font-size: 16px; color: var(--wine); margin-top: 2px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; border: 2px solid var(--ink); background: var(--cream); }
.tag.gold { background: var(--gold-2); } .tag.wine { background: var(--wine); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 3px solid var(--ink); background: var(--wine); color: #fff; font-weight: 900; font-size: 16px; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.gold { background: var(--gold-2); color: var(--ink); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 13px; box-shadow: 0 3px 0 var(--ink); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { color: var(--wine); font-weight: 800; text-decoration: underline; padding: 4px; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-weight: 800; font-size: 13px; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 3px solid var(--ink); background: #fff; font-size: 17px; }
.field textarea { min-height: 70px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 13px; border-radius: 999px; border: 3px solid var(--ink); background: #fff; font-weight: 800; font-size: 14px; }
.chip.on { background: var(--gold-2); }
.chip small { display: block; font-weight: 600; font-size: 11px; color: var(--ink-2); }
.wines { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.wine { border: 3px solid var(--ink); border-radius: 18px; background: #fff; padding: 10px 6px 8px; text-align: center; font-weight: 900; font-size: 13px; }
.wine.on { background: var(--gold-2); box-shadow: 0 4px 0 var(--ink); }
.wine small { display: block; font-weight: 600; color: var(--ink-2); font-size: 11px; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 800; margin: 10px 0; }
.toggle input { width: 22px; height: 22px; accent-color: var(--wine); }
.empty { text-align: center; padding: 18px 8px; color: var(--ink-2); }
.empty .art { display: flex; justify-content: center; margin-bottom: 6px; }

/* ---------- modal ---------- */
.modal { position: absolute; inset: 0; z-index: 40; background: rgba(30, 10, 14, .55); display: none; align-items: flex-end; justify-content: center; padding: 12px; }
.modal.open { display: flex; }
.modal .card { width: 100%; max-width: 460px; max-height: 92vh; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 3px solid var(--ink); border-radius: 28px; padding: 20px 18px calc(18px + var(--safe-b)); box-shadow: var(--shadow); animation: up .25s cubic-bezier(.2,.9,.3,1.15); }
@media (min-width: 700px) { .modal { align-items: center; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.close { float: right; margin: 0 0 8px 12px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); font-weight: 900; font-size: 18px; line-height: 1; background: #fff; }
.code { font-family: var(--serif); font-size: 64px; letter-spacing: 10px; color: var(--wine); text-align: center; margin: 6px 0; }
.av-builder { display: grid; gap: 10px; }
.av-preview { display: flex; justify-content: center; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.opts button { flex: none; padding: 7px 11px; border-radius: 12px; border: 3px solid var(--ink); background: #fff; font-weight: 800; font-size: 13px; }
.opts button.on { background: var(--gold-2); }
.swatch { width: 34px; height: 34px; border-radius: 50%; padding: 0 !important; }

/* ---------- ticket card ---------- */
.ticket { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.ticket .beacon { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); flex: none; animation: pulseB 1.2s infinite; }
@keyframes pulseB { 50% { transform: scale(1.12); } }

/* ---------- glow ---------- */
#glow { position: fixed; inset: 0; z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 30px; }
#glow.open { display: flex; animation: glowPulse 1s ease-in-out infinite; }
#glow .name { font-family: var(--serif); font-size: 64px; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
#glow .hint { margin-top: 16px; font-weight: 900; font-size: 18px; background: rgba(0,0,0,.25); padding: 8px 14px; border-radius: 999px; }
@keyframes glowPulse { 50% { filter: brightness(1.35); } }

#toast { position: absolute; left: 50%; top: calc(16px + var(--safe-t)); transform: translate(-50%, -200%); opacity: 0; pointer-events: none; z-index: 70; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; transition: transform .25s, opacity .2s; max-width: 90vw; text-align: center; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.stamp { border: 3px dashed var(--wine); border-radius: 14px; padding: 6px; text-align: center; font-size: 11px; font-weight: 800; transform: rotate(-3deg); background: #fff; }
.stamp:nth-child(2n) { transform: rotate(2deg); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

#world.far .mk.landmark .lbl, #world.far .mk.venue .lbl { display: none; }
#world.far .mk.landmark { opacity: .8; }

.mk.district { pointer-events: none; transform: translate(-50%, -50%) scale(var(--inv, 1)); }
.mk.district .lbl { background: none; border: 0; box-shadow: none; font-family: var(--serif); font-weight: 400; letter-spacing: 3px; font-size: 15px; color: rgba(125, 29, 29, .75); text-shadow: 0 0 3px var(--cream), 0 0 6px var(--cream); }
body.night .mk.district .lbl { color: rgba(233, 207, 155, .7); text-shadow: 0 0 3px #2e1119, 0 0 6px #2e1119; }

/* ---------- your bottles ---------- */
.bags { display: grid; gap: 12px; }
.bagcard { display: grid; grid-template-columns: 80px 1fr; gap: 14px; padding: 12px; border: 3px solid var(--ink); border-radius: 20px; background: #fff; }
.bagcard .pic .bph { height: 132px; width: 80px; border-radius: 12px; }
.bagcard .info { min-width: 0; display: flex; flex-direction: column; }
.bagcard .from { font-size: 13px; color: var(--ink-2); }
.bagcard .from b { color: var(--ink); }
.bagcard .wname { font-family: var(--serif); font-size: 21px; color: var(--wine); line-height: 1.1; margin-top: 2px; }
.bagcard .meta { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 3px; }
.bagcard .q { font-family: var(--serif); font-size: 15px; color: var(--ink); margin-top: 6px; line-height: 1.25; }
.bagcard .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 10px; }
.bagcard .acts.one { display: flex; }
.bagcard .acts .btn { padding: 9px 6px; }
.bagcard .links { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.bagcard .links .link { padding: 2px 0; font-size: 13px; }

/* ---------- send ---------- */
.sec { margin-top: 16px; }
.sec .lab { font-size: 12px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.sec .lab small { text-transform: none; letter-spacing: 0; font-weight: 700; }
.tofield { display: flex; gap: 8px; align-items: center; }
.tofield input { flex: 1; min-width: 0; padding: 13px 14px; border-radius: 14px; border: 3px solid var(--ink); background: #fff; font-size: 17px; }
.outrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.outrow > span { flex: none; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.ochip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 2px solid var(--ink); background: #fff3d6; font-weight: 900; font-size: 13px; }
.ochip .av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: block; }
.ochip .av svg { width: 100%; height: 100%; display: block; }
.to-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 18px; background: #fff3d6; }
.to-card .av { position: relative; width: 48px; height: 48px; flex: none; }
.to-card .av i { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); border: 2px solid #fff3d6; }
.to-card b { display: block; font-size: 16px; } .to-card small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; }
.wpick { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.wcard { position: relative; flex: none; width: 100px; padding: 0 0 8px; border: 3px solid var(--rule); border-radius: 18px; background: #fff; text-align: center; overflow: hidden; }
.wcard .pic { display: block; } .wcard .bph { width: 100%; height: auto; border: 0; border-radius: 0; aspect-ratio: 3 / 4; object-position: 50% 45%; }
.wcard b { display: block; font-size: 14px; margin-top: 6px; } .wcard small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.wcard.on { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); background: #fff3d6; }
.wcard.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--wine); color: #fff; font-weight: 900; font-size: 14px; line-height: 24px; border: 2px solid #fff; }
.bandlist { display: grid; gap: 8px; }
.bandrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 3px solid var(--rule); border-radius: 16px; background: #fff; text-align: left; }
.bandrow b { display: block; font-size: 15px; } .bandrow small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; }
.bandrow .pr { font-weight: 900; font-size: 15px; }
.bandrow .rd { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ink-2); }
.bandrow.on { border-color: var(--ink); background: #fff3d6; }
.bandrow.on .rd { border-color: var(--wine); background: radial-gradient(circle, var(--wine) 0 45%, transparent 50%); }
.notebox { width: 100%; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--rule); background: #fff; font-size: 16px; resize: vertical; }
.notebox:focus, .tofield input:focus { outline: none; border-color: var(--ink); }
.paybar { position: sticky; bottom: calc(-18px - var(--safe-b)); margin: 14px -18px calc(-18px - var(--safe-b)); padding: 12px 18px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(255,253,247,0), var(--card) 18px); }
.paybar .fine { font-size: 11px; color: var(--ink-2); margin: 6px 0 0; text-align: center; }
.paybar #msg { margin: 6px 0 0; text-align: center; } .paybar #msg:empty { display: none; }
@media (max-width: 380px) { .pill .till { display: none; } .pill { padding: 0 12px; } }

/* outside: a halo on your own avatar */
.me-btn { position: relative; overflow: visible; }
.me-btn svg { border-radius: 50%; overflow: hidden; }
.me-btn.outside { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 6px var(--ink), 0 0 22px 8px rgba(255, 200, 90, .85); animation: halo 2.6s ease-in-out infinite; }
.me-btn.outside::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid var(--card); }
@keyframes halo { 50% { box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 6px var(--ink), 0 0 34px 14px rgba(255, 200, 90, .55); } }
.outbox { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.outbox.on { background: #fff3d6; }
.outbox b { display: block; font-size: 15px; } .outbox small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; line-height: 1.3; }
.outbox .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,139,87,.25); }
/* whole bottle in the wine picker, never cropped */
.wcard { width: 92px; }
.wcard .bph { aspect-ratio: 3 / 5; object-fit: contain; object-position: 50% 50%; }
.outnote { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: #fff3d6; border: 2px solid var(--ink); font-size: 14px; line-height: 1.4; }
.outnote b { display: block; font-size: 15px; }
.meav { position: relative; width: 96px; height: 96px; border-radius: 50%; flex: none; }
.meav svg { border-radius: 50%; display: block; }
.meav.outside { box-shadow: 0 0 0 4px var(--gold-2), 0 0 0 7px var(--ink), 0 0 26px 10px rgba(255, 200, 90, .8); }
.meav.outside::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); border: 3px solid var(--card); }
.lvl { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--wine); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .3px; border: 2px solid var(--ink); }
.lvl.sm { margin: 0 0 0 4px; padding: 1px 7px; font-size: 10px; vertical-align: 2px; }
.status { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.status .n { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--wine); min-width: 44px; text-align: center; }
.status b { display: block; font-size: 15px; } .status small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; margin-top: 4px; }
.status small b { display: inline; font-size: 12px; color: var(--ink); }
.status .bar { height: 8px; border-radius: 4px; background: var(--rule); margin-top: 8px; overflow: hidden; }
.status .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--wine)); border-radius: 4px; }

/* ---------- send: number or link ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; margin-bottom: 10px; }
.seg button { padding: 10px 6px; border-radius: 11px; font-weight: 900; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--wine); color: #fff; }
.hint { font-size: 12px; color: var(--ink-2); font-weight: 700; margin: 6px 2px 0; }

/* ---------- share the sealed card ---------- */
.sealcard { width: 70%; max-width: 260px; margin: 8px auto 4px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.18)); transform: rotate(-4deg); }
.sealcard svg { width: 100%; height: auto; display: block; }
.sharegrid { display: grid; gap: 10px; margin: 14px 0 6px; }
.snapwrap { display: flex; justify-content: center; min-height: 44px; }

/* ---------- opening a bottle link ---------- */
.gift { position: absolute; inset: 0; z-index: 38; display: none; flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(120% 80% at 50% 38%, #a3302c 0%, #7d1d1d 50%, #4e1013 100%); color: #FFF6E6; padding: calc(18px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
.gift.show { display: flex; }
.gift .gtop { font-family: var(--sans); font-weight: 900; letter-spacing: 6px; font-size: 13px; color: #E9CF9B; }
.gift .gmsg { text-align: center; margin-top: 7vh; transition: opacity .4s, transform .4s; }
.gift .gmsg h2 { color: #FFF6E6; font-size: 30px; margin: 0; } .gift .gmsg p { color: #F2C66B; font-weight: 800; margin: 8px 0 0; }
.gift .gmsg.gone { opacity: 0; transform: translateY(-10px); }
.gstage { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; perspective: 900px; min-height: 0; }
.genv { position: relative; width: min(82vw, 360px); aspect-ratio: 400 / 320; margin-top: 10vh; animation: hover 3.2s ease-in-out infinite; }
.genv > svg, .gseal > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.genv .e-back { z-index: 1; } .genv .e-front { z-index: 3; pointer-events: none; }
.genv .e-flap { z-index: 4; transform-origin: 50% 31.25%; pointer-events: none; }
.gpocket { position: absolute; inset: 0; z-index: 2; clip-path: inset(-300% 6% 6.5% 6%); pointer-events: none; }
.gbottle { position: absolute; left: 33%; width: 34%; top: 34%; aspect-ratio: 3 / 5; height: auto; border-radius: 12px; border: 3px solid var(--ink); background: #f3f2ec; object-fit: cover; }
.gseal { position: absolute; inset: 0; z-index: 5; background: none; border: 0; padding: 0; pointer-events: none; }
.genv:not(.open) { cursor: pointer; }
.genv:not(.open) .gseal { animation: sealpulse 1.6s ease-in-out infinite; }
.genv.open { animation: none; }
.genv.open .e-seal.l { animation: sealL .55s ease-in forwards; } .genv.open .e-seal.r { animation: sealR .55s ease-in forwards; }
.genv.open .e-flap { animation: flap .7s .35s cubic-bezier(.4,.1,.3,1) forwards; }
.genv.open .gbottle { animation: rise 1s .95s cubic-bezier(.2,.9,.25,1.05) forwards; box-shadow: 0 0 0 0 rgba(255,210,122,0); }
.genv.opened .e-flap { transform: rotateX(180deg); z-index: 1; }
@keyframes hover { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
@keyframes sealpulse { 50% { transform: scale(1.04); } }
@keyframes sealL { to { transform: translate(-14%, 30%) rotate(-28deg); opacity: 0; } }
@keyframes sealR { to { transform: translate(14%, 30%) rotate(28deg); opacity: 0; } }
@keyframes flap { 0% { transform: rotateX(0); z-index: 4; } 49% { z-index: 4; } 50% { transform: rotateX(90deg); z-index: 1; } 100% { transform: rotateX(180deg); z-index: 1; } }
@keyframes rise { to { transform: translateY(-40%); box-shadow: 0 0 40px 10px rgba(255,210,122,.55); } }
.gcard { width: 100%; max-width: 460px; background: var(--card); color: var(--ink); border: 3px solid var(--ink); border-radius: 26px; padding: 18px; box-shadow: var(--shadow);
  transform: translateY(40px); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.3,1.1), opacity .3s; }
.gcard.up, .genv.empty ~ .gcard, .gift .gstage + .gcard:not([hidden]) { transform: none; opacity: 1; }
.gcard .wn { font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-2); }
.gcard h2 { margin: 4px 0 2px; font-size: 26px; } .gcard p { margin: 4px 0; }
.gcard .q { font-family: var(--serif); font-size: 19px; color: var(--wine); } .gcard .for { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.gcard .btn { margin-top: 10px; } .gcard .fine { font-size: 12px; color: var(--ink-2); text-align: center; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .genv, .genv * { animation-duration: .01s !important; animation-delay: 0s !important; } }
.gift .gcard { position: relative; z-index: 6; }
.gift.compact .gtop { display: none; }
.gift.compact .genv { width: min(46vw, 190px); margin-top: 7vh; transition: width .35s, margin .35s; }
.gift.compact .gcard h2 { font-size: 22px; }

/* Welcome: a bottle between two friends */
.hero { position: relative; height: 214px; margin: 34px 0 18px; }
.hero .panel { position: absolute; left: 12%; right: 12%; top: 0; bottom: 18px; border-radius: 26px; background: #F4E6CF; overflow: hidden; display: flex; justify-content: center; }
.hero .panel img { height: 104%; margin-bottom: -2%; align-self: flex-end; mix-blend-mode: multiply; filter: brightness(1.06) contrast(1.04); }
.hero .a { position: absolute; bottom: 0; line-height: 0; border-radius: 50%; box-shadow: 0 6px 0 rgba(58,42,32,.18); }
.hero .a.left { left: 0; transform: rotate(-6deg); }
.hero .a.right { right: 0; transform: rotate(6deg); }
.prizepic { display: inline-flex; align-items: center; justify-content: center; aspect-ratio: 3 / 5; background: #F4E6CF; border-radius: 14px; }
.welcome { text-align: center; }
/* The real bottle stands in the panel and rises above it. The PNG's backdrop is transparent (shadow kept soft), so it works in every browser. */
.hero .popbottle { position: absolute; left: 50%; bottom: 14px; height: 250px; transform: translateX(-50%); pointer-events: none; }
.notyou { text-align: center; color: var(--muted, #7a6656); font-size: 14px; margin: 16px 0 0; }

/* ---------- laptops and tablets: the map fills the screen; the game sits in a phone-width column ---------- */
@media (min-width: 700px) {
  #dock { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
  #ticketBar { left: 50%; right: auto; width: 460px; transform: translateX(-50%); }
  .sheet { left: 50%; right: auto; width: 500px; transform: translate(-50%, 105%); }
  .sheet.open { transform: translate(-50%, 0); }
}
