/* Surfaces the landing page does not have: the browse grid, the creator
   workbench, the moderation table, and a Zone frame.

   styles.css is copied from the landing page rather than linked, because the
   card DB shares the project's design language and nothing else -- ticket 02
   settled that copying is fine and coupling is not. */

/* ---------------------------------------------------------------- a Zone.
   The landing page has no Zone frame: .dc-card is hardcoded aspect-ratio 3/4,
   which is a Unit. A Zone is 9:16 and carries no stat gems, because
   data/locations.yaml has no cost and no power on any of its 120 locations. */
.dc-card.is-zone { aspect-ratio: 9 / 16; }
.dc-card.is-zone .gem { display: none; }

/* ------------------------------------------------------------ the shell */
.cards-page { max-width: 1400px; margin: 0 auto; padding: 24px clamp(16px,3vw,40px) 90px; }
.cards-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px clamp(16px,3vw,40px); border-bottom: 1px solid rgba(255,255,255,.08); }
.cards-nav .brand { font: 800 15px/1 var(--font-num); letter-spacing: .1em; text-transform: uppercase;
  color: var(--k-ink); text-decoration: none; }
.cards-nav .spacer { flex: 1; }
.cards-nav a { color: var(--k-ink-2); text-decoration: none; font-size: 14px; }
.cards-nav a:hover { color: var(--k-ink); }

h1.cards-h1 { font-family: var(--font-num); font-size: clamp(26px,3vw,38px); letter-spacing: -.02em;
  color: var(--k-ink); margin: 26px 0 6px; }
.cards-sub { color: var(--k-ink-3); font-size: 14px; margin: 0 0 26px; }
h2.cards-h2 { font-family: var(--font-num); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--k-ink-3); margin: 36px 0 14px; }

/* ------------------------------------------------------- browse (variant A) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 26px; align-items: stretch; }
/* A Unit is 3:4 and a Zone is 9:16, so a mixed row is ragged by construction.
   Stretching the cell and pushing the meta line to its bottom puts every
   caption in a row on the same baseline, which is what the eye actually reads
   along -- without forcing the two shapes into one box and wasting the
   difference as empty space. */
.grid .cell { min-width: 0; display: flex; flex-direction: column; }
.grid .cell a.art { display: block; text-decoration: none; }
.cellmeta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: auto; padding-top: 10px; }

.chip { display: inline-block; font: 700 10px/1 var(--font-num); letter-spacing: .09em;
  text-transform: uppercase; padding: 5px 8px; border-radius: 5px;
  background: rgba(255,255,255,.07); color: var(--k-ink-2); }
