/* ---------- fonts ---------- */
@font-face { font-family: "SF Compact Display"; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/sf-compact-display-bold.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Text"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/sf-pro-text-regular.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Text"; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/sf-pro-text-medium.woff2") format("woff2"); }
@font-face { font-family: "SF Pro Text"; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/sf-pro-text-semibold.woff2") format("woff2"); }

/* ---------- tokens ----------
   Type sizes keep the Figma ratios (32 / 16 / 14 / 14); the whole scale is
   driven by --base so it can shrink to fit the screen. */
:root {
  --base: clamp(10px, 0.75vw, 14px);
  --fs-title: 2.2857em;   /* 32 / 14 */
  --fs-card-title: 1.1428em; /* 16 / 14 */
  --fs-body: 1em;         /* 14 */
  --fs-small: 0.86em;

  --font-display: "SF Compact Display", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --ink: #212121;
  --ink-soft: #5a5a65;
  --ink-label: #4d4d4d;
  --line: #ddd;
  --panel: #f8f8f8;
  --white: #fff;

  --r-shell: 12px;
  --r-panel: 12px;
  --r-card: 8px;
  --r-pill: 20px;
  --r-tag: 8px;

  --tone-mint: #cbdfd8;
  --tone-grey: #e1e4e8;
  --tone-pink: #ffdce0;
  --tone-blue: #d9e5f5;
  --tone-lilac: #f0e7f6;
  --tone-green: #cbdfd8;
  --tone-dark: #454545;

  --shadow-card: 0 2px 2px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html { font-size: var(--base); }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-text); font-weight: 400; font-size: var(--fs-body);
  letter-spacing: .1px; color: var(--ink); background: #ff2ff0;
  overflow: hidden; /* desktop: the page never scrolls */
}
h1, h2, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- poster wall ----------
   The stage keeps the wall image's proportions and "covers" the screen, so the
   poster grid never reflows, it only crops. */
.wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #b020f0; }
.wall-stage {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100vw, calc(100dvh * 1615 / 1134)); aspect-ratio: 1615 / 1134;
  background: url("../assets/wall/wall.jpg") center / 100% 100% no-repeat;
}
.poster {
  position: absolute; display: block; padding: 0; border: 0; cursor: zoom-in; background: none; overflow: hidden;
}
.poster .reveal {
  position: absolute; max-width: none; opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.poster:hover .reveal, .poster:focus-visible .reveal { opacity: 1; }
.poster:focus-visible { outline: 3px solid #fff; outline-offset: -3px; z-index: 2; }

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 1; height: 100dvh; display: flex; flex-direction: column;
  align-items: stretch; gap: 24px; padding: 10.6vh 4.6vw 4vh 5.4vw; pointer-events: none;
}
.stage > * { pointer-events: auto; }

.pill-link {
  position: fixed; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: .5em;
  width: 13em; height: 2.6em; padding: 0 .85em; background: var(--white); border-radius: var(--r-card);
  text-decoration: none; font-weight: 500; letter-spacing: -.4px; box-shadow: var(--shadow-card);
  transition: transform .15s ease;
}
.pill-link:hover { transform: translateY(-2px); }
.pill-link::after { content: "↗"; color: var(--ink-soft); }
.pill-tools { top: 2.6vh; right: 1.6vw; }
.pill-twitter { bottom: 2.6vh; right: 1.6vw; }

/* ---------- board shell ---------- */
.shell {
  flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--r-shell); padding: 2.857em;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.shell-head { display: flex; flex-direction: column; gap: .571em; }
.shell-head h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-title); line-height: normal; letter-spacing: 0; }
.shell-head p { color: var(--ink-soft); }
.panel { flex: 1 1 auto; min-height: 0; margin-top: 1.714em; background: var(--panel); border-radius: var(--r-panel); padding: .571em; display: flex; }
.columns { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }

.column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: .857em; padding: .857em; border-radius: var(--r-panel); }
.col-head {
  align-self: flex-start; max-width: 100%; display: inline-flex; align-items: flex-start; gap: .6em;
  padding: .286em .857em; border: 0; border-radius: var(--r-pill); background: var(--tone-grey); color: var(--ink-label);
  font-weight: 600; font-size: var(--fs-card-title); letter-spacing: -.2px; line-height: normal; text-align: left; cursor: default; flex: none;
}
.col-emoji { flex: none; }
.col-label { min-width: 0; }
.col-head .chev { display: none; margin-left: auto; align-self: center; flex: none; transition: transform .2s; }
.col-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .857em;
  padding: 1px; scrollbar-width: none; border-radius: var(--r-card);
}
.col-body::-webkit-scrollbar { display: none; }
.column.drop-ok .col-body { outline: 2px dashed rgba(0, 0, 0, .25); outline-offset: 2px; }

