/* ============ Emily's Cozy Corner: a warm, calm dusk theme ============ */
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #fff8f4; --ink: #4a3b52; --soft: #8b7b94; --faint: #b9acbf;
  --rose: #ee7aa3; --rose2: #ff9fbd; --violet: #a98bf0; --violet2: #c9b6ff;
  --pink: #ffe1ea; --peach: #ffe9d9; --lav: #ece4ff; --mint: #daf5e8; --sky: #dcefff; --butter: #fff3c9;
  --glass: rgba(255, 255, 255, .62); --glass-hi: rgba(255, 255, 255, .86); --line: rgba(255, 255, 255, .9);
  --sh-s: 0 2px 10px rgba(120, 80, 110, .08); --sh-m: 0 12px 34px rgba(130, 90, 120, .14); --sh-l: 0 28px 70px rgba(130, 90, 120, .22);
  --r: 28px; --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif; --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(.3, .8, .3, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
}
::selection { background: #ffd3e2; color: var(--ink); }
html { scrollbar-width: thin; scrollbar-color: #e4cfe6 transparent; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font: 500 1rem/1.5 var(--font); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; line-height: 1.15; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--violet2); outline-offset: 3px; }
.ic { display: block; flex: none; }
.vh { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
[hidden] { display: none !important; }

/* ---- living background ---- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(170deg, #fff8f4 0%, #fff0f5 55%, #f5eeff 100%); }
.aurora i { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; opacity: .7; will-change: transform; }
.aurora i:nth-child(1) { left: -35vmax; top: -40vmax; background: radial-gradient(closest-side, #ffd3e2, transparent); animation: drift1 38s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { right: -45vmax; top: 10vmax; background: radial-gradient(closest-side, #e3d6ff, transparent); animation: drift2 46s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: -20vmax; bottom: -55vmax; background: radial-gradient(closest-side, #ffe7cf, transparent); animation: drift1 52s ease-in-out infinite alternate-reverse; }
.aurora::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .35 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift1 { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-16vmax, 8vmax, 0) scale(.92); } }

/* ---- header (tools) ---- */
#bar { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: linear-gradient(var(--bg), rgba(255, 248, 244, 0)); transition: background .35s, box-shadow .35s; view-transition-name: bar; }
#bar.scrolled { background: rgba(255, 246, 248, .72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 rgba(255, 255, 255, .8), 0 10px 30px rgba(130, 90, 120, .1); }
#bar h2 { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.3rem; min-width: 0; }
.bar-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { #bar h2 { font-size: 1.15rem; gap: 8px; } }
.bar-em { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #ffffffc0; box-shadow: var(--sh-s); font-size: 1.15rem; view-transition-name: tool-icon; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--glass-hi); box-shadow: var(--sh-s); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-m); }
.icon-btn:active { transform: scale(.94); }

#app { max-width: 980px; margin: 0 auto; padding: 8px 18px 90px; }
.page { animation: pageIn .55s var(--ease) both; }
#app { view-transition-name: page; }
.vt .page, .vt .tile-card, .vt .cat, .vt .note { animation: none; }
::view-transition-old(page) { animation: vtOut .22s ease-in both; }
::view-transition-new(page) { animation: vtIn .55s var(--ease) .05s both; }
::view-transition-old(bar) { animation: fadeOut .2s both; } ::view-transition-new(bar) { animation: fadeIn .45s .1s both; }
::view-transition-group(tool-icon) { animation-duration: .6s; animation-timing-function: cubic-bezier(.2, .9, .25, 1); z-index: 10; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(4px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(18px) scale(.995); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.sub { color: var(--soft); margin: .3rem 0 0; }
.small { font-size: .88rem; }
.center { text-align: center; }

/* ---- shared components ---- */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-m); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 800; letter-spacing: .01em; border: 1px solid var(--line); background: var(--glass-hi); color: var(--ink); box-shadow: var(--sh-s); transition: transform .45s var(--spring), box-shadow .3s, filter .2s; text-decoration: none; user-select: none; -webkit-user-select: none; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-m); }
.btn:active { transform: scale(.95); transition-duration: .12s; }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--rose2), var(--violet)); box-shadow: 0 10px 26px rgba(200, 110, 170, .35); }
.btn.primary:hover { box-shadow: 0 14px 34px rgba(200, 110, 170, .45); filter: saturate(1.08); }
.btn.round { width: 48px; padding: 0; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }

.seg { --i: 0; --n: 1; position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); box-shadow: inset 0 1px 3px rgba(120, 80, 110, .08); max-width: 100%; }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); transform: translateX(calc(var(--i) * 100%)); border-radius: 999px; background: linear-gradient(135deg, var(--rose2), var(--violet)); box-shadow: 0 6px 16px rgba(200, 110, 170, .3); transition: transform .4s var(--ease); }
.seg.none::before { opacity: 0; }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 9px 16px; border-radius: 999px; font-weight: 800; color: var(--soft); min-height: 40px; white-space: nowrap; transition: color .25s; }
.seg button[aria-pressed="true"] { color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-hi); font-weight: 700; color: var(--soft); transition: all .4s var(--spring); }
.chip:active { transform: scale(.94); transition-duration: .1s; }
.chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--pink), var(--lav)); color: var(--ink); border-color: #fff; box-shadow: 0 6px 16px rgba(200, 120, 170, .22); transform: translateY(-1px); }