.chip.s-in_playtesting { background: #14532d; color: #bbf7d0; }
.chip.s-being_coded    { background: #1e3a8a; color: #bfdbfe; }
.chip.s-needs_revision { background: #78350f; color: #fed7aa; }
.chip.s-rejected       { background: #4c0519; color: #fecdd3; }
.chip.s-already_exists { background: #334155; color: #cbd5e1; }
.chip.s-sibling_low_prio { background: #3f3f46; color: #d4d4d8; }
.chip.s-none { background: rgba(255,255,255,.05); color: var(--k-ink-3); }
.endorse { color: var(--k-accent-soft, #ffc451); font: 700 11px/1 var(--font-num); }
.score { font: 700 13px/1 var(--font-num); color: var(--k-ink); }
.ver { font: 700 10px/1 var(--font-num); color: var(--k-ink-3); letter-spacing: .08em; }
.ai-flag { font: 700 9px/1 var(--font-num); letter-spacing: .1em; text-transform: uppercase;
  color: var(--k-ink-3); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: 4px 6px; }

/* ------------------------------------------- filter rail (variant C, reused) */
.with-rail { display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap; }
.rail-col { flex: 0 0 230px; position: sticky; top: 18px; }
.rail-col .grp { margin-bottom: 20px; }
.rail-col .grp > .lbl { font: 700 10px/1 var(--font-num); letter-spacing: .12em;
  text-transform: uppercase; color: var(--k-ink-3); margin-bottom: 9px; }
.rail-col label.ck { display: flex; gap: 8px; align-items: center; font-size: 13px;
  color: var(--k-ink-2); margin-bottom: 6px; }
.main-col { flex: 1 1 620px; min-width: 300px; }

/* --------------------------------------------------------------- controls */
.fld { display: block; margin-bottom: 14px; }
.fld > .lbl { display: block; font: 700 10px/1 var(--font-num); letter-spacing: .12em;
  text-transform: uppercase; color: var(--k-ink-3); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; box-sizing: border-box; background: rgba(0,0,0,.35); color: var(--k-ink);
  border: 1px solid rgba(255,255,255,.13); border-radius: 6px; padding: 10px 12px;
  font: 400 15px/1.4 inherit; }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--k-ink-3); margin-top: 5px; }
.count { float: right; font: 700 10px/1 var(--font-num); color: var(--k-ink-3); }
.err { color: #fecdd3; background: #4c0519; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin: 0 0 16px; }
.ok  { color: #bbf7d0; background: #14532d; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin: 0 0 16px; }

.typetog { display: flex; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; overflow: hidden; }
.typetog button { flex: 1; padding: 10px; border: 0; cursor: pointer; background: rgba(0,0,0,.35);
  color: var(--k-ink-3); font: 700 11px/1 var(--font-num); letter-spacing: .12em; text-transform: uppercase; }
.typetog button[aria-pressed=true] { background: var(--k-accent-soft, #ffc451); color: #1c1203; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 11px 18px; background: rgba(255,255,255,.06);
  color: var(--k-ink); font: 700 11px/1 var(--font-num); letter-spacing: .1em; text-transform: uppercase; }
.btn.primary { background: var(--k-accent-soft, #ffc451); color: #1c1203; border-color: transparent; }
.btn.danger  { background: #7f1d1d; color: #fecdd3; border-color: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------------- the cropper.
   The card's own art window is the crop viewport: no separate widget, so what
   you place is exactly what ships. Scale runs from "covers the frame" to 1:1
   and stops -- nothing is ever enlarged. */
.dc-card.is-cropping .win { cursor: grab; touch-action: none; }
.dc-card.is-cropping .win img { object-fit: none !important; inset: auto !important;
  width: auto !important; height: auto !important; max-width: none; transition: none !important; }
.cropbar { margin-top: 12px; }
.cropbar input[type=range] { width: 100%; }
.cropbar .zl { display: flex; justify-content: space-between; font: 700 9px/1 var(--font-num);
  letter-spacing: .1em; text-transform: uppercase; color: var(--k-ink-3); margin-top: 4px; }
.drop { border: 1px dashed rgba(255,255,255,.2); border-radius: 8px; padding: 20px; text-align: center;
  color: var(--k-ink-3); font-size: 13px; }

/* ------------------------------------------------- moderation (variant C) */
table.mod { width: 100%; border-collapse: collapse; min-width: 760px; }
table.mod thead th { font: 700 10px/1 var(--font-num); letter-spacing: .1em; text-transform: uppercase;
  color: var(--k-ink-3); text-align: left; padding: 0 10px 8px; }
table.mod td { padding: 9px 10px; border-top: 1px solid rgba(255,255,255,.07); vertical-align: middle; }
table.mod .thumb { width: 40px; overflow: hidden; border-radius: 3px; }
table.mod .thumb.unit { aspect-ratio: 3/4; }
table.mod .thumb.zone { aspect-ratio: 9/16; }
table.mod .thumb img { width: 100%; height: 100%; object-fit: cover; }
.scroller { overflow-x: auto; }

/* ------------------------------------------------------------- history */
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { border-left: 2px solid rgba(255,255,255,.12); padding: 0 0 18px 16px; position: relative; }
.hist li::before { content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--k-accent-soft, #ffc451); }
.hist .when { font: 700 10px/1 var(--font-num); letter-spacing: .08em; color: var(--k-ink-3); }
.hist .what { color: var(--k-ink-2); font-size: 14px; margin-top: 5px; }
.hist .why { color: var(--k-ink-3); font-size: 13px; font-style: italic; margin-top: 4px; }
.diff ins { background: #14532d; color: #bbf7d0; text-decoration: none; padding: 1px 3px; border-radius: 3px; }
.diff del { background: #4c0519; color: #fecdd3; padding: 1px 3px; border-radius: 3px; }

/* ------------------------------------------------------------ discussion */
.reply { border-top: 1px solid rgba(255,255,255,.07); padding: 16px 0; }
.reply .meta { font: 700 10px/1 var(--font-num); letter-spacing: .08em; color: var(--k-ink-3); margin-bottom: 7px; }
.reply .body { color: var(--k-ink-2); font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.reply .stamp { color: var(--k-ink-3); }

/* ------------------------------------------------------ prose pages.
   The terms and the privacy notice. Wide measure, generous leading: these
   are the two pages on the site somebody actually has to read. */
.prose { color: var(--k-ink-2); font-size: 16px; line-height: 1.7; }
.prose h2 { font-family: var(--font-num); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--k-ink-3); margin: 34px 0 10px; }
.prose p { margin: 0 0 15px; }
.prose ul { margin: 0 0 15px; padding-left: 20px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--k-ink); }
.prose table { border-collapse: collapse; margin: 0 0 18px; width: 100%; }
.prose td, .prose th { border-top: 1px solid rgba(255,255,255,.09); padding: 8px 10px;
  text-align: left; vertical-align: top; font-size: 15px; }
.prose th { font: 700 10px/1 var(--font-num); letter-spacing: .1em; text-transform: uppercase;
  color: var(--k-ink-3); border-top: 0; }
