/* Versed Study — shared styles. Same family as Versed Play: dark, loud, playful. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0E0D17; --bg2: #16152A; --card: #1E1C33; --card2: #262445; --line: #2E2B4A; --text: #F4F2FF; --muted: #9A97B8; --dim: #5E5B7E;
  --lime: #C6FF3D; --pink: #FF4FA3; --cyan: #3DF2FF; --amber: #FFB020; --violet: #8B7BFF; --green: #3DFF9A; --red: #FF5C5C; --ink: #0E0D17;
  --radius: 18px; --shadow: 0 10px 30px rgba(0,0,0,.35); --pop: 4px 4px 0 var(--pink);
  --ease: cubic-bezier(.16,1,.3,1);
  --display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body); background: var(--bg); color: var(--text); min-height: 100dvh; line-height: 1.45;
  -webkit-font-smoothing: antialiased; touch-action: manipulation; overflow-x: hidden;
  background-image: radial-gradient(60% 40% at 80% -10%, rgba(139,123,255,.25), transparent 60%), radial-gradient(50% 35% at 0% 100%, rgba(198,255,61,.12), transparent 60%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--cyan); }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.01em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
img.px, .px img, canvas.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* inline SVG icons (common.js icon()) */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.3em; }
.ic.tiny { width: .85em; height: .85em; vertical-align: -.1em; margin-left: .15em; }
.ic.big { width: 2rem; height: 2rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 14px; font-weight: 700; transition: transform .12s var(--ease), box-shadow .12s, background .15s; user-select: none; white-space: nowrap; border: 2px solid transparent; text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: var(--pop); }
.btn-primary:hover { background: #d6ff6b; }
.btn-dark { background: var(--text); color: var(--ink); border-color: var(--text); box-shadow: var(--pop); }
.btn-coral { background: var(--pink); color: #fff; border-color: var(--pink); box-shadow: 4px 4px 0 var(--lime); }
.btn-coral:hover { background: #ff6cb3; }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-ghost:active { box-shadow: none; }
.btn-ghost[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

.input { width: 100%; padding: .9rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); outline: none; transition: border-color .15s, box-shadow .15s; color: var(--text); }
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198,255,61,.15); }
.input-code { text-transform: uppercase; letter-spacing: .35em; font-weight: 800; font-size: 1.6rem; text-align: center; font-family: var(--display); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
label.field { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin: .9rem 0 .35rem; text-transform: uppercase; letter-spacing: .08em; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--red); font-weight: 600; font-size: .9rem; min-height: 1.3em; margin-top: .6rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(198,255,61,.15); color: var(--lime); }
.pill.pink { background: rgba(255,79,163,.15); color: var(--pink); }
.pill.cyan { background: rgba(61,242,255,.15); color: var(--cyan); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; text-decoration: none; color: var(--text); font-family: var(--display); font-size: .95rem; letter-spacing: .02em; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: 2px 2px 0 var(--pink); image-rendering: pixelated; flex: none; }
.brand .teal { color: var(--lime); }

/* credit / ad strip — one line at the bottom; entries live in /strip.json and are never about us */
.strip-slot { position: fixed; left: 0; right: 0; bottom: 0; height: 44px; background: var(--bg2); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 0 .75rem 0 2.4rem; z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.strip-slot .strip-label { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }
.strip-house { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-size: .78rem; max-width: 640px; width: 100%; min-width: 0; }
.strip-house img { width: 24px; height: 24px; object-fit: contain; flex: none; image-rendering: pixelated; }
.strip-house .strip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-house .strip-cta { margin-left: auto; flex: none; color: var(--muted); font-size: .72rem; font-weight: 700; text-decoration: underline; text-decoration-color: var(--dim); }
.has-strip { padding-bottom: 56px; }
.toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--ink); padding: .6rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 700; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 92vw; text-align: center; }

