/* Screen "hero" (the hero sheet) structural styles. Only CSS variables from
   base.css are used so the three themes apply. Classes are prefixed .sheet-
   (not .hero-, which the landing page already uses) and sit on top of
   .panel/.card/.btn/.tag/.progress from base.css. */

.sheet { display: flex; flex-direction: column; gap: 0; }
.sheet .btn { min-height: 44px; }
.sheet-small { font-size: 0.9rem; }

/* ---------- identity ---------- */
.sheet-identity { display: flex; gap: 18px 24px; align-items: center; flex-wrap: wrap; }
.sheet-portrait {
  flex: 0 0 auto; width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; line-height: 1;
  border: 3px solid var(--line); border-radius: var(--radius);
  background: var(--bg-sunken); box-shadow: var(--shadow);
}
.sheet-identity-body { flex: 1 1 280px; min-width: 0; }
.sheet-kicker { font-size: 0.9rem; margin-bottom: 2px; }
.sheet-name { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 8px; overflow-wrap: anywhere; }
.sheet-rank-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-xp { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.sheet-xp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }

/* ---------- grid of panels ---------- */
.sheet-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; align-items: start; }
.sheet-grid > .panel { margin-bottom: 0; min-width: 0; }
.sheet-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sheet-panel-icon { font-size: 2rem; line-height: 1; }
.sheet-panel-titles { flex: 1 1 160px; min-width: 0; }
.sheet-panel-title { margin: 0; font-size: 1.4rem; }
.sheet-panel-sub { font-size: 0.9rem; }
.sheet-callout { padding: 10px 14px; margin: 0; border-radius: var(--radius-sm); background: var(--bg-sunken); border-left: 4px solid var(--accent); font-weight: 600; }
.sheet-empty { margin: 0; }

/* ---------- stats & mana ---------- */
.sheet-stats { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; grid-template-columns: 1fr; }
.sheet-stat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.sheet-stat-icon { font-size: 1.6rem; line-height: 1; }
.sheet-stat-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sheet-stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.sheet-mana { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- army ---------- */
.sheet-stacks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sheet-stack { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.sheet-stack-icon { font-size: 1.7rem; line-height: 1; }
.sheet-stack-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sheet-stack-count { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* ---------- campaign facts ---------- */
.sheet-facts { margin: 0; display: grid; gap: 4px 16px; grid-template-columns: 1fr; }
.sheet-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }
.sheet-fact:first-child { border-top: 0; }
.sheet-fact dt { color: var(--ink-soft); }
.sheet-fact dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- obelisks ---------- */
.sheet-obelisks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sheet-obelisk-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-obelisk {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1; border-radius: var(--radius-sm);
  border: 1px dashed var(--line); background: var(--bg); opacity: 0.6;
}
.sheet-obelisk.is-done { opacity: 1; border-style: solid; border-color: var(--good); background: var(--bg-sunken); }
.sheet-grail-note { margin: 0 0 10px; }

/* ---------- log ---------- */
.sheet-log { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.sheet-log li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 0.93rem; }
.sheet-log li:first-child { border-top: 0; }
.sheet-log-day { color: var(--ink-soft); white-space: nowrap; min-width: 62px; font-variant-numeric: tabular-nums; }

/* ---------- save panel ---------- */
.sheet-save-block { padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--line); }
.sheet-save-block:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }
.sheet-save-title { margin: 0 0 6px; font-size: 1.1rem; }
.sheet-code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.35; resize: vertical; overflow-wrap: anywhere; word-break: break-all; min-height: 72px; }
.sheet-save-actions { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.sheet-danger { border-top-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.sheet-danger p { margin-bottom: 8px; }

/* ---------- responsive ---------- */
@media (min-width: 900px) {
  .sheet-grid { grid-template-columns: 1fr 1fr; }
  .sheet-panel-wide { grid-column: 1 / -1; }
  .sheet-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .sheet-identity { gap: 14px; }
  .sheet-portrait { width: 84px; height: 84px; font-size: 3rem; }
  .sheet-save-actions .btn { flex: 1 1 100%; }
  .sheet-grail-note { font-size: 0.88rem; }
}
