/* ringcay
   Layout idea: a film scrapbook. Squared paper, photos with tape, typewriter notes, one heavy grotesque for the loud lines.
   Colour is bright and flat. Two palettes, day and night, picked from the visitor's clock (see applyTheme in main.js). */
:root {
  color-scheme: light;
  --paper: #f7f2e7;
  --grid: rgba(40, 34, 60, 0.05);
  --ink: #1c1830;
  --sub: rgba(28, 24, 48, 0.66);
  --card: #ffffff;
  --well: #f3eddf;             /* inputs and quiet tiles, sitting on a card */
  --line: rgba(28, 24, 48, 0.14);
  --mark: #ffe14d;             /* highlighter */
  --btn: #1c1830;
  --btn-ink: #f7f2e7;
  --frame: #ffffff;            /* photo frames stay light in both palettes */
  --frame-ink: #1c1830;
  --pink: #ff4fa3; --cobalt: #2447d6; --lemon: #ffe14d; --tomato: #ff5c34; --mint: #8be28a; --sky: #a9deff; --lilac: #c9b8ff;
  --display: "Bricolage Grotesque", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --typer: "Special Elite", "Noto Sans SC", "PingFang SC", ui-monospace, monospace;
  --hand: "Nanum Pen Script", "Noto Sans SC", "PingFang SC", cursive;
  --r: 14px;
  --r-lg: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #15122e;
  --grid: rgba(255, 255, 255, 0.045);
  --ink: #f7f2e7;
  --sub: rgba(247, 242, 231, 0.68);
  --card: #211d47;
  --well: #2c2759;
  --line: rgba(247, 242, 231, 0.18);
  --mark: #8a5cf6;
  --btn: #ffe14d;
  --btn-ink: #15122e;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; transition: background-color 600ms var(--ease), color 600ms var(--ease); }
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
::selection { background: var(--pink); color: #fff; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
mark { color: inherit; background: linear-gradient(transparent 10%, var(--mark) 10% 92%, transparent 92%); padding: 0 0.1em; margin: 0 -0.1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.typer { font-family: var(--typer); font-size: 16.5px; line-height: 1.5; color: var(--sub); }
.hand { font-family: var(--hand); font-size: 34px; line-height: 1; }
.fine { font-size: 13.5px; color: var(--sub); display: flex; gap: 6px; align-items: flex-start; }
.fine svg { flex: none; margin-top: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; height: var(--nav-h); display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 3vw, 40px); background: var(--paper); transition: background-color 600ms var(--ease); }
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; text-decoration: none; font: 800 25px/1 var(--display); letter-spacing: -0.05em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { text-decoration: none; font-family: var(--typer); font-size: 16px; padding: 9px 13px 7px; border-radius: 999px; }
.nav-links a:hover, .nav-links a.on { background: var(--card); }
.lang { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); }
.lang button { height: 34px; min-width: 40px; padding: 0 11px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--sub); }
.lang button.on { background: var(--ink); color: var(--paper); }

