@property --rot { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@property --s { syntax: "<number>"; inherits: false; initial-value: .74; }
@property --glow-h { syntax: "<number>"; inherits: true; initial-value: 30; }

:root {
  --bg: #faf6f0;
  --bg-2: #f3ece2;
  --bg-elev: #ffffff;
  --line: #ebe3d7;
  --line-strong: #dcd1c1;
  --fg: #1d1a17;
  --fg-dim: #625a52;
  --fg-faint: #9d948a;
  --accent: #ee7a12;
  --accent-ink: #ffffff;
  --accent-soft: rgba(238, 122, 18, .14);
  --teal: #13989a;
  --teal-soft: rgba(19, 152, 154, .14);
  --glass: rgba(255, 255, 255, .78);
  --shade: 250, 246, 240;
  --dot: rgba(98, 90, 82, .14);
  --shadow-sm: 0 1px 2px rgba(70, 45, 20, .06), 0 4px 12px -4px rgba(70, 45, 20, .1);
  --shadow: 0 1px 2px rgba(70, 45, 20, .06), 0 18px 40px -16px rgba(70, 45, 20, .25);
  --shadow-lg: 0 2px 4px rgba(70, 45, 20, .06), 0 30px 70px -20px rgba(70, 45, 20, .35);
  --glow-a: .22;
  --radius: 16px;
  --gutter: clamp(16px, 4.5vw, 96px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-cover: cubic-bezier(.76, 0, .24, 1);
  --cover-dur: .9s;
  --pick-dur: .8s;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #13110f;
  --bg-2: #1b1815;
  --bg-elev: #211d19;
  --line: #2d2823;
  --line-strong: #3d362f;
  --fg: #f5efe7;
  --fg-dim: #b4aa9e;
  --fg-faint: #776d63;
  --accent: #ff9d3d;
  --accent-ink: #1a1208;
  --accent-soft: rgba(255, 157, 61, .16);
  --teal: #45d2d2;
  --teal-soft: rgba(69, 210, 210, .14);
  --glass: rgba(33, 29, 25, .78);
  --shade: 19, 17, 15;
  --dot: rgba(245, 239, 231, .07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px -4px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 70px -20px rgba(0, 0, 0, .8);
  --glow-a: .2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
  transition: background .3s var(--ease), color .3s var(--ease);
}
body:not(.revealed) { overflow: hidden; height: 100dvh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { flex: none; }
.mono { font-family: var(--mono); font-size: .8125rem; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; }
.brand-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 3px var(--line-strong); }
.brand-name b { color: var(--accent); font-weight: 700; }
.brand-btn { background: none; border: 0; padding: 0; cursor: pointer; }

.primary-btn, .ghost-btn, .pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.primary-btn { padding: 12px 20px; border: 0; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px var(--accent); }
.primary-btn:hover { transform: translateY(-2px); }
.primary-btn:disabled { opacity: .4; cursor: default; transform: none; }
.primary-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.primary-btn .i-lock { display: none; }
.primary-btn.is-locked .i-lock { display: block; }
.ghost-btn { padding: 11px 18px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--fg); }
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.pill-btn { padding: 8px 16px; font-size: .88rem; border: 1px solid var(--line-strong); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), color .2s var(--ease), opacity .4s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--bg-2); color: var(--fg-dim); }
.chip:empty { display: none; }
.chip::before, .status::before, .slot-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-faint); }
[data-status="live"]::before { background: #22b35e !important; }
[data-status="wip"]::before { background: #e8a613 !important; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .74rem; padding: 3px 9px; border-radius: 7px; background: var(--bg-2); color: var(--fg-dim); border: 1px solid var(--line); }

.cover {
  --R: clamp(420px, 44vw, 940px);
  --cx: 100vw;
  --cy: 52dvh;
  --focus: 180deg;
  --dir: -1;
  --tw: clamp(230px, 15.5vw, 310px);
  --slot-h: calc(var(--tw) * .625 + 70px);
  position: fixed; inset: 0; z-index: 30;
  overflow: hidden;
  background:
    radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--bg);
  color: var(--fg);
  transition: transform var(--cover-dur) var(--ease-cover), --glow-h 1.2s var(--ease), background-color .3s var(--ease);
}
body.revealed .cover { transform: translateY(-100%); pointer-events: none; }
.skip-cover .cover { transition: none; }
.cover::before, .cover::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.cover::before { width: 46vw; height: 46vw; left: -12vw; top: -18vw; background: var(--accent-soft); }
.cover::after { width: 40vw; height: 40vw; right: -10vw; bottom: -20vw; background: var(--teal-soft); }

.mosaic {
  position: absolute; inset: -20%;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
  transform: rotate(-7deg);
  transition: opacity var(--pick-dur) var(--ease), filter var(--pick-dur) var(--ease);
}
.cover.picking .mosaic { opacity: .25; filter: blur(3px); }
.mosaic-row {
  display: flex; gap: 26px; width: max-content;
  animation: marquee 70s linear infinite;
  animation-direction: var(--dir, normal);
}
@keyframes marquee { to { transform: translateX(-50%); } }
.tile {
  flex: none; width: clamp(200px, 19vw, 300px);
  border-radius: 14px; overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.tile-bar, .slot-bar, .thumb-bar { display: flex; align-items: center; gap: 5px; padding: 0 10px; height: 22px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.tile-bar i, .slot-bar i, .thumb-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.tile-bar i:first-child, .slot-bar i:first-child, .thumb-bar i:first-child { background: #f36d5f; }
.tile-bar i:nth-child(2), .slot-bar i:nth-child(2), .thumb-bar i:nth-child(2) { background: #f5be4f; }
.tile-bar i:nth-child(3), .slot-bar i:nth-child(3), .thumb-bar i:nth-child(3) { background: #5fcf65; }
.tile-shot { aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.tile-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-lines { display: grid; gap: 6px; padding: 12px 14px 14px; }
.tile-lines i { height: 7px; border-radius: 4px; background: var(--bg-2); }
.tile-lines i:first-child { width: 70%; background: var(--line-strong); }
.tile-lines i:last-child { width: 45%; }
.cover-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 52% at 50% 52%, rgba(var(--shade), .97) 0%, rgba(var(--shade), .9) 45%, rgba(var(--shade), .35) 100%),
    linear-gradient(180deg, rgba(var(--shade), .7), rgba(var(--shade), 0) 25%, rgba(var(--shade), 0) 75%, rgba(var(--shade), .8));
  transition: opacity var(--pick-dur) var(--ease);
}
.cover.picking .cover-shade {
  background:
    radial-gradient(circle at var(--cx) var(--cy), hsl(var(--glow-h) 85% 60% / var(--glow-a)) 0, transparent calc(var(--R) * 1.15)),
    linear-gradient(90deg, rgba(var(--shade), .96) 0%, rgba(var(--shade), .75) 45%, rgba(var(--shade), .2) 100%);
}

.cover-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
  transition: padding var(--pick-dur) var(--ease-cover);
}
.cover-actions { display: flex; align-items: center; gap: 10px; transition: opacity .3s var(--ease); }
.cover.picking .cover-actions { opacity: 0; pointer-events: none; }

.cover-inner {
  position: absolute; z-index: 3;
  left: 50%; top: 52%; translate: -50% -50%;
  width: min(calc(100% - var(--gutter) * 2), 760px);
  text-align: center;
  transition: left var(--pick-dur) var(--ease-cover), translate var(--pick-dur) var(--ease-cover), width var(--pick-dur) var(--ease-cover);
  animation: fade-in .9s var(--ease) both;
}
@keyframes fade-in { from { opacity: 0; } }
.cover.picking .cover-inner {
  left: var(--gutter); translate: 0 -50%;
  width: min(560px, calc(100vw - var(--R) - var(--tw) * .72 - var(--gutter) * 2));
  text-align: left;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px 6px 10px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 600; color: var(--fg-dim);
  box-shadow: var(--shadow-sm);
}
.cover.picking .eyebrow { margin-bottom: 16px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cover-title {
  margin: 0; font-weight: 800; letter-spacing: -.05em; line-height: 1.12;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  transition: font-size var(--pick-dur) var(--ease-cover);
}
.cover-title .hl {
  background: linear-gradient(transparent 62%, var(--accent-soft) 62% 92%, transparent 92%);
  color: var(--accent);
}
.cover.picking .cover-title { font-size: clamp(1.9rem, 2.8vw, 2.7rem); }
.cover-lead { margin: 18px 0 34px; color: var(--fg-dim); font-size: clamp(1rem, 1.6vw, 1.12rem); transition: margin var(--pick-dur) var(--ease-cover); }
.cover.picking .cover-lead { margin: 10px 0 22px; }

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.door {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  padding: 18px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  transition: border-color .25s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease), padding var(--pick-dur) var(--ease-cover);
}
.door:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.door[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.cover.picking .door { padding: 12px 14px; }
.door-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  transition: width var(--pick-dur) var(--ease-cover), height var(--pick-dur) var(--ease-cover);
}
.door[data-pick="other"] .door-icon { background: var(--teal-soft); color: var(--teal); }
.cover.picking .door-icon { width: 36px; height: 36px; border-radius: 11px; }
.door-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.door-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.door-tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--fg-faint); }
.door-title { font-size: clamp(1rem, 1.8vw, 1.2rem); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.cover.picking .door-title { font-size: .98rem; }
.door-count {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
  background: var(--bg-2); color: var(--fg-dim);
}
.door[aria-pressed="true"] .door-count, .door:hover .door-count { background: var(--accent); color: var(--accent-ink); }

.recent {
  margin: 18px auto 0; max-width: 560px; text-align: left;
  padding: 14px 16px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.cover.picking .recent { display: none; }
.recent-head { display: flex; justify-content: space-between; margin: 0 0 6px; font-size: .78rem; font-weight: 700; color: var(--fg-faint); }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.recent-list li { min-width: 0; }
.recent-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; text-align: left;
  transition: background .2s var(--ease);
}
.recent-item:hover { background: var(--bg-2); }
.recent-swatch { width: 34px; height: 24px; border-radius: 6px; flex: none; }
.recent-title { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { color: var(--fg-faint); font-size: .74rem; white-space: nowrap; }

.detail {
  display: none;
  margin-top: 18px; padding: 20px 22px;
  border-radius: 20px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.cover.picking .detail { display: block; animation: info-in .6s var(--ease) .3s both; }
@keyframes info-in { from { opacity: 0; translate: 0 12px; } }
.detail.swap { animation: swap .45s var(--ease) !important; }
@keyframes swap { from { opacity: .3; translate: 0 6px; } }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.detail-no { color: var(--fg-faint); font-size: .74rem; letter-spacing: .1em; }
.detail-title { margin: 8px 0 4px; font-size: 1.45rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.3; }
.detail-desc { margin: 0 0 14px; color: var(--fg-dim); font-size: .92rem; }
.detail-desc:empty { display: none; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.detail-grid div { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); min-width: 0; }
.detail-grid dt { font-size: .7rem; color: var(--fg-faint); font-weight: 600; }
.detail-grid dd { margin: 2px 0 0; font-size: .86rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail .tags:empty { display: none; }
.detail-actions { display: flex; gap: 8px; margin-top: 16px; }
.detail-hint { margin: 12px 0 0; font-size: .68rem; color: var(--fg-faint); }

.ring-wrap {
  position: absolute; z-index: 1;
  left: var(--cx); top: var(--cy); width: 0; height: 0;
  --rot: 0deg;
  translate: calc(var(--R) + var(--tw)) 0;
  opacity: 0;
  transition: --rot .8s cubic-bezier(.3, .8, .25, 1), translate var(--pick-dur) var(--ease-cover), opacity .5s var(--ease);
  touch-action: none; user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.cover.picking .ring-wrap { translate: 0 0; opacity: 1; pointer-events: auto; transition-delay: 0s, .1s, .1s; }
.ring-wrap.dragging { transition: none; }
.orbit {
  position: absolute; border-radius: 50%;
  width: calc(var(--R) * 2); height: calc(var(--R) * 2);
  left: calc(var(--R) * -1); top: calc(var(--R) * -1);
  border: 1.5px solid var(--line-strong);
  background:
    radial-gradient(circle, transparent 0 55%, var(--bg-elev) 55.2% 55.6%, transparent 55.8%),
    radial-gradient(circle, hsl(var(--glow-h) 80% 60% / .1), var(--glass) 72%);
  box-shadow: var(--shadow-lg), inset 0 0 0 10px rgba(var(--shade), .5);
  cursor: grab;
}
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; }
.orbit::before {
  inset: calc(var(--R) * .2);
  border: 1.5px dashed var(--line-strong);
  transform: rotate(var(--rot));
}
.orbit::after {
  inset: -16px;
  background: repeating-conic-gradient(from 0deg, var(--fg-faint) 0 .3deg, transparent .3deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent calc(var(--R) + 7px), #000 calc(var(--R) + 8px));
  mask: radial-gradient(circle, transparent calc(var(--R) + 7px), #000 calc(var(--R) + 8px));
  transform: rotate(var(--rot));
  opacity: .6;
}
.ring-wrap.dragging .orbit { cursor: grabbing; }

.ring { list-style: none; margin: 0; padding: 0; }
.slot {
  --ang: calc(var(--a, 0deg) + var(--rot));
  position: absolute;
  width: var(--tw); height: var(--slot-h);
  left: calc(var(--tw) / -2); top: calc(var(--slot-h) / -2);
  transform: rotate(var(--ang)) translateX(var(--R)) rotate(calc(-1 * var(--ang))) scale(var(--s));
  opacity: .45;
  filter: saturate(.6);
  transition: --s .6s var(--ease), opacity .5s var(--ease), filter .5s var(--ease);
  cursor: pointer;
}
.slot.near { --s: .9; opacity: .85; filter: none; }
.slot.is-focus { --s: 1.12; opacity: 1; z-index: 3; filter: none; }
.slot-card {
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  border-radius: 14px; overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.slot.is-focus .slot-card { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lg); }
.slot-host { margin-left: 8px; font-family: var(--mono); font-size: .64rem; color: var(--fg-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-bar { height: 26px; flex: none; }
.slot-shot { position: relative; flex: 1; overflow: hidden; }
.slot-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.slot-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--tw) * .22); font-weight: 800; color: rgba(255,255,255,.55); }
.slot-shot:has(img) .slot-initial { display: none; }
.lock-badge {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #1d1a17;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.lock-badge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.slot-foot { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; }
.slot-title { font-size: .86rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-status { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; color: var(--fg-faint); white-space: nowrap; }

.ring-nav, .pick-close {
  position: absolute; z-index: 5;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.cover.picking .ring-nav, .cover.picking .pick-close { opacity: 1; pointer-events: auto; transition-delay: .4s; }
.ring-nav { right: 22px; top: 52%; translate: 0 -50%; display: flex; flex-direction: column; gap: 8px; }
.pick-close { top: 20px; right: var(--gutter); }
.nav-btn.next svg { transform: rotate(180deg); }

.scroll-hint {
  position: absolute; z-index: 3; bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer;
  color: var(--fg-faint); font-size: .8rem;
  transition: opacity .4s var(--ease);
}
.cover.picking .scroll-hint { opacity: 0; pointer-events: none; }
.scroll-hint:hover { color: var(--fg); }
.scroll-hint svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

.pw-dialog {
  width: min(400px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px;
  background: var(--bg-elev); color: var(--fg);
  box-shadow: var(--shadow-lg);
}
.pw-dialog::backdrop { background: rgba(var(--shade), .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pw-dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.pw-form { display: flex; flex-direction: column; padding: 28px 26px 24px; }
.pw-form.shake { animation: shake .42s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pw-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.pw-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.pw-title { margin: 0; font-size: 1.3rem; letter-spacing: -.03em; }
.pw-sub { margin: 6px 0 18px; color: var(--fg-dim); font-size: .9rem; }
.pw-input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg);
  font: inherit; font-size: 1rem; letter-spacing: .1em; outline: none;
}
.pw-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pw-error { margin: 8px 0 0; color: #d93b3b; font-size: .84rem; }
.pw-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.stage {
  min-height: 100dvh;
  opacity: 0; translate: 0 60px;
  transition: opacity .7s var(--ease) .25s, translate .9s var(--ease) .15s;
}
body.revealed .stage { opacity: 1; translate: 0 0; }
.skip-cover .stage { transition: none; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px var(--gutter);
  background: rgba(var(--shade), .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand-btn { justify-self: start; }
.topbar .theme-toggle { justify-self: end; }
.segments { display: flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.segments button { border: 0; background: transparent; cursor: pointer; padding: 6px 16px; border-radius: 999px; color: var(--fg-dim); font-size: .88rem; font-weight: 600; transition: background .2s var(--ease), color .2s var(--ease); }
.segments button:hover { color: var(--fg); }
.segments button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

.list-wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter) 64px; }
.list-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.list-title { margin: 0; font-size: clamp(1.8rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.list-sub { margin: 8px 0 0; color: var(--fg-faint); font-size: .875rem; }
.search { flex: 0 1 300px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--fg-faint); stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: .92rem; outline: none; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color .25s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.card.enter { animation: rise .7s var(--ease) backwards; }
@keyframes rise { from { opacity: 0; translate: 0 28px; } }
.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-link { display: flex; flex-direction: column; height: 100%; }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--thumb-bg, var(--bg-2)); border-bottom: 1px solid var(--line); }
.thumb-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.card:hover .thumb img { transform: scale(1.03); }
.thumb-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; color: rgba(255,255,255,.55); }
.thumb:has(img) .thumb-initial { display: none; }
.status, .lock {
  position: absolute; z-index: 1; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  background: rgba(255,255,255,.92); color: #1d1a17;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.status { left: 12px; }
.lock { right: 12px; }
.lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .78rem; color: var(--fg-faint); }
.client { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.card-title { margin: 0; font-size: 1.18rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; }
.card-desc { margin: 0; color: var(--fg-dim); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { margin-top: 4px; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--fg-faint); border-top: 1px dashed var(--line); }
.host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrow { transition: transform .3s var(--ease), color .3s var(--ease); }
.card:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
.empty { color: var(--fg-faint); text-align: center; padding: 64px 0; }

.contact { margin-top: 72px; padding: 32px; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact-q { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.footer { max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 36px; display: flex; justify-content: space-between; gap: 16px; color: var(--fg-faint); font-size: .8rem; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .cover {
    --R: min(88vw, 40dvh);
    --cx: 50vw;
    --cy: 100dvh;
    --focus: 270deg;
    --dir: 1;
    --tw: min(40vw, 170px);
    --slot-h: calc(var(--tw) * .625 + 62px);
  }
  .cover-top { padding: 14px var(--gutter); }
  .cover-actions .pill-btn { display: none; }
  .cover-inner { top: 50%; }
  .doors { grid-template-columns: 1fr; gap: 10px; }
  .door { padding: 14px; }
  .recent { margin-top: 12px; }
  .cover.picking .cover-inner { top: 64px; translate: 0 0; width: calc(100vw - var(--gutter) * 2); }
  .cover.picking .eyebrow { display: none; }
  .cover.picking .cover-title { font-size: 1.5rem; }
  .cover.picking .cover-lead { display: none; }
  .cover.picking .doors { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .cover.picking .door { padding: 8px 10px; gap: 8px; }
  .cover.picking .door-icon, .cover.picking .door-tag { display: none; }
  .cover.picking .door-title { font-size: .86rem; }
  .cover.picking .door-count { min-width: 24px; height: 24px; font-size: .7rem; }
  .detail { padding: 14px 16px; margin-top: 10px; }
  .detail-title { font-size: 1.1rem; margin: 4px 0 2px; }
  .detail-desc, .detail .tags, .detail-hint { display: none; }
  .detail-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 0; }
  .detail-grid div { padding: 6px 8px; }
  .detail-grid div:last-child { grid-column: auto; }
  .detail-grid dd { font-size: .78rem; }
  .detail-actions { margin-top: 10px; }
  .detail-actions .primary-btn, .detail-actions .ghost-btn { padding: 9px 14px; font-size: .86rem; }
  .ring-nav { right: auto; left: 50%; top: auto; bottom: 14px; translate: -50% 0; flex-direction: row; gap: 64px; }
  .nav-btn.prev svg { transform: rotate(-90deg); }
  .nav-btn.next svg { transform: rotate(90deg); }
  .pick-close { top: 14px; }
  .ring-wrap { translate: 0 calc(var(--R) + var(--tw)); }
  .topbar { grid-template-columns: auto 1fr auto; }
  .topbar .brand-name { display: none; }
  .segments { justify-self: center; }
  .segments button { padding: 6px 12px; }
  .search { flex-basis: 100%; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .recent { display: none; }
  .cover.picking .detail-grid { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
