/* ============================================================
   The Gate of Life — ancient-Rome skin over the shared engine CSS.
   The base palette is already torch-and-gold; Rome warms it further:
   travertine stone, arena sand, imperial crimson. Documents become
   wax tablets; the title castle becomes the Colosseum's arcade.
   ============================================================ */

:root {
  --bg-0: #0d0906;
  --bg-1: #171009;
  --bg-2: #241a10;
  --stone-1: #453a2e;
  --stone-2: #332b23;
  --parchment: #e8dcc0;
  --ink: #2b2015;
}

/* title screen: dusk over the city, torch haze low */
#title-screen {
  background:
    radial-gradient(1200px 700px at 50% 120%, #3a2210 0%, transparent 60%),
    radial-gradient(900px 500px at 80% -10%, #241408 0%, transparent 55%),
    linear-gradient(180deg, #0d0906 0%, #1c110a 55%, #241206 100%);
}
#title-bg {
  background: radial-gradient(160px 160px at 70% 22%, rgba(232, 220, 192, 0.18) 0%, rgba(232, 220, 192, 0.05) 40%, transparent 70%);
}

/* the Colosseum's broken arcade instead of castle battlements */
#title-bg::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: min(96vw, 1200px);
  height: 44vh;
  transform: translateX(-50%);
  background:
    /* tier bands: mask the arch-glow into two storeys of openings */
    linear-gradient(180deg,
      #0e0803 0%, #0e0803 34%,
      transparent 34%, transparent 52%,
      #0e0803 52%, #0e0803 62%,
      transparent 62%, transparent 82%,
      #0e0803 82%, #0e0803 100%),
    /* torch-warm arch openings punched into the dark mass */
    repeating-linear-gradient(90deg,
      transparent 0%, transparent 2.2%,
      rgba(255, 169, 77, 0.13) 2.2%, rgba(255, 169, 77, 0.13) 6.2%,
      transparent 6.2%, transparent 9%),
    linear-gradient(180deg, #120a05 0%, #070402 100%);
  clip-path: polygon(
    0% 100%, 0% 34%, 2% 34%, 2% 28%, 56% 28%, 56% 34%, 58% 34%,
    58% 46%, 66% 50%, 74% 56%, 82% 64%, 90% 74%, 96% 84%, 100% 92%,
    100% 100%
  );
}

#game-title {
  background: linear-gradient(180deg, #f6ead0 0%, #e8c85a 42%, #9c5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 0.05em;
  filter: drop-shadow(0 6px 30px rgba(224, 123, 42, 0.3));
}

.title-kicker { color: #f0a85a; letter-spacing: 0.42em; }
.title-foot { letter-spacing: 0.22em; }

/* game screen backdrop warms up too */
#game-screen {
  background:
    radial-gradient(1000px 600px at 50% -20%, #2b1c10 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

/* wax tablet: the Roman counterpart of .parchment-note / .datapad */
.wax-tablet {
  position: relative;
  margin: 6px auto;
  padding: 22px 26px;
  max-width: 500px;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(90, 62, 30, 0.25) 0%, transparent 55%),
    linear-gradient(170deg, #241c12 0%, #1d1812 60%, #171209 100%);
  color: #e8dcc0;
  border: 10px solid #6b4f2c;
  border-radius: 8px;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 34px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(232, 220, 192, 0.07);
  font-style: normal;
  letter-spacing: 0.05em;
  line-height: 1.75;
  animation: fadeUp 0.5s var(--ease-out) both;
}
.wax-tablet .tab-title {
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--gold-bright);
}
.wax-tablet .tab-carve { color: #c9b98f; }

/* stone-cut inscriptions inside dialogs */
.stone-cut {
  display: block;
  margin: 10px auto;
  padding: 14px 18px;
  max-width: 460px;
  text-align: center;
  letter-spacing: 0.22em;
  color: #cfc6b4;
  background: linear-gradient(180deg, #3a3126, #2b2318);
  border: 1px solid rgba(207, 198, 180, 0.2);
  border-radius: 6px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
  font-size: 15px;
}

/* Gus's dock: warm lion-gold instead of ghost blue */
#gus-dock { filter: drop-shadow(0 0 14px rgba(209, 165, 63, 0.45)); }
#gus-dock:hover { filter: drop-shadow(0 0 24px rgba(255, 207, 106, 0.7)); }
#gus-dock::after { color: #f0dfae; border-color: rgba(209, 165, 63, 0.5); }
.gus-portrait { filter: drop-shadow(0 0 18px rgba(209, 165, 63, 0.4)); }
.gus-speech { color: #f0dfae; }
.gus-tier.next { border-color: rgba(209, 165, 63, 0.45); }

/* tesserae journal cards read as bone on dark */
.journal-sun { border-color: rgba(232, 220, 192, 0.28); }

/* maze grid (Chamber 5) */
.maze-grid {
  display: grid;
  grid-template-columns: repeat(4, 54px);
  grid-template-rows: repeat(4, 54px);
  gap: 4px;
  justify-content: center;
  margin: 12px auto;
}
.maze-cell {
  position: relative;
  border-radius: 6px;
  background: rgba(7, 5, 3, 0.85);
  border: 1px solid rgba(69, 58, 46, 0.5);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.maze-cell.seen { background: rgba(69, 58, 46, 0.45); border-color: rgba(201, 162, 39, 0.3); }
.maze-cell.rubble {
  background: repeating-linear-gradient(45deg, #16100a 0 6px, #0d0906 6px 12px);
  border-color: rgba(69, 58, 46, 0.7);
}
.maze-cell.here { border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(232, 200, 90, 0.35); }
.maze-face { color: var(--gold-bright); font-size: 22px; line-height: 1; }

/* SATOR square (Chamber 4) */
.sator-grid {
  display: grid;
  grid-template-columns: repeat(5, 52px);
  gap: 5px;
  justify-content: center;
  margin: 10px auto;
}
.sator-cell {
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--parchment);
  background: linear-gradient(180deg, #2e2518, #1e180f);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease-spring);
  user-select: none;
}
.sator-cell:hover { border-color: var(--gold-bright); transform: translateY(-2px); }
.sator-cell.fixed {
  background: linear-gradient(180deg, #453a2e, #332b23);
  color: var(--gold-bright);
  cursor: default;
  border-color: rgba(207, 198, 180, 0.3);
}
.sator-cell.fixed:hover { transform: none; }
.sator-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 460px;
  margin: 12px auto 4px;
  min-height: 44px;
}
.sator-tile {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--parchment);
  background: linear-gradient(180deg, #262a3b00, #181b2900), linear-gradient(180deg, #2b2318, #1a140c);
  border: 1px solid rgba(232, 220, 192, 0.25);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s, box-shadow 0.2s;
}
.sator-tile:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.sator-tile.picked {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(232, 200, 90, 0.35), 0 0 16px rgba(232, 200, 90, 0.25);
}

/* kit-selection columns (Chamber 2) */
.kit-cols { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.kit-col { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.kit-col-title {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.kit-opt {
  padding: 10px 12px;
  font-size: 14px;
  text-align: center;
  color: var(--text);
  background: rgba(7, 5, 3, 0.55);
  border: 1px solid rgba(216, 211, 200, 0.16);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-spring);
  user-select: none;
}
.kit-opt:hover { border-color: rgba(201, 162, 39, 0.5); transform: translateY(-2px); }
.kit-opt.on {
  border-color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(232, 200, 90, 0.15);
}
/* photoreal kit sprites inside each option */
.kit-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.kit-opt-img {
  width: 100%; height: 96px; object-fit: contain;
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.6));
}
.kit-opt span { font-size: 13px; line-height: 1.25; }

/* jug displays (Chamber 3) */
.jug-row { display: flex; gap: 26px; justify-content: center; align-items: flex-end; margin: 14px 0 6px; }
.jug {
  width: 84px;
  text-align: center;
  user-select: none;
}
.jug-vessel {
  position: relative;
  height: 110px;
  border: 2px solid rgba(207, 198, 180, 0.4);
  border-top-width: 1px;
  border-radius: 6px 6px 16px 16px;
  background: rgba(7, 5, 3, 0.6);
  overflow: hidden;
}
.jug-oil {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, #b98a2e, #8a5a1c);
  transition: height 0.45s var(--ease-out);
  box-shadow: inset 0 3px 8px rgba(255, 220, 140, 0.35);
}
.jug-cap { margin-top: 6px; font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); }
.jug-amt { font-size: 18px; color: var(--parchment); }

/* letter tumblers / rings (Chambers 1 & 7) */
.ring-row { display: flex; gap: 10px; justify-content: center; margin: 14px 0; }
.ring {
  width: 52px; height: 68px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--parchment);
  background: linear-gradient(180deg, #3a2f20, #241c12);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s var(--ease-spring), border-color 0.2s;
}
.ring:hover { border-color: var(--gold-bright); }
.ring:active { transform: scale(0.94); }
.ring.tick { animation: dialTick 0.25s var(--ease-spring); }

/* the editor's ordo: six-bolt chronological sequence lock (Chamber 7 finale) */
.ordo-slots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px auto 6px;
}
.ordo-slot {
  position: relative;
  width: 118px;
  min-height: 58px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  border: 1px dashed rgba(201, 162, 39, 0.4);
  background: rgba(7, 5, 3, 0.5);
}
.ordo-slot .ord {
  position: absolute;
  top: 3px; left: 7px;
  font-size: 10px;
  color: var(--text-dim);
}
.ordo-slot.filled {
  border-style: solid;
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, #3a2f20, #241c12);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(232, 200, 90, 0.12);
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.2s;
}
.ordo-slot.filled:hover { transform: translateY(-2px); box-shadow: 0 0 16px rgba(232, 200, 90, 0.28); }
.ordo-tray {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 58px;
  max-width: 500px;
  margin: 12px auto 4px;
}
.ordo-chip {
  width: 118px;
  padding: 9px 6px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--parchment);
  background: linear-gradient(180deg, #2b2318, #1a140c);
  border: 1px solid rgba(232, 220, 192, 0.25);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s var(--ease-spring), border-color 0.2s, box-shadow 0.2s;
}
.ordo-chip:hover {
  transform: translateY(-3px);
  border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(232, 200, 90, 0.18);
}
.ordo-name { font-size: 15px; letter-spacing: 0.1em; color: var(--gold-bright); }
.ordo-gloss { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
