:root {
  --wall: #e6eeec;
  --paper: #f6faf9;
  --ink: #0e2230;
  --ink-2: #44606c;
  --tide: #1b5a6b;
  --deep: #0b2a3a;
  --glass: #5fb3a8;
  --glass-soft: #cfe6e2;
  --brass: #b8934a;
  --coral: #ee8a78;
  --line: rgba(14, 34, 48, .14);
  --radius: 14px;
  --serif: 'Bodoni Moda', 'Didot', Georgia, serif;
  --sans: 'Figtree', 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 { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); line-height: 1.45; font-size: 16px;
  background: var(--wall);
  background-image: radial-gradient(1200px 500px at 50% -10%, #f4faf8 0, transparent 70%), repeating-linear-gradient(90deg, rgba(14,34,48,.018) 0 2px, transparent 2px 7px);
  min-height: 100vh; min-height: 100dvh;
}
body.noscroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tide); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .center { text-align: center; }
.stack { display: grid; gap: 12px; } .stack.lg { gap: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ── shell ── */
.app { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 14px) 16px calc(92px + var(--safe-b)); }
.studio .app, .app.wide { max-width: 980px; }
.topbar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.brand { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.brand small { font-family: var(--sans); font-weight: 500; font-size: .78rem; color: var(--ink-2); margin-left: 8px; letter-spacing: 0; }
.icon-btn { background: none; border: 0; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink-2); font-size: 1.1rem; min-width: 40px; min-height: 40px; }
.icon-btn:hover { background: rgba(14,34,48,.07); }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: rgba(246,250,249,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.nav-inner { display: flex; width: 100%; max-width: 520px; } .studio .nav-inner { max-width: 640px; }
.nav button { flex: 1; background: none; border: 0; padding: 9px 2px 8px; display: grid; gap: 2px; justify-items: center; font-size: .74rem; color: var(--ink-2); cursor: pointer; position: relative; }
.nav button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav button[aria-current="page"] { color: var(--tide); font-weight: 700; }
.nav button[aria-current="page"]::before { content: ''; position: absolute; top: -1px; width: 30px; height: 3px; background: var(--tide); border-radius: 0 0 3px 3px; }
.badge-dot { position: absolute; top: 6px; margin-left: 20px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--coral); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }

