/* ============================================================
   YACHT — Kyle Aspell × Saikoro pair archive
   ============================================================ */

:root {
  --accent: #d4161f;      /* 메인 빨강 — 여기만 바꾸면 전체 포인트 색이 바뀝니다 */
  --accent-bright: #ff4a4f;
  --accent-deep: #a8121a;
  --ink: #0f0b0b;
  --ink-2: #150e0e;
  --paper: #ede7dd;
  --paper-2: #fbf8f3;
  --cream: #f6f1ea;
  --muted: #a79d95;
  --muted-dark: #4a403b;

  --f-display: Anton, Impact, "Arial Narrow", sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "Space Mono", ui-monospace, monospace;
  --f-kr: "Black Han Sans", sans-serif;
  --f-jp: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;

  --gutter: clamp(20px, 4.5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-mono);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--cream); }
a:hover { color: var(--accent-bright); }
h1, h2, p { margin: 0; font-weight: 400; }

.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; }
.muted { color: var(--muted); }
.kr { font-family: var(--f-kr); }
.accent { color: var(--accent); }

/* ---------- textures ---------- */
.scratch {
  background-image:
    repeating-linear-gradient(90deg, rgba(246,241,234,.035) 0 1px, transparent 1px 180px),
    repeating-linear-gradient(0deg, rgba(246,241,234,.025) 0 1px, transparent 1px 180px);
}
.ht-card { background-image: radial-gradient(rgba(212,22,31,.16) 1.1px, transparent 1.6px); background-size: 5px 5px; }
.ht-die  { background-image: radial-gradient(rgba(0,0,0,.30) 1.2px, transparent 1.7px); background-size: 6px 6px; }
.ht-red  { background-image: radial-gradient(rgba(212,22,31,.42) 1.4px, transparent 1.9px); background-size: 8px 8px; }
.ht-glow {
  background-image: radial-gradient(rgba(212,22,31,.75) 1.8px, transparent 2.3px);
  background-size: 9px 9px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 68%);
          mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 68%);
}

/* ---------- motion ---------- */
@keyframes bob    { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -18px; rotate: 6deg; } }
@keyframes bob2   { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: -7deg; } }
@keyframes sway   { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes spin   { to { rotate: 360deg; } }
@keyframes twinkle{ 0%,100% { scale: 1; opacity: 1; } 50% { scale: .55; opacity: .5; } }
.a-bob     { animation: bob 4.2s ease-in-out infinite; }
.a-bob2    { animation: bob2 5s ease-in-out infinite .6s; }
.a-sway1   { animation: sway 6s ease-in-out infinite; }
.a-sway2   { animation: sway 6s ease-in-out infinite 1.2s; }
.a-sway3   { animation: sway 6s ease-in-out infinite 2.4s; }
.a-spin    { animation: spin 60s linear infinite; }
.a-twinkle { animation: twinkle 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .a-bob, .a-bob2, .a-sway1, .a-sway2, .a-sway3, .a-spin, .a-twinkle { animation: none; }
  .roll__die { transition: none !important; }
}

/* ---------- top bar ---------- */
.topbar {
  height: 88px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid rgba(246,241,234,.14);
}
.wordmark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wordmark__en { font-family: var(--f-display); font-size: 32px; letter-spacing: .04em; }
.wordmark__jp { font-family: var(--f-jp); font-weight: 800; font-size: 20px; color: var(--accent-bright); }
.nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav a { font-size: 13px; letter-spacing: .14em; text-decoration: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px var(--gutter) 64px; }
.hero__glow { position: absolute; right: -140px; top: 160px; width: 820px; height: 820px; pointer-events: none; }
.hero__meta {
  position: relative;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  font-size: 12px; letter-spacing: .16em; color: var(--muted);
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px);
  gap: 24px; align-items: start;
  margin-top: 40px;
}
.hero__copy { position: relative; z-index: 2; min-width: 0; }
.headline {
  display: flex; flex-direction: column;
  font-family: var(--f-display);
  font-size: clamp(48px, 10.8vw, 156px);
  line-height: .9; letter-spacing: -.005em;
}
.headline--outline { color: transparent; -webkit-text-stroke: 2px var(--cream); }
.headline--accent { color: var(--accent); }
.hero__pair { margin-top: 36px; font-family: var(--f-display); font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .04em; }
.hero__sub { margin-top: 10px; font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.4vw, 34px); color: var(--accent-bright); }
.hero__cta { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.btn-light {
  height: 60px; padding: 0 32px; display: inline-flex; align-items: center;
  background: var(--cream); color: var(--ink); text-decoration: none;
  font-family: var(--f-display); font-size: 22px; letter-spacing: .08em;
}
.btn-light:hover { background: var(--accent); color: #fff; }
.link-mono { font-size: 14px; letter-spacing: .14em; }
.hero__jp {
  position: absolute; right: calc(var(--gutter) - 24px); bottom: 110px;
  writing-mode: vertical-rl;
  font-family: var(--f-jp); font-weight: 800; font-size: 54px; letter-spacing: .12em;
}

/* stage: sized with container units so it scales down on small screens */
.stage { position: relative; width: 100%; aspect-ratio: 620 / 800; container-type: inline-size; }
.stage__burst {
  position: absolute; left: 0; top: 17.7cqw; width: 100cqw; height: 100cqw;
  background: var(--accent);
  clip-path: polygon(50.0% 2.8%, 54.2% 31.6%, 69.6% 9.2%, 62.0% 35.0%, 88.5% 19.3%, 69.1% 40.8%, 88.0% 41.3%, 74.4% 50.0%, 89.8% 59.1%, 67.8% 58.6%, 84.1% 77.2%, 62.6% 65.8%, 70.8% 93.2%, 54.2% 68.4%, 50.0% 97.4%, 44.3% 74.8%, 32.6% 86.1%, 34.8% 69.1%, 18.4% 75.2%, 32.4% 58.5%, 4.9% 60.3%, 27.0% 50.0%, 9.8% 40.8%, 27.6% 39.2%, 19.2% 25.4%, 38.3% 35.4%, 31.5% 11.5%, 44.8% 27.2%);
}
.pcard {
  position: absolute; width: 40.3cqw; height: 56.5cqw; padding: 2.9cqw;
  background-color: var(--cream); border-radius: 2.3cqw;
  box-shadow: 0 30px 60px rgba(0,0,0,.55);
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--ink);
}
.pcard--1 { left: 6.5cqw;  top: 21cqw;   transform: rotate(-17deg); }
.pcard--2 { left: 30.6cqw; top: 9.7cqw;  transform: rotate(-2deg); }
.pcard--3 { left: 54.8cqw; top: 22.6cqw; transform: rotate(15deg); }
.pcard__idx { display: flex; flex-direction: column; align-items: center; gap: .6cqw; width: 6.5cqw; }
.pcard__idx span { font-family: var(--f-display); font-size: 6.45cqw; line-height: 1; }
.pcard__idx img { width: 3.9cqw; height: 3.9cqw; }
.pcard__idx.red span { color: var(--accent); }
.pcard__idx--flip { align-self: flex-end; transform: rotate(180deg); }
.pcard__big { align-self: center; width: 20cqw; height: 20cqw; }
.stage__die { position: absolute; }
.stage__die--a { left: 17.7cqw; top: 75.8cqw; transform: rotate(-14deg); }
.stage__die--b { left: 53.2cqw; top: 83.9cqw; transform: rotate(9deg); }
.stage__die .die { --size: 29cqw; }
.stage__sparkle {
  position: absolute; left: 77.4cqw; top: 0; width: 11.3cqw; height: 11.3cqw;
  background: var(--accent-bright);
  clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%);
}

