
@font-face {
  font-family: "Cinzel Decorative";
  src: url("assets/fonts/CinzelDecorative-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cinzel Decorative";
  src: url("assets/fonts/CinzelDecorative-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("assets/fonts/CrimsonText-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("assets/fonts/CrimsonText-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("assets/fonts/CrimsonText-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IM Fell French Canon";
  src: url("assets/fonts/IMFellFrenchCanon-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* War College — painted lecture hall · parchment · wood · brass */
:root {
  --bg: #1a120c;
  --bg2: #2a1c12;
  --panel: #3a2818;
  --line: #6a4a28;
  --text: #f3e6d0;
  --muted: #c4a574;
  --accent: #8a6aaa;
  --accent2: #a8d4b0;
  --danger: #c44048;
  --gold: #f5c542;
  --good: #5ddea8;
  --warn: #f0c14a;
  --crimson: #c43c55;
  --radius: 10px;
  --frame-gold: #c49048;
  --frame-gold-bright: #f0d78c;
  --frame-gold-dim: rgba(196, 144, 72, 0.55);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  font-family: "Crimson Text", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;   /* ns2: lock page scroll (cg2 already locked; base page now too) */
  min-height: 0;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(120, 80, 36, 0.4) 0%, transparent 55%),
    radial-gradient(1100px 520px at 40% 20%, rgba(80, 60, 100, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #2a1c12 0%, #1a120c 55%, #120c08 100%);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
a { color: #e0b060; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
code { font-size: 0.85em; color: var(--frame-gold-bright); }

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 14px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(245, 197, 66, 0.2);
}
.brand .tag {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--frame-gold-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; }
.nav a { color: var(--muted); }
.nav a.active {
  color: var(--frame-gold-bright);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(245, 197, 66, 0.25);
}
.nav a.muted { opacity: 0.65; }

/* Chrome frame corners */
.chrome {
  position: relative;
  background: linear-gradient(165deg, rgba(28, 24, 38, 0.96), rgba(14, 16, 24, 0.98));
  border: 1px solid var(--frame-gold-dim);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(245, 197, 66, 0.06);
}
.chrome .c-tr, .chrome .c-bl {
  position: absolute;
  width: 18px; height: 18px;
  pointer-events: none;
  border-color: var(--frame-gold);
  border-style: solid;
  opacity: 0.85;
}
.chrome .c-tr { top: 6px; right: 6px; border-width: 2px 2px 0 0; }
.chrome .c-bl { bottom: 6px; left: 6px; border-width: 0 0 2px 2px; }

/* Pot HUD */
.pots-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .pots-hud { grid-template-columns: 1fr 1fr; }
}
.pot-cell {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(212,176,74,0.18);
  text-align: center;
}
.pot-cell .label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.pot-cell strong {
  display: block;
  font-size: 1.25rem;
  color: var(--frame-gold-bright);
  margin: 2px 0;
}
.pot-cell .unit { font-size: 0.65rem; color: var(--muted); }
.pot-cell.crew.pulse {
  animation: potPulse 2.4s ease-in-out infinite;
  border-color: rgba(245,197,66,0.45);
}
.pot-cell.solo strong { color: var(--accent2); }
.pot-cell.next strong { color: var(--accent); }
.pot-cell.muted-pot { opacity: 0.7; }
.pot-cell.muted-pot strong { color: var(--muted); font-size: 1rem; }
@keyframes potPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,197,66,0); }
  50% { box-shadow: 0 0 18px 0 rgba(245,197,66,0.22); }
}

/* Player HUD */
.player-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.hud-cell .label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.hud-cell strong { font-size: 1.05rem; }
.hud-cell.gems strong { color: var(--gold); }
.hud-cell.insight strong { color: var(--accent); }
.hud-cell.merit strong { color: var(--frame-gold-bright); }
.hud-cell .regen {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}
.hp-bar {
  width: 72px; height: 6px;
  margin-top: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.hp-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--crimson), #ff8a9a);
  border-radius: 4px;
  transition: width 0.25s;
}
.orb-r { color: #ff6b7a; margin-right: 8px; }
.orb-g { color: #5ddea8; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.08s, border-color 0.15s, background 0.15s;
}
.btn:hover:not(:disabled) { border-color: var(--frame-gold-dim); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.sm { padding: 6px 10px; font-size: 0.78rem; }
.btn.primary {
  background: linear-gradient(180deg, #6a4dff, #4a2fd0);
  border-color: #8b70ff;
}
.btn.gold {
  background: linear-gradient(180deg, #c9a03a, #8a6a18);
  border-color: var(--frame-gold);
  color: #1a1408;
}
.btn.accent {
  background: linear-gradient(180deg, #3a2a6a, #241848);
  border-color: var(--accent);
  color: #d8cfff;
}
.btn.danger {
  background: linear-gradient(180deg, #a02840, #6a1228);
  border-color: var(--danger);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.btn.good {
  background: linear-gradient(180deg, #2a8a60, #186040);
  border-color: var(--good);
}
.btn.toggle {
  background: rgba(0,0,0,0.25);
  border-color: var(--line);
  color: var(--muted);
}
.btn.toggle.active {
  background: linear-gradient(180deg, rgba(212,176,74,0.25), rgba(100,70,20,0.35));
  border-color: var(--frame-gold);
  color: var(--frame-gold-bright);
}

/* Hero */
.hero.legacy-unused {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 160px;
}
.hero-img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.92;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  background: linear-gradient(180deg, transparent 20%, rgba(8,10,16,0.88) 100%);
  pointer-events: none;
}
.hero-overlay h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--frame-gold-bright);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.hero-overlay p { margin: 2px 0 10px; color: var(--muted); font-size: 0.9rem; }
.ascension {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.ascension .label { font-size: 0.7rem; text-transform: uppercase; color: var(--muted); }
.asc-bar {
  flex: 1;
  max-width: 220px;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(212,176,74,0.25);
}
.asc-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.3s;
}
#ascText { font-size: 0.8rem; color: var(--frame-gold-bright); font-weight: 600; }

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.tab.active {
  background: linear-gradient(180deg, rgba(212,176,74,0.28), rgba(80,55,15,0.4));
  border-color: var(--frame-gold);
  color: var(--frame-gold-bright);
}

.panel {
  padding: 16px 16px 18px;
  margin-bottom: 12px;
}
.panel[hidden] { display: none !important; }
.panel-head h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--frame-gold-bright);
}
.panel-head .sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
.muted { color: var(--muted); font-weight: 400; }

.sink-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.cram-flag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  animation: potPulse 1.5s infinite;
}

/* Lecture tiles */
.lecture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 560px) {
  .lecture-grid { grid-template-columns: repeat(2, 1fr); }
}
.lecture-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(212,176,74,0.28);
  background:
    radial-gradient(120px 80px at 50% 0%, rgba(124,92,255,0.18), transparent 70%),
    rgba(0,0,0,0.35);
  color: var(--text);
  min-height: 128px;
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}
.lecture-tile:hover:not(:disabled) {
  border-color: var(--frame-gold);
  box-shadow: 0 0 20px rgba(245,197,66,0.15);
  transform: translateY(-2px);
}
.lecture-tile img {
  width: 56px; height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.lecture-tile .t-name { font-weight: 700; font-size: 0.92rem; }
.lecture-tile .t-cost {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lecture-tile.pinned::after {
  content: "PIN";
  position: absolute;
  top: 6px; right: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #1a1408;
  background: var(--gold);
  padding: 2px 5px;
  border-radius: 4px;
}

.chrome-inset {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(42,49,66,0.9);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.chrome-inset .log-line { margin: 0 0 4px; }
.chrome-inset .log-line.good { color: var(--good); }
.chrome-inset .log-line.warn { color: var(--warn); }
.chrome-inset .log-line.bad { color: var(--danger); }

/* Crew */
.crew-create .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.crew-create input[type="text"] {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
  color: var(--text);
}
.crew-create .code-in { max-width: 120px; text-transform: uppercase; letter-spacing: 0.1em; }
.chk { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hint { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }

.crew-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212,176,74,0.25);
}
.crew-banner h4 { margin: 0; color: var(--frame-gold-bright); }
.crew-banner .meta { margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
.crew-code { text-align: right; }
.crew-code .label { display: block; font-size: 0.65rem; color: var(--muted); text-transform: uppercase; }
.crew-code strong {
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--accent2);
}

.crew-roster {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.crew-roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--line);
}
.crew-roster .who { font-weight: 600; }
.crew-roster .tags { font-size: 0.72rem; color: var(--muted); }
.crew-roster .tag-alliance {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(124,92,255,0.2);
  color: #c4b5ff;
  margin-left: 6px;
}
.crew-roster .runner-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #1a1408;
  background: var(--gold);
  padding: 3px 7px;
  border-radius: 5px;
}
.crew-roster .btn-runner {
  font-size: 0.72rem;
  padding: 4px 8px;
}
.crew-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pins { font-size: 0.8rem; color: var(--muted); }

/* Seat */
.seat-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(212,176,74,0.35);
}
.seat-bg {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 35%;
}
.seat-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(8,10,16,0.55), transparent 40%, rgba(8,10,16,0.85));
}
.occupant {
  align-self: center;
  text-align: center;
  margin-top: 36px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(10,8,18,0.75);
  border: 1px solid rgba(212,176,74,0.4);
  min-width: 160px;
}
.occ-label { display: block; font-size: 0.65rem; text-transform: uppercase; color: var(--muted); }
#seatName { font-size: 1.15rem; color: var(--frame-gold-bright); }
.seat-hp {
  width: 140px; height: 8px;
  margin: 6px auto 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.seat-hp i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #ff5c7a, #f5c542);
  transition: width 0.2s;
}
#seatHpText { font-size: 0.75rem; color: var(--muted); }
.hold-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
}
.hold-stats .label { display: block; font-size: 0.65rem; color: var(--muted); text-transform: uppercase; }
.hold-stats strong { color: var(--gold); font-size: 1.1rem; }