/* ── cards & controls ── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.flat { background: transparent; border-style: dashed; }
.plaque { background: var(--paper); border: 1px solid var(--line); border-radius: 3px; box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); padding: 18px 20px; }
.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; background: var(--ink); color: #fff; min-height: 46px; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--tide); } .btn.primary:hover { background: #164d5c; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: #b44a3e; } .btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn.big { min-height: 96px; font-size: 1.15rem; border-radius: 16px; display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; }
.btn.big span { font-weight: 500; font-size: .82rem; opacity: .85; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--tide); font-weight: 700; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
label.field { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
label.field > span.hint { font-weight: 400; color: var(--ink-2); font-size: .8rem; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 46px; font-weight: 400;
}
input:focus, select:focus, textarea:focus { border-color: var(--tide); outline: none; box-shadow: 0 0 0 3px rgba(27,90,107,.18); }
textarea { resize: vertical; min-height: 80px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(14,34,48,.07); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 9px 8px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(14,34,48,.14); }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: .88rem; cursor: pointer; font-weight: 600; }
.chip.on { background: var(--tide); color: #fff; border-color: var(--tide); }
.chip.del { border-color: #a63a2e; color: #a63a2e; background: #fbeeec; }
.ico-x { display: inline-flex; width: .8em; height: .8em; } .ico-x svg { width: 100%; height: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: var(--glass-soft); color: var(--deep); }
.tag.gold { background: #efe0b8; color: #6b4f12; } .tag.coral { background: #fbd8d1; color: #7a2c20; } .tag.ink { background: var(--ink); color: #fff; }
.err { color: #a63a2e; font-weight: 600; font-size: .9rem; }
.bar { height: 10px; border-radius: 6px; background: rgba(14,34,48,.1); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--glass), var(--tide)); border-radius: 6px; transition: width .5s; }
.bar.pity > i { background: linear-gradient(90deg, #e6c473, var(--brass)); }
.list { display: grid; }
.list > .item { display: flex; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }
.big-num { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; }

/* ── home ── */
.coin-card { background: var(--deep); color: #eaf5f3; border-radius: 18px; padding: 18px; display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; }
.coin-card::after { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 100%; background: radial-gradient(closest-side, rgba(95,179,168,.35), transparent); }
.coin-card .big-num { font-size: 3.2rem; color: #fff; }
.coin-card .btn { background: radial-gradient(circle at 35% 30%, #f6e2a0, #d2a84c 55%, #b8934a); color: #3a2807; box-shadow: inset 0 0 0 2px rgba(122,90,20,.35), 0 4px 10px rgba(0,0,0,.3); position: relative; z-index: 1; }
.coin-glyph { font-size: 2.6rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .t { stroke: rgba(14,34,48,.1); } .ring .v { stroke: var(--tide); transition: stroke-dashoffset .6s; } .ring.done .v { stroke: var(--brass); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .c b { font-family: var(--serif); font-size: 1.5rem; }
.week-dots { display: flex; gap: 6px; }
.week-dots i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 700; background: rgba(14,34,48,.08); color: var(--ink-2); }
.week-dots i.on { background: var(--tide); color: #fff; } .week-dots i.today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--tide); }
.streaks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.streaks b { font-family: var(--serif); font-size: 1.7rem; display: block; line-height: 1; }
.notice { display: flex; gap: 12px; align-items: center; background: #fbf1d8; border: 1px solid #ecd9a4; border-radius: var(--radius); padding: 12px 14px; }
.notice.sea { background: var(--glass-soft); border-color: #a9d0ca; }
.notice > :first-child { font-size: 1.5rem; }

/* ── paintings & frames ── */
.frame { --pad: 9px; --o: 0px; padding: var(--pad); border-radius: 2px; position: relative; box-shadow: var(--fs); --fs: 0 10px 18px -8px rgba(14,34,48,.45), 0 2px 3px rgba(14,34,48,.25); }
.frame.small { --pad: 5px; }
.frame::before, .frame::after { content: ''; position: absolute; pointer-events: none; }
.frame.empty { opacity: .72; filter: brightness(.55) saturate(.6) contrast(.95); }
.mat { background: #f3f6f4; padding: 9%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), inset 0 3px 8px rgba(0,0,0,.18); position: relative; }
.small .mat { padding: 7%; }

/* 3★ OAK: plain, thin, matte — a cheap print in a basic frame */
.f-3 { --pad: 7px; --fs: 0 4px 7px -4px rgba(14,34,48,.4), 0 1px 2px rgba(14,34,48,.25);
  background: repeating-linear-gradient(92deg, rgba(0,0,0,.05) 0 1px, transparent 1px 5px), linear-gradient(135deg, #a98456, #94703f 55%, #a07a49); }
.f-3.small { --pad: 4px; }
.f-3 .mat { padding: 6%; background: #ece9e1; }

/* 4★ SILVER: medium, polished, tasteful ornament */
.f-4 { --pad: 15px; --o: 20px; --fs: 0 12px 20px -8px rgba(14,34,48,.5), 0 2px 3px rgba(14,34,48,.28), 0 0 0 1px #6f7c85, inset 0 0 0 1px rgba(255,255,255,.9), inset 0 0 0 3px rgba(111,124,133,.45);
  background: linear-gradient(135deg, #fbfdff 0%, #c4ced5 22%, #8d9aa3 38%, #f2f6f9 52%, #aab5bd 70%, #e6ecf0 86%, #8d9aa3 100%); }
.f-4.small { --pad: 8px; --o: 11px; }
.f-4::before { inset: calc(var(--pad) * .3); border: calc(var(--pad) * .17) dotted #5f6d77; border-radius: 1px; }
.f-4::after { inset: 0; --r: calc(var(--o) / 2);
  background:
    radial-gradient(circle at var(--r) var(--r), #4d5a63 0 12%, #fff 14% 26%, transparent 28%) 0 0 / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #4d5a63 0 12%, #fff 14% 26%, transparent 28%) 100% 0 / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #4d5a63 0 12%, #fff 14% 26%, transparent 28%) 0 100% / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #4d5a63 0 12%, #fff 14% 26%, transparent 28%) 100% 100% / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #7d8a93 0 44%, #eef3f6 46% 62%, #7d8a93 64% 72%, transparent 74%) 0 0 / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #7d8a93 0 44%, #eef3f6 46% 62%, #7d8a93 64% 72%, transparent 74%) 100% 0 / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #7d8a93 0 44%, #eef3f6 46% 62%, #7d8a93 64% 72%, transparent 74%) 0 100% / var(--o) var(--o) no-repeat,
    radial-gradient(circle at var(--r) var(--r), #7d8a93 0 44%, #eef3f6 46% 62%, #7d8a93 64% 72%, transparent 74%) 100% 100% / var(--o) var(--o) no-repeat; }
.f-4 .mat { background: #f4f7f8; padding: 10%; box-shadow: 0 0 0 2px #aab5bd, 0 0 0 3px #6f7c85, inset 0 0 0 1px rgba(0,0,0,.2), inset 0 3px 8px rgba(0,0,0,.18); }
.f-4.small .mat { padding: 8%; box-shadow: 0 0 0 1px #8d9aa3, inset 0 0 0 1px rgba(0,0,0,.2), inset 0 2px 5px rgba(0,0,0,.18); }

/* 5★ GILDED: thick, heavily carved, rich gold with rosette corners */
.f-5 { --pad: 26px; --o: 44px; --fs: 0 16px 26px -10px rgba(14,34,48,.6), 0 3px 5px rgba(14,34,48,.35), 0 0 0 1px #4f3608, inset 0 0 0 1px #fff3b8, inset 0 0 0 4px rgba(94,64,8,.6), inset 0 0 0 5px rgba(255,236,150,.9);
  background:
    repeating-linear-gradient(45deg, rgba(255,246,190,.16) 0 3px, rgba(90,60,8,.12) 3px 6px),
    linear-gradient(135deg, #fff1a6 0%, #e5b93f 16%, #8a6414 32%, #f8de86 48%, #b88a22 64%, #f3d56f 80%, #6f4d0c 100%); }
.f-5.small { --pad: 13px; --o: 24px; }
.f-5::before { inset: calc(var(--pad) * .26); border: calc(var(--pad) * .16) dotted #5a3d08; box-shadow: 0 0 0 1px rgba(255,240,170,.8); }
.f-5::after { inset: 0; --r: calc(var(--o) / 2);
  --flower: repeating-conic-gradient(from 11deg at 50% 50%, #7a560f 0 11deg, #f6dc84 11deg 22.5deg);
  --gem: radial-gradient(circle at 50% 50%, #8e1222 0 11%, #ff6b7d 13% 17%, #5a3d08 19% 25%, #fff0a0 27% 40%, transparent 42%);
  background:
    var(--gem) 0 0 / var(--o) var(--o) no-repeat, var(--gem) 100% 0 / var(--o) var(--o) no-repeat, var(--gem) 0 100% / var(--o) var(--o) no-repeat, var(--gem) 100% 100% / var(--o) var(--o) no-repeat,
    var(--flower) 0 0 / var(--o) var(--o) no-repeat, var(--flower) 100% 0 / var(--o) var(--o) no-repeat, var(--flower) 0 100% / var(--o) var(--o) no-repeat, var(--flower) 100% 100% / var(--o) var(--o) no-repeat;
  -webkit-mask: radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 0 0 / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 100% 0 / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 0 100% / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 100% 100% / var(--o) var(--o) no-repeat;
  mask: radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 0 0 / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 100% 0 / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 0 100% / var(--o) var(--o) no-repeat, radial-gradient(circle at var(--r) var(--r), #000 calc(var(--r) - .5px), transparent var(--r)) 100% 100% / var(--o) var(--o) no-repeat; }
.f-5 .mat { background: #faf6ea; padding: 11%; box-shadow: 0 0 0 3px #d9ad39, 0 0 0 4px #5a3d08, 0 0 0 5px #fff0a0, inset 0 0 0 1px rgba(0,0,0,.25), inset 0 4px 10px rgba(0,0,0,.22); }
.f-5.small .mat { padding: 8%; box-shadow: 0 0 0 2px #d9ad39, 0 0 0 3px #5a3d08, inset 0 0 0 1px rgba(0,0,0,.25), inset 0 2px 6px rgba(0,0,0,.22); }
.canvas-wrap { position: relative; line-height: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.canvas-wrap canvas { width: 100%; height: auto; aspect-ratio: 4/5; display: block; }
.hl { position: absolute; width: 50%; height: 50%; border: 3px solid #fff; box-shadow: 0 0 22px 4px rgba(255,255,255,.9), inset 0 0 18px rgba(255,255,255,.6); animation: pulse 1.2s ease-in-out 3; pointer-events: none; }
.hl.q0 { left: 0; top: 0; } .hl.q1 { left: 50%; top: 0; } .hl.q2 { left: 0; top: 50%; } .hl.q3 { left: 50%; top: 50%; }
@keyframes pulse { 50% { opacity: .35; } }
.museum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 16px; padding: 6px 4px; }
.studio .museum-grid, .app.wide .museum-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.exhibit { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 8px; align-content: start; align-self: start; }
.exhibit:active { transform: scale(.98); }
.exhibit .cap { display: grid; gap: 1px; padding: 0 2px; font-size: .84rem; }
.exhibit .cap b { font-family: var(--serif); font-size: .98rem; line-height: 1.2; }
.pips { display: inline-flex; gap: 3px; vertical-align: middle; } .pips i { width: 9px; height: 9px; border-radius: 2px; background: rgba(14,34,48,.15); } .pips i.on { background: var(--tide); }
.complete-tag { color: var(--brass); font-weight: 700; }

/* ── sheets, toast ── */
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(8,24,34,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--wall); border-radius: 22px 22px 0 0; padding: 16px 16px calc(22px + var(--safe-b)); animation: rise .28s cubic-bezier(.2,.8,.2,1); }
.sheet.wide { max-width: 760px; }
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; min-height: 40px; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 200; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; text-align: center; font-weight: 600; font-size: .92rem; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── comments ── */
.thread { display: grid; gap: 10px; }
.bubble { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bubble.mi { background: var(--glass-soft); border-color: #a9d0ca; margin-left: 22px; }
.bubble .meta { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; color: var(--ink-2); margin-bottom: 3px; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── timer ── */
.timer-pill { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(74px + var(--safe-b)); background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 8px 8px 18px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.3); font-variant-numeric: tabular-nums; font-weight: 700; }
.timer-pill button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.set-row { display: grid; grid-template-columns: 28px 1fr 1fr 40px; gap: 8px; align-items: center; }
.set-row input { min-height: 42px; text-align: center; }

/* ── onboarding / login ── */
.splash { min-height: 100dvh; display: grid; align-content: center; gap: 22px; max-width: 440px; margin: 0 auto; padding: 28px 20px; }
.splash h1 { font-size: 2.8rem; } .splash .tag-line { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.dots { display: flex; gap: 6px; } .dots i { width: 24px; height: 4px; border-radius: 2px; background: rgba(14,34,48,.15); } .dots i.on { background: var(--tide); }

/* ── the sea ── */
.sea-hero { background: linear-gradient(#f4c7a5 0, #ec9a86 148px, #5aa7b4 149px, #1b5a6b 62%, #0b2a3a 100%); color: #fff; border-radius: 20px; padding: 22px 18px 20px; position: relative; overflow: hidden; display: grid; gap: 14px; }
.sea-hero .sun { position: relative; width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; background: #fff3d6; display: grid; place-content: center; justify-items: center; gap: 2px; text-align: center; color: var(--deep); box-shadow: 0 0 80px 30px rgba(255,236,190,.55); }
.sea-hero > * { position: relative; }
.sea-hero .sun .big-num { font-size: 3.4rem; color: var(--deep); }
.sea-hero .sun-label { text-align: center; font-size: .9rem; font-weight: 700; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); margin-top: -4px; }
.sea-hero .btn { background: rgba(255,255,255,.95); color: var(--deep); }
.sea-hero .btn.gold { background: linear-gradient(135deg, #f6dc92, #d1a84b); color: #3a2806; }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; font-size: .85rem; }
.rates b { display: block; font-family: var(--serif); font-size: 1.3rem; }

.scene { position: fixed; inset: 0; z-index: 100; background: linear-gradient(#f4c7a5 0%, #ec9a86 24%, #5aa7b4 25%, #1b5a6b 60%, #0b2a3a 100%); overflow: hidden; display: grid; place-items: center; animation: fade .3s; }
.scene .sun { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: #fff3d6; left: 50%; top: 8%; transform: translateX(-50%); box-shadow: 0 0 80px 30px rgba(255,236,190,.55); }
.scene .waves { position: absolute; left: 0; right: 0; bottom: 0; height: 78%; pointer-events: none; }
.scene .waves svg { position: absolute; left: -10%; width: 220%; bottom: 0; }
.w1 { animation: drift 7s linear infinite; opacity: .5; } .w2 { animation: drift 5s linear infinite reverse; opacity: .6; bottom: -18px !important; } .w3 { animation: drift 9s linear infinite; opacity: .8; bottom: -34px !important; }
@keyframes drift { to { transform: translateX(-22%); } }
.coin-fly { position: absolute; left: 50%; bottom: 8%; width: 54px; height: 54px; margin-left: -27px; perspective: 400px; animation: toss 1.4s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes flip { to { transform: rotateX(360deg); } }
.coin-svg { display: inline-block; vertical-align: middle; } .coin-svg svg { width: 100%; height: 100%; display: block; }
.coin-fly .coin-svg { animation: flip .45s linear infinite; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.coin-glyph .coin-svg { width: 1em; height: 1em; }
@keyframes toss { 0% { transform: translateY(0) scale(1); opacity: 1; } 45% { transform: translateY(-62vh) scale(1.05); opacity: 1; } 80% { transform: translateY(calc(-52vh + 27px)) scale(.5); opacity: 1; } 100% { transform: translateY(calc(-52vh + 27px)) scale(.15); opacity: 0; } }
.ripple { position: absolute; left: 50%; top: 40%; width: 40px; height: 14px; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; transform: translate(-50%, -50%) scale(0); animation: ripple 1.2s ease-out 1.1s forwards; }
.ripple.r2 { animation-delay: 1.35s; }
@keyframes ripple { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(7); opacity: 0; } }
.reveal { position: relative; width: min(86vw, 340px); display: grid; gap: 12px; justify-items: center; text-align: center; color: #fff; animation: wash 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes wash { 0% { transform: translateY(70vh) rotate(-6deg); opacity: 0; } 60% { transform: translateY(-14px) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.reveal .frame { width: 100%; }
.reveal .stars { font-size: 1.5rem; letter-spacing: .12em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.reveal.t4 .stars { color: #c9e4ff; } .reveal.t5 .stars { color: #ffd966; }
.reveal.t5 .frame, .reveal.t4 .frame { animation: glow 1.6s ease-in-out infinite alternate; }
.reveal.t5 .frame { --g: 255, 214, 100; } .reveal.t4 .frame { --g: 200, 225, 255; }
@keyframes glow { from { box-shadow: var(--fs), 0 0 0 0 rgba(var(--g), 0); } to { box-shadow: var(--fs), 0 0 46px 14px rgba(var(--g), .75); } }
.reveal h2 { text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.reveal .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.refund { width: min(86vw, 320px); text-align: center; color: #fff; display: grid; gap: 10px; animation: wash .8s both; } .refund .coin-glyph { font-size: 4rem; }
.scene-actions { position: absolute; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); display: flex; justify-content: center; gap: 10px; z-index: 3; padding: 0 16px; }
.scene-actions .btn { background: rgba(255,255,255,.92); color: var(--deep); }
.scene-top { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; left: 14px; display: flex; justify-content: space-between; color: #fff; font-weight: 700; z-index: 3; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.summary { width: min(94vw, 480px); max-height: 82dvh; overflow: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: start; padding: 6px; z-index: 2; }
.summary .cell { display: grid; gap: 3px; align-content: start; justify-items: center; font-size: .66rem; color: #fff; text-align: center; font-weight: 700; }
.summary .cell.t5 .frame { box-shadow: var(--fs), 0 0 14px 3px rgba(255, 214, 100, .8); }
.summary .cell.t4 .frame { box-shadow: var(--fs), 0 0 12px 2px rgba(200, 225, 255, .8); }
.sparkle { position: absolute; font-size: 1.2rem; animation: spark 1.6s ease-out forwards; pointer-events: none; }
@keyframes spark { 0% { transform: translateY(0) scale(0); opacity: 1; } 100% { transform: translateY(-120px) scale(1.4); opacity: 0; } }
.shake { animation: shake .4s; } @keyframes shake { 30% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }

/* ── studio ── */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; display: grid; gap: 6px; background: var(--paper); cursor: pointer; }
.split-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 320px; }
.split-preview canvas { width: 100%; aspect-ratio: 4/5; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.3); display: block; }
.studio-cols { display: grid; gap: 18px; } @media (min-width: 760px) { .studio-cols.two { grid-template-columns: minmax(280px, 380px) 1fr; align-items: start; } }
input[type=range] { width: 100%; accent-color: var(--tide); }
.unread { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.studio .topbar { align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .studio .brand small { display: none; } }

/* track calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: .72rem; font-weight: 700; color: var(--ink-2); padding-bottom: 2px; }
.cal-cell { aspect-ratio: 1; border: 0; border-radius: 10px; background: rgba(14,34,48,.05); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; cursor: pointer; color: var(--ink); font: inherit; min-width: 0; }
.cal-cell.empty { background: none; cursor: default; }
.cal-cell.has { background: var(--glass-soft); }
.cal-cell.future { opacity: .35; cursor: default; }
.cal-cell.today { box-shadow: 0 0 0 2px var(--tide); }
.cal-n { font-size: .88rem; font-weight: 600; line-height: 1; }
.cal-dots { display: flex; gap: 3px; height: 7px; }
.cal-dots i, .cal-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
i.f { background: var(--tide); } i.p { background: var(--brass); } i.g { background: var(--coral); }
.cal-legend { display: flex; gap: 16px; justify-content: center; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }

.cal-cell.sel { background: var(--tide); color: #fff; }
.cal-cell.sel .cal-dots i { box-shadow: 0 0 0 1.5px #fff; }

.sea-hero .waves { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; pointer-events: none; overflow: hidden; }
.sea-hero .waves svg { position: absolute; left: -10%; width: 220%; bottom: 0; }

/* 5★ glitter from the ripple */
.glitter { position: absolute; left: 50%; top: 40%; width: 10px; height: 10px; margin: -5px 0 0 -5px; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff7d0 0, #f6dc92 40%, #d1a84b 100%); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: glitter 1.6s ease-out forwards; filter: drop-shadow(0 0 4px rgba(255,226,140,.9)); }
@keyframes glitter { 0% { opacity: 0; transform: translate(0, 0) scale(0); } 12% { opacity: 1; transform: translate(calc(var(--dx) * .25), calc(var(--dy) * .4)) scale(var(--s)); } 55% { opacity: 1; transform: translate(calc(var(--dx) * .8), var(--dy)) scale(calc(var(--s) * 1.15)) rotate(120deg); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 50px)) scale(.2) rotate(240deg); } }

/* ── sideways museum wall ── */
.gallery { --ex: clamp(180px, 56vw, 300px); position: relative; margin: 0 calc(50% - 50vw); width: 100vw; min-width: 0; }
body { overflow-x: clip; }
.stack > *, .stack.lg > * { min-width: 0; }
.gallery-scroll { width: 100%; overflow-x: auto; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y pinch-zoom; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery-scroll::-webkit-scrollbar { display: none; }
.gallery-wall { position: relative; z-index: 0; display: flex; align-items: flex-start; gap: 46px; width: max-content; min-width: 100%; box-sizing: border-box; padding: 40px max(24px, calc(50vw - var(--ex) / 2)) 92px; border-block: 1px solid rgba(60,40,20,.25);
  background:
    linear-gradient(#6b4e33, #4a3524) bottom / 100% 40px no-repeat,
    linear-gradient(#f6f1e6, #ddd5c3) bottom 40px left / 100% 14px no-repeat,
    linear-gradient(to bottom, rgba(0,0,0,.16), transparent 54px) top / 100% 54px no-repeat,
    linear-gradient(to bottom, #efe9dc, #e2dac8); background-color: #e8e1d1; }
.gallery .exhibit { flex: none; width: var(--ex); position: relative; gap: 10px; }
.gallery .exhibit::before { content: ''; position: absolute; z-index: -1; left: -34%; right: -34%; top: -40px; height: 112%; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(255,251,230,.85), rgba(255,251,230,0) 72%); }
.gallery .exhibit .frame { transition: transform .2s; }
.gallery .exhibit:hover .frame { transform: translateY(-3px); }
.gallery .cap { justify-self: start; max-width: 100%; background: #fffdf7; border: 1px solid #d3c9b2; border-radius: 1px; padding: 6px 10px 7px; box-shadow: 0 1px 2px rgba(60,40,20,.22); }
.gallery-nav { display: none; position: absolute; top: 38%; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(60,40,20,.25); background: rgba(255,253,247,.92); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; place-items: center; box-shadow: 0 3px 10px rgba(14,34,48,.25); z-index: 2; }
.gallery-nav.prev { left: 10px; } .gallery-nav.next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .gallery-nav { display: grid; } }

@media (hover: hover) and (pointer: fine) { .gallery-scroll { cursor: grab; } }
.gallery-scroll.dragging { cursor: grabbing; }
.gallery-scroll.dragging .exhibit { pointer-events: none; }
.info-btn { color: var(--ink-2); display: inline-grid; place-items: center; padding: 6px; margin-top: 4px; }
.fav-tag { color: #d6405c; font-weight: 700; }
.title-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.heart-btn { background: none; border: 0; cursor: pointer; font-size: 1.8rem; line-height: 1; padding: 4px 6px; color: var(--ink-2); border-radius: 10px; }
.heart-btn[aria-pressed="true"] { color: #d6405c; animation: heartpop .35s ease-out; }
@keyframes heartpop { 40% { transform: scale(1.35); } }

.top-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.view-toggle { display: inline-flex; padding: 6px 11px; align-items: center; gap: 6px; flex: none; }
.view-toggle svg { width: 16px; height: 16px; }
.gallery-top { display: flex; align-items: center; gap: 10px; }

.sort-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.sort-opt > span:first-child { display: grid; gap: 1px; }
.sort-opt[aria-pressed="true"] { border-color: var(--tide); background: #e4f1ef; }
.sort-check { color: var(--tide); font-weight: 700; }

.fs-btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.fs-view { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 14px; padding: calc(var(--safe-t) + 16px) 12px calc(var(--safe-b) + 16px); background: radial-gradient(ellipse at 50% 30%, #3a4a50, #12191d 75%); animation: fade .2s; cursor: zoom-out; }
.fs-art { width: min(94vw, calc((100dvh - 120px) * .82)); filter: drop-shadow(0 18px 40px rgba(0,0,0,.6)); }
.fs-cap { display: grid; gap: 2px; justify-items: center; color: #fff; text-align: center; font-family: var(--serif); }
.fs-cap b { font-size: 1.15rem; font-weight: 600; } .fs-cap span { color: #ffd966; letter-spacing: .12em; font-size: .9rem; }
.fs-close { position: absolute; top: calc(var(--safe-t) + 10px); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem; cursor: pointer; }
.fs-close:hover { background: rgba(255,255,255,.26); }

.bulk-bar { position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 12px -6px rgba(14,34,48,.4); }
.exhibit.picked { outline: 3px solid var(--ink); outline-offset: 5px; border-radius: 3px; }
.exhibit:disabled { opacity: .45; cursor: not-allowed; }