/* ---------- dice ---------- */
.die {
  --size: 150px;
  width: var(--size); height: var(--size);
  padding: calc(var(--size) * .145);
  border-radius: calc(var(--size) * .156);
  background-color: var(--accent);
  box-shadow: 0 22px 40px rgba(0,0,0,.6), inset 0 calc(var(--size) * -.055) 0 rgba(0,0,0,.22);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: calc(var(--size) * .04);
}
.die > i { display: flex; align-items: center; justify-content: center; }
.die > i.on::after {
  content: ""; width: calc(var(--size) * .175); height: calc(var(--size) * .175);
  border-radius: 50%; background: var(--cream);
}
.die--light { background-color: var(--cream); }
.die--light > i.on::after { background: var(--accent); }

/* ---------- sections ---------- */
.kicker { font-size: 12px; letter-spacing: .18em; font-weight: 700; color: var(--accent-bright); }
.kicker--dark { color: var(--accent-deep); }
.display { font-family: var(--f-display); font-size: clamp(72px, 9.7vw, 140px); line-height: .86; }
.display--stack { display: flex; flex-direction: column; font-size: clamp(72px, 10.4vw, 150px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.section-head__title { display: flex; flex-direction: column; gap: 10px; }

/* deck */
.deck { background: var(--paper); color: var(--ink); padding: 88px var(--gutter) 110px; }
.deck__intro { max-width: 380px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--muted-dark); }
.deck__intro .kr { font-size: 16px; color: var(--ink); }
.deck__grid { margin-top: 52px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.dcard {
  aspect-ratio: 300 / 420; padding: 22px;
  background-color: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 16px;
  color: var(--ink); text-decoration: none;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotate(var(--tilt, 0deg));
  transition: translate .25s ease, box-shadow .25s ease;
}
.dcard:hover { color: var(--ink); translate: 0 -14px; box-shadow: 0 24px 40px rgba(15,11,11,.25); }
.dcard--red, .dcard--red:hover { color: var(--accent-deep); }
.dcard__top, .dcard__bottom { display: flex; justify-content: space-between; align-items: flex-start; }
.dcard__bottom { align-items: flex-end; }
.dcard__idx { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dcard__idx span { font-family: var(--f-display); font-size: 38px; line-height: 1; }
.dcard__idx img { width: 22px; height: 22px; }
.dcard__big { align-self: center; width: 40%; height: auto; }
.dcard__bottom > div { display: flex; flex-direction: column; gap: 4px; }
.dcard__name { font-family: var(--f-display); font-size: clamp(36px, 3.4vw, 48px); line-height: .9; }
.dcard .kr { font-size: 17px; }

/* roll */
.roll {
  padding: 100px var(--gutter);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px;
}
.roll__left { display: flex; flex-direction: column; gap: 18px; }
.roll__sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.1vw, 30px); }
.roll__sub [lang="ja"] { font-family: var(--f-jp); font-style: normal; font-weight: 800; }
.roll__controls { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.roll__die { transition: transform .7s cubic-bezier(.2,.9,.3,1.2); }
.roll__btnwrap { display: flex; flex-direction: column; gap: 14px; }
.btn-outline {
  height: 64px; padding: 0 30px;
  border: 2px solid var(--cream); border-radius: 0; background: transparent; color: var(--cream);
  font-family: var(--f-display); font-size: 24px; letter-spacing: .08em; cursor: pointer;
}
.btn-outline:hover { background: var(--cream); color: var(--ink); }
.btn-outline:focus-visible, a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 4px; }

.roll__right { display: flex; flex-direction: column; gap: 16px; }
/* 제목·주사위는 오른쪽 정렬, 넓은 화면에서는 뽑은 카드가 왼쪽 칸으로 */
.roll__left { align-items: flex-end; text-align: right; }
.roll__left .display--stack { align-items: flex-end; }
.roll__controls { justify-content: flex-end; }
.roll__left .btn-more { align-self: flex-end; }
@media (min-width: 1101px) {
  .roll__left { grid-column: 2; grid-row: 1; }
  .roll__right { grid-column: 1; grid-row: 1; }
}
.roll__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.draw {
  flex-grow: 1; min-height: 460px; padding: 32px;
  background-color: var(--ink-2); border: 1.5px solid rgba(246,241,234,.22); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  text-align: center;
}
.draw__head { display: flex; align-items: center; gap: 28px; }
.draw__jp { font-family: var(--f-jp); font-weight: 800; font-size: clamp(96px, 10vw, 150px); line-height: 1; color: var(--accent); }
.draw__label { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.draw__pile { font-family: var(--f-display); font-size: clamp(56px, 6.6vw, 96px); line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--cream); }
.draw__kr { font-family: var(--f-kr); font-size: 22px; color: var(--accent-bright); }
.draw__media { width: 100%; display: flex; justify-content: center; }
.draw__media img, .draw__media video { max-width: 100%; max-height: 280px; border-radius: 8px; }
.draw__media audio { width: 100%; max-width: 420px; }

/* credits */
.credits {
  padding: 40px var(--gutter);
  border-top: 1px solid rgba(255,74,79,.35);
  color: var(--accent-bright);
  display: flex; flex-direction: column; gap: 22px;
}
.credits a { color: var(--accent-bright); }
.credits__row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; }
.credits__mark { display: flex; align-items: baseline; gap: 14px; }
.credits__en { font-family: var(--f-display); font-size: 48px; line-height: 1; color: var(--accent); }
.credits__jp { font-family: var(--f-jp); font-weight: 800; font-size: 22px; letter-spacing: .2em; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 560px; margin: 24px auto 0; }
  .hero__jp { display: none; }
  .deck__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roll { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar { height: auto; padding-top: 18px; padding-bottom: 18px; flex-direction: column; align-items: flex-start; }
  .nav { flex-wrap: wrap; gap: 12px 20px; }
  .deck__grid { gap: 20px; }
  .dcard { padding: 14px; }
  .dcard__idx span { font-size: 28px; }
  .dcard__bottom > .mono { display: none; }
  .dcard__name { font-size: 30px; }
  .roll__controls { gap: 20px; }
  .roll .die { --size: 110px; }
  .draw { padding: 24px 16px; min-height: 380px; }
  .draw__head { gap: 16px; }
}

/* ============================================================
   v2 — fan art slot, spread (list.html), card view (read.html),
   writer (write.html)
   ============================================================ */
:root { --f-body: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif; }
body { overflow-x: clip; }