.tone-mint { background: var(--tone-mint); } .tone-grey { background: var(--tone-grey); }
.tone-pink { background: var(--tone-pink); } .tone-blue { background: var(--tone-blue); }
.tone-lilac { background: var(--tone-lilac); } .tone-green { background: var(--tone-green); }
.tone-dark { background: var(--tone-dark); color: #fff !important; }

/* ---------- cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .571em; flex: none;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 1.143em;
  box-shadow: var(--shadow-card); text-decoration: none; color: inherit; cursor: grab;
}
a.card { cursor: pointer; }
a.card:hover { border-color: #c9c9c9; }
.card.dragging { opacity: .4; }
.card.bare { padding: 0; overflow: hidden; border: 0; background: transparent; box-shadow: none; }
.card-title { font-weight: 600; font-size: var(--fs-card-title); letter-spacing: -.2px; line-height: normal; color: var(--ink); }
.card-text { color: var(--ink-soft); }
.card-badge { display: block; font-size: 1.2em; line-height: 1; }
.card-img { display: block; width: 100%; height: auto; border-radius: 4px; -webkit-user-drag: none; }
.card.bare .card-img { border-radius: var(--r-card); }
.card-tag { display: inline-block; padding: .286em .714em; border-radius: var(--r-tag); font-weight: 500; letter-spacing: -.4px; line-height: normal; color: var(--ink-label); }
.checks { list-style: none; margin: 0; padding: .571em 0; width: 100%; display: flex; flex-direction: column; gap: .571em; color: var(--ink-soft); }
.checks li { display: flex; align-items: flex-start; gap: .429em; line-height: normal; }
.checks li::before {
  content: ""; flex: none; width: 1.143em; height: 1.143em; border-radius: 4px; background: var(--tone-grey);
  background-image: radial-gradient(circle, #6b6f76 0 .12em, transparent .14em);
}
.checks li.done { text-decoration: line-through; opacity: .6; color: var(--ink-label); }
.checks li.done::before {
  background-image: none; content: "✓"; display: grid; place-items: center; font-size: .8em; color: #555; text-decoration: none;
}

/* ---------- blog shell ---------- */
.blog-shell {
  flex: 1 1 0; min-height: 9em; width: clamp(17em, 20vw, 26em); display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--r-shell); padding: .3em; box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.blog-shell .column { flex: 1; min-height: 0; }

/* ---------- modals ---------- */
.modal {
  border: 0; padding: 0; border-radius: var(--r-shell); background: var(--white); color: var(--ink);
  max-width: min(92vw, 720px); max-height: 92dvh; overflow: auto; box-shadow: 0 20px 80px rgba(0, 0, 0, .45);
}
.modal::backdrop { background: rgba(20, 0, 30, .6); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-close {
  position: absolute; top: .6em; right: .6em; z-index: 2; width: 2.3em; height: 2.3em; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.poster-modal { width: max-content; }
.poster-modal img { display: block; max-width: 100%; max-height: 74dvh; width: auto; margin: 0 auto; }
.poster-meta { padding: 1.1em 1.4em 1.3em; }
.poster-meta h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.6em; }
.poster-meta p { margin-top: .3em; color: var(--ink-soft); }
.poster-meta a { color: var(--ink); }

.gate-modal { width: min(92vw, 30em); padding: 1.8em; text-align: center; }
.gate-lock { font-size: 2.4em; line-height: 1; }
.gate-modal h2 { margin-top: .4em; font-family: var(--font-display); font-weight: 700; font-size: 1.7em; }
.gate-modal p { color: var(--ink-soft); margin-top: .3em; }
.gate-q { margin-top: 1.2em !important; color: var(--ink) !important; font-weight: 600; font-size: var(--fs-card-title); letter-spacing: -.2px; }
.gate-options { margin-top: 1em; display: grid; gap: .55em; }
.gate-options button {
  padding: .75em 1em; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--white); cursor: pointer;
  transition: background .12s;
}
.gate-options button:hover { background: var(--panel); }
.error-pop {
  position: fixed; left: 50%; top: 50%; z-index: 20; max-width: 90vw; padding: 1em 1.4em; border-radius: var(--r-shell);
  background: var(--tone-pink); border: 1px solid #f0a9b1; color: var(--ink); font-weight: 600; font-size: var(--fs-card-title);
  letter-spacing: -.2px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); pointer-events: none;
  transform: translate(-50%, -50%); animation: wobble .55s ease-out;
}
@keyframes wobble {
  0% { transform: translate(-50%, -50%) scale(.9); opacity: 0; }
  15% { transform: translate(calc(-50% - 12px), -50%) scale(1); opacity: 1; }
  30% { transform: translate(calc(-50% + 10px), -50%); }
  45% { transform: translate(calc(-50% - 8px), -50%); }
  60% { transform: translate(calc(-50% + 6px), -50%); }
  80% { transform: translate(calc(-50% - 3px), -50%); }
  100% { transform: translate(-50%, -50%); }
}

.toast {
  position: fixed; left: 50%; bottom: 3vh; z-index: 10; transform: translateX(-50%); padding: .7em 1.1em;
  background: #222; color: #fff; border-radius: var(--r-pill); pointer-events: none;
}

:focus-visible { outline: 2px solid #2b6cff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- mobile: stacked, collapsible columns; page scrolls, wall stays put ---------- */
@media (max-width: 820px) {
  :root { --base: 14px; }
  body { overflow: auto; }
  .stage { height: auto; min-height: 100dvh; padding: 4.4em 4vw 2em; gap: 1.2em; }
  .pill-link { position: static; width: 100%; }
  .pill-tools { position: absolute; top: 1em; right: 4vw; width: 9em; }
  .pill-twitter { margin-top: .4em; }
  .shell { padding: 1.3em; }
  .panel { padding: .8em; }
  .columns { display: flex; flex-direction: column; gap: .7em; }
  .column { background: var(--white); border-radius: var(--r-card); padding: .7em; }
  .col-head { align-self: stretch; cursor: pointer; padding: .55em .85em; }
  .col-head .chev { display: inline; }
  .column.collapsed .col-body { display: none; }
  .column.collapsed .chev { transform: rotate(-90deg); }
  .col-body { overflow: visible; }
  .blog-shell { flex: none; width: 100%; padding: .7em; }
}