/* pixel decoration: absolutely placed props in margins, hidden on narrow screens where they'd crowd text */
.deco { position: absolute; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; user-select: none; z-index: 0; }
.deco-inline { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: bottom; }
.divider { display: flex; align-items: center; gap: .6rem; color: var(--dim); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; margin: 2.2rem 0 1rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
@media (max-width: 720px) { .deco.lg { display: none; } .brand { font-size: .85rem; } .top nav a { font-size: .74rem; } }

/* ---------- layout ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 0; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.wrap.wide { max-width: 900px; }
.wrap.landing { max-width: 1040px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .25rem 0 1rem; position: relative; z-index: 2; }
.top nav { display: flex; gap: .2rem; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 700; padding: .35rem .5rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .3rem; }
.top nav a:hover, .top nav a[aria-current] { background: var(--card); color: var(--text); }
.top nav a .ic { width: 1em; height: 1em; }
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.05; margin: .5rem 0 .4rem; }
.hero h1 span { color: var(--lime); }
.hero p { color: var(--muted); margin-bottom: 1rem; }
.section { margin-top: 1.5rem; position: relative; }
.section h2 { font-size: 1rem; font-weight: 800; margin-bottom: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.section h2 a { font-size: .8rem; font-weight: 700; }
.foot { text-align: center; color: var(--dim); font-size: .78rem; padding: 2rem 0 1rem; position: relative; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .paw { width: 21px; height: 18px; image-rendering: pixelated; opacity: .6; vertical-align: -3px; margin: 0 .3rem; }

/* ---------- landing ---------- */
.l-hero { display: grid; gap: 1.2rem; align-items: center; position: relative; margin-top: .5rem; }
.l-hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; line-height: 1.02; margin-bottom: .6rem; }
.l-hero h1 span { color: var(--lime); }
.l-hero .lede { color: var(--muted); font-size: 1.05rem; max-width: 34ch; margin-bottom: 1rem; }
.l-hero .cta { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.l-hero .live { margin-top: .9rem; }
.demo { position: relative; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.demo canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; cursor: pointer; touch-action: manipulation; }
.demo .tag { position: absolute; top: 10px; left: 12px; font-size: .7rem; font-weight: 700; color: var(--lime); background: rgba(14,13,23,.75); padding: .25rem .6rem; border-radius: 999px; display: inline-flex; gap: .35rem; align-items: center; }
.demo .tag .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.demo .cap { position: absolute; right: 12px; bottom: 10px; font-size: .7rem; color: var(--muted); background: rgba(14,13,23,.7); padding: .2rem .5rem; border-radius: 999px; }
@media (min-width: 820px) { .l-hero { grid-template-columns: 1fr 1.1fr; gap: 2rem; } }

/* landing sections after the join card: one heading, one line, one thing */
.strip { margin-top: 2.2rem; position: relative; }
.strip h2 { font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; flex-wrap: wrap; }
.strip h2 .ic { color: var(--lime); }
.strip h2 a { font-size: .8rem; font-weight: 700; font-family: var(--body); margin-left: auto; }
.strip > p { color: var(--muted); margin-bottom: .8rem; }
.strip > p a { font-weight: 700; }
.strip .art { border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 1rem; position: relative; overflow: hidden; }

/* the whole cork wall shrunk down: a real 2400x1600 surface scaled to fit, clicking anywhere opens /board */
.wall { display: block; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); border: 6px solid #6b4a2b; box-shadow: inset 0 0 0 2px #3f2a17, var(--shadow); background: #a8783f; text-decoration: none; }
.wall:hover { border-color: #7d5834; }
.wall .surface { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: scale(var(--s, .4)); pointer-events: none; }
.wall .surface .pin { pointer-events: none; }
.wall .cap { position: absolute; right: 10px; bottom: 8px; font-size: .7rem; font-weight: 700; color: var(--text); background: rgba(14,13,23,.75); padding: .25rem .6rem; border-radius: 999px; pointer-events: none; }
@media (max-width: 720px) { .wall { border-width: 4px; } .wall .surface .label { display: none; } }

.pomo-sound { display: grid; gap: .6rem; align-items: start; }
@media (min-width: 820px) { .pomo-sound { grid-template-columns: 1fr 1fr; } }

.tools-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.tools-row a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem .5rem .7rem; font-size: .85rem; font-weight: 700; transition: border-color .15s, transform .12s var(--ease); }
.tools-row a:hover { border-color: var(--violet); transform: translateY(-2px); }
.tools-row a .ic { width: 1.1em; height: 1.1em; color: var(--lime); }

/* live room list on the landing: one row per public lobby, refreshed every 20 s */
.roomlist { display: grid; gap: .5rem; }
.roomrow { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .5rem .6rem .5rem .5rem; transition: transform .12s var(--ease), border-color .15s; }
.roomrow:hover { transform: translateY(-2px); border-color: var(--violet); }
.roomrow img { width: 72px; height: 62px; object-fit: contain; image-rendering: pixelated; border-radius: 10px; background: var(--card2); }
.roomrow .info { display: grid; gap: .1rem; min-width: 0; }
.roomrow .info b { font-family: var(--display); font-weight: 800; font-size: .85rem; }
.roomrow .info span { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomrow .info .who.on { color: var(--lime); font-weight: 700; }
.roomrow .info .tm { color: var(--text); }
.roomrow .info .tm.flow { color: var(--violet); } .roomrow .info .tm.break { color: var(--cyan); }
.roomrow .btn { white-space: nowrap; }
.roomrow.busy .btn { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.busiest { display: inline-flex; align-items: center; gap: .3rem; margin: .5rem 0 0 .6rem; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; vertical-align: middle; }
.busiest b { color: var(--text); }
.busiest:hover { color: var(--text); }
@media (min-width: 820px) { .roomlist { grid-template-columns: 1fr 1fr; } }

.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.rooms figure { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: .6rem; text-align: center; transition: transform .12s var(--ease), border-color .15s; }
.rooms figure:hover { transform: translateY(-2px); border-color: var(--violet); }
.rooms img { width: 100%; height: auto; max-height: 150px; object-fit: contain; image-rendering: pixelated; }
.rooms figcaption { font-family: var(--display); font-weight: 800; font-size: .8rem; margin-top: .3rem; }
@media (min-width: 620px) { .rooms { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .rooms { grid-template-columns: repeat(5, 1fr); } .rooms img { max-height: 120px; } }

/* pomodoro mock on the landing */
.pomo-mock { display: grid; gap: .6rem; }
.pomo-mock .bar { height: 10px; border-radius: 5px; background: var(--card2); overflow: hidden; }
.pomo-mock .bar i { display: block; height: 100%; width: 62%; background: var(--lime); }
.pomo-mock .row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pomo-mock .clock { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pomo-mock .phase { font-family: var(--display); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.pomo-mock .pets-row { display: flex; gap: .3rem; align-items: flex-end; margin-top: .3rem; }
.pomo-mock .pets-row canvas { width: 56px; height: 56px; image-rendering: pixelated; }

.tools { display: grid; gap: .6rem; }
.tools a { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; transition: border-color .15s, transform .12s var(--ease); }
.tools a:hover { border-color: var(--violet); transform: translateY(-2px); }
.tools a .ic { width: 1.6rem; height: 1.6rem; color: var(--lime); flex: none; }
.tools a b { display: block; font-family: var(--display); font-size: .85rem; }
.tools a span { color: var(--muted); font-size: .78rem; display: block; }
@media (min-width: 620px) { .tools { grid-template-columns: repeat(3, 1fr); } .tools a { flex-direction: column; align-items: flex-start; } }

/* ---------- join ---------- */
.join { position: relative; }
.pets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.pets button { aspect-ratio: 1; min-width: 0; border-radius: 14px; background: var(--card); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .1rem; padding: .3rem; transition: transform .12s var(--ease), border-color .15s; position: relative; }
.pets button canvas { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; image-rendering: pixelated; image-rendering: crisp-edges; margin: auto; }
.pets button span { font-size: .7rem; font-weight: 700; color: var(--muted); }
.pets button:hover { transform: translateY(-2px); border-color: var(--violet); }
.pets button[aria-pressed="true"] { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(198,255,61,.2); background: var(--card2); }
.pets button[aria-pressed="true"] span { color: var(--lime); }
@media (min-width: 620px) { .pets { grid-template-columns: repeat(6, 1fr); } }
.actions { display: grid; gap: .6rem; margin-top: 1rem; }
.row { display: flex; gap: .5rem; align-items: center; }
.row .input { flex: 1; }
.live { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85rem; }
.live b { color: var(--lime); font-family: var(--display); }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.links a { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; transition: border-color .15s, transform .12s var(--ease); }
.links a:hover { border-color: var(--violet); transform: translateY(-2px); }
.links a b { display: block; font-family: var(--display); font-size: .9rem; margin-bottom: .2rem; }
.links a span { color: var(--muted); font-size: .8rem; }

/* ---------- cork board ---------- */
.cork { position: relative; border-radius: var(--radius); padding: 1rem; min-height: 180px; border: 6px solid #6b4a2b; box-shadow: inset 0 0 0 2px #3f2a17, var(--shadow);
  background-color: #a8783f;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.14) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(0,0,0,.1) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.07) 0 1px, transparent 2px),
    repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 7px);
  background-size: 23px 19px, 31px 27px, 17px 29px, 37px 23px, auto, auto; }
.cork .empty { color: #3a2a14; font-size: .85rem; font-weight: 700; }
.pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.pins .pin:nth-child(3n) { transform: rotate(-1.5deg); } .pins .pin:nth-child(3n+1) { transform: rotate(1.2deg); } .pins .pin:nth-child(5n) { transform: rotate(2deg); }

/* a pin: post-it (note), index card (card) or a photo with tape (photo) */
.pin { position: relative; padding: 1.1rem .8rem .7rem; color: #1c1a10; font-family: var(--body); font-size: .82rem; line-height: 1.3; min-height: 110px; box-shadow: 3px 4px 0 rgba(0,0,0,.28); overflow-wrap: anywhere; width: 100%; }
.pin h4 { font-family: var(--display); font-size: .78rem; font-weight: 800; margin-bottom: .3rem; line-height: 1.2; }
.pin p { white-space: pre-line; }
.pin.note { clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.pin .tack { position: absolute; top: 6px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #e63c3c; box-shadow: inset -2px -2px 0 rgba(0,0,0,.35), 1px 2px 0 rgba(0,0,0,.3); }
.pin.card { background: #fffdf5 !important; background-image: repeating-linear-gradient(180deg, transparent 0 18px, rgba(61,140,255,.25) 18px 19px) !important; background-position: 0 1.3rem !important; border-top: 6px solid var(--pc, #ff8a8a); padding-top: .9rem; }
.pin.card .clip { position: absolute; top: -9px; right: 12px; width: 14px; height: 26px; border: 3px solid #8e8e9c; border-radius: 7px; background: transparent; box-shadow: inset 0 0 0 2px #fffdf5; }
.pin.photo { background: #fff !important; padding: .6rem .6rem .7rem; }
.pin.photo > p { background: var(--pc, #ffd66b); padding: .8rem .6rem; min-height: 64px; margin-top: .5rem; border-radius: 2px; }
.pin.photo h4 { margin-top: 1rem; }
.pin.photo .tape { position: absolute; top: -8px; left: 50%; width: 64px; height: 18px; margin-left: -32px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.08); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.pin.lime { background: #d9ff6b; --pc: #d9ff6b; } .pin.pink { background: #ffa5d0; --pc: #ffa5d0; } .pin.cyan { background: #9ff3ff; --pc: #9ff3ff; } .pin.amber { background: #ffd66b; --pc: #ffd66b; } .pin.violet { background: #c7bdff; --pc: #c7bdff; } .pin.green { background: #9dffc6; --pc: #9dffc6; }
.pin .meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .55rem; font-size: .68rem; font-weight: 700; opacity: .85; }
.pin .meta .when { opacity: .7; margin-left: auto; }
.pin .pl { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border-radius: 8px; text-decoration: none; font-weight: 800; font-size: .7rem; color: #fff; background: #1c1a10; }
.pin .pl .ic { width: 1em; height: 1em; }
.pin .pl.room { background: #0E0D17; color: var(--lime); }
.pin .pl.play { background: #FF4FA3; }
.pin .pl.ext { background: transparent; color: #7a3c00; border: 1px dashed #7a3c00; }
.pin .report, .pin .del { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; color: #1c1a10; opacity: .35; border-radius: 6px; }
.pin .report:hover, .pin .del:hover { opacity: 1; background: rgba(0,0,0,.08); }
.pin .del { right: 30px; color: #b00; opacity: .7; }
.pin .report .ic, .pin .del .ic { width: 14px; height: 14px; }

/* the big board page: a scrollable cork surface with pins placed at absolute spots */
.board-page { max-width: none; padding: .75rem .75rem 0; }
.board-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; position: relative; z-index: 2; }
.board-bar h1 { font-size: 1.3rem; font-weight: 800; }
.board-bar h1 span { color: var(--lime); }
.board-bar p { color: var(--muted); font-size: .8rem; flex: 1 1 260px; }
.board-bar .btn { margin-left: auto; }
.board-frame { position: relative; }
.surface-wrap { position: relative; border-radius: var(--radius); border: 8px solid #6b4a2b; box-shadow: inset 0 0 0 2px #3f2a17, var(--shadow); overflow: auto; height: calc(100dvh - 190px); min-height: 380px; cursor: grab; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #6b4a2b transparent; -webkit-overflow-scrolling: touch; }
.surface-wrap.dragging { cursor: grabbing; user-select: none; }
.surface { position: relative; width: 2400px; height: 1600px;
  background-color: #a8783f;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.14) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(0,0,0,.1) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,.07) 0 1px, transparent 2px),
    repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.04) 0 2px, transparent 2px 7px);
  background-size: 23px 19px, 31px 27px, 17px 29px, 37px 23px, auto, auto; }
.surface .pin { position: absolute; left: var(--x); top: var(--y); width: 220px; transform: rotate(var(--rot)); }
.surface .pin:hover { z-index: 5; transform: rotate(0deg) scale(1.03); }
.surface .empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; color: #3a2a14; font-weight: 700; }
.surface .deco { opacity: .95; }
.surface .label { position: absolute; font-family: var(--display); font-weight: 800; color: rgba(60,38,14,.55); letter-spacing: .04em; pointer-events: none; }
.board-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(14,13,23,.8); color: var(--text); font-size: .75rem; padding: .35rem .8rem; border-radius: 999px; pointer-events: none; white-space: nowrap; z-index: 3; }
.minimap { position: absolute; right: 22px; bottom: 22px; width: 120px; height: 80px; background: rgba(14,13,23,.7); border: 1px solid var(--line); border-radius: 8px; z-index: 3; pointer-events: none; }
.minimap i { position: absolute; width: 4px; height: 4px; border-radius: 1px; }
.minimap b { position: absolute; border: 1px solid var(--lime); border-radius: 3px; }
@media (max-width: 720px) { .surface-wrap { height: calc(100dvh - 240px); cursor: default; } .board-hint { display: none; } }

dialog.sheet { border: 0; background: transparent; padding: 0; max-width: min(96vw, 520px); width: 100%; margin: auto; }
dialog.sheet::backdrop { background: rgba(14,13,23,.7); backdrop-filter: blur(3px); }
dialog.sheet .card { position: relative; max-height: 92dvh; overflow: auto; }
dialog.sheet h2 { font-size: 1.1rem; margin-bottom: .2rem; }
dialog.sheet .close { position: absolute; top: .8rem; right: .8rem; width: 36px; height: 36px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; }
.pin-form { display: grid; gap: .3rem; }
.pin-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pin-form .link-row { display: grid; grid-template-columns: 150px 1fr; gap: .5rem; }
.colours, .styles { display: flex; gap: .4rem; flex-wrap: wrap; }
.colours button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; }
.colours button[aria-pressed="true"] { border-color: var(--text); }
.colours .lime { background: #d9ff6b; } .colours .pink { background: #ffa5d0; } .colours .cyan { background: #9ff3ff; } .colours .amber { background: #ffd66b; } .colours .violet { background: #c7bdff; } .colours .green { background: #9dffc6; }
.styles button { padding: .4rem .7rem; border-radius: 10px; border: 2px solid var(--line); background: var(--card2); font-size: .8rem; font-weight: 700; }
.styles button[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.count { font-size: .75rem; color: var(--dim); text-align: right; }
@media (max-width: 480px) { .pin-form .two, .pin-form .link-row { grid-template-columns: 1fr; } }

/* ---------- sound panel ---------- */
.snd { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.snd-head { width: 100%; display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; text-align: left; font-weight: 700; font-size: .85rem; }
.snd-head .ic { color: var(--lime); }
.snd-head .snd-state { color: var(--muted); font-weight: 500; font-size: .75rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd-head .chev { transition: transform .2s; color: var(--muted); }
.snd-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.snd-body { padding: 0 .8rem .8rem; display: grid; gap: .2rem; }
.snd-body.folded { height: 0; padding: 0; overflow: hidden; }   /* not display:none — audio and embeds keep going */
.snd:not(:has(.snd-head)) .snd-body { padding-top: .5rem; }
.snd-row { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.snd-row:last-child { border-bottom: 0; }
.snd-row .snd-ic { width: 1.5rem; height: 1.5rem; color: var(--cyan); flex: none; }
.snd-row b { display: block; font-family: var(--display); font-size: .8rem; }
.snd-row span { color: var(--muted); font-size: .74rem; display: block; }
.snd-row .grow { flex: 1; min-width: 0; }
.snd-row .btn { flex: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--card2); outline: none; margin-top: .4rem; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--lime); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid var(--bg); cursor: pointer; }
.snd-yt { margin-top: .6rem; display: grid; gap: .6rem; }
.yt { display: grid; gap: .6rem; }
@media (min-width: 620px) { .yt { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.yt .vid { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--card2); border: 1px solid var(--line); }
.yt .vid button { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; color: var(--text); font-weight: 700; font-size: .75rem; padding: .5rem; text-align: center; }
.yt .vid button .ic.big { width: 56px; height: 40px; padding: .4rem; border-radius: 10px; background: var(--pink); color: #fff; }
.yt .vid iframe { width: 100%; height: 100%; border: 0; }
.tip { font-size: .74rem; color: var(--muted); background: var(--bg2); border: 1px dashed var(--line); border-radius: 10px; padding: .5rem .7rem; }

/* ---------- grade calculator (legacy page under /tools) ---------- */
.grid-rows { display: grid; gap: .4rem; }
.grid-rows .r { display: grid; grid-template-columns: 1fr 70px 70px 32px; gap: .4rem; align-items: center; }
.grid-rows .r .input { padding: .6rem .7rem; border-radius: 10px; }
.grid-rows .h { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; padding: 0 .3rem; }
.grid-rows .x { color: var(--dim); font-size: 1.1rem; }
.stat { text-align: center; padding: 1rem; border-radius: 14px; background: var(--card2); }
.stat b { display: block; font-family: var(--display); font-size: 2.4rem; color: var(--lime); line-height: 1; }
.stat span { color: var(--muted); font-size: .8rem; }
.stat.warn b { color: var(--amber); } .stat.bad b { color: var(--red); } .stat.good b { color: var(--green); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

.free-line { color: var(--muted); font-size: .92rem; max-width: 68ch; margin: 1rem auto 0; text-align: center; }
.free-line b { color: var(--text, #fff); }