/* ---------- fan art: the trump card in the hero ---------- */
.art {
  position: absolute; left: 24.2cqw; top: 3.2cqw; width: 50cqw; height: 72.6cqw; margin: 0;
  padding: 1.9cqw 1.9cqw 0; box-sizing: border-box;
  background: var(--paper-2); border: 2px solid var(--ink); border-radius: 2.9cqw;
  box-shadow: 0 34px 64px rgba(0,0,0,.6); rotate: -3deg;
  display: flex; flex-direction: column; gap: 1.6cqw; color: var(--ink);
}
.art__corner { display: flex; justify-content: space-between; align-items: center; padding: 0 .6cqw; }
.art__rank { display: flex; align-items: baseline; gap: .5cqw; font-family: var(--f-display); font-size: 3.6cqw; }
.art__rank img { width: 2.6cqw; height: 2.6cqw; }
.art__label { font-size: 1.7cqw; letter-spacing: .2em; color: var(--accent-deep); }
.art__img {
  position: relative; flex: 1; min-height: 0; border-radius: 1.6cqw; overflow: hidden;
  background-color: #e6ddd0; background-image: radial-gradient(rgba(212,22,31,.22) 1.2px, transparent 1.7px); background-size: 7px 7px;
  display: flex; align-items: center; justify-content: center;
}
.art__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art__ph { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 1.9cqw; letter-spacing: .16em; color: #5b504a; }
.art__ph small { font-size: 1.6cqw; letter-spacing: .1em; }
.art figcaption { height: 6.5cqw; display: flex; align-items: center; justify-content: space-between; padding: 0 .6cqw; font-size: 1.8cqw; letter-spacing: .14em; }
.art figcaption span { font-family: var(--f-jp); font-weight: 800; font-size: 2.3cqw; color: var(--accent-deep); }
.stage__die--a { left: 9.7cqw; top: 83.9cqw; }
.stage__die--b { left: 61.3cqw; top: 87.1cqw; }

/* ---------- shared bits ---------- */
.page-dark { background: var(--ink); }
.topbar--solid { background: var(--ink); }
.nav { align-items: center; }
.nav__write { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; border: 1.5px solid var(--cream); font-family: var(--f-display); font-size: 16px !important; letter-spacing: .1em !important; }
.nav__write:hover, .nav__write.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav a[aria-current="page"]:not(.nav__write) { color: var(--accent-bright); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.btn-red {
  height: 58px; padding: 0 28px; display: inline-flex; align-items: center; border: none; border-radius: 0; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none; font-family: var(--f-display); font-size: 21px; letter-spacing: .08em;
}
.btn-red:hover { background: var(--accent-bright); color: #fff; }
.btn-red--sm, .btn-outline--sm { height: 52px; padding: 0 22px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; }
.btn-text { height: 52px; padding: 0 8px; border: none; background: transparent; color: var(--muted); font-size: 13px; letter-spacing: .14em; text-decoration: underline; cursor: pointer; }
.hint { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.credits--compact { padding: 28px var(--gutter); }

.subbar {
  min-height: 72px; padding: 12px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  background: var(--ink); border-bottom: 1px solid rgba(246,241,234,.14); font-size: 12px; letter-spacing: .16em;
}
.subbar a { text-decoration: none; }
.subbar__filters { display: flex; gap: 6px; }
.subbar__filters a { min-width: 44px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(246,241,234,.3); }
.subbar__filters img { width: 18px; height: 18px; filter: brightness(0) invert(.95); }
.subbar__filters a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.viewtoggle { display: flex; border: 1px solid rgba(246,241,234,.3); }
.viewtoggle > * { height: 36px; padding: 0 16px; display: inline-flex; align-items: center; text-decoration: none; }
.viewtoggle [aria-current="page"] { background: var(--accent); color: #fff; }

/* corner index: rank + suit */
.corner { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); }
.corner b { font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1; }
.corner img { width: 16px; height: 16px; }
.corner.is-red { color: var(--accent-deep); }
.corner--big { flex-direction: column; gap: 4px; }
.corner--big b { font-size: 48px; }
.corner--big img { width: 34px; height: 34px; }
.corner--sm { position: absolute; left: 8px; top: 6px; z-index: 2; padding: 2px 5px; border-radius: 6px; background: rgba(251,248,243,.9); }
.corner--sm b { font-size: 18px; }
.corner--sm img { width: 14px; height: 14px; }

/* thumbs */
.thumb { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 8px; display: flex; align-items: center; justify-content: center; background-color: #e6ddd0; background-image: radial-gradient(rgba(212,22,31,.22) 1.2px, transparent 1.7px); background-size: 7px 7px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { position: relative; width: var(--s); height: var(--s); border-radius: 50%; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.play svg { width: 50%; height: 50%; fill: #fff; }
.chip { width: var(--s); height: var(--s); flex-shrink: 0; border-radius: 50%; background: repeating-conic-gradient(var(--accent) 0 30deg, var(--cream) 30deg 45deg); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(0,0,0,.25); }
.chip i { width: 64%; height: 64%; border-radius: 50%; background: var(--accent); border: 2px dashed var(--cream); box-sizing: border-box; }
@keyframes chipspin { to { rotate: 360deg; } }
.spin { animation: chipspin 6s linear infinite; }
.thumb--music, .thumb--note { background: #efe7da; }
.thumb--note { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; padding: 14px; }
.thumb__kicker { font-size: 9px; letter-spacing: .16em; color: var(--accent-deep); }
.thumb__excerpt { font-family: var(--f-body); font-size: 12px; line-height: 1.7; color: var(--muted-dark); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- spread (list.html) ---------- */
.spread { background: var(--paper); color: var(--ink); padding: 72px var(--gutter) 110px; }
.spread__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 22px; }
.spread__sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); color: var(--accent-deep); }
.spread__count { font-size: 12px; letter-spacing: .14em; color: var(--muted-dark); }
.spread__grid { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 36px 24px; }
.stile {
  height: 254px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  background-color: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 14px; color: var(--ink); text-decoration: none;
  box-shadow: 0 10px 22px rgba(15,11,11,.14); transition: translate .2s ease;
}
.stile:hover { translate: 0 -8px; color: var(--ink); }
.stile__top { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 0; }
.stile__num { font-size: 10px; letter-spacing: .1em; color: #5b504a; }
.stile__title { padding: 0 4px 2px; font-family: var(--f-body); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spread__empty { margin-top: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; font-family: var(--f-body); font-size: 20px; }

/* ---------- card view (read.html) ---------- */
.reader { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 40px var(--gutter) 40px; }
.reader > * { width: 100%; max-width: 1080px; }
.flipbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flipbar__pos { font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.cardstack { position: relative; touch-action: pan-y; scroll-margin-top: 16px; }
.cardstack__ghost { position: absolute; border: 2px solid var(--ink); border-radius: 20px; }
.cardstack__ghost--1 { inset: 18px -16px -18px 16px; background: #e6ddd0; rotate: 1.6deg; }
.cardstack__ghost--2 { inset: 10px 10px -10px -10px; background: #efe7da; rotate: -1.1deg; }
.post {
  position: relative; background-color: var(--paper-2); border: 2px solid var(--ink); border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,.55); color: var(--ink);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4.5vw, 52px) clamp(28px, 4.4vw, 48px);
  display: flex; flex-direction: column;
}
@keyframes flipNext { from { transform: perspective(1400px) rotateY(-70deg) translateX(60px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes flipPrev { from { transform: perspective(1400px) rotateY(70deg) translateX(-60px); opacity: .2; } to { transform: none; opacity: 1; } }
.post.flip-next { animation: flipNext .55s cubic-bezier(.2,.8,.3,1); transform-origin: left center; }
.post.flip-prev { animation: flipPrev .55s cubic-bezier(.2,.8,.3,1); transform-origin: right center; }
.post__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.post__tag { display: flex; align-items: center; gap: 18px; }
.post__kicker { font-size: 12px; letter-spacing: .2em; color: var(--accent-deep); }
.post__no { display: flex; align-items: baseline; gap: 8px; }
.post__no-label { font-family: var(--f-serif); font-style: italic; font-size: 26px; }
.post__no-num { font-family: var(--f-display); font-size: clamp(44px, 4.4vw, 62px); line-height: .9; border-bottom: 6px solid var(--accent); }
.post__no--sm .post__no-label { font-size: 18px; }
.post__no--sm .post__no-num { font-size: 28px; border-bottom-width: 4px; }
figure.post__media { margin: 28px 0 0; }
.post__media img, .post__media video { width: 100%; max-height: 72vh; object-fit: contain; background: #e6ddd0; border-radius: 10px; }
.post__title { margin-top: 32px; font-family: var(--f-kr); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1.25; }
.post__meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; letter-spacing: .1em; color: #5b504a; }
.post__rule { margin: 36px 0; display: flex; align-items: center; gap: 16px; color: var(--accent-deep); font-family: var(--f-serif); font-size: 20px; }
.post__rule i { flex: 1; height: 1px; background: #d9cfbf; }
.post__body { max-width: 680px; width: 100%; align-self: center; font-family: var(--f-body); font-size: clamp(17px, 1.35vw, 19px); line-height: 2; word-break: keep-all; overflow-wrap: anywhere; }
.post__body p { margin: 0 0 1.4em; white-space: pre-line; }
.post__body--caption { max-width: none; margin-top: 18px; font-size: 17px; line-height: 1.9; }
.post__end { margin-top: 32px; align-self: center; font-family: var(--f-display); font-size: 22px; letter-spacing: .3em; color: var(--accent-deep); }
.post__tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 7px 13px; border: 1.5px solid var(--ink); border-radius: 999px; font-family: var(--f-body); font-size: 14px; color: var(--ink); }
.post__credit { margin-top: 28px; padding: 18px 24px; border: 1.5px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; letter-spacing: .12em; }
.is-empty .hand, .is-empty .flipbar, .is-empty .cardstack__ghost { display: none; }
.is-empty .post { gap: 24px; align-items: flex-start; }

.music { margin-top: 28px; display: flex; align-items: center; gap: 56px; }
.music__side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.music__wave { height: 70px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.music__wave i { flex: 1; max-width: 7px; border-radius: 3px; background: #d9cfbf; transition: background .2s ease; }
.music__wave i.is-on { background: var(--accent); }
.music__ctrl { display: flex; align-items: center; gap: 16px; }
.music__play { width: 64px; height: 64px; border-radius: 50%; border: none; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.music__play svg { width: 28px; height: 28px; fill: #fff; }
.music__play.is-playing svg { display: none; }
.music__play.is-playing::before, .music__play.is-playing::after { content: ""; width: 7px; height: 24px; margin: 0 3px; border-radius: 2px; background: #fff; }
.music__time { font-size: 13px; letter-spacing: .1em; }

/* hand: a poker hand fanned under the card */
.hand { max-width: 1312px !important; margin-top: 24px; }
.hand__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hand .hint { text-align: right; }
.hand__fan { position: relative; height: 360px; }
.hcard {
  position: absolute; left: var(--x); top: calc(60px + var(--y)); width: 140px; height: 210px; margin-left: -70px; padding: 8px;
  border: 2px solid var(--ink); border-radius: 12px; background-color: var(--paper-2); overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 16px 26px rgba(0,0,0,.5);
  rotate: var(--r); transform-origin: 50% 120%;
  transition: translate .2s ease, top .3s ease;
}
.hcard:hover { translate: 0 -14px; }
.hcard.is-on { top: calc(10px + var(--y)); box-shadow: 0 0 0 4px var(--accent), 0 18px 28px rgba(0,0,0,.55); }
.hcard__num { align-self: flex-end; font-size: 11px; color: #5b504a; }
.hcard .thumb--note { align-items: center; justify-content: center; }
.thumb__suit { width: 60px; height: 60px; position: static !important; object-fit: contain !important; }
.thumb__line { width: 70px; height: 5px; border-radius: 3px; background: #d9cfbf; }
.thumb__line--short { width: 54px; }
.hand__more { position: absolute; top: 150px; font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.hand__more--l { left: 0; }
.hand__more--r { right: 0; }

/* roll excerpt for note cards */
.draw__excerpt { max-width: 440px; font-family: var(--f-body); font-size: 16px; line-height: 1.8; color: var(--cream); }

/* ---------- writer (write.html) ---------- */
.writer { padding: 80px var(--gutter) 110px; }
.writer__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; }
.writer__sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); color: var(--accent-bright); }
.display--light { color: var(--cream); }
.writer__grid { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 72px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 30px; }
.form__label { font-size: 12px; letter-spacing: .18em; color: var(--accent-bright); }
.form__label small { color: var(--muted); letter-spacing: .1em; font-size: 12px; }
.form__row { display: flex; flex-direction: column; gap: 10px; }
.form__two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form__suits { margin: 0; padding: 0; border: none; }
.form__suits legend { padding: 0; margin-bottom: 14px; }
.suit-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.suit-pick label { cursor: pointer; }
.suit-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.suit-pick span {
  height: 136px; border-radius: 12px; border: 3px solid var(--paper-2); background: var(--paper-2); color: var(--ink);
  box-shadow: 0 6px 12px rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: translate .15s ease;
}
.suit-pick img { width: 44px; height: 44px; }
.suit-pick i { font-style: normal; font-size: 12px; letter-spacing: .14em; }
.suit-pick em { font-style: normal; font-family: var(--f-body); font-size: 14px; }
.suit-pick label:hover span { translate: 0 -3px; }
.suit-pick input:checked + span { border-color: var(--accent); translate: 0 -6px; box-shadow: 0 12px 22px rgba(0,0,0,.5); }
.suit-pick input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: 4px; }
.check { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-family: var(--f-body); font-size: 17px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.check small { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.field {
  width: 100%; height: 56px; padding: 0 16px; background: var(--paper-2); color: var(--ink);
  border: 2px solid var(--paper-2); border-radius: 6px; font-family: var(--f-body); font-size: 18px; outline: none;
}
.field:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(255,74,79,.35); }
.field::placeholder { color: #8a7f78; }
.field--mono { font-family: var(--f-mono); font-size: 16px; }
.field--area { height: 380px; padding: 16px; line-height: 1.9; resize: vertical; }
.form__count { align-self: flex-end; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.drop {
  min-height: 140px; padding: 20px; border: 2px dashed rgba(246,241,234,.4); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer;
}
.drop:hover, .drop.is-over { border-color: var(--accent-bright); background: rgba(255,74,79,.06); }
.drop svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-bright); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop__main { font-family: var(--f-body); font-size: 17px; word-break: break-all; }
.drop__sub { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.form__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 8px; }
.form__btns .btn-red { height: 60px; }
.form__status { min-height: 1.4em; font-family: var(--f-body); font-size: 16px; color: var(--accent-bright); }
.form__note { font-size: 12px; line-height: 1.8; letter-spacing: .04em; color: var(--muted); }
.form__note code { color: var(--cream); }

.preview { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.preview__deck { position: relative; }
.preview__ghost { position: absolute; inset: 14px -12px -14px 12px; background: #e6ddd0; border: 2px solid var(--ink); border-radius: 18px; rotate: 1.8deg; }
.preview__card {
  position: relative; background-color: var(--paper-2); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 0 24px 44px rgba(0,0,0,.5); padding: 30px 30px 34px; color: var(--ink);
  display: flex; flex-direction: column; gap: 18px;
}
.preview__suit { width: 30px; height: 30px; }
.preview__card .post__tag { gap: 12px; }
.preview__card .post__kicker { font-size: 11px; letter-spacing: .16em; }
.preview__media img, .preview__media video { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; }
.preview__media audio { width: 100%; }
.preview__title { font-family: var(--f-kr); font-size: 28px; line-height: 1.3; }
.preview__meta { font-size: 11px; letter-spacing: .1em; color: #5b504a; }
.preview__rule { height: 1px; background: #d9cfbf; }
.preview__body { max-height: 360px; overflow: hidden; white-space: pre-line; font-family: var(--f-body); font-size: 15px; line-height: 1.9; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.preview__title.is-empty, .preview__body.is-empty { color: #9a8f88; }
.preview__card .post__tags { margin-top: 0; }
.preview__card .tag { padding: 6px 12px; font-size: 13px; }
.preview__hint { margin-top: 20px; font-size: 12px; letter-spacing: .1em; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .spin, .post.flip-next, .post.flip-prev { animation: none; } .hcard { transition: none; } }

@media (max-width: 1100px) {
  .writer__grid { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; max-width: 520px; }
  .music { flex-direction: column; align-items: stretch; gap: 28px; }
  .music__chip { align-self: center; --s: 220px !important; }
}
@media (max-width: 560px) {
  .spread__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .stile { height: 214px; }
  .post { border-radius: 14px; }
  .cardstack__ghost--1 { inset: 10px -6px -10px 6px; rotate: .5deg; }
  .cardstack__ghost--2 { inset: 6px 6px -6px -6px; rotate: -.4deg; }
  .corner--big b { font-size: 36px; }
  .corner--big img { width: 26px; height: 26px; }
  .flipbar .btn-outline--sm, .flipbar .btn-red--sm { padding: 0 14px; letter-spacing: .06em; }
  .hand__fan { height: 270px; overflow: hidden; }
  .hcard { width: 96px; height: 144px; margin-left: -48px; padding: 5px; top: calc(40px + var(--y)); }
  .hcard.is-on { top: calc(6px + var(--y)); }
  .hcard .chip { --s: 56px !important; }
  .hcard .play { --s: 32px !important; }
  .thumb__suit { width: 40px; height: 40px; }
  .thumb__line { width: 46px; height: 4px; }
  .thumb__line--short { width: 34px; }
  .hand__more { top: 0; }
  .hand .hint { text-align: left; }
  .suit-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__two { grid-template-columns: minmax(0, 1fr); }
  .subbar__filters { order: 3; width: 100%; }
  .music__chip { --s: 180px !important; }
}

/* ============================================================
   v3 — casino floor (casino.html) + home link
   ============================================================ */
.btn-more { margin-top: 26px; align-self: flex-start; min-height: 52px; padding: 10px 22px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; background: var(--cream); color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 18px; letter-spacing: .08em; }
.btn-more small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--accent-deep); }
.btn-more:hover { background: var(--accent); color: #fff; }
.btn-more:hover small { color: #fff; }

.ht-dark { background-image: radial-gradient(rgba(0,0,0,.28) 1.3px, transparent 1.8px); background-size: 7px 7px; }
.back { background-color: var(--accent); background-image: repeating-linear-gradient(45deg, rgba(246,241,234,.5) 0 2px, transparent 2px 16px), repeating-linear-gradient(-45deg, rgba(246,241,234,.5) 0 2px, transparent 2px 16px); }
@keyframes tumble { 0% { rotate: 0deg; scale: 1; translate: 0 -30px; } 45% { rotate: 220deg; scale: 1.12; } 100% { rotate: 360deg; scale: 1; translate: 0 0; } }
@keyframes cardin { from { transform: perspective(900px) rotateY(90deg); } to { transform: perspective(900px) rotateY(0); } }
@keyframes reel { 0% { translate: 0 -70%; filter: blur(5px); } 70% { filter: blur(2px); } 100% { translate: 0 0; filter: blur(0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes pop { 0% { scale: .6; opacity: 0; } 40% { scale: 1.12; opacity: 1; } 100% { scale: 1; } }
.tumble { animation: tumble .6s cubic-bezier(.2,.8,.3,1); }
.cardin { animation: cardin .45s cubic-bezier(.2,.8,.3,1); }
.spinning { animation: reel .7s cubic-bezier(.2,.8,.3,1) both; }
.blink { animation: blink 1.2s steps(2) infinite; }
.blink2 { animation: blink 1.2s steps(2) infinite .6s; }
.pop { animation: pop .55s cubic-bezier(.2,.8,.3,1); }
@media (prefers-reduced-motion: reduce) { .tumble, .cardin, .spinning, .blink, .blink2, .pop { animation: none; } }

.casino .display--md { font-size: clamp(56px, 6.7vw, 96px); line-height: .86; }
.kicker--pink { color: #ffb3b5; }

/* intro */
.cz-intro { padding: 64px var(--gutter) 40px; display: flex; flex-direction: column; gap: 26px; }
.cz-intro__top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.cz-intro__title { display: flex; flex-direction: column; gap: 12px; }
.cz-intro__title .display { font-size: clamp(56px, 9.4vw, 136px); }
.cz-intro__sub { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.2vw, 32px); color: var(--accent-bright); }
.cz-intro__sub span { font-family: var(--f-body); font-style: normal; font-size: 17px; color: var(--cream); }
.bank { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border: 1.5px solid rgba(246,241,234,.35); border-radius: 16px; }
.bank > div { display: flex; flex-direction: column; }
.bank__label { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.bank__num { font-family: var(--f-display); font-size: 60px; line-height: 1; }
.bank__reset { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(246,241,234,.4); background: transparent; color: var(--cream); cursor: pointer; font-size: 18px; }
.bank__reset:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.cz-intro__links { display: flex; flex-wrap: wrap; gap: 12px; }
.cz-intro__links a { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 10px; border: 1.5px solid var(--cream); text-decoration: none; font-size: 12px; letter-spacing: .14em; }
.cz-intro__links a.is-dim { border-color: rgba(246,241,234,.35); color: var(--muted); }
.cz-intro__links .prize { margin-left: auto; background: var(--cream); color: var(--ink); border-color: var(--cream); font-family: var(--f-display); font-size: 18px; letter-spacing: .08em; }
.cz-intro__links .prize[hidden] { display: none; }
.cz-intro__links .prize i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* yacht dice table */
.cz-dice { padding: 20px var(--gutter) 60px; }
.table-felt {
  background-color: #7d0b10; border: 14px solid #2b0709; border-radius: 48px;
  box-shadow: inset 0 0 0 2px rgba(246,241,234,.35), 0 30px 60px rgba(0,0,0,.6);
  padding: clamp(24px, 3.5vw, 48px) clamp(20px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px;
}
.dice-play { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dice-play__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dice-play__head > div { display: flex; flex-direction: column; gap: 6px; }
.dice-round { font-family: var(--f-display); font-size: 28px; letter-spacing: .06em; }
.dice-round b { font-weight: 400; }
.dice-round small { font-size: 28px; color: #ffb3b5; }
.dice-rules { font-family: var(--f-body); font-size: 16px; line-height: 1.7; color: #ffd9da; }
.dice-tray { position: relative; margin-top: 30px; min-height: 260px; padding: 30px 16px; border: 2px dashed rgba(246,241,234,.3); border-radius: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px; }
.yacht-flash { position: absolute; top: -34px; left: 50%; translate: -50% 0; padding: 8px 22px; background: var(--cream); color: var(--accent); font-family: var(--f-display); font-size: 40px; letter-spacing: .1em; box-shadow: 0 10px 20px rgba(0,0,0,.4); rotate: -3deg; }
.yacht-flash[hidden] { display: none; }
.die-btn { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0; border: none; background: transparent; cursor: pointer; transition: translate .2s ease; }
.die-btn.is-held { translate: 0 -18px; }
.die-btn.is-idle { cursor: default; }
.die--felt { --size: clamp(64px, 8vw, 104px); background-color: var(--accent); box-shadow: inset 0 -8px 0 rgba(0,0,0,.22), 0 16px 26px rgba(0,0,0,.5); }
.is-idle .die--felt { background-color: #5a1316; }
.is-held .die--felt { box-shadow: inset 0 -8px 0 rgba(0,0,0,.22), 0 16px 26px rgba(0,0,0,.5), 0 0 0 4px var(--cream); }
.die-btn__tag { font-size: 11px; letter-spacing: .2em; padding: 3px 8px; border-radius: 4px; color: transparent; }
.is-held .die-btn__tag { background: var(--cream); color: var(--ink); }
.dice-ctrl { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; }
.btn-roll { height: 72px; padding: 0 40px; border: none; border-radius: 999px; background: var(--cream); color: var(--ink); font-family: var(--f-display); font-size: 30px; letter-spacing: .1em; cursor: pointer; box-shadow: 0 8px 0 #bdb3a8; }
.btn-roll:disabled { background: rgba(246,241,234,.35); box-shadow: none; cursor: default; }
.rolls { display: flex; flex-direction: column; gap: 8px; font-size: 11px; letter-spacing: .2em; color: #ffb3b5; }
.rolls > div { display: flex; gap: 8px; }
.rolls i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--cream); }
.rolls i.on { background: var(--cream); }
.dice-msg { margin-left: auto; max-width: 300px; text-align: right; font-family: var(--f-body); font-size: 16px; color: #ffd9da; }
.dice-over { margin-top: auto; padding: 22px 26px; background: var(--cream); color: var(--ink); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dice-over[hidden] { display: none; }
.dice-over > div { display: flex; flex-direction: column; gap: 4px; }
.dice-over span { font-size: 12px; letter-spacing: .18em; color: var(--accent-deep); }
.dice-over b { font-family: var(--f-display); font-weight: 400; font-size: 52px; line-height: 1; }
.dice-over small { font-size: 24px; color: var(--accent-deep); }

.scorecard { background-color: var(--paper-2); color: var(--ink); border-radius: 20px; border: 2px solid var(--ink); padding: 22px 22px 18px; display: flex; flex-direction: column; }
.scorecard__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 10px; border-bottom: 2px solid var(--ink); }
.scorecard__head span { font-family: var(--f-display); font-size: 26px; letter-spacing: .06em; }
.scorecard__head small { font-size: 11px; letter-spacing: .14em; color: #5b504a; }
.sc-row { width: 100%; min-height: 40px; padding: 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: none; border-bottom: 1px solid #e6ddd0; background: transparent; color: var(--ink); text-align: left; cursor: default; }
.sc-row span { font-family: var(--f-body); font-size: 15px; }
.sc-row b { font-family: var(--f-display); font-weight: 400; font-size: 22px; color: #c9bfb4; }
.sc-row.is-open { cursor: pointer; }
.sc-row.is-open b { color: var(--accent); }
.sc-row.is-open:hover { background: #f3e6d6; }
.sc-row.is-done { color: #8a7f78; }
.sc-row.is-done b { color: var(--ink); }
.sc-row:disabled { opacity: 1; }
.scorecard__bonus { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px; margin: 2px 0; background: #efe7da; border-radius: 8px; font-size: 12px; letter-spacing: .04em; }
.scorecard__bonus b { font-family: var(--f-display); font-weight: 400; font-size: 18px; }
.scorecard__total { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; padding: 12px 8px 0; border-top: 2px solid var(--ink); }
.scorecard__total span { font-family: var(--f-display); font-size: 24px; letter-spacing: .06em; }
.scorecard__total b { font-family: var(--f-display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--accent); }

/* high & low */
.cz-hl { background: var(--paper); color: var(--ink); padding: 84px var(--gutter) 100px; display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 56px; }
.cz-hl__text { display: flex; flex-direction: column; gap: 18px; }
.cz-hl__text .display { font-size: clamp(64px, 7.6vw, 110px); }
.cz-hl__text p { font-family: var(--f-body); font-size: 17px; line-height: 1.75; color: var(--muted-dark); }
.hl-stats { display: flex; gap: 36px; margin-top: 8px; }
.hl-stats div { display: flex; flex-direction: column; }
.hl-stats span { font-size: 11px; letter-spacing: .2em; color: #5b504a; }
.hl-stats b { font-family: var(--f-display); font-weight: 400; font-size: 80px; line-height: 1; }
.hl-msg { font-family: var(--f-display); font-size: 30px; letter-spacing: .04em; }
.hl-msg.is-win { color: #1f7a4a; }
.hl-msg.is-lose { color: var(--accent-deep); }
.hl-msg.is-muted { color: #5b504a; }
.cz-hl__table { display: flex; flex-direction: column; align-items: center; gap: 36px; }
.hl-cards { position: relative; width: 100%; max-width: 720px; height: 390px; }
.hl-deck { position: absolute; left: 0; top: 40px; width: 200px; height: 290px; border: 10px solid var(--paper-2); border-radius: 18px; box-shadow: 8px 8px 0 #e6ddd0, 16px 16px 0 #d9cfbf, 0 24px 40px rgba(15,11,11,.35); display: flex; align-items: center; justify-content: center; }
.hl-deck span { width: 80px; height: 80px; border-radius: 50%; background: var(--paper-2); display: flex; align-items: center; justify-content: center; font-family: var(--f-display); font-size: 44px; color: var(--accent); }
.hl-now { position: absolute; left: 280px; top: 0; }
.hl-prev { position: absolute; left: 570px; top: 90px; opacity: .8; rotate: 8deg; }
.hl-prev[hidden] { display: none; }
.pc { position: relative; width: 240px; height: 350px; background-color: var(--paper-2); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 24px 40px rgba(15,11,11,.3); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); }
.pc.is-red { color: var(--accent-deep); }
.pc__idx { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 40px; }
.pc__idx span { font-family: var(--f-display); font-size: 40px; line-height: 1; }
.pc__idx img { width: 28px; height: 28px; }
.pc__idx--flip { align-self: flex-end; rotate: 180deg; }
.pc__big { align-self: center; width: 120px; height: 120px; }
.pc--sm { width: 140px; height: 204px; padding: 10px; border-radius: 12px; }
.pc--sm .pc__idx span { font-size: 24px; }
.pc--sm .pc__idx img { width: 16px; height: 16px; }
.pc--sm .pc__big { width: 64px; height: 64px; }
.hl-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.hl-btn { height: 72px; width: 220px; border: none; font-family: var(--f-display); font-size: 30px; letter-spacing: .08em; cursor: pointer; }
.hl-btn--high { background: var(--accent); color: #fff; box-shadow: 0 8px 0 #7d0b10; }
.hl-btn--low { background: var(--ink); color: var(--cream); box-shadow: 0 8px 0 var(--muted-dark); }
.hl-btn:active { translate: 0 4px; box-shadow: none; }

/* slot */
.cz-slot { padding: 90px var(--gutter) 110px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; }
.cz-slot__machine { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.slot {
  width: 100%; max-width: 700px; background-color: var(--accent); border-radius: 40px; border: 6px solid var(--cream);
  box-shadow: 0 0 0 10px var(--ink), 0 0 0 12px rgba(246,241,234,.3), 0 40px 70px rgba(0,0,0,.6);
  padding: 26px clamp(16px, 4vw, 40px) 34px; display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.slot__marquee { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.slot__marquee i { width: 14px; height: 14px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 10px #fff; }
.slot__marquee span { padding: 6px 20px; background: var(--ink); color: var(--cream); font-family: var(--f-display); font-size: clamp(26px, 3vw, 40px); letter-spacing: .12em; border-radius: 8px; }
.slot__marquee b { font-family: var(--f-jp); font-weight: 800; font-size: .65em; color: var(--accent-bright); }
.slot__window { position: relative; width: 100%; max-width: 600px; aspect-ratio: 2 / 1; background: var(--ink); border-radius: 20px; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.reel { background: var(--paper-2); border-radius: 10px; overflow: hidden; display: flex; }
.reel__strip { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-around; }
.sym { display: flex; align-items: center; justify-content: center; line-height: 1; opacity: .3; font-family: var(--f-display); font-size: clamp(22px, 3vw, 30px); color: var(--ink); }
.sym img { width: clamp(26px, 3.4vw, 44px); height: clamp(26px, 3.4vw, 44px); }
.sym.is-big { opacity: 1; font-size: clamp(56px, 7.6vw, 110px); }
.sym.is-big img { width: clamp(56px, 7vw, 100px); height: clamp(56px, 7vw, 100px); }
.sym--seven { color: var(--accent); }
.sym--bar.is-big { font-size: clamp(34px, 4.4vw, 64px); }
.slot__line { position: absolute; left: 6px; right: 6px; top: 50%; height: 3px; background: var(--accent); opacity: .75; pointer-events: none; }
.btn-spin { height: 70px; padding: 0 56px; border: none; border-radius: 999px; background: var(--cream); color: var(--ink); font-family: var(--f-display); font-size: 32px; letter-spacing: .12em; cursor: pointer; box-shadow: 0 8px 0 #bdb3a8; }
.btn-spin:active { translate: 0 4px; box-shadow: none; }
.slot-msg { margin-top: 28px; font-family: var(--f-display); font-size: 34px; letter-spacing: .04em; text-align: center; }
.slot-msg.is-win { color: #7ee0a1; }
.slot-msg.is-lose { color: var(--accent-bright); }
.slot-msg.is-muted { color: var(--muted); }
.cz-slot__text { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.cz-slot__text p { font-family: var(--f-body); font-size: 16px; line-height: 1.75; color: #d9cfc6; }
.payout { margin-top: 10px; border: 1.5px solid rgba(246,241,234,.35); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.payout__label { font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.payout div { display: flex; justify-content: space-between; font-family: var(--f-display); font-size: 26px; }
.payout b { font-weight: 400; }

@media (max-width: 1100px) {
  .table-felt { grid-template-columns: minmax(0, 1fr); border-radius: 32px; }
  .cz-hl { grid-template-columns: minmax(0, 1fr); }
  .cz-slot { grid-template-columns: minmax(0, 1fr); }
  .dice-msg { margin-left: 0; text-align: left; }
}
@media (max-width: 640px) {
  .table-felt { border-width: 8px; border-radius: 24px; }
  .dice-tray { gap: 14px; padding: 22px 8px; }
  .die--felt { --size: 64px; }
  .die-btn.is-held { translate: 0 -10px; }
  .hl-cards { height: 300px; }
  .hl-deck { width: 110px; height: 160px; top: 60px; border-width: 6px; }
  .hl-deck span { width: 48px; height: 48px; font-size: 26px; }
  .hl-now { left: 90px; }
  .hl-now .pc { width: 170px; height: 248px; }
  .hl-now .pc__big { width: 80px; height: 80px; }
  .hl-prev { display: none !important; }
  .hl-btn { width: 150px; font-size: 24px; }
  .bank__num { font-size: 44px; }
  .cz-intro__links .prize { margin-left: 0; }
  .die--felt { --size: 46px; }
  .die-btn__tag { font-size: 9px; padding: 2px 3px; letter-spacing: .06em; }
  .dice-tray { gap: 7px; min-height: 170px; padding: 20px 4px; flex-wrap: nowrap; }
  .scorecard__head small { display: none; }
  .btn-spin { height: 60px; padding: 0 28px; font-size: 22px; white-space: nowrap; }
}

/* ============================================================
   v4 — TRPG 로그 (♥ LOGS) · 코코포리아 로그를 카지노 테이블 채팅으로
   ============================================================ */
.thumb--log { background: #efe7da; flex-direction: column; gap: 10px; padding: 14px; }
.thumb__chat { width: 100%; display: flex; flex-direction: column; gap: 7px; }
.thumb__bubble { display: block; height: 16px; border-radius: 9px; background: var(--accent); }
.thumb__bubble--l { width: 72%; align-self: flex-start; border-bottom-left-radius: 2px; }
.thumb__bubble--r { width: 58%; align-self: flex-end; border-bottom-right-radius: 2px; }
.thumb__bubble.is-ink { background: var(--ink); }
.thumb__chat .thumb__bubble:last-child { width: 44%; opacity: .55; }
.thumb__kicker--log { align-self: flex-start; }
.hcard .thumb__bubble { height: 11px; }
.draw__excerpt--log { font-family: var(--f-mono); letter-spacing: .04em; }

.post__log { margin-top: 30px; }
.log { display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.log__note { margin: 0; padding: 22px; border: 1.5px dashed var(--ink); border-radius: 12px; font-family: var(--f-body); font-size: 15px; line-height: 1.8; color: var(--muted-dark); list-style: none; }
.log__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.log__stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 12px; background: #efe7da; }
.log__stat b { font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1; }
.log__stat span { font-size: 10px; letter-spacing: .14em; color: var(--muted-dark); }
.log__stat.is-crit { background: var(--accent); border-color: var(--accent); color: #fff; }
.log__stat.is-crit span { color: rgba(255,255,255,.85); }
.log__stat.is-fumble { background: var(--ink); color: var(--cream); }
.log__stat.is-fumble span { color: var(--muted); }

.log__cast, .log__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.log__who, .log__tab {
  height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font-family: var(--f-body); font-size: 14px; cursor: pointer;
}
.log__who i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 3px #fbf8f3, 0 0 0 1.5px var(--c); }
.log__who small, .log__tab small { font-family: var(--f-mono); font-size: 10px; color: var(--muted-dark); }
.log__who[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.log__who[aria-pressed="true"] small { color: rgba(255,255,255,.8); }
.log__who[aria-pressed="true"] i { box-shadow: inset 0 0 0 3px var(--c), 0 0 0 1.5px #fff; background: #fff; }
.log__tab { border-radius: 6px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; }
.log__tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.log__tab[aria-pressed="true"] small { color: rgba(255,255,255,.8); }

.log__list {
  margin: 0; padding: 18px; list-style: none; max-height: 72vh; overflow-y: auto; overscroll-behavior: contain;
  border: 2px solid var(--ink); border-radius: 14px;
  background-color: #efe7da; background-image: radial-gradient(rgba(212,22,31,.14) 1px, transparent 1.5px); background-size: 7px 7px;
  display: flex; flex-direction: column; gap: 8px;
}
.log__msg {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start;
  padding: 10px 14px; background: var(--paper-2); border-radius: 10px; border-left: 5px solid var(--c);
}
.log__head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.log__name { font-family: var(--f-kr); font-weight: 400; font-size: 16px; color: var(--c); overflow-wrap: anywhere; }
.log__tabname { font-size: 10px; letter-spacing: .12em; color: var(--muted-dark); }
.log__text { font-family: var(--f-body); font-size: 16px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.log__msg.is-side { background: transparent; border-left-style: dashed; }
.log__msg.is-side .log__text { font-size: 14px; color: var(--muted-dark); }
.log__msg.is-system { grid-template-columns: minmax(0, 1fr); border-left: none; background: transparent; text-align: center; padding: 4px; }
.log__msg.is-system .log__head { display: none; }
.log__msg.is-system .log__text { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted-dark); }
.log__msg.has-roll .log__text { font-family: var(--f-mono); font-size: 13px; letter-spacing: .02em; }
.log__roll {
  min-width: 74px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 2px solid var(--ink); border-radius: 8px; background: var(--paper-2);
}
.log__roll b { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1; }
.log__roll em { font-style: normal; font-size: 10px; letter-spacing: .16em; }
.log__roll.is-success { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.log__roll.is-special { background: var(--ink); color: #ffd35c; border-color: var(--ink); }
.log__roll.is-crit { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,22,31,.25); }
.log__roll.is-fail { color: var(--muted-dark); border-style: dashed; }
.log__roll.is-fumble { background: #2a0507; color: var(--accent-bright); border-color: #2a0507; }
.log__more { align-self: center; height: 46px; padding: 0 22px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; cursor: pointer; }
.log__more:hover { background: var(--ink); color: var(--cream); }
.log__open { align-self: flex-end; font-size: 12px; letter-spacing: .14em; color: var(--accent-deep); }
.log__open:hover { color: var(--accent); }

.pvlog { margin-top: 14px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 10px; background: #efe7da; display: flex; flex-direction: column; gap: 6px; font-family: var(--f-body); font-size: 13px; line-height: 1.6; color: var(--ink); }
.pvlog__head { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; color: var(--accent-deep); }
.pvlog__line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .log__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log__stat b { font-size: 28px; }
  .log__list { padding: 10px; max-height: 76vh; }
  .log__msg { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 11px; }
  .log__head { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 8px; }
  .log__text { font-size: 15px; }
  .log__roll { min-width: 60px; padding: 4px 8px; }
  .log__roll b { font-size: 22px; }
}

/* ---------- 비공개 카드 (잠금) ---------- */
.thumb--locked { flex-direction: column; gap: 10px; background-color: var(--accent); background-image: repeating-linear-gradient(45deg, rgba(246,241,234,.5) 0 2px, transparent 2px 16px), repeating-linear-gradient(-45deg, rgba(246,241,234,.5) 0 2px, transparent 2px 16px); background-size: auto; }
.thumb__lock { width: 56px; height: 56px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.thumb__lock svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.thumb__kicker--lock { padding: 4px 8px; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink); }
.hcard .thumb__lock { width: 44px; height: 44px; }
.hcard .thumb__lock svg { width: 20px; height: 20px; }

.lock { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.lock__back { flex: none; width: 150px; height: 200px; border: 2px solid var(--ink); border-radius: 12px; }
.lock__label { max-width: 26em; font-family: var(--f-body); font-size: 17px; line-height: 1.7; word-break: keep-all; }
.lock__row { width: 100%; max-width: 380px; display: flex; gap: 10px; }
.lock__input { flex: 1; min-width: 0; border-color: var(--ink); font-family: var(--f-mono); letter-spacing: .12em; }
.lock__input:focus { border-color: var(--accent); }
.lock .btn-red { flex: none; border: none; cursor: pointer; }
.lock .btn-red:disabled { opacity: .6; cursor: default; }
.lock__msg { min-height: 1.4em; margin: 0; font-family: var(--f-body); font-size: 15px; color: var(--accent-deep); }
.post__edit { position: absolute; right: clamp(20px, 4.5vw, 52px); bottom: 14px; font-size: 12px; letter-spacing: .14em; color: var(--muted-dark); }
.post__edit:hover { color: var(--accent); }

/* ---------- 관리자 (write.html) ---------- */
.gate { margin-top: 64px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.gate__text { margin: 0; font-family: var(--f-body); font-size: 17px; color: var(--muted); }
.gate__row { display: flex; gap: 10px; }
.gate__row .field { flex: 1; min-width: 0; }
.gate .btn-red { flex: none; border: none; cursor: pointer; }
.adminbar { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.adminbar .form__label { flex-basis: 100%; }
.adminbar__select { flex: 1; min-width: 0; max-width: 560px; font-size: 16px; }
.form__unattach { align-self: flex-start; height: 36px; }
.form__delete { margin-left: auto; color: var(--accent-bright); }
.form__btns .btn-red:disabled { opacity: .6; cursor: default; }
.art__link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.art__link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