.seat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.consumables h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--frame-gold-bright); }
.con-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
@media (max-width: 640px) {
  .con-row { grid-template-columns: 1fr 1fr; }
}
.btn.con {
  flex-direction: column;
  padding: 10px 8px;
  background: rgba(0,0,0,0.35);
  border-color: rgba(212,176,74,0.3);
  text-align: center;
}
.btn.con .name { font-size: 0.82rem; }
.btn.con .meta { font-size: 0.68rem; color: var(--muted); font-weight: 500; }
.btn.con.writ { border-color: rgba(124,92,255,0.5); }

/* Shop */
.shop-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.price-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  margin-left: auto;
}
.orb-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .orb-showcase { grid-template-columns: 1fr; }
}
.orb-card {
  text-align: center;
  padding: 16px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212,176,74,0.25);
}
.orb-card img {
  width: 88px; height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(245,197,66,0.25));
}
.orb-card h4 { margin: 8px 0 4px; color: var(--frame-gold-bright); }
.orb-card p { margin: 0 0 6px; font-size: 0.8rem; color: var(--muted); }
.orb-card .stack { color: var(--text); font-size: 0.9rem; }
.orb-card .cap { font-size: 0.72rem; color: var(--warn); }
.bundle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

/* Boards */
.boards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .boards-grid { grid-template-columns: 1fr; }
}
.board-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212,176,74,0.22);
}
.board-card h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--frame-gold-bright);
}
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rank;
}
.rank-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(42,49,66,0.7);
  font-size: 0.82rem;
  counter-increment: rank;
}
.rank-list li::before {
  content: counter(rank);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(212,176,74,0.15);
  color: var(--frame-gold-bright);
  font-weight: 700;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.rank-list li.you {
  background: rgba(124,92,255,0.12);
  border-radius: 6px;
  border-bottom-color: transparent;
}
.rank-list li.you::before { background: var(--accent); color: #fff; }
.rank-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .sc { font-weight: 700; color: var(--gold); }
.rank-list .prize {
  font-size: 0.68rem;
  color: var(--good);
  white-space: nowrap;
}
.rank-list .prize.soft { color: var(--muted); }

.foot {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4,6,12,0.78);
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none !important; }
.modal-card {
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: 20px 18px 18px;
  position: relative;
}
.modal-x {
  position: absolute;
  top: 8px; right: 10px;
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}
.modal-card h3 {
  margin: 0 0 8px;
  color: var(--frame-gold-bright);
  padding-right: 28px;
}
.modal-card p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Drill timing bar */
.drill-wrap { text-align: center; padding: 8px 0; }
.drill-timer {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}
.timing-track {
  position: relative;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 12px 0;
}
.timing-zone {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(93,222,168,0.35);
  border-left: 2px solid var(--good);
  border-right: 2px solid var(--good);
}
.timing-needle {
  position: absolute;
  top: 0; bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(245,197,66,0.8);
  left: 0%;
}
.drill-score { font-size: 1.1rem; font-weight: 700; margin: 8px 0; }
.tap-hint { font-size: 0.8rem; color: var(--muted); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(420px, 92vw);
  padding: 10px 16px;
  border-radius: 10px;
  background: #1a1e2a;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--good); }
.toast.err { border-color: var(--danger); }


/* Paid Crew Proxies */
.proxy-hud {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(212, 176, 74, 0.08);
  border: 1px solid rgba(212, 176, 74, 0.28);
  font-size: 0.82rem;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.proxy-hud .proxy-tax { color: var(--warn); font-weight: 600; }
.proxy-hud .proxy-split { color: var(--text); }
.crew-roster li.empty-slot {
  border-style: dashed;
  background: rgba(0,0,0,0.18);
}
.crew-roster li.kind-proxy {
  border-color: rgba(212,176,74,0.45);
}
.crew-roster li.kind-labBot {
  border-color: rgba(120,140,180,0.4);
  opacity: 0.92;
}
.crew-roster .kind-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.crew-roster .kind-badge.proxy {
  background: rgba(212,176,74,0.25);
  color: var(--frame-gold-bright);
}
.crew-roster .kind-badge.lab {
  background: rgba(120,140,180,0.25);
  color: #a8b8d8;
}
.crew-roster .kind-badge.human {
  background: rgba(80,180,120,0.2);
  color: #8fdfb0;
}
.proxy-hire {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.proxy-hire .btn-hire {
  font-size: 0.7rem;
  padding: 4px 8px;
  min-height: 0;
}
.proxy-hire .btn-hire.upgrade {
  border-color: rgba(212,176,74,0.5);
}
.crew-roster .slot-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.runner-locked {
  font-size: 0.68rem;
  color: var(--muted);
  font-style: italic;
}

.proxy-hud .proxy-voucher { color: var(--accent2); font-weight: 600; }
.btn-hire.has-voucher { box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.45); }


/* —— World chrome overrides —— */
.brand h1 {
  font-family: "Cinzel Decorative", Georgia, serif;
  color: #f3e2b8;
  text-shadow: 0 2px 0 #3a2410, 0 0 18px rgba(255, 180, 60, 0.25);
}
.brand .tag {
  font-family: "Crimson Text", Georgia, serif;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #c4a574;
}
.nav a { color: #b89868; font-family: "Crimson Text", Georgia, serif; }
.nav a.active { color: #f0e0c0; font-weight: 700; text-shadow: none; }

.chrome {
  background: linear-gradient(165deg, #4a3420 0%, #2e1c10 100%);
  border: 2px solid #8a6238;
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 220, 160, 0.08);
}
.chrome .c-tr, .chrome .c-bl { display: none; }

.pouch-hud, .player-hud {
  background: linear-gradient(180deg, #5a3e28 0%, #3a2818 100%);
  border: 2px solid #8a6238;
}
.hud-cell .label {
  font-family: "Crimson Text", Georgia, serif;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #d4b888;
  font-size: 0.72rem;
}
.hud-cell strong {
  font-family: "IM Fell French Canon", Georgia, serif;
  color: #f8ecd0;
}

/* Prize sacks */
.sack-rail, .pots-hud {
  background: linear-gradient(165deg, #3a2818, #241810);
  border: 2px solid #8a6238;
}
.pot-cell {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 220, 160, 0.12), transparent 55%),
    linear-gradient(180deg, #5a3e28, #2e1c10);
  border: 2px solid #6a4a28;
  border-radius: 12px 12px 40% 40%;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.12);
}
.pot-cell .label {
  font-family: "Crimson Text", Georgia, serif;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #d4b888;
}
.pot-cell strong {
  font-family: "IM Fell French Canon", Georgia, serif;
}

/* Lecture hall scene */
.college-scene.hero {
  position: relative;
  min-height: min(42vh, 320px);
  padding: 0;
  overflow: hidden;
  border: 3px solid #5a3a1c;
  background: #1a1008;
}
.college-bg {
  position: absolute;
  inset: 0;
  background: url("assets/town/rooms/room_war_college.png") center 40% / cover no-repeat;
  filter: saturate(1.05) contrast(1.03) brightness(1.05);
  transform: scale(1.02);
}
.college-vignet {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 10, 4, 0.08) 0%, transparent 22%, transparent 70%, rgba(10, 5, 2, 0.28) 100%);
}
.college-scene .hero-overlay,
.college-scene .yard-sign {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 16px 22px;
  background: transparent;
}
.college-scene h2 {
  margin: 0;
  font-family: "Cinzel Decorative", Georgia, serif;
  font-size: clamp(1.45rem, 4.5vw, 2.2rem);
  color: #f3e2b8;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #3a2410, 0 0 18px rgba(255, 180, 60, 0.35), 0 8px 24px rgba(0,0,0,0.7);
}
.college-scene .yard-mood,
.college-scene .hero-overlay > p {
  margin: 6px 0 12px;
  font-family: "Crimson Text", Georgia, serif;
  font-style: italic;
  color: #d8c4a0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ascension {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #d8c49a, #c4a878);
  border: 2px solid #6a4a28;
  border-radius: 4px;
  color: #2a1a0c;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.ascension .label {
  font-family: "IM Fell French Canon", Georgia, serif;
  font-size: 0.82rem;
  color: #3a2410;
  text-transform: none;
}
.asc-bar {
  width: 120px;
  height: 10px;
  background: #5a3a1c;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #3a2410;
}
.asc-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c49030, #f0d78c);
  box-shadow: 0 0 8px rgba(255, 180, 40, 0.5);
}
#ascText {
  font-family: "IM Fell French Canon", Georgia, serif;
  font-weight: 700;
  color: #3a2410;
}

/* Wood plaque tabs */
.tabs {
  gap: 8px;
  border-bottom: none;
  margin-bottom: 0;
}
.tab {
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 6px 6px 0 0;
  border: 2px solid #6a4a28;
  background: #3a2818;
  color: #d4b888;
  font-family: "IM Fell French Canon", "Crimson Text", Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.tab.active {
  background: linear-gradient(180deg, #7a5430, #5a3a1c);
  color: #fff6e0;
  border-color: #c49048;
  box-shadow: 0 -2px 12px rgba(255, 180, 60, 0.2);
}

.panel.plank, .panel.chrome {
  background: linear-gradient(165deg, #4a3420 0%, #2e1c10 100%);
  border: 2px solid #8a6238;
}
.panel-head h3 {
  font-family: "Cinzel Decorative", Georgia, serif;
  color: #f3e2b8;
}
.panel-head .sub, .panel-head p.sub {
  font-family: "Crimson Text", Georgia, serif;
  font-style: italic;
  color: #c4a574;
}

.btn {
  min-height: 40px;
  border-radius: 8px;
  border: 2px solid #6a4a28;
  background: linear-gradient(180deg, #5a3e28, #3a2818);
  color: #f0e0c0;
  font-family: "IM Fell French Canon", "Crimson Text", Georgia, serif;
  font-weight: 700;
  box-shadow: 0 3px 0 #2a180c;
}
.btn.gold {
  background: linear-gradient(180deg, #8a6430, #5a3e18);
  border-color: #c49048;
  color: #fff6e0;
}
.btn.ghost {
  background: transparent;
  border-color: rgba(138, 98, 56, 0.55);
  color: #c4a574;
  box-shadow: none;
}
.btn.primary {
  background: linear-gradient(180deg, #4a3a6a, #2a1e40);
  border-color: #7a6aa0;
  color: #e8e0f8;
}
.btn.danger {
  background: linear-gradient(180deg, #6a2828, #3a1414);
  border-color: #8a3840;
  color: #f0c0c0;
}
.btn.accent {
  background: linear-gradient(180deg, #5a3a6a, #3a2848);
  border-color: #8a6aaa;
  color: #e8e0f8;
}
.btn.toggle.active {
  background: linear-gradient(180deg, #7a5430, #5a3a1c);
  border-color: #c49048;
  color: #fff6e0;
}

/* Lecture tiles as podium cards */
.lecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.lecture-tile, .tile {
  background: linear-gradient(165deg, #e8d4a8, #c8a878) !important;
  border: 2px solid #6a4a28 !important;
  color: #2a1a0c !important;
  border-radius: 8px !important;
  min-height: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.lecture-tile h4, .tile h4, .lecture-tile .name {
  font-family: "IM Fell French Canon", Georgia, serif;
  color: #3a2410 !important;
}

/* Apothecary shelf */
.orb-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .orb-showcase { grid-template-columns: 1fr; }
}
.orb-card {
  background: linear-gradient(165deg, #3a2818, #241810);
  border: 2px solid #8a6238;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  box-shadow: inset 0 0 24px rgba(0,0,0,0.35);
}
.orb-card h4 {
  font-family: "IM Fell French Canon", Georgia, serif;
  color: #f3e2b8 !important;
}
.orb-card p { color: #c4a574 !important; }

/* Stone tablet boards */
.board-card {
  background:
    linear-gradient(165deg, #6a6858 0%, #4a4840 100%);
  border: 3px solid #8a8070;
  border-radius: 4px;
  padding: 12px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.35), 0 6px 16px rgba(0,0,0,0.4);
}
.board-card h4 {
  font-family: "Cinzel Decorative", Georgia, serif;
  color: #e8e0c8 !important;
  text-align: center;
  letter-spacing: 0.04em;
}
.rank-list li {
  background: rgba(20, 16, 10, 0.35);
  border: 1px solid rgba(200, 180, 140, 0.25);
  color: #f0e8d0;
}
.rank-list li.you {
  border-color: #c49048;
  background: rgba(180, 120, 40, 0.25);
}

/* Crew as seated benches */
.crew-roster {
  display: grid;
  gap: 10px;
}
.crew-roster li, .crew-seat {
  background: linear-gradient(165deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  color: #2a1a0c;
  border-radius: 8px;
  padding: 10px;
}

.hp-bar {
  background: #3a1a18;
  border: 1px solid #6a3a30;
  border-radius: 2px;
  overflow: hidden;
}
.hp-bar i {
  background: linear-gradient(90deg, #8a2820, #e07060);
}

/* Timing tap — brass needle, parchment track */
.timing-track {
  background: linear-gradient(180deg, #d8c49a, #c4a878);
  border: 2px solid #6a4a28;
}
.timing-zone {
  background: rgba(80, 140, 80, 0.45);
}
.timing-needle {
  background: #8a5020;
  box-shadow: 0 0 6px rgba(200, 120, 40, 0.6);
}

.modal {
  background: rgba(12, 6, 2, 0.72);
}
.modal-card {
  background: linear-gradient(165deg, #f0e0c0, #d4b888) !important;
  border: 3px solid #6a4a28 !important;
  color: #2a1a0c;
  font-family: "Crimson Text", Georgia, serif;
}
.modal-card h3 {
  font-family: "Cinzel Decorative", Georgia, serif;
  color: #3a2410 !important;
}
.modal-card p { color: #4a3420 !important; }

.dev-drawer {
  margin: 12px 0 0;
  border: 1px dashed #5a4a38;
  border-radius: 8px;
  background: rgba(20, 12, 6, 0.85);
  color: #8a7048;
  font-size: 0.78rem;
}
.dev-drawer summary {
  cursor: pointer;
  padding: 6px 12px;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #8a7048;
  list-style: none;
}
.dev-drawer summary::-webkit-details-marker { display: none; }
.dev-drawer[open] summary { border-bottom: 1px solid #4a3828; color: #c4a574; }
.dev-drawer-body { padding: 10px 12px 12px; }
.lab-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-note {
  margin: 10px 0 0;
  color: #8a7048;
  font-family: "Crimson Text", Georgia, serif;
}

.foot {
  margin-top: 16px;
  font-family: "Crimson Text", Georgia, serif;
  color: #a88860;
  font-size: 0.85rem;
  text-align: center;
}

.seat-stage {
  border: 3px solid #5a3a1c;
  border-radius: 8px;
  overflow: hidden;
}
.consumables h4 {
  font-family: "IM Fell French Canon", Georgia, serif;
  color: #f3e2b8;
}

@media (max-width: 420px) {
  .college-scene.hero { min-height: 36vh; }
  .tab { padding: 8px 10px; font-size: 0.85rem; }
}
@media (min-width: 1100px) {
  .college-scene.hero { min-height: 360px; }
}

/* Hide old hero-img if any remnant */
.hero-img { display: none; }

.lecture-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  cursor: pointer;
  font: inherit;
  min-height: 128px;
  background: linear-gradient(165deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  border-radius: 8px;
  color: #2a1a0c;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.lecture-tile img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35)); }
.lecture-tile .t-name, .lecture-tile .name {
  font-family: "IM Fell French Canon", Georgia, serif;
  font-weight: 700;
  color: #3a2410;
  font-size: 0.95rem;
}
.lecture-tile .t-meta, .lecture-tile .meta { font-size: 0.78rem; color: #5a4028; font-style: italic; }
.lecture-tile.pinned { outline: 3px solid #c49048; outline-offset: 2px; }
.lecture-tile:disabled { opacity: 0.55; cursor: not-allowed; }

.tabs.sign-tabs { border-bottom: none; background: transparent; }
.tabs.sign-tabs .tab { background: transparent; border: none; box-shadow: none; }
/* let .sign-tab win */
.tabs.sign-tabs .sign-tab {
  background: linear-gradient(180deg, #e8d4a8, #c8a878);
  box-shadow: 0 4px 0 #5a3a1c, 0 8px 16px rgba(0,0,0,0.35);
  color: #2a1a0c;
}
.tabs.sign-tabs .sign-tab.active {
  background: linear-gradient(180deg, #f0e0b8, #d4a860);
  box-shadow: 0 4px 0 #8a6238, 0 0 16px rgba(255, 180, 60, 0.35);
}
.college-scene.hero {
  min-height: min(48vh, 380px);
  margin: 0 -6px 8px;
  border-width: 2px;
}
body.room-page .pots-hud, body.room-page .player-hud:not(.pouch-panel) { display: none !important; }


/* —— college8: candles + labeled lectures —— */
.ascension.candle-asc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 12px;
  max-width: min(360px, 92vw);
  background: linear-gradient(180deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.ascension .label {
  font-family: "IM Fell French Canon", Georgia, serif;
  font-size: 0.8rem;
  color: #3a2410;
}
.asc-candles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 280px;
}
.asc-candle {
  width: 10px;
  height: 22px;
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(90deg, #8a7860, #6a5848);
  border: 1px solid #4a3828;
  position: relative;
  opacity: 0.55;
}
.asc-candle.lit {
  opacity: 1;
  background: linear-gradient(90deg, #f5ecd0, #e8c878 40%, #d4a040);
  box-shadow: 0 0 8px rgba(255, 180, 40, 0.55);
}
.asc-candle.lit::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 8px;
  height: 10px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 70%, #fff6a0 0%, #ff9a20 50%, transparent 70%);
  border-radius: 50% 50% 40% 40%;
}
.asc-count {
  font-family: "IM Fell French Canon", Georgia, serif;
  font-size: 0.85rem;
  color: #3a2410;
  font-weight: 700;
}

.lecture-tile .t-flavor {
  display: block;
  font-size: 0.75rem;
  font-style: italic;
  color: #5a4028;
  margin: 2px 0 4px;
  line-height: 1.2;
}
.lecture-tile .t-cost.cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "IM Fell French Canon", Georgia, serif;
  font-weight: 700;
  color: #3a2410;
  background: rgba(90, 58, 28, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.cost i.res.insight {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, #f0e8d0, #d4b888);
  border: 1px solid #8a6238;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
  position: relative;
}
.cost i.res.insight::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background: #6a4a28;
  opacity: 0.35;
}

.asc-candle {
  width: 9px !important;
  height: 26px !important;
  background: linear-gradient(90deg, #d8c49a, #c4a878 45%, #a88858) !important;
  border: 1px solid #6a4a28 !important;
  opacity: 0.4 !important;
  border-radius: 2px 2px 1px 1px !important;
}
.asc-candle.lit {
  opacity: 1 !important;
  background: linear-gradient(90deg, #fff6d0, #f0d78c 40%, #e0a040) !important;
  box-shadow: 0 0 10px rgba(255, 180, 40, 0.6) !important;
}

/* —— college9: simplicity pass — one big action, labels, tour, tips —— */
.top-hud .back-town.has-lbl,
.top-hud .menu-btn.has-lbl {
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.top-hud .menu-btn.has-lbl { border-radius: 12px; }
.has-lbl .lbl {
  font-style: normal;
  font-family: "IM Fell French Canon", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
}
.pill-stack { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.pill-stack strong { font-size: 0.85rem; }
.pill-lbl {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #5a4028;
  margin-top: 1px;
}
@media (max-width: 440px) {
  .top-hud { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .top-hud .pill-row { gap: 4px; flex-wrap: nowrap; }
  .top-hud .pill { padding: 4px 7px; gap: 4px; }
  .top-hud .back-town.has-lbl, .top-hud .menu-btn.has-lbl { padding: 0 8px; min-width: 40px; height: 40px; }
  .top-hud .menu-btn.has-lbl .lbl { display: none; }
}
@media (max-width: 380px) {
  .top-hud .back-town.has-lbl .lbl { display: none; }
}
.bar-lbl { display: block; font-size: 0.65rem; color: #5a4028; margin-top: 2px; }

/* Hero = the first screen: title, one sentence, one big button, one goal */
.college-scene.hero { display: flex; align-items: center; justify-content: center; }
.college-scene .start-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 26px 14px 20px;
}
.college-scene .hero-line {
  margin: 2px 0 6px !important;
  font-size: clamp(1.02rem, 3.6vw, 1.25rem);
  font-style: normal !important;
  color: #fff4dc !important;
  max-width: 30ch;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(30, 16, 6, 0.55);
}
.college-scene .hero-line b { color: #f0d78c; }
.btn.big-start, .btn.big-claim {
  min-height: 64px;
  min-width: min(300px, 86vw);
  padding: 12px 28px;
  font-size: clamp(1.25rem, 4.6vw, 1.55rem);
  letter-spacing: 0.03em;
  border-radius: 14px;
  border: 3px solid #6a1a14;
  color: #fff4e0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 190, 150, 0.35), transparent 60%),
    linear-gradient(180deg, #b8382c, #7a1c16);
  box-shadow: 0 5px 0 #4a0e0a, 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 210, 160, 0.25);
  text-shadow: 0 2px 0 rgba(60, 10, 6, 0.7);
}
.btn.big-start:hover:not(:disabled) { filter: brightness(1.08); border-color: #8a2a20; }
.btn.big-start:disabled { background: linear-gradient(180deg, #6a5a4a, #4a3e32); border-color: #3a2e22; box-shadow: 0 4px 0 #2a2018; }
.btn.big-start.sm { min-height: 44px; min-width: 0; font-size: 1rem; padding: 8px 18px; }
.btn.big-claim {
  min-height: 52px;
  font-size: 1.1rem;
  margin-top: 8px;
  border-color: #8a6420;
  background: linear-gradient(180deg, #f0c850, #b88420);
  color: #2a1a0c;
  text-shadow: none;
  box-shadow: 0 4px 0 #6a4a10, 0 0 18px rgba(255, 200, 60, 0.6);
  animation: claimGlow 1.4s ease-in-out infinite;
}
@keyframes claimGlow { 50% { box-shadow: 0 4px 0 #6a4a10, 0 0 30px rgba(255, 210, 80, 0.95); } }
.start-cost {
  margin: 0 !important;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 0.98rem;
  color: #f3e6d0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.start-cost b { color: #f0d78c; }
.goal-card {
  width: min(420px, 92vw);
  margin-top: 6px;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, #f0e0b8, #d4b888);
  border: 2px solid #6a4a28;
  border-radius: 8px;
  color: #2a1a0c;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.goal-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; align-items: baseline; }
.goal-title { font-family: "IM Fell French Canon", Georgia, serif; font-weight: 700; font-size: 1.02rem; }
.goal-reward { font-family: "Crimson Text", Georgia, serif; font-size: 0.95rem; color: #5a3410; font-weight: 700; }
.goal-bar { margin-top: 7px; height: 12px; border-radius: 6px; background: #8a7050; border: 1px solid #5a3a1c; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c49030, #f5d060); transition: width 0.4s ease; }
.refill-inline { min-height: 44px; }

/* Honors candle strip (after round 1) */
.asc-strip { margin: 10px auto 4px; }
.asc-strip[hidden] { display: none !important; }
.asc-hint { font-family: "Crimson Text", Georgia, serif; font-size: 0.85rem; color: #5a3410; }

.more-locked {
  text-align: center;
  margin: 14px auto;
  padding: 12px 16px;
  max-width: 520px;
  font-family: "Crimson Text", Georgia, serif;
  font-size: 1rem;
  color: #d8c4a0;
  border: 2px dashed rgba(196, 144, 72, 0.5);
  border-radius: 10px;
  background: rgba(40, 24, 12, 0.6);
}
.more-locked[hidden], .more-area[hidden] { display: none !important; }
.more-title {
  margin: 16px 0 8px;
  text-align: center;
  font-family: "Cinzel Decorative", Georgia, serif;
  color: #f3e2b8;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}
.tab.is-new::after {
  content: "New";
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #b8382c;
  color: #fff4e0;
  font-size: 0.65rem;
  vertical-align: middle;
}
.log-title { margin: 12px 0 6px; font-family: "IM Fell French Canon", Georgia, serif; color: #f3e2b8; font-size: 0.95rem; }
.lecture-tile.info { cursor: default; min-height: 110px; }
.lecture-tile.info:hover { transform: none; }
.lecture-tile.pinned { cursor: pointer; }

.field-lbl { font-family: "Crimson Text", Georgia, serif; color: #e8d4a8; font-size: 0.95rem; min-width: 84px; }
.btn.big { min-height: 52px; font-size: 1.1rem; padding: 10px 22px; }
.seat-lock {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(20, 12, 6, 0.6);
  border: 1px solid #8a6238;
  color: #f0d78c;
  font-family: "Crimson Text", Georgia, serif;
}
.seat-lock[hidden] { display: none !important; }
.prize-chests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
@media (max-width: 560px) { .prize-chests { grid-template-columns: 1fr; } }
.chest-cell {
  padding: 10px 12px;
  border-radius: 8px;
  background: linear-gradient(165deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  color: #2a1a0c;
  text-align: center;
}
.chest-cell .label { display: block; font-family: "IM Fell French Canon", Georgia, serif; font-size: 0.85rem; color: #5a3410; }
.chest-cell strong { font-size: 1.2rem; }
.board-sub { margin: -4px 0 8px; text-align: center; font-size: 0.8rem; color: #e0d8c0; font-style: italic; }
.shop-note { margin: 12px 0 8px; }
.cram-flag { color: #f0d78c; font-weight: 700; }

/* modal results */
.modal-card .result-big { font-family: "IM Fell French Canon", Georgia, serif; font-size: 1.5rem; font-weight: 700; color: #3a2410 !important; margin: 6px 0 8px; }
.modal-card .result-big.good { color: #2a6a30 !important; }
.modal-card .dev-only { display: none; }
.modal-card .drill-how { font-size: 1.05rem; }
.drill-timer-wrap { display: flex; flex-direction: column; align-items: center; }
.drill-timer-lbl { font-size: 0.75rem; color: #5a4028; }
#btnDrillTap { margin-top: 6px; }
.modal-actions .btn { min-height: 48px; min-width: 140px; font-size: 1.05rem; }

/* tooltips */
.tip-i {
  width: 22px; height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #8a6238;
  background: #f0e0b8;
  color: #3a2410;
  font: 700 0.8rem/1 Georgia, serif;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  cursor: help;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.tip-bubble {
  position: fixed;
  z-index: 400;
  padding: 8px 11px;
  border-radius: 8px;
  background: #2a1a0c;
  border: 1.5px solid #c49048;
  color: #f3e6d0;
  font: 0.9rem/1.3 "Crimson Text", Georgia, serif;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  pointer-events: none;
}
.tip-bubble[hidden] { display: none !important; }
[data-tip] { cursor: help; }
button[data-tip], a[data-tip], label[data-tip] { cursor: pointer; }

/* walkthrough */
.coach { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.coach[hidden] { display: none !important; }
.coach-spot {
  position: fixed;
  border-radius: 14px;
  border: 3px solid #f0d78c;
  box-shadow: 0 0 0 9999px rgba(10, 5, 2, 0.62), 0 0 22px rgba(255, 200, 80, 0.8);
  transition: all 0.25s ease;
  animation: coachPulse 1.3s ease-in-out infinite;
}
@keyframes coachPulse { 50% { box-shadow: 0 0 0 9999px rgba(10, 5, 2, 0.62), 0 0 36px rgba(255, 210, 90, 1); } }
.coach.card-hidden { display: none !important; }
.coach-card {
  position: fixed;
  pointer-events: auto;
  padding: 12px 14px 12px;
  border-radius: 10px;
  background: linear-gradient(165deg, #f5e8c8, #dcc090);
  border: 3px solid #6a4a28;
  color: #2a1a0c;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.coach-step { margin: 0 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #7a5430; font-weight: 700; }
.coach-text { margin: 0 0 10px; font: 1.05rem/1.35 "Crimson Text", Georgia, serif; }
.coach-actions { display: flex; justify-content: space-between; gap: 8px; }
.coach-arrow {
  position: absolute;
  width: 0; height: 0;
  margin-left: -12px;
  border: 12px solid transparent;
}
.coach-arrow.up { top: -24px; border-bottom-color: #6a4a28; }
.coach-arrow.down { bottom: -24px; border-top-color: #6a4a28; }
.btn[hidden], .tip-i[hidden], .dev-drawer[hidden] { display: none !important; }
@media (max-width: 440px) {
  .top-hud .pill.coin, .top-hud .pill.gold { display: none; }
  .top-hud .menu-btn.has-lbl .lbl { display: inline; }
}
/* the old hero overlay was decorative (pointer-events:none); the start sign holds real controls */
.college-scene .start-sign, .college-scene .start-sign * { pointer-events: auto; }

/* —— college10: Athens loop — Explore, encounter stage, hit animation, halls, marks —— */
.power-chip {
  margin: 0 !important;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0e0b8, #d4b888);
  border: 2px solid #6a4a28;
  color: #2a1a0c !important;
  font-family: "IM Fell French Canon", Georgia, serif;
  font-style: normal !important;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.power-chip .lbl { font-size: 0.85rem; color: #5a3410; }
.power-chip b { font-size: 1.15rem; color: #7a1c16; }

.hall-strip {
  width: min(520px, 94vw);
  margin: 10px auto 4px;
  padding: 10px 14px 10px;
  background: linear-gradient(180deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  border-radius: 8px;
  color: #2a1a0c;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  text-align: center;
}
.hall-strip[hidden] { display: none !important; }
.hall-strip-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; font-family: "IM Fell French Canon", Georgia, serif; }
.hall-strip-top strong { font-size: 1.15rem; }

.hall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .hall-grid { grid-template-columns: 1fr; } }
.hall-card {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(165deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  color: #2a1a0c;
  font-family: "Crimson Text", Georgia, serif;
}
.hall-card.here { outline: 3px solid #c49048; outline-offset: 2px; box-shadow: 0 0 18px rgba(255, 190, 70, 0.45); }
.hall-card.locked { opacity: 0.6; filter: grayscale(0.4); }
.hall-card-top { display: flex; justify-content: space-between; align-items: baseline; font-family: "IM Fell French Canon", Georgia, serif; font-size: 1.05rem; }
.hall-status { font-size: 0.8rem; padding: 1px 8px; border-radius: 999px; background: rgba(90,58,28,0.15); }
.hall-card p { margin: 6px 0 0; font-size: 0.92rem; }
.hall-card .lbl { display: block; font-size: 0.75rem; color: #6a4a28; text-transform: uppercase; letter-spacing: 0.05em; }

/* encounter */
.modal.enc-open .modal-card { max-width: 460px; width: min(460px, 94vw); padding: 14px 16px 16px; }
.enc { text-align: center; }
.enc-hall { margin: 0 0 6px !important; font-size: 0.8rem !important; text-transform: uppercase; letter-spacing: 0.08em; color: #6a4a28 !important; }
.enc-portrait-wrap {
  position: relative;
  width: min(260px, 62vw);
  aspect-ratio: 4 / 5;
  margin: 0 auto 8px;
  border: 4px solid #6a4a28;
  border-radius: 10px 10px 50% 50% / 10px 10px 18% 18%;
  overflow: hidden;
  box-shadow: 0 0 0 2px #c49048, 0 10px 24px rgba(0,0,0,0.45);
  background: #1a1008;
}
@media (max-height: 760px) { .enc-portrait-wrap { width: min(200px, 50vw); } }
.enc-portrait { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.4s ease; }
.enc-name { margin: 2px 0 0 !important; font-size: 1.3rem !important; }
.enc-kind { margin: 2px 0 6px !important; font-size: 0.92rem !important; }
.enc-vs { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 6px; }
.vs-col { min-width: 120px; padding: 6px 10px; border-radius: 8px; border: 2px solid #6a4a28; background: rgba(255,255,255,0.35); }
.vs-col.you { border-color: #2a6a30; }
.vs-col.foe { border-color: #8a2a20; }
.vs-lbl { display: block; font-size: 0.75rem; color: #5a3410; text-transform: uppercase; letter-spacing: 0.05em; }
.vs-col strong { font-family: "IM Fell French Canon", Georgia, serif; font-size: 1.5rem; color: #2a1a0c; }
.vs-mid { font-family: "Cinzel Decorative", Georgia, serif; font-weight: 700; color: #7a1c16; font-size: 1.1rem; }
.enc-hp { height: 12px; margin: 4px auto 0; width: 90%; border-radius: 6px; background: #3a1a18; border: 1px solid #6a3a30; overflow: hidden; }
.enc-hp i { display: block; height: 100%; background: linear-gradient(90deg, #8a2820, #e07060); transition: width 0.5s ease; }
.bar-lbl.center { text-align: center; }
.enc-compare { margin: 8px 0 2px !important; font-size: 1.05rem !important; color: #2a1a0c !important; }
.enc-verdict { margin: 0 0 6px !important; font-weight: 700; }
.enc-verdict.good, .modal-card .enc-verdict.good { color: #2a6a30 !important; }
.enc-scrolls { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0; }
.enc-scrolls:empty { display: none; }
.scroll-tg { min-height: 40px; font-size: 0.9rem; }
.enc-actions { justify-content: center; }
.enc-actions .btn.big-start { min-width: 180px; min-height: 58px; }
.enc-note { margin: 4px 0 0 !important; font-size: 0.8rem !important; }
.enc-pts { font-family: "IM Fell French Canon", Georgia, serif; font-size: 1.2rem; font-weight: 700; color: #7a4a10 !important; margin: 0 0 4px !important; }
.enc-drop, .enc-climb-note { margin: 2px 0 !important; font-weight: 700; color: #4a3a7a !important; }

/* hit animation: slash sweep + shake + red flash + floating damage */
.enc-slash {
  position: absolute; inset: -20%;
  background: linear-gradient(120deg, transparent 44%, rgba(255,250,220,0.95) 49%, rgba(255,200,120,0.9) 51%, transparent 56%);
  transform: translateX(-120%);
  pointer-events: none;
}
.enc-dmg {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, 0);
  font: 700 2rem "IM Fell French Canon", Georgia, serif;
  color: #fff4e0;
  text-shadow: 0 2px 0 #7a1c16, 0 0 12px rgba(200, 40, 20, 0.9);
  opacity: 0;
  pointer-events: none;
}
.enc-stamp {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-14deg) scale(2);
  padding: 6px 14px;
  border: 4px solid #a8201a;
  border-radius: 8px;
  color: #a8201a;
  background: rgba(255, 240, 210, 0.85);
  font: 700 1.6rem "Cinzel Decorative", Georgia, serif;
  opacity: 0;
  pointer-events: none;
}
.enc-portrait-wrap.hit { animation: encShake 0.45s ease; }
.enc-portrait-wrap.hit .enc-slash { animation: encSlash 0.35s ease-out; }
.enc-portrait-wrap.hit .enc-portrait { animation: encFlash 0.45s ease; }
.enc-portrait-wrap.hit .enc-dmg { animation: encDmg 1s ease-out forwards; }
.enc-portrait-wrap.defeated .enc-portrait { filter: grayscale(0.85) brightness(0.7); }
.enc-portrait-wrap.defeated .enc-stamp { animation: encStamp 0.35s ease-out forwards; }
.enc-portrait-wrap.chest .enc-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255, 220, 120, 0.0), transparent 60%); pointer-events: none; }
.enc-portrait-wrap.opened .enc-glow { animation: chestGlow 0.9s ease-out forwards; }
.enc-portrait-wrap.opened { animation: encShake 0.35s ease; }
@keyframes encShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px) rotate(-1.5deg); } 40% { transform: translateX(8px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes encSlash { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes encFlash { 0% { filter: none; } 25% { filter: brightness(1.8) sepia(1) hue-rotate(-30deg) saturate(4); } 100% { filter: none; } }
@keyframes encDmg { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
@keyframes encStamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); } }
@keyframes chestGlow { from { background: radial-gradient(circle at 50% 55%, rgba(255, 230, 140, 0.95), transparent 20%); } to { background: radial-gradient(circle at 50% 55%, rgba(255, 220, 120, 0.55), transparent 70%); } }
@media (prefers-reduced-motion: reduce) { .enc-portrait-wrap.hit, .enc-portrait-wrap.hit * { animation-duration: 0.01s !important; } }

/* marks */
.mark-wrap[hidden] { display: none !important; }
.mark-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mark-item, .mark-empty {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(165deg, #e8d4a8, #c8a878);
  border: 2px solid #6a4a28;
  color: #2a1a0c;
  font-family: "Crimson Text", Georgia, serif;
}
.mark-empty { font-style: italic; }
.mark-art { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; border: 2px solid #6a4a28; flex-shrink: 0; }
.mark-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mark-sub { font-size: 0.82rem; color: #5a3410; }
.mark-hp { height: 10px; border-radius: 5px; background: #3a1a18; overflow: hidden; }
.mark-hp i { display: block; height: 100%; background: linear-gradient(90deg, #8a2820, #e07060); transition: width 0.45s ease; }
.mark-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
@media (max-width: 520px) { .mark-item { flex-wrap: wrap; } .mark-act { width: 100%; } }
.mark-item.hit .mark-art { animation: encShake 0.45s ease, encFlash 0.45s ease; }

/* climb */
.climb { text-align: center; }
.climb-banner { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; border: 3px solid #6a4a28; margin-bottom: 8px; }
.enc-portrait-wrap { width: min(250px, 58vw, 27vh); }
.modal.enc-open .modal-card { max-height: 96vh; overflow-y: auto; }
/* readable text on parchment cards */
.crew-roster .tags, .crew-roster .tag-alliance, .crew-roster .runner-locked { color: #4a3018 !important; background: transparent; }
.crew-roster .kind-badge { color: #2a1a0c !important; background: rgba(90, 58, 28, 0.15) !important; border: 1px solid rgba(90, 58, 28, 0.4) !important; }
.crew-roster .kind-badge.proxy { background: rgba(60, 90, 160, 0.18) !important; }
.crew-roster .kind-badge.lab { background: rgba(120, 80, 150, 0.18) !important; }
.crew-roster .kind-badge.human { background: rgba(40, 110, 50, 0.18) !important; }
.modal-card .btn.ghost, .mark-item .btn.ghost, .crew-roster .btn.ghost {
  color: #3a2410; border-color: #8a6238; background: rgba(255, 250, 235, 0.35);
}

/* ico1: painted currency icons sit inline with the number in the Stats pouch (was stacking 30 / 40 and 0 / %) */
.pouch-grid .sack strong > span { display: inline; font-size: inherit; color: inherit; }
.pouch-grid .sack strong > [data-cur] { margin-right: 3px; }

/* ==========================================================================
   college11 — one-screen redesign (tower26 style)
   no scrolling · small top bar with 2 resources · one big Explore · first-visit hint
   Shop / Crew / Seat / Log = small dock buttons opening no-scroll sheets · dev tools behind the gear
   ========================================================================== */
html:has(body.cg2), body.cg2 { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.cg2 { min-height: 0; }
body.cg2 .app.cg-app {
  position: fixed; inset: 0; margin: 0; padding: 0 !important; max-width: none; overflow: hidden;
}

/* Top bar: Town · menu · just Insight + Gems */
body.cg2 .top-hud.cg-hud { z-index: 40; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: linear-gradient(180deg, rgba(40, 24, 10, 0.6), transparent); }
body.cg2 .back-town.cg-town {
  width: auto; height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center;
  font: 700 1rem/1 "Crimson Text", Georgia, serif; color: #2a1c10; background: linear-gradient(180deg, #f3e2c0, #d9bf8e);
}
body.cg2 .back-town.cg-town::before { content: "←"; margin-right: 6px; font-size: 1.05rem; }
body.cg2 .top-hud .menu-btn { width: 40px; height: 40px; margin-left: 0; }
body.cg2 .ev-res { display: flex; gap: 8px; margin-left: auto; align-items: center; }
body.cg2 .ev-res .res {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 9px;
  border-radius: 999px; border: 2px solid #b8862e; background: linear-gradient(180deg, #f7ebcf, #e2c992); color: #2a1c10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35); font: 700 1.05rem/1 "Crimson Text", Georgia, serif; font-variant-numeric: tabular-nums;
}
body.cg2 .ev-res .res-cap { font-size: 0.8rem; font-weight: 600; color: #6a4824; margin-left: -4px; }
body.cg2 .ev-res .cur-ico { width: 22px; height: 22px; margin: 0; vertical-align: middle; }
body.cg2 .ev-res [data-cur] { min-width: 22px; display: inline-flex; }

/* The hall fills the screen; the card sits in the middle */
body.cg2 .cg-stage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: calc(60px + env(safe-area-inset-top)) 12px calc(74px + env(safe-area-inset-bottom));
  overflow: hidden; background: #1a1008;
}
body.cg2 .cg-stage .college-bg { position: absolute; inset: 0; background-position: center 40%; transform: none; }
body.cg2 .cg-stage .college-vignet {
  position: absolute; inset: 0; pointer-events: none; opacity: 1;
  background: radial-gradient(ellipse at 50% 55%, rgba(10,5,2,0.15), rgba(10,5,2,0.55) 75%) !important;
}
body.cg2 .cg-card {
  position: relative; z-index: 2; width: min(440px, 100%); max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
body.cg2 .cg-title {
  margin: 0; font-family: "Cinzel Decorative", Georgia, serif; font-size: clamp(1.6rem, 6vw, 2.3rem); font-weight: 700;
  color: #f3e2b8; letter-spacing: 0.05em;
  text-shadow: 0 2px 0 #3a2410, 0 0 18px rgba(255, 180, 60, 0.35), 0 8px 24px rgba(0,0,0,0.75);
}
body.cg2 .cg-hall {
  width: 100%; padding: 7px 12px 6px; border-radius: 10px; color: #2a1a0c;
  background: linear-gradient(180deg, #efdcb0, #d2b380); border: 2px solid #6a4a28; box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
body.cg2 .cg-hall[hidden] { display: none !important; }
body.cg2 .cg-hall-top { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: "Crimson Text", Georgia, serif; font-size: 0.92rem; }
body.cg2 .cg-hall-top strong { font-family: "IM Fell French Canon", Georgia, serif; font-size: 1.08rem; }
body.cg2 .cg-hall .goal-bar { margin-top: 5px; height: 9px; }
body.cg2 .cg-hall .asc-hint { display: block; margin-top: 3px; font-size: 0.82rem; }
body.cg2 .power-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; font-size: 0.98rem; }
body.cg2 .power-chip .pc-sep { color: #8a6a40; }
body.cg2 .power-chip .cur-ico { width: 18px; height: 18px; margin: 0; }
body.cg2 .power-chip #hudRank { color: #3a2410; font-weight: 700; }

/* First visit: one line, pointing at Explore */
body.cg2 .cg-first-hint {
  position: relative; margin: 0; display: flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 8px 10px 8px 14px; border-radius: 12px; border: 2px solid #b8862e;
  background: linear-gradient(180deg, #fff6dc, #f0d9a4); color: #2a1a0c; box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  font: 700 1rem/1.25 "Crimson Text", Georgia, serif; animation: cgHintBob 1.6s ease-in-out infinite;
}
body.cg2 .cg-first-hint[hidden] { display: none !important; }
body.cg2 .cg-first-hint::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: #b8862e; border-bottom: 0;
}
body.cg2 .cg-first-hint .hint-x { flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(106,72,36,0.15); color: #5a3818; font-size: 0.9rem; }
@keyframes cgHintBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { body.cg2 .cg-first-hint { animation: none; } }

body.cg2 .btn.big-start#btnStart { min-height: 72px; min-width: min(320px, 88vw); font-size: clamp(1.45rem, 5.4vw, 1.75rem); }
body.cg2 .start-cost { flex-wrap: wrap; justify-content: center; }
body.cg2 .start-cost .cur-ico { width: 18px; height: 18px; }
body.cg2 .goal-card { width: 100%; margin-top: 0; padding: 8px 12px 10px; }
body.cg2 .goal-card .btn.big-claim { margin-top: 8px; min-height: 52px; min-width: 0; width: 100%; font-size: 1.1rem; }

/* Dock: small buttons, bottom-left (like the Tower's War log) */
body.cg2 .cg-dock {
  position: absolute; left: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 35;
  display: flex; gap: 6px; max-width: calc(100vw - 80px);
}
body.cg2 .cg-dock[hidden] { display: none !important; }
body.cg2 .dock-btn {
  position: relative; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; border: 2px solid #b8862e; background: linear-gradient(180deg, #f3e2c0, #d9bf8e);
  color: #2a1c10; font: 700 1rem/1 "Crimson Text", Georgia, serif; box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
body.cg2 .dock-btn[hidden] { display: none !important; }
body.cg2 .dock-btn.active { background: linear-gradient(180deg, #fff3d6, #ecd29c); border-color: #6a4824; }
body.cg2 .dock-btn .cur-ico { width: 18px; height: 18px; margin: 0; }
body.cg2 .dock-btn.seat-btn { border-color: #8a2a20; background: linear-gradient(180deg, #f6d9b8, #e0a878); }
body.cg2 .dock-btn.is-new::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: #c8382c; border: 2px solid #fff4e0;
}
body.cg2 .dock-badge {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #8a2a20; color: #fff4e0;
  font-size: 0.75rem; display: inline-grid; place-items: center;
}
body.cg2 .dock-badge[hidden] { display: none !important; }
@media (max-width: 400px) { body.cg2 .dock-btn { padding: 0 11px; font-size: 0.95rem; } body.cg2 .cg-dock { gap: 5px; } }

/* Gear + dev tools panel (bottom-right) */
body.cg2 .phone-tools-btn.cg-gear {
  display: inline-flex; position: absolute; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 35;
  width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 999px; border: 2px solid #b8862e;
  background: linear-gradient(180deg, #f3e2c0, #d9bf8e); color: #2a1c10; font-size: 1.25rem; box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
body.cg2 .phone-tools-panel.cg-tools {
  position: absolute; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 36;
  width: min(330px, calc(100vw - 20px)); padding: 10px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(165deg, #f3e2c0, #d4b888); border: 2px solid #6a4824; box-shadow: 0 12px 32px rgba(0,0,0,0.5); color: #2a1c10;
}
body.cg2 .cg-tools[hidden] { display: none !important; }
body.cg2 .cg-tools .pt-label { display: block; font-size: 0.78rem; color: #5a3818; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
body.cg2 .cg-tools .lab-row { gap: 5px; }
body.cg2 .cg-tools .btn.sm { padding: 5px 8px; font-size: 0.76rem; }
body.cg2 .cg-tools .chk { color: #3a2410; font-size: 0.78rem; }
body.cg2 .cg-tools .lab-note { margin: 6px 0 0; font-size: 0.72rem; color: #5a3818; line-height: 1.3; }

/* Sheets: parchment card above the dock, never scrolls */
body.cg2 .cg-sheet {
  position: absolute; left: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 36;
  width: min(420px, calc(100vw - 20px)); max-height: calc(100% - 136px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: hidden; padding: 10px 12px 12px; border-radius: 14px;
  background: linear-gradient(165deg, #f3e2c0, #d4b888); border: 2px solid #6a4824;
  box-shadow: 0 12px 32px rgba(0,0,0,.55); color: #2a1c10; font-family: "Crimson Text", Georgia, serif;
}
body.cg2 .cg-sheet[hidden] { display: none !important; }
body.cg2 .cg-sheet h2 {
  margin: 0 0 6px; padding-right: 30px; display: flex; align-items: center; gap: 6px;
  font: 700 .9rem/1.2 "Crimson Text", Georgia, serif; text-transform: uppercase; letter-spacing: .06em; color: #6a4824;
}
body.cg2 .cg-sheet h2 + * { margin-top: 0; }
body.cg2 .cg-sheet h2:not(:first-of-type) { margin-top: 8px; padding-right: 0; }
body.cg2 .cg-sheet h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; color: #7a5a38; font-size: .8rem; }
body.cg2 .cg-sheet .sheet-x {
  position: absolute; right: 6px; top: 4px; width: 34px; height: 34px; border: 0; background: none; font-size: 1.05rem; color: #6a4824; cursor: pointer;
}
body.cg2 .cg-sheet .sheet-line { margin: 0 0 6px; font-size: .88rem; color: #4a3418; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
body.cg2 .cg-sheet .cur-ico { width: 18px; height: 18px; margin: 0 2px 0 0; vertical-align: -3px; }
body.cg2 .cg-sheet .btn { color: #2a1a0c; }
body.cg2 .cg-sheet .btn.gold, body.cg2 .cg-sheet .btn.accent { color: #2a1a0c; }
body.cg2 .cg-sheet .hint, body.cg2 .cg-sheet .muted { color: #6a5438; }
body.cg2 .cg-sheet .tip-i { width: 20px; height: 20px; font-size: .74rem; }

/* Shop sheet */
body.cg2 .shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
body.cg2 .shop-grid .btn { min-height: 50px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .9rem; line-height: 1.1; }
body.cg2 .shop-grid .btn .cost { font-size: .88rem; }
body.cg2 .cg-sheet .price-tag { margin-left: auto; color: #5a3410; font-size: .82rem; }
body.cg2 .cg-sheet .cram-flag { color: #4a3a7a; font-size: .84rem; }
body.cg2 .orb-line { display: grid; grid-template-columns: 38px 1fr; gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(106,72,36,.25); }
body.cg2 .orb-line img { width: 38px; height: 38px; object-fit: contain; grid-row: span 2; }
body.cg2 .orb-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.2; font-size: .84rem; }
body.cg2 .orb-txt b { font-size: .92rem; }
body.cg2 .orb-txt .cap { color: #8a4a10; font-size: .74rem; font-style: normal; }
body.cg2 .orb-line .bundle-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; }
body.cg2 .orb-line .bundle-row .btn { min-height: 40px; padding: 3px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; font-size: .9rem; }
body.cg2 .orb-line .bundle-row .btn small { font-size: .7rem; font-weight: 600; white-space: nowrap; }
body.cg2 .orb-line .bundle-row .cur-ico { width: 13px; height: 13px; vertical-align: -2px; }

/* Crew sheet */
body.cg2 .cg-sheet .crew-create .form-row { margin-bottom: 8px; gap: 6px; }
body.cg2 .cg-sheet .crew-create input[type="text"] { min-height: 44px; background: #fffaf0; color: #2a1a0c; border: 2px solid #b8862e; font-size: 1rem; min-width: 120px; }
body.cg2 .cg-sheet .chk { color: #3a2410; }
body.cg2 .cg-sheet #btnCreateCrew { width: 100%; margin-bottom: 8px; }
body.cg2 .cg-sheet #btnJoinCrew { min-height: 44px; }
body.cg2 .cg-sheet .crew-banner { margin-bottom: 6px; padding: 6px 10px; background: rgba(255,250,235,.45); border: 1px solid rgba(106,72,36,.35); }
body.cg2 .cg-sheet .crew-banner h4 { color: #2a1a0c; font-size: 1rem; }
body.cg2 .cg-sheet .crew-banner .meta { color: #5a4028; margin-top: 1px; font-size: .78rem; }
body.cg2 .cg-sheet .crew-code .label { color: #6a4824; }
body.cg2 .cg-sheet .crew-code strong { color: #1a5a40; font-size: 1.05rem; }
body.cg2 .cg-sheet .crew-roster { gap: 5px; margin-bottom: 6px; }
body.cg2 .cg-sheet .crew-roster li { padding: 5px 8px; gap: 6px; flex-wrap: wrap; font-size: .88rem; }
body.cg2 .cg-sheet .crew-roster .tags { font-size: .72rem; }
body.cg2 .cg-sheet .crew-roster .slot-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-left: auto; }
body.cg2 .cg-sheet .proxy-hire { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; align-items: center; }
body.cg2 .cg-sheet .proxy-hire .btn-hire { padding: 4px 7px; font-size: .74rem; min-height: 32px; }
body.cg2 .cg-sheet .proxy-hire .cur-ico { width: 13px; height: 13px; vertical-align: -2px; }
body.cg2 .cg-sheet .log-title { margin: 4px 0 4px; color: #3a2410; font-size: .88rem; display: flex; gap: 6px; align-items: baseline; justify-content: space-between; }
body.cg2 .cg-sheet .mark-list { gap: 5px; }
body.cg2 .cg-sheet .mark-item, body.cg2 .cg-sheet .mark-empty { padding: 5px 8px; gap: 8px; flex-wrap: nowrap; font-size: .84rem; }
body.cg2 .cg-sheet .mark-art { width: 40px; height: 50px; }
body.cg2 .cg-sheet .mark-sub { font-size: .74rem; }
body.cg2 .cg-sheet .mark-info .mark-sub:last-child { display: none; }
body.cg2 .cg-sheet .mark-act { width: auto; gap: 4px; }
body.cg2 .cg-sheet .mark-act .btn { padding: 4px 8px; font-size: .76rem; min-height: 32px; }
body.cg2 .cg-sheet .proxy-hud { margin: 4px 0; padding: 0; background: none; border: 0; font-size: .8rem; color: #3a2410; }
body.cg2 .cg-sheet .proxy-hud .proxy-voucher { color: #1a5a40; }
body.cg2 .cg-sheet .crew-actions { gap: 6px; }
body.cg2 .cg-sheet .pins { color: #5a4028; font-size: .78rem; }
body.cg2 .cg-sheet .crew-actions #btnLeaveCrew { margin-left: auto; }

/* Seat sheet */
body.cg2 .cg-sheet .seat-lock { margin: 0 0 6px; padding: 5px 10px; font-size: .88rem; }
body.cg2 .cg-sheet .seat-stage { margin-bottom: 6px; border-color: #6a4824; }
body.cg2 .cg-sheet .seat-bg { height: 118px; }
body.cg2 .cg-sheet .seat-overlay { padding: 6px 10px; }
body.cg2 .cg-sheet .you-hp { display: flex; align-items: center; gap: 8px; font-size: .86rem; margin-bottom: 6px; }
body.cg2 .cg-sheet .you-hp .hp-bar { flex: 1; height: 9px; border-radius: 4px; }
body.cg2 .cg-sheet .you-hp .hp-bar i { display: block; height: 100%; }
body.cg2 .cg-sheet .seat-controls { display: grid; grid-template-columns: 1.3fr 1fr; gap: 6px; margin-bottom: 6px; }
body.cg2 .cg-sheet .seat-controls .btn { min-height: 48px; min-width: 0; }
body.cg2 .cg-sheet .seat-controls .btn.danger { color: #fff4e0; }
body.cg2 .cg-sheet .con-row { grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 4px; }
body.cg2 .cg-sheet .btn.con { min-height: 44px; padding: 4px 6px; display: flex; gap: 1px; background: rgba(255,250,235,.5); border: 2px solid #b8862e; }
body.cg2 .cg-sheet .btn.con .meta { color: #5a4028; font-size: .7rem; }
body.cg2 .cg-sheet .btn.con .cur-ico { width: 12px; height: 12px; vertical-align: -2px; }
body.cg2 .cg-sheet .hint#writCaps { margin: 0 0 4px; font-size: .74rem; }

/* Log sheet */
body.cg2 .cg-sheet .prize-chests { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
body.cg2 .cg-sheet .chest-cell { padding: 4px 6px; }
body.cg2 .cg-sheet .chest-cell .label { font-size: .74rem; }
body.cg2 .cg-sheet .chest-cell strong { font-size: 1rem; }
body.cg2 .cg-sheet .boards-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
body.cg2 .cg-sheet .board-card { padding: 5px 6px; background: rgba(255,250,235,.45); border: 1px solid rgba(106,72,36,.35); box-shadow: none; border-radius: 8px; }
body.cg2 .cg-sheet .board-card h4 { margin: 0 0 3px; font: 700 .82rem/1.2 "Crimson Text", Georgia, serif; color: #3a2410 !important; text-align: left; }
body.cg2 .cg-sheet .rank-list li { padding: 1px 2px; gap: 4px; font-size: .74rem; background: none; border: 0; border-bottom: 1px solid rgba(106,72,36,.18); color: #2a1a0c; }
body.cg2 .cg-sheet .rank-list li:nth-child(n+6) { display: none; }
body.cg2 .cg-sheet .rank-list li.you { display: flex; background: rgba(184,134,46,.25); }
body.cg2 .cg-sheet .rank-list li::before { width: 16px; height: 16px; font-size: .64rem; background: rgba(106,72,36,.18); color: #3a2410; }
body.cg2 .cg-sheet .rank-list .sc { color: #6a3a10; }
body.cg2 .cg-sheet .rank-list .prize { display: none; }
body.cg2 .cg-sheet .rank-list .rk-face { width: 16px !important; height: 16px !important; }
body.cg2 .cg-sheet .hall-grid { grid-template-columns: 1fr; gap: 3px; }
body.cg2 .cg-sheet .hall-card { padding: 3px 8px; font-size: .76rem; border-width: 1px; line-height: 1.25; }
body.cg2 .cg-sheet .hall-card.here { outline-width: 2px; outline-offset: 0; box-shadow: none; }
body.cg2 .cg-sheet .hall-card-top { font-size: .86rem; }
body.cg2 .cg-sheet .hall-card p { margin: 0; font-size: .74rem; }
body.cg2 .cg-sheet .hall-card .hall-deck, body.cg2 .cg-sheet .hall-card .hall-need { display: none; }
body.cg2 .cg-sheet .hall-card .lbl { display: inline; font-size: .7rem; }
body.cg2 .cg-sheet .short-log { max-height: none; overflow: hidden; padding: 4px 8px; background: rgba(255,250,235,.4); border: 1px solid rgba(106,72,36,.3); color: #4a3418; font-size: .78rem; }
body.cg2 .cg-sheet .short-log:empty::before { content: "Nothing yet. Explore to start."; font-style: italic; color: #7a5a38; }
body.cg2 .cg-sheet .short-log .log-line { margin: 0; padding: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cg2 .cg-sheet .short-log .log-line:nth-child(n+5) { display: none; }
body.cg2 .cg-sheet #seatLog .log-line:nth-child(n+3) { display: none; }
body.cg2 .cg-sheet .short-log .log-line.good { color: #1a6a38; }
body.cg2 .cg-sheet .short-log .log-line.warn { color: #8a5a10; }
body.cg2 .cg-sheet .short-log .log-line.bad { color: #a82828; }

/* Encounter card: always fits the screen, never scrolls */
body.cg2 .modal { padding: 10px; }
body.cg2 .modal.enc-open .modal-card { max-height: calc(100dvh - 20px); overflow: hidden; padding: 10px 14px 12px; }
body.cg2 .enc-portrait-wrap { width: min(230px, 56vw, 26vh); }
body.cg2 .modal-actions { margin-top: 8px; }

/* Desktop: a little roomier */
@media (min-width: 760px) {
  body.cg2 .cg-sheet { width: 460px; left: 14px; padding: 12px 16px 14px; }
  body.cg2 .cg-dock { left: 14px; }
  body.cg2 .cg-card { gap: 12px; }
}
/* Short screens (landscape phones): tighten the middle card */
@media (max-height: 640px) {
  body.cg2 .cg-card { gap: 6px; }
  body.cg2 .cg-title { font-size: 1.4rem; }
  body.cg2 .btn.big-start#btnStart { min-height: 56px; }
  body.cg2 .cg-hall .asc-hint { display: none; }
  body.cg2 .cg-sheet .seat-bg { height: 80px; }
}

/* college11 polish: seat overlay in one row, hall strip on one line, crew rows compact */
body.cg2 .cg-sheet .seat-overlay { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 8px; background: linear-gradient(180deg, transparent 30%, rgba(8,10,16,0.8)); }
body.cg2 .cg-sheet .occupant { margin: 0; padding: 4px 10px; min-width: 0; align-self: flex-end; text-align: left; }
body.cg2 .cg-sheet #seatName { font-size: 1rem; }
body.cg2 .cg-sheet .seat-hp { width: 120px; margin: 3px 0 1px; }
body.cg2 .cg-sheet .hold-stats { gap: 10px; color: #f3e6d0; text-align: center; }
body.cg2 .cg-sheet .hold-stats strong { font-size: 1rem; }
body.cg2 .cg-hall-top { flex-wrap: nowrap; white-space: nowrap; }
body.cg2 .cg-hall-top #hallWins { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: .86rem; }
body.cg2 .cg-sheet .crew-roster li { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 3px; }
body.cg2 .cg-sheet .crew-roster li > div:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cg2 .cg-sheet .crew-roster li > div:first-child .tags { display: inline; margin-left: 4px; }
body.cg2 .cg-sheet .crew-roster .runner-locked { display: none; }
body.cg2 .cg-sheet .crew-roster .slot-actions { display: contents; }
body.cg2 .cg-sheet .crew-roster .runner-badge, body.cg2 .cg-sheet .crew-roster .btn-runner { grid-column: 2; grid-row: 1; justify-self: end; }
body.cg2 .cg-sheet .crew-roster .proxy-hire { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
body.cg2 .cg-sheet .crew-roster .proxy-hire > .tags { display: none; }
body.cg2 .cg-sheet .crew-roster .proxy-hire[data-upgrade] { grid-template-columns: repeat(2, 1fr); }
body.cg2 .cg-sheet .crew-roster .proxy-hire .btn-hire { width: 100%; min-width: 0; white-space: nowrap; }
body.cg2 .cg-sheet .crew-roster .kind-badge { font-size: .64rem; padding: 1px 5px; margin-left: 4px; }
body.cg2 .cg-sheet .mark-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) 124px; align-items: center; }
body.cg2 .cg-sheet .mark-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; }
body.cg2 .cg-sheet .mark-info .mark-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cg2 .cg-sheet .mark-act { min-width: 0; }
body.cg2 .cg-sheet .mark-act .mark-sub { font-size: .66rem; line-height: 1.1; white-space: normal; }
body.cg2 .cg-sheet .mark-act .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cg2 .cg-sheet .crew-roster li.empty-slot .tags { font-size: .68rem; }
/* opponents_v2 portraits are square: square frame so elf ears / ork tusks aren't cropped */
body.cg2 .enc-portrait-wrap.sq { aspect-ratio: 1 / 1; border-radius: 10px 10px 40% 40% / 10px 10px 14% 14%; }
body.cg2 .enc-portrait-wrap.sq .enc-portrait { object-position: center 30%; }
body.cg2 .cg-sheet .mark-art { object-position: center 25%; }