/* ---------- buttons, tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font: 800 16px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; transition: transform 140ms var(--ease), background-color 140ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn.primary, .btn.ink { background: var(--btn); color: var(--btn-ink); }
.btn.ghost { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.quiet { background: var(--well); }
.btn.big { height: 56px; padding: 0 26px; font-size: 18px; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--tomato); }
.btn small { font-weight: 600; opacity: 0.75; }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover, .btn.ink:hover { background: var(--pink); color: #fff; } .btn.ghost:hover, .btn.quiet:hover { background: var(--mark); color: #1c1830; box-shadow: none; } }
.pill { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; color: #1c1830; font: 800 14px/1 var(--display); }
.tag { position: absolute; top: -8px; right: -6px; min-width: 32px; padding: 4px 8px; border-radius: 999px; background: var(--pink); color: #fff; font: 800 12.5px/1.1 var(--display); text-align: center; transform: rotate(7deg); box-shadow: 0 0 0 3px var(--card); }
.tag.owned { background: #1c1830; color: #fff; }
.tag.free { background: var(--well); color: var(--ink); }
.used .tag { position: static; transform: none; box-shadow: none; margin-left: auto; }

/* ---------- sky, stage, photo frames ---------- */
.sky-bg, .stage { background: radial-gradient(circle at 15% 17%, #ffe14d 0 5.6%, transparent 5.9%), radial-gradient(ellipse 9% 5% at 76% 15%, #fff 98%, transparent), radial-gradient(ellipse 6% 4% at 71% 17.5%, #fff 98%, transparent), radial-gradient(ellipse 6% 3.6% at 81% 17.5%, #fff 98%, transparent), radial-gradient(ellipse 6% 3.4% at 30% 31%, #ffffffee 98%, transparent), radial-gradient(ellipse 4.4% 2.8% at 26% 32.5%, #ffffffee 98%, transparent), linear-gradient(180deg, #4fb5ff 0%, #a9deff 65%, #e3f5ff 100%); }
[data-theme="night"] .sky-bg, [data-theme="night"] .stage { background: radial-gradient(circle at 17% 15%, #1d1548 0 4.3%, transparent 4.6%), radial-gradient(circle at 15.5% 17%, #fff1b8 0 5%, transparent 5.3%), radial-gradient(1.6px 1.6px at 28% 12%, #fff4d6 99%, transparent), radial-gradient(1.4px 1.4px at 44% 22%, #fff4d6 99%, transparent), radial-gradient(2px 2px at 62% 9%, #fff4d6 99%, transparent), radial-gradient(1.4px 1.4px at 78% 26%, #fff4d6 99%, transparent), radial-gradient(1.8px 1.8px at 88% 13%, #fff4d6 99%, transparent), radial-gradient(1.3px 1.3px at 52% 38%, #fff4d6 99%, transparent), radial-gradient(1.6px 1.6px at 9% 40%, #fff4d6 99%, transparent), radial-gradient(1.5px 1.5px at 94% 44%, #fff4d6 99%, transparent), radial-gradient(1.4px 1.4px at 36% 52%, #fff4d6 99%, transparent), radial-gradient(1.7px 1.7px at 70% 56%, #fff4d6 99%, transparent), linear-gradient(180deg, #16113a 0%, #3a2578 60%, #7a3e9b 100%); }
.stage { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none; }
.stage .sky { display: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; outline: none; }
.stage canvas:active { cursor: grabbing; }
.stage-ui { position: absolute; inset: 0; pointer-events: none; }
.stage-ui > * { pointer-events: auto; }
.stage-ui .pill { position: absolute; left: 14px; bottom: 14px; }
.stage-slot { width: 100%; height: 100%; }

.snap { position: relative; background: var(--frame); color: var(--frame-ink); padding: 14px 14px 0; border-radius: 3px; transform: rotate(var(--r, -1.5deg)); box-shadow: 0 18px 44px -18px rgba(20, 14, 50, 0.45); }
.snap-img { position: relative; overflow: hidden; border-radius: 2px; }
.snap figcaption { padding: 12px 6px 16px; text-align: center; }
.tape { position: absolute; top: -15px; left: 50%; width: 118px; height: 30px; margin-left: -59px; background: rgba(255, 79, 163, 0.86); transform: rotate(-4deg); z-index: 2; }
[data-theme="night"] .tape { background: rgba(255, 225, 77, 0.9); }
.tape.t1 { background: rgba(255, 225, 77, 0.9); transform: rotate(3deg); } .tape.t2 { background: rgba(36, 71, 214, 0.8); } .tape.t3 { background: rgba(139, 226, 138, 0.9); transform: rotate(5deg); }
.stamp { position: absolute; top: -18px; right: -14px; width: 126px; height: 126px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--cobalt); color: var(--lemon); font: 800 19px/1.05 var(--display); letter-spacing: -0.03em; transform: rotate(12deg); z-index: 3; }
.stamp b { display: block; font-size: 27px; }
[data-theme="night"] .stamp { background: var(--pink); color: #15122e; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding: 20px clamp(16px, 3vw, 40px) 40px; max-width: 1480px; margin: 0 auto; }
.hero-copy { display: grid; gap: 20px; }
.hero h1 { font-size: clamp(50px, 7vw, 108px); letter-spacing: -0.05em; line-height: 0.98; }
.lede { font-size: clamp(16.5px, 1.4vw, 19px); max-width: 30em; }
.strip { display: grid; gap: 4px; margin-top: 8px; }
.strip-row { display: flex; gap: 0; margin-left: -8px; }
.sticker { flex: 0 1 118px; min-width: 0; aspect-ratio: 22 / 17; transform: rotate(var(--r)); transition: transform 180ms var(--ease); filter: drop-shadow(0 0 0 #fff); }
.sticker img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 300ms var(--ease); filter: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 5px 6px rgba(20, 14, 50, 0.25)); }
.sticker img.in { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .sticker:hover { transform: rotate(0deg) translateY(-4px) scale(1.06); } }
.hero-photo { position: relative; justify-self: center; width: min(100%, 640px); }
.hero-photo .snap.big { --r: -2.2deg; padding: 18px 18px 0; }
.hero-photo .snap-img { aspect-ratio: 35 / 32; }
.hero-photo figcaption { font-size: clamp(34px, 3.6vw, 50px); padding: 16px 6px 22px; }

.notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 clamp(16px, 3vw, 40px); max-width: 1480px; margin: 0 auto; }
.note { border-radius: 4px; padding: 18px 18px 22px; display: grid; gap: 6px; align-content: start; color: #1c1830; }
.note:nth-child(odd) { transform: rotate(-0.8deg); } .note:nth-child(even) { transform: rotate(0.7deg); }
.note b { font: 800 23px/1.05 var(--display); letter-spacing: -0.03em; }
.note span { font-family: var(--typer); font-size: 14.5px; line-height: 1.45; color: rgba(28, 24, 48, 0.78); }
.lemon { background: var(--lemon); } .sky { background: var(--sky); } .pink { background: #ffc2de; } .mint { background: var(--mint); }

.explore { padding: 72px clamp(16px, 3vw, 40px) 32px; max-width: 1480px; margin: 0 auto; }
.explore-head { display: grid; gap: 10px; margin-bottom: 34px; }
.explore-head h2 { font-size: clamp(34px, 4.4vw, 60px); }
.explore-head p { max-width: 44em; }
.masonry { columns: 250px; column-gap: 26px; }
.pin { display: block; break-inside: avoid; margin-bottom: 34px; text-decoration: none; }
.pin.snap { padding: 11px 11px 0; transition: transform 220ms var(--ease); }
.pin .snap-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.pin .snap-img img.in { opacity: 1; }
.pin .open { position: absolute; right: 8px; top: 8px; background: var(--pink); color: #fff; opacity: 0; transition: opacity 150ms var(--ease); }
.pin figcaption { display: grid; gap: 1px; text-align: left; padding: 10px 4px 14px; }
.pin figcaption b { font: 800 17px/1.2 var(--display); letter-spacing: -0.02em; }
.pin figcaption span { font-family: var(--typer); font-size: 13px; color: rgba(28, 24, 48, 0.62); }
@media (hover: hover) and (pointer: fine) { .pin.snap:hover { transform: rotate(0deg) translateY(-4px); } .pin:hover .snap-img img { transform: scale(1.04); } .pin:hover .open { opacity: 1; } }
.pin.idea { border-radius: 4px; padding: 22px 18px 20px; display: grid; gap: 8px; color: #1c1830; transform: rotate(0.8deg); }
.pin.idea .hand { font-size: 40px; line-height: 0.92; }
.pin.idea span { font-family: var(--typer); font-size: 14px; color: rgba(28, 24, 48, 0.78); }
.foot { display: grid; gap: 14px; justify-items: start; padding: 28px clamp(16px, 3vw, 40px) 56px; max-width: 1480px; margin: 0 auto; color: var(--sub); font-size: 14px; }
.foot p { max-width: 60em; }

/* ---------- studio + viewer ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 18px; height: calc(100dvh - var(--nav-h)); padding: 0 clamp(16px, 2vw, 28px) 18px; }
.studio-stage { min-height: 0; }
.studio-stage .stage { border-radius: var(--r-lg); }
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--card); border-radius: var(--r-lg); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--well) transparent; transition: background-color 600ms var(--ease); }
.steps { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 10px; background: var(--card); }
.steps button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 999px; font: 800 16px/1 var(--display); letter-spacing: -0.02em; color: var(--sub); }
.steps button i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--well); }
.steps button.on { background: var(--ink); color: var(--paper); }
.steps button.on i { background: var(--pink); color: #fff; }
.panel-body { flex: 1; display: grid; gap: 20px; align-content: start; padding: 10px 22px 22px; }
.panel-body > .btn { justify-self: start; }
.panel-body > .btn.wide { justify-self: stretch; }
.panel h2 { font-size: 40px; }
.sub { color: var(--sub); margin-top: -12px; }
.lead { margin-top: -10px; }
.formline { margin-top: -8px; padding: 10px 14px; border-radius: var(--r); background: var(--well); color: var(--ink); font-size: 15px; }
.panel-foot { position: sticky; bottom: 0; z-index: 3; padding: 12px 16px 16px; background: linear-gradient(180deg, transparent 0, var(--card) 16px); display: grid; gap: 8px; }
.panel-foot.two { grid-template-columns: auto 1fr; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.tight { gap: 8px; }
legend { padding: 0; margin-bottom: 10px; font: 800 20px/1.2 var(--display); letter-spacing: -0.03em; }
legend em { font: 400 13.5px/1.2 var(--typer); font-style: normal; color: var(--sub); margin-left: 6px; letter-spacing: 0; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--sub); }
.field.grow { flex: 1; min-width: 0; }
input[type="text"], input[type="date"], textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r); border: 2px solid transparent; background: var(--well); outline: none; transition: border-color 140ms var(--ease); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { border-color: var(--pink); }
::placeholder { color: var(--sub); opacity: 0.7; }

.fams { display: flex; flex-wrap: wrap; gap: 6px; }
.tiles { display: grid; gap: 12px; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { position: relative; display: grid; gap: 4px; justify-items: center; padding: 8px 4px 10px; border-radius: var(--r); background: var(--well); border: 2.5px solid transparent; transition: transform 140ms var(--ease), border-color 140ms var(--ease); }
.tile img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform 180ms var(--ease); }
.tile span:not(.tag) { font-family: var(--typer); font-size: 13px; line-height: 1.15; text-align: center; }
.tile.ring { color: #1c1830; padding: 6px 4px 12px; }
.tile.ring img { aspect-ratio: 22 / 17; }
.tile.ring:nth-child(4n + 1) { background: #fff3c4; } .tile.ring:nth-child(4n + 2) { background: #ffe3ef; } .tile.ring:nth-child(4n + 3) { background: #e2eeff; } .tile.ring:nth-child(4n + 4) { background: #e4f8e9; }
.tile.on { border-color: var(--pink); }
.tile:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tile:hover img { transform: translateY(-3px) scale(1.04); } }

.swatches { display: flex; gap: 10px; }
.swatches.wrap { flex-wrap: wrap; }
.swatch { display: grid; gap: 5px; justify-items: center; width: 66px; font-size: 12px; font-weight: 600; line-height: 1.1; text-align: center; }
.swatch i { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px transparent; transition: box-shadow 140ms var(--ease); }
.swatch.on i { box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--pink); }
.dots { display: flex; flex-wrap: wrap; gap: 12px; }
.dot-btn { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff 0 9%, transparent 28%), conic-gradient(from 20deg, var(--c), color-mix(in srgb, var(--c) 60%, #fff), var(--c), color-mix(in srgb, var(--c) 70%, #000), var(--c)); box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px transparent; transition: box-shadow 140ms var(--ease), transform 140ms var(--ease); }
.dot-btn.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--pink); }
.dot-btn:active { transform: scale(0.92); }
.chip { height: 38px; padding: 0 14px; border-radius: 999px; background: var(--well); font: 800 14.5px/1 var(--display); letter-spacing: -0.02em; }
.chip.on { background: var(--ink); color: var(--paper); }

.trial { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-radius: var(--r); background: var(--lemon); color: #1c1830; font-size: 14px; line-height: 1.35; }
.trial .btn { flex: none; background: #1c1830; color: #fff; }
.from { justify-self: start; padding: 6px 12px; border-radius: 999px; background: var(--lilac); color: #1c1830; font-size: 13.5px; font-weight: 600; margin-top: -8px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--cobalt); color: #fff; font-weight: 600; font-size: 14.5px; }
.empty { padding: 16px; border-radius: var(--r); background: var(--well); color: var(--sub); font-size: 14.5px; }
.file { cursor: pointer; }
.photo-row { display: flex; gap: 12px; align-items: center; }
.photo-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.piece-head { display: flex; gap: 12px; align-items: flex-end; }
.piece-head img { width: 72px; height: 72px; flex: none; background: var(--well); border-radius: var(--r); }

.snap.edit { justify-self: center; width: min(100%, 310px); --r: -1.6deg; padding: 12px 12px 4px; }
.snap.edit > img, .snap.big > img { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 2px; }
.snap .drop, .snap .stand-in { width: 100%; aspect-ratio: 1; border-radius: 2px; }
.snap .drop { display: grid; place-content: center; justify-items: center; gap: 2px; background: #f3eddf; color: rgba(28, 24, 48, 0.66); text-align: center; }
.snap .drop b { color: #1c1830; font: 800 17px/1.2 var(--display); }
.snap .drop small { font-size: 12.5px; }
.snap input.caption { font-family: var(--hand); font-size: 30px; line-height: 1; text-align: center; border: 0; min-height: 0; height: 50px; padding: 8px 4px 4px; background: transparent; color: #1c1830; border-radius: 0; }
.snap input.caption::placeholder { color: rgba(28, 24, 48, 0.4); }
.snap input.caption:focus { background: #f3eddf; }
.snap .over { position: absolute; top: 22px; right: 22px; background: #fff; color: #1c1830; }
.stand-in { display: grid; place-items: center; }
.snap .stand-in img { width: 74%; aspect-ratio: 1; object-fit: contain; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--well); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--sub); }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg.mini { grid-template-columns: 40px 40px; flex: none; }
.mem-row { display: flex; gap: 12px; align-items: center; padding: 8px 8px 8px 10px; border-radius: var(--r); background: var(--well); }
.mem-row img { width: 44px; height: 44px; flex: none; }
.mem-row > div:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.mem-row b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-row span { font-size: 13px; color: var(--sub); }
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 600; }
.switch em { font-style: normal; font-weight: 400; color: var(--sub); }
.switch input { position: absolute; opacity: 0; }
.switch i { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background-color 160ms var(--ease); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease); }
.switch input:checked + i { background: var(--pink); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--pink); outline-offset: 2px; }
.used { display: grid; gap: 6px; }
.used-row { display: flex; gap: 12px; align-items: center; padding: 6px 12px 6px 8px; border-radius: var(--r); background: var(--well); font-weight: 600; font-size: 15px; }
.used-row img { width: 44px; height: 40px; flex: none; object-fit: contain; }

/* ---------- modal + toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(15, 11, 36, 0.62); animation: fade 200ms var(--ease); overflow-y: auto; }
.modal { position: relative; width: min(100%, 430px); background: var(--card); border-radius: var(--r-lg); padding: 28px 24px 22px; display: grid; gap: 14px; animation: rise 320ms var(--ease); }
.modal .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--well); z-index: 4; }
.modal h3 { font-size: 34px; }
.modal .sub { margin-top: -6px; }
.modal.memory { padding-top: 52px; }
.modal .snap.big { justify-self: center; width: min(100%, 330px); --r: -2deg; padding: 12px 12px 0; }
.modal .snap.big figcaption { font-size: 32px; padding: 10px 4px 14px; }
.card-text { display: grid; gap: 8px; padding: 6px 6px 6px; }
.when { font-family: var(--typer); font-size: 13.5px; color: var(--sub); }
.story { font-size: 17px; line-height: 1.55; white-space: pre-wrap; }
.buy-art { display: flex; justify-content: center; gap: 6px; padding: 10px; border-radius: var(--r); background: #e2eeff; }
.buy-art img { width: 150px; height: 132px; object-fit: contain; }
.buy-art.pack img { width: 31%; height: auto; }
.demo-note { padding: 12px 14px; border-radius: var(--r); background: var(--lemon); color: #1c1830; font-size: 14px; line-height: 1.4; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: calc(100vw - 32px); padding: 13px 18px 11px; border-radius: 999px; background: #1c1830; color: #fff; font-family: var(--typer); font-size: 14.5px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
[data-theme="night"] #toast { background: var(--lemon); color: #15122e; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

/* ---------- Chinese ---------- */
/* Latin keeps the brand faces. Chinese sets in Noto Sans SC: black weight for the loud lines, medium for notes.
   No brush or Kai faces: the "handwritten" lines become a bold sans, the typewriter lines a plain medium. */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.12; }
:lang(zh) .hero h1 { font-size: clamp(42px, 5.8vw, 88px); line-height: 1.1; }
:lang(zh) .panel h2 { font-size: 32px; }
:lang(zh) .typer { font-size: 15px; font-weight: 500; line-height: 1.7; }
:lang(zh) .hand { font-weight: 700; font-size: 22px; line-height: 1.3; letter-spacing: 0.02em; }
:lang(zh) .hero-photo figcaption { font-size: clamp(22px, 2.2vw, 30px); }
:lang(zh) .pin.idea .hand { font-size: 24px; font-weight: 900; line-height: 1.25; }
:lang(zh) .modal .snap.big figcaption { font-size: 21px; }
:lang(zh) .snap input.caption { font-size: 19px; font-weight: 700; }
:lang(zh) .note b, :lang(zh) legend, :lang(zh) .btn, :lang(zh) .chip, :lang(zh) .steps button, :lang(zh) .pin figcaption b { font-weight: 700; letter-spacing: 0; }
:lang(zh) .note span, :lang(zh) .tile span:not(.tag), :lang(zh) .pin figcaption span { font-weight: 500; }
:lang(zh) .stamp { font-size: 17px; font-weight: 900; } :lang(zh) .stamp b { font-size: 24px; }
:lang(zh) .story { line-height: 1.8; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav { gap: 8px; }
  .nav .btn.primary { height: 40px; padding: 0 14px; font-size: 14.5px; }
  .hero { grid-template-columns: 1fr; padding-top: 22px; gap: 26px; }
  .hero-photo { order: -1; width: min(100%, 460px); }
  .stamp { width: 96px; height: 96px; font-size: 15px; right: -6px; } .stamp b { font-size: 21px; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masonry { columns: 2; column-gap: 14px; }
  .pin { margin-bottom: 22px; }
  .explore { padding-top: 48px; }
  .studio { display: block; height: auto; padding: 0 12px 12px; }
  .studio-stage { position: sticky; top: var(--nav-h); z-index: 5; height: 39svh; min-height: 260px; padding-bottom: 10px; background: var(--paper); }
  .panel { overflow: visible; }
  .steps { top: calc(var(--nav-h) + max(39svh, 260px)); }
}
@media (max-width: 420px) {
  .nav-links { display: none; }
  .lang { padding: 0; background: none; }
  .lang button { height: 40px; background: var(--card); color: var(--ink); }
  .lang button.on { display: none; }
  .hero h1 { font-size: 46px; }
  .panel h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