.slider { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--rose2), var(--violet)) 0 0 / var(--p) 100% no-repeat, rgba(130, 100, 140, .16); }
.slider::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(130, 100, 140, .16); }
.slider::-moz-range-progress { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--rose2), var(--violet)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 3px 10px rgba(110, 70, 120, .32); transition: transform .15s; }
.slider::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(110, 70, 120, .32); }
.slider:active::-webkit-slider-thumb { transform: scale(1.15); }

.toast-pop { position: fixed; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30; background: rgba(74, 59, 82, .92); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--sh-l); transition: all .35s var(--ease); max-width: 90vw; text-align: center; }
.toast-pop.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; color: var(--soft); padding: 70px 10px; font-size: 1.1rem; }

/* ---- welcome ---- */
#welcome { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 28px; overflow: hidden; transition: opacity .9s ease, transform .9s var(--ease), filter .9s; background: linear-gradient(165deg, #ffe3ec 0%, #f4e9ff 55%, #ffeede 100%); }
#welcome.leaving { opacity: 0; transform: scale(1.04); filter: blur(6px); pointer-events: none; }
.w-glow { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .75; animation: breathe 9s ease-in-out infinite alternate; }
.w-glow.a { width: 60vmax; height: 60vmax; left: -20vmax; top: -22vmax; background: #ffc4d8; }
.w-glow.b { width: 55vmax; height: 55vmax; right: -22vmax; bottom: -22vmax; background: #d3c2ff; animation-delay: -4s; }
.w-glow.c { width: 40vmax; height: 40vmax; left: 25vw; bottom: -18vmax; background: #ffe0b8; animation-delay: -2s; }
@keyframes breathe { to { transform: scale(1.18) translate(3vmax, -2vmax); opacity: .55; } }
.petal { position: absolute; bottom: -60px; left: var(--x); font-size: var(--s); opacity: 0; filter: blur(var(--b)); animation: rise var(--d) linear var(--delay) infinite; pointer-events: none; }
@keyframes rise { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; } 10% { opacity: var(--o); } 50% { transform: translate3d(var(--sway), -55dvh, 0) rotate(14deg); } 90% { opacity: var(--o); } 100% { transform: translate3d(calc(var(--sway) * -1), -118dvh, 0) rotate(-12deg); opacity: 0; } }
.w-box { position: relative; text-align: center; max-width: 480px; display: grid; justify-items: center; gap: 14px; }
.w-box > * { animation: wIn 1.4s var(--ease) both; }
.w-box > :nth-child(1) { animation-delay: .1s; } .w-box > :nth-child(2) { animation-delay: .35s; } .w-box > :nth-child(3) { animation-delay: .75s; } .w-box > :nth-child(4) { animation-delay: 1.05s; } .w-box > :nth-child(5) { animation-delay: 1.4s; }
@keyframes wIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.w-img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: var(--sh-l); }
.w-hello { font: 700 .85rem var(--font); letter-spacing: .32em; text-transform: uppercase; color: var(--rose); }
.w-name { font: 600 clamp(3.4rem, 15vw, 6rem)/1 var(--serif); background: linear-gradient(135deg, #e9578b, #8d6be8); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .1em .08em; }
.w-msg { font: 500 1.2rem/1.65 var(--font); color: var(--ink); margin: 0; }
.w-from { font: italic 500 1.15rem var(--serif); color: var(--soft); margin: 0; }
#enter { position: relative; overflow: hidden; margin-top: 10px; min-height: 64px; padding: 0 64px; font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; color: #fff; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ff8fb4, #a98bf0); box-shadow: 0 16px 40px rgba(190, 100, 170, .42), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .25s var(--ease), box-shadow .25s; }
#enter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); animation: shine 4.5s ease-in-out 2s infinite; }
@keyframes shine { 40%, 100% { transform: translateX(120%); } }
#enter:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 22px 50px rgba(190, 100, 170, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
#enter:active { transform: scale(.96); }

/* ---- home ---- */
.hero { text-align: center; padding: 28px 0 22px; }
.kicker { margin: 0 0 8px; font: 800 .76rem var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--rose); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.pills .teaser { margin-top: 0; }
.teaser.soft { background: rgba(255, 255, 255, .5); color: var(--soft); }
.note { position: relative; margin: 4px auto 26px; max-width: 560px; padding: 20px 26px 22px; text-align: center; border-radius: var(--r); background: linear-gradient(150deg, rgba(255, 255, 255, .88), rgba(255, 238, 245, .7)); border: 1px solid var(--line); box-shadow: var(--sh-m); animation: tileIn .8s var(--ease) .15s both; }
.note figcaption { font: 800 .7rem var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.note figcaption::before { content: "♡ "; color: var(--rose2); }
.note blockquote { margin: 8px 0 0; font: italic 500 clamp(1.15rem, 4.6vw, 1.4rem)/1.45 var(--serif); }
.hero h1 { font-size: clamp(2.5rem, 9vw, 4rem); }
.hero h1 em { font-style: italic; background: linear-gradient(135deg, #e9578b, #8d6be8); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.teaser { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 18px 10px 14px; border-radius: 999px; background: var(--glass-hi); border: 1px solid var(--line); box-shadow: var(--sh-s); color: var(--ink); text-decoration: none; font-weight: 700; transition: transform .25s var(--ease); }
.teaser:hover { transform: translateY(-2px); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 22px; }
.cat-nav .chip { min-height: 38px; font-size: .9rem; flex: none; }
@media (max-width: 640px) { .cat-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -14px 22px; padding: 4px 14px 8px; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); } .cat-nav::-webkit-scrollbar { display: none; } } /* one swipeable row instead of three rows of buttons */
.cats { display: grid; gap: 34px 22px; }
.cat { scroll-margin-top: 14px; position: relative; animation: tileIn .7s var(--ease) both; }
.cat::before { content: ""; position: absolute; inset: -14px -10px; z-index: -1; border-radius: 36px; background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 45%, transparent), transparent 70%); }
.cat-head { display: flex; align-items: center; gap: 12px; margin: 0 4px 14px; }
.cat-em { width: 42px; height: 42px; flex: none; display: grid; place-items: center; font-size: 1.3rem; border-radius: 14px; background: #ffffffc0; box-shadow: var(--sh-s); }
.cat-head h2 { font-size: 1.35rem; }
.cat-head small { display: block; color: var(--soft); font-weight: 700; font-size: .85rem; }
.tiles > .tile-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; } /* an odd one out spans the row, so nothing sits alone */
@media (min-width: 900px) { .cats { grid-template-columns: 1fr 1fr; } .cat.wide { grid-column: 1 / -1; } .cat.wide .tiles { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; } .cat.wide .tiles > .tile-card:last-child:nth-child(odd) { grid-column: auto; min-height: 178px; } }
.tile-card { --c: var(--pink); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px 20px; min-height: 178px; border-radius: var(--r); text-decoration: none; color: var(--ink); background: linear-gradient(160deg, #ffffffcc, var(--c)); border: 1px solid var(--line); box-shadow: var(--sh-m); transition: transform .55s var(--spring), box-shadow .4s; animation: tileIn .7s var(--ease) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(22px) scale(.97); } }
.tile-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -50px; top: -50px; border-radius: 50%; background: radial-gradient(closest-side, #ffffffb0, transparent); transition: transform .5s var(--ease); }
.tile-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .8), transparent 65%); opacity: 0; transition: opacity .45s; pointer-events: none; }
.tile-card:hover::before { opacity: 1; }
.tile-card > * { position: relative; }
.tile-card:hover { transform: translateY(-6px); box-shadow: var(--sh-l); }
.tile-card:hover::after { transform: scale(1.4); }
.tile-card:active { transform: scale(.97); transition-duration: .15s; }
.tile-card .em { width: 62px; height: 62px; display: grid; place-items: center; font-size: 2rem; border-radius: 20px; background: #ffffffb8; box-shadow: var(--sh-s); margin-bottom: 14px; transition: transform .4s var(--ease); }
.tile-card:hover .em { transform: rotate(-6deg) scale(1.08); }
.tile-card strong { font: 600 1.18rem var(--serif); }
.tile-card small { color: var(--soft); font-weight: 600; line-height: 1.35; }
[data-c="pink"] { --c: #ffd9e5; } [data-c="peach"] { --c: #ffe3cf; } [data-c="lav"] { --c: #e6dcff; } [data-c="mint"] { --c: #d3f1e3; } [data-c="sky"] { --c: #d5eafd; } [data-c="butter"] { --c: #fff0bd; }
.love { text-align: center; margin: 44px 0 0; font: italic 500 1.15rem var(--serif); color: var(--soft); }
.love::before { content: "♡"; display: block; font-style: normal; font-size: 1.6rem; color: var(--rose); animation: beat 2.6s ease-in-out infinite; margin-bottom: 4px; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.25); } 24% { transform: scale(1); } 36% { transform: scale(1.18); } }

/* ---- timer ---- */
.timer { display: grid; justify-items: center; gap: 22px; }
.ring-wrap { position: relative; width: min(82vw, 340px); aspect-ratio: 1; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 14; }
.ring-fg { fill: none; stroke: url(#rg); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .4s linear; filter: drop-shadow(0 4px 10px rgba(200, 110, 170, .4)); }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.ring-time { font: 600 clamp(3rem, 15vw, 4.4rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.ring-label { color: var(--soft); font-weight: 700; letter-spacing: .06em; }
.timer .ctrls { display: flex; gap: 16px; align-items: center; }
.btn.big { width: 76px; height: 76px; min-height: 0; padding: 0; }
.tune { width: min(100%, 520px); display: grid; gap: 16px; }
.step-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper b { min-width: 3.2ch; text-align: center; font: 700 1.2rem var(--font); font-variant-numeric: tabular-nums; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-hi); display: grid; place-items: center; box-shadow: var(--sh-s); }
.stepper button:active { transform: scale(.9); }
.timer.running .ring-wrap { animation: ringBreath 8s ease-in-out infinite; }
@keyframes ringBreath { 50% { transform: scale(1.02); } }
.timer.running .ring-fg { filter: drop-shadow(0 4px 14px rgba(200, 110, 170, .6)); }

/* ---- sounds ---- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 8px; }
.scard { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--sh-m); transition: transform .35s var(--ease), box-shadow .35s, background .35s; }
.scard.on { background: linear-gradient(160deg, #fff, var(--c, var(--lav))); box-shadow: var(--sh-l); transform: translateY(-3px); }
.scard .top { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: left; width: 100%; }
.scard .em { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; background: #ffffffb8; box-shadow: var(--sh-s); flex: none; transition: transform .4s var(--ease); }
.scard.on .em { transform: scale(1.1) rotate(-4deg); }
.scard b { display: block; font: 600 1.1rem var(--serif); }
.scard small { color: var(--soft); font-weight: 700; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; margin-left: auto; opacity: 0; transition: opacity .3s; }
.scard.on .eq { opacity: 1; }
.eq i { width: 4px; border-radius: 3px; background: linear-gradient(var(--rose2), var(--violet)); height: 30%; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 50% { height: 100%; } }
.scard .slider { opacity: .55; transition: opacity .3s; } .scard.on .slider { opacity: 1; }
.sleep { margin: 26px auto 0; max-width: 560px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.sleep h3 { font-size: 1.15rem; }

/* ---- countdowns ---- */
.cd-hero { position: relative; overflow: hidden; text-align: center; padding: 30px 18px 26px; border-radius: 34px; background: linear-gradient(150deg, #fff, #ffe2ec 60%, #eadfff); border: 1px solid var(--line); box-shadow: var(--sh-l); margin-bottom: 20px; }
.cd-hero .em { font-size: 2.4rem; }
.cd-hero h3 { font-size: 1.5rem; margin: 6px 0 2px; }
.today { font: 600 clamp(2.4rem, 10vw, 3.8rem)/1.1 var(--serif); color: #d9588a; margin: 14px 0 8px; animation: pop 1.8s ease-in-out infinite; }
.units { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; }
.unit { min-width: 70px; padding: 12px 8px 10px; border-radius: 20px; background: #ffffffc8; box-shadow: var(--sh-s); }
.unit b { display: block; font: 600 clamp(1.8rem, 8vw, 2.6rem)/1 var(--serif); font-variant-numeric: tabular-nums; color: #d9588a; }
.unit span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.cd-note { color: var(--soft); font-weight: 700; margin: 0; min-height: 1.4em; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cd { position: relative; overflow: hidden; text-align: center; padding: 22px 16px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--sh-m); }
.cd h3 { font-size: 1.15rem; margin: 4px 0; }
.cd .big { font: 600 2.6rem/1.1 var(--serif); color: #d9588a; } .cd .big small { font: 700 .9rem var(--font); color: var(--soft); margin-left: 4px; }
.cd .tm { color: var(--soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.party { background: linear-gradient(150deg, #fff, #ffe2ec, #eadfff) !important; }
.party .big, .party .unit b { animation: pop 1.8s ease-in-out infinite; }
@keyframes pop { 50% { transform: scale(1.06); } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -30px; font-style: normal; animation: fall var(--d, 3.6s) linear infinite; animation-delay: var(--dl, 0s); font-size: var(--fs, 1.2rem); }
@keyframes fall { to { transform: translateY(420px) rotate(60deg); opacity: 0; } }

/* ---- gallery ---- */
.masonry { columns: 2; column-gap: 14px; }
@media (min-width: 640px) { .masonry { columns: 3; } } @media (min-width: 940px) { .masonry { columns: 4; } }
.ph { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: var(--lav); border-radius: 22px; overflow: hidden; break-inside: avoid; box-shadow: var(--sh-m); transition: transform .4s var(--ease), box-shadow .4s; animation: tileIn .7s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.ph img { width: 100%; display: block; opacity: 0; transition: transform .6s var(--ease), opacity .7s; }
.ph img.ld { opacity: 1; }
.ph:hover { transform: translateY(-4px); box-shadow: var(--sh-l); } .ph:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(40, 28, 46, .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: fadeIn .35s ease both; touch-action: pan-y; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-stage { width: 100vw; height: 100dvh; display: grid; place-items: center; padding: 70px 14px 110px; overflow: hidden; }
.lb-stage img { max-width: calc(100vw - 28px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb-stage img.in-l { animation: slideL .45s var(--ease) both; } .lb-stage img.in-r { animation: slideR .45s var(--ease) both; } .lb-stage img.pop { animation: zoomIn .5s var(--ease) both; }
@keyframes slideL { from { opacity: 0; transform: translateX(60px) scale(.96); } } @keyframes slideR { from { opacity: 0; transform: translateX(-60px) scale(.96); } } @keyframes zoomIn { from { opacity: 0; transform: scale(.9); } }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); } .lb-btn:active { transform: scale(.92); }
.lb-x { top: max(16px, env(safe-area-inset-top)); right: 16px; } .lb-prev { left: 14px; top: 50%; margin-top: -25px; } .lb-next { right: 14px; top: 50%; margin-top: -25px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: max(24px, env(safe-area-inset-bottom)); text-align: center; color: #fff; padding: 0 70px; }
.lb-cap p { margin: 0; font: italic 500 1.25rem var(--serif); min-height: 1.5em; } .lb-cap small { color: #ffffff90; font-weight: 700; letter-spacing: .1em; }

/* ---- picture tools ---- */
.drop { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 30px 18px; border-radius: 30px; border: 2px dashed #d9c4e8; background: var(--glass); transition: all .3s var(--ease); }
.drop.over { background: var(--lav); border-color: var(--violet); transform: scale(1.01); }
.drop .big-ic { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 24px; background: linear-gradient(135deg, var(--pink), var(--lav)); color: var(--rose); box-shadow: var(--sh-m); }
.drop h3 { font-size: 1.3rem; }
.options { display: grid; gap: 14px; justify-items: center; margin-bottom: 18px; }
.thumbs { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 12px; max-width: 100%; scroll-snap-type: x proximity; justify-content: safe center; scrollbar-width: none; } .thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 92px; height: 92px; padding: 0; border: 4px solid #fff; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--sh-m); transition: transform .3s var(--ease), box-shadow .3s; scroll-snap-align: center; }
.thumb:hover { transform: translateY(-4px) rotate(-1.5deg); box-shadow: var(--sh-l); } .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.working { display: grid; justify-items: center; gap: 16px; padding: 70px 10px; color: var(--soft); font-weight: 700; text-align: center; }
.spinner { width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--rose2), var(--violet)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.game { display: grid; gap: 14px; justify-items: center; }
.side { display: grid; gap: 14px; justify-items: center; width: 100%; min-width: 0; }
.viewer { position: relative; width: 100%; max-width: 880px; height: auto; max-height: min(74dvh, 720px); min-height: 240px; border-radius: 30px; overflow: hidden; background: linear-gradient(160deg, #f7ecf3, #ece3f8); box-shadow: inset 0 2px 12px rgba(120, 80, 130, .1), var(--sh-m); cursor: crosshair; }
.viewer canvas { position: absolute; inset: 0; touch-action: none; }
.vtools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.vtools .icon-btn { width: 42px; height: 42px; }
.viewer-wrap { position: relative; width: 100%; max-width: 880px; }
.progress { width: 100%; max-width: 560px; display: grid; gap: 8px; text-align: center; font-weight: 800; color: var(--soft); }
.bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .85); box-shadow: inset 0 1px 3px rgba(120, 80, 110, .1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--rose2), var(--violet)); transition: width .6s var(--ease); }
.palette { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 680px; padding: 4px; }
.sw { position: relative; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(110, 70, 120, .22); font-weight: 900; font-size: 1.05rem; display: grid; place-items: center; transition: transform .3s var(--ease), box-shadow .3s; }
.sw:hover { transform: translateY(-3px); }
.sw.on { transform: scale(1.18); box-shadow: 0 0 0 4px var(--violet2), 0 8px 20px rgba(110, 70, 120, .35); }
.sw.fin { opacity: .4; transform: scale(.88); } .sw.fin::after { content: "✓"; position: absolute; font-size: .9rem; right: -2px; bottom: -4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--rose); box-shadow: var(--sh-s); }
.sw.custom { background: conic-gradient(#ff9db8, #ffe58a, #8fd9a8, #7aa7f0, #c9b6ff, #ff9db8); color: transparent; cursor: pointer; }
.sw.custom::after { content: "+"; position: absolute; inset: 7px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.3rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hint { min-height: 1.5em; color: var(--soft); font-weight: 700; text-align: center; margin: 0; transition: opacity .3s; }
.desk { padding: 22px 12px; border-radius: 30px; background: linear-gradient(160deg, #f4e9f1, #e9e0f4); box-shadow: inset 0 2px 12px rgba(120, 80, 130, .1); display: grid; justify-items: center; }
.paper { width: min(100%, 460px); background: #fff; line-height: 0; box-shadow: 0 2px 4px rgba(90, 60, 100, .12), 0 20px 50px rgba(90, 60, 100, .25); border-radius: 3px; }
.paper canvas { width: 100%; height: auto; display: block; }
.finish { text-align: center; display: grid; gap: 10px; justify-items: center; animation: pageIn .6s var(--ease) both; }
.finish h3 { font-size: 1.6rem; }
/* big screens: picture on the left, colours and buttons beside it, so she never scrolls to change colour */
@media (min-width: 900px) {
  .game { grid-template-columns: minmax(0, 1fr) 286px; column-gap: 22px; align-items: start; }
  .game > :not(.viewer-wrap):not(.side) { grid-column: 1 / -1; }
  .game .viewer { max-height: min(calc(100dvh - 150px), 720px); }
  .side { position: sticky; top: 84px; align-content: start; }
  .side .palette { gap: 8px; padding: 6px; } .side .sw { width: 44px; height: 44px; }
  .side .toolbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .side .toolbar .wide { grid-column: 1 / -1; } .side .toolbar .btn { padding: 0 12px; white-space: nowrap; }
}
/* phones: the colours become one swipeable row, so picture, colours and buttons fit on one screen */
@media (max-width: 640px) {
  .game .viewer { max-height: max(260px, calc(100dvh - 330px)); }
  .game .palette { position: relative; justify-self: stretch; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -14px; padding: 12px 26px 20px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  .game .palette::-webkit-scrollbar { display: none; }
  .game .sw { flex: none; scroll-snap-align: center; } .game .sw.on { box-shadow: 0 0 0 4px var(--violet2), 0 3px 8px rgba(110, 70, 120, .3); } /* a shadow that fits inside the row, so it isn't cut off */
  .game .toolbar .btn { padding: 0 16px; min-height: 44px; gap: 7px; }
}
@media (pointer: coarse) { .vtools [data-z="in"], .vtools [data-z="out"] { display: none; } .vtools { opacity: 0; pointer-events: none; transition: opacity .3s; } .viewer.zoomed .vtools { opacity: 1; pointer-events: auto; } }

/* ---- satisfying corner ---- */
.bw { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; max-width: 440px; margin: 14px auto; padding: 16px; border-radius: 34px; background: linear-gradient(160deg, #e8f3ff, #f0e8ff); box-shadow: inset 0 2px 10px rgba(100, 120, 170, .15), var(--sh-m); touch-action: none; }
.bub { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle at 32% 26%, #fff 0 9%, rgba(255, 255, 255, .55) 10% 22%, rgba(206, 228, 255, .5) 23% 60%, rgba(160, 200, 245, .75) 100%); box-shadow: inset -5px -7px 12px rgba(110, 160, 220, .45), inset 3px 4px 8px #ffffffd0, 0 6px 12px rgba(100, 140, 200, .25); transition: transform .12s; }
.bub:active { transform: scale(.93); }
.bub.popped { background: radial-gradient(circle at 50% 50%, #e4eefa, #d6e4f4); box-shadow: inset 0 3px 6px rgba(110, 150, 200, .35); transform: scale(.78); }
.bub.popped::after { content: ""; position: absolute; inset: -30%; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); animation: burst .5s ease-out forwards; pointer-events: none; }
@keyframes burst { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.toywrap { position: relative; width: fit-content; max-width: 100%; margin: 14px auto; }
.toycv { display: block; border-radius: 32px; box-shadow: var(--sh-l); touch-action: none; }
.toyhint { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; padding: 0 20px; text-align: center; font: italic 500 1.05rem var(--serif); color: rgba(74, 59, 82, .55); pointer-events: none; transition: opacity .8s; }
.toyhint.gone { opacity: 0; }.toycv.pond { background: linear-gradient(165deg, #cfe8ff, #e0d5ff); } .toycv.sand { cursor: crosshair; }
.dots { display: flex; gap: 10px; justify-content: center; }

/* music lines */
.mwrap { position: relative; max-width: 700px; margin: 14px auto 18px; }
.mcv { display: block; width: 100%; aspect-ratio: 1.15; border-radius: 30px; box-shadow: var(--sh-l); touch-action: none; cursor: crosshair; }
.mhint { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; margin: 0; color: #ffffffcc; font: italic 500 1.5rem/1.35 var(--serif); pointer-events: none; transition: opacity .7s; }
.mhint small { font: 600 .95rem var(--font); color: #ffffff90; }
.chip .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.mrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--soft); font-weight: 700; flex-wrap: wrap; }
.mrow > span { min-width: 4.5em; text-align: right; }
@media (max-width: 520px) { .mrow > span { min-width: 0; width: 100%; text-align: center; margin-bottom: -4px; font-size: .85rem; } .mrow .seg button { padding: 9px 11px; } }
.mtempo { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; max-width: 420px; margin: 16px auto 4px; color: var(--soft); font-weight: 700; }
/* big screens: the drawing on the left, every control beside it */
@media (min-width: 900px) {
  .studio { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  .studio .mwrap { margin: 14px 0 0; }
  .studio .mcv { max-height: calc(100dvh - 130px); }
  .mside { position: sticky; top: 84px; padding-top: 14px; }
  .mside .mrow > span { min-width: 0; width: 100%; text-align: center; margin-bottom: -4px; font-size: .85rem; }
  .mside .mrow .seg button { padding: 9px 10px; font-size: .9rem; }
  .mside .mtempo { margin-top: 14px; }
  .mside .toolbar { flex-wrap: nowrap; } .mside .toolbar .btn:not(.round) { padding: 0 14px; white-space: nowrap; }
}
.btn.round.big2 { width: 60px; height: 60px; background: linear-gradient(135deg, var(--rose2), var(--violet)); color: #fff; border-color: transparent; box-shadow: 0 10px 26px rgba(200, 110, 170, .35); }

/* ---- now playing ---- */
.np { position: fixed; z-index: 15; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 16px; border-radius: 999px; background: rgba(74, 59, 82, .88); color: #fff; box-shadow: var(--sh-l); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: translate(-50%, 160%); opacity: 0; pointer-events: none; transition: transform .6s var(--spring), opacity .3s; }
.np.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.np a { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.np .eq { opacity: 1; margin: 0; height: 14px; } .np .eq i { width: 3px; background: linear-gradient(#ffc4d8, #c9b6ff); }
.np button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; transition: background .2s, transform .3s var(--spring); }
.np button:active { transform: scale(.9); }

/* ---- breathe ---- */
.breathe { display: grid; justify-items: center; gap: 16px; }
.breathe > .sub { margin: 0; min-height: 1.4em; }
.orb-wrap { position: relative; width: min(80vw, 340px); aspect-ratio: 1; display: grid; place-items: center; border: 0; background: none; padding: 0; margin: 6px 0; }
.orb { position: absolute; inset: 0; display: block; transform: scale(.56); transition: transform 1.6s cubic-bezier(.45, 0, .55, 1); }
.orb i { position: absolute; inset: 0; border-radius: 50%; }
.orb i:nth-child(1) { inset: -16%; background: radial-gradient(closest-side, rgba(255, 159, 189, .35), rgba(201, 182, 255, .15) 60%, transparent); animation: glow 7s ease-in-out infinite alternate; }
@keyframes glow { to { transform: scale(1.08); opacity: .7; } }
.orb i:nth-child(2) { inset: -7%; border: 1.5px solid rgba(255, 255, 255, .85); opacity: .6; transition: opacity .8s, transform .8s; }
.orb i:nth-child(3) { background: radial-gradient(circle at 34% 28%, #fff 0, #ffe1ea 32%, #f0c8ec 62%, #c9b6ff 100%); box-shadow: 0 30px 80px rgba(169, 139, 240, .42), inset 0 -14px 34px rgba(169, 139, 240, .3), inset 0 8px 20px #fff; }
.breathe[data-phase="hold"] .orb i:nth-child(2) { opacity: 1; transform: scale(1.04); }
.orb-text { position: relative; display: grid; gap: 2px; text-align: center; pointer-events: none; }
.orb-text b { font: 600 clamp(1.45rem, 6vw, 1.9rem) var(--serif); }
.orb-text small { font: 800 1.15rem var(--font); color: var(--soft); min-height: 1.4em; font-variant-numeric: tabular-nums; }

/* ---- DJ booth ---- */
.dj { display: grid; gap: 16px; }
.dj-tip { margin: 0; }
.decks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deck { --dc: #ff9fbd; --lvl: 0; position: relative; display: grid; gap: 9px; align-content: start; padding: 14px 12px 16px; border-radius: var(--r); color: #fff; background: linear-gradient(170deg, #2b2459, #47306f 70%, #5d3a77); box-shadow: var(--sh-l), inset 0 1px 0 rgba(255, 255, 255, .12); overflow: hidden; overflow: clip; min-width: 0; } /* clip: the glow below must never make the deck scrollable (its contents would slide up) */
.deck::before { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(closest-side, var(--dc), transparent); opacity: calc(.12 + var(--lvl) * .35); pointer-events: none; transition: opacity .1s; }
.deck > * { position: relative; }
.deck.synced { animation: pop .7s var(--ease); }
.dk-load { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; text-align: left; transition: background .2s; min-width: 0; }
.dk-load:hover { background: rgba(255, 255, 255, .14); }
.dk-letter { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: #2b2459; background: var(--dc); }
.dk-name { display: grid; min-width: 0; line-height: 1.2; } .dk-name b { font: 600 .98rem var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dk-name small { color: #ffffffa0; font-weight: 700; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck.loading .dk-name small { animation: breathe 1.2s ease-in-out infinite alternate; }
.vinyl { --rot: 0deg; position: relative; justify-self: center; width: min(100%, 210px); aspect-ratio: 1; border-radius: 50%; touch-action: none; cursor: grab; transform: rotate(var(--rot)); background: radial-gradient(circle, #141018 0 30%, #1d1823 31%, #141018 33%, #221c29 50%, #141018 52%, #201a27 70%, #141018 72%, #1b1621 100%); box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 4px rgba(255, 255, 255, .06); }
.vinyl.held { cursor: grabbing; }
.vinyl .grooves { position: absolute; inset: 4%; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 3px, rgba(255, 255, 255, .035) 3px 4px), conic-gradient(from 20deg, transparent, rgba(255, 255, 255, .13) 8%, transparent 18%, transparent 50%, rgba(255, 255, 255, .1) 58%, transparent 68%); }
.vinyl .lbl { position: absolute; inset: 33%; border-radius: 50%; background: radial-gradient(circle, #fff 0 7%, var(--dc) 8% 100%); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.vinyl .lbl::after { content: ""; position: absolute; left: 50%; top: 10%; width: 4px; height: 22%; margin-left: -2px; border-radius: 2px; background: rgba(255, 255, 255, .8); }
.deck.playing .vinyl { box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 4px rgba(255, 255, 255, .06), 0 0 30px color-mix(in srgb, var(--dc) 45%, transparent); }
.wave { width: 100%; height: 46px; border-radius: 10px; background: rgba(0, 0, 0, .22); touch-action: none; cursor: pointer; }
.dk-time { display: flex; justify-content: space-between; gap: 4px; font: 700 .76rem var(--font); color: #ffffffb0; font-variant-numeric: tabular-nums; }
.dk-time .bpm { color: var(--dc); }
.dk-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.deck button:not(.dk-load) { min-height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .09); color: #fff; font: 800 .78rem var(--font); letter-spacing: .04em; display: grid; place-items: center; padding: 0 4px; transition: background .2s, transform .3s var(--spring), box-shadow .2s, color .2s; }
.deck button:not(.dk-load):active { transform: scale(.92); transition-duration: .08s; }
.deck .dk-play { background: var(--dc); color: #2b2459; border-color: transparent; }
.deck.playing .dk-play { box-shadow: 0 0 18px color-mix(in srgb, var(--dc) 70%, transparent); }
.deck .pads button.on { background: var(--dc); color: #2b2459; box-shadow: 0 0 14px color-mix(in srgb, var(--dc) 60%, transparent); }
.pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; } .pads.fx { grid-template-columns: repeat(3, 1fr); }
.dk-label { margin: 2px 0 -3px; font: 800 .64rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: #ffffff80; }
.dk-tempo { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font: 700 .76rem var(--font); color: #ffffffb0; }
.dk-tempo b { min-width: 3.6em; text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
.deck .slider::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--dc), var(--dc)) 0 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, .16); }
.mixer { display: grid; gap: 14px; }
.strips { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.strip { display: grid; gap: 4px; min-width: 0; } .strip > b { font: 600 1.05rem var(--serif); }
.strip label { display: grid; grid-template-columns: 4.2em 1fr; align-items: center; gap: 6px; font: 700 .78rem var(--font); color: var(--soft); }
.slider.knob::-webkit-slider-runnable-track { background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(130, 100, 140, .45) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), rgba(130, 100, 140, .16); }
.xfade { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font: 600 1.2rem var(--serif); }
.xfade .slider { height: 40px; } .xfade .slider::-webkit-slider-runnable-track { height: 12px; background: linear-gradient(90deg, #ff9fbd, #b79cff); }
.xfade .slider::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: -11px; border-radius: 10px; }
.xfade .slider::-moz-range-thumb { width: 34px; height: 34px; border-radius: 10px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e9578b; display: inline-block; }
#rec.on { color: #fff; background: #e9578b; border-color: transparent; } #rec.on .rec-dot { background: #fff; animation: beat 1.2s ease-in-out infinite; }
.vu { width: 120px; height: 8px; border-radius: 99px; background: rgba(130, 100, 140, .16); overflow: hidden; } .vu i { display: block; height: 100%; background: linear-gradient(90deg, #8fe8c8, #ffd88a, #ff9fbd); transform-origin: left; transform: scaleX(0); }
.sheet { position: fixed; inset: 0; z-index: 26; display: grid; align-items: end; justify-items: center; background: rgba(40, 28, 46, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s ease both; }
.sheet-card { width: min(100%, 560px); max-height: 85dvh; overflow: auto; padding: 18px 18px max(20px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff8f4; box-shadow: var(--sh-l); display: grid; gap: 10px; animation: sheetUp .45s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-top { display: flex; justify-content: space-between; align-items: center; }
.sheet .dk-label { color: var(--faint); margin: 6px 0 0; }
.crate { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.crate button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-hi); box-shadow: var(--sh-s); transition: transform .3s var(--spring); }
.crate button:active { transform: scale(.96); }
.crate span { grid-row: span 2; font-size: 1.5rem; } .crate b { font: 600 .95rem var(--serif); } .crate small { color: var(--soft); font-weight: 700; font-size: .75rem; }
/* big screens: deck A, the mixer, deck B side by side like real decks, so the crossfader is always in reach */
@media (min-width: 900px) {
  .dj { grid-template-columns: minmax(0, 1fr) 260px minmax(0, 1fr); grid-template-areas: "tip tip tip" "a mix b"; align-items: start; gap: 16px 14px; }
  .dj-tip { grid-area: tip; } .decks { display: contents; } #deckA { grid-area: a; } #deckB { grid-area: b; }
  .dj .mixer { grid-area: mix; padding: 16px 14px; } .dj .strips { grid-template-columns: 1fr; gap: 12px; }
  .dj .xfade { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; } .dj .mixer .row-wrap { flex-direction: column; }
}
@media (max-width: 520px) { .deck { padding: 11px 9px 13px; gap: 8px; } .dk-letter { width: 26px; height: 26px; } .dk-load { padding: 5px; } .deck button:not(.dk-load) { min-height: 36px; font-size: .7rem; } .pads { gap: 4px; } .strips { gap: 12px; } .strip label { grid-template-columns: 3.6em 1fr; font-size: .72rem; } .dk-tempo span { display: none; } }

/* ---- love notes ---- */
.notes { display: grid; gap: 18px; max-width: 560px; margin: 6px auto 0; }
.ncard { display: grid; gap: 14px; }
.ncard h3 { font-size: 1.2rem; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; color: var(--ink); font-weight: 600; } .steps li::marker { color: var(--rose); font-weight: 800; }
.key { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; border-radius: 8px; background: #fff; box-shadow: var(--sh-s); color: #3b82f6; font-size: .9rem; vertical-align: middle; }
.nhead { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.nem { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--pink), var(--lav)); font-size: 1.7rem; box-shadow: var(--sh-s); }
.switch { position: relative; width: 58px; height: 34px; border-radius: 99px; border: 0; padding: 0; background: rgba(130, 100, 140, .22); transition: background .3s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(80, 50, 90, .3); transition: transform .35s var(--spring); }
.switch[aria-checked="true"] { background: linear-gradient(135deg, var(--rose2), var(--violet)); } .switch[aria-checked="true"] i { transform: translateX(24px); }
.switch:disabled { opacity: .5; }
.nbody { display: grid; gap: 12px; justify-items: center; transition: opacity .3s; }
.ncard.off .nbody { opacity: .55; }
.nbody .seg button { padding: 9px 13px; }
.nrow { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--soft); }
.nrow select { min-height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-hi); font-weight: 800; color: var(--ink); box-shadow: var(--sh-s); }
.nstatus { margin: 0; min-height: 1.4em; text-align: center; font-weight: 700; color: var(--rose); }
.npreview { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, .78); box-shadow: var(--sh-m); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.npreview .nicon img { width: 38px; height: 38px; border-radius: 10px; display: block; }
.npreview b { display: block; font-size: .92rem; } .npreview small { display: block; color: var(--ink); font-size: .9rem; transition: opacity .3s; } .npreview em { align-self: start; font-style: normal; font-size: .75rem; color: var(--faint); }

/* ---- print: show only the colouring page ---- */
#print-sheet { display: none; }
@media print { body > *:not(#print-sheet) { display: none !important; } #print-sheet { display: block !important; } body { background: #fff; } }

@media (max-width: 520px) { #app { padding: 4px 14px 80px; } .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; } .tile-card { min-height: 160px; padding: 16px 14px; } .tile-card .em { width: 54px; height: 54px; font-size: 1.7rem; margin-bottom: 10px; } .sgrid { grid-template-columns: 1fr 1fr; gap: 10px; } .scard { padding: 12px; } .scard .top { flex-direction: column; align-items: flex-start; } .scard .eq { position: absolute; right: 14px; top: 14px; } .unit { min-width: 62px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.viewer.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ph { position: relative; }
.badge { position: absolute; right: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font: 800 .8rem var(--font); box-shadow: var(--sh-s); backdrop-filter: blur(6px); }
.badge.new { background: linear-gradient(135deg, var(--rose2), var(--violet)); color: #fff; }
