/* Inquest — a nightly deduction ledger. Parchment, ink crosses, wax seals. */

.inquest-frame {
  width: min(760px, 96vw);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.6vw, 22px);
  padding: clamp(14px, 2.6vw, 24px);
}

.sect {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  color: var(--oxblood);
  margin: 0 0 8px;
  font-weight: 500;
}

/* ---- the case card ---- */

.case-card {
  border-bottom: 1px solid rgba(122, 104, 80, .35);
  padding-bottom: clamp(10px, 2vw, 16px);
}
.case-eyebrow {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  color: var(--ink-light);
  margin: 0 0 6px;
}
.case-text {
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
.case-text b { color: var(--oxblood); font-weight: 600; }

/* ---- testimonies ---- */

.clue-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: clue;
  columns: 2;
  column-gap: 26px;
}
@media (max-width: 620px) { .clue-list { columns: 1; } }
.clue-list li { break-inside: avoid; }
.clue-list button {
  counter-increment: clue;
  display: flex;
  gap: 9px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 4px;
  font-family: var(--body);
  font-size: clamp(14.5px, 2.1vw, 16.5px);
  line-height: 1.4;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: background .15s var(--ease), color .2s var(--ease);
}
.clue-list button::before {
  content: counter(clue, lower-roman) '.';
  font-family: var(--caps);
  font-size: .78em;
  color: var(--oxblood);
  min-width: 22px;
  flex: none;
}
.clue-list button:hover { background: rgba(200, 156, 58, .14); }
.clue-list button.struck { color: rgba(107, 90, 72, .55); }
.clue-list button.struck .clue-text {
  text-decoration: line-through;
  text-decoration-color: rgba(90, 26, 31, .6);
  text-decoration-thickness: 1.5px;
}
.sworn {
  margin: 10px 0 0;
  font-family: var(--hand);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-light);
}

/* ---- the ledger grid ---- */

.ledger {
  --cell: clamp(30px, 7.4vw, 42px);
  display: grid;
  grid-template-columns: max-content max-content max-content;
  grid-template-rows: max-content max-content max-content;
  gap: 7px;
  justify-content: center;
  align-content: start;
}
.lg-heads { display: grid; grid-template-columns: repeat(4, var(--cell)); }
.lg-heads .lg-h {
  height: clamp(60px, 13vw, 86px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: clamp(9.5px, 1.6vw, 11.5px);
  color: var(--ink-light);
  overflow: hidden;
}
.lg-rows { display: grid; grid-template-rows: repeat(4, var(--cell)); }
.lg-rows .lg-r {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  max-width: 96px;
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(9.5px, 1.6vw, 11.5px);
  color: var(--ink-light);
  white-space: nowrap;
}
.lg-block {
  display: grid;
  grid-template-columns: repeat(4, var(--cell));
  grid-template-rows: repeat(4, var(--cell));
  border-radius: 6px;
  box-shadow: inset 0 0 0 1.5px rgba(122, 104, 80, .5);
  overflow: hidden;
  background: rgba(246, 238, 214, .35);
}
.lg-c {
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: inset -.5px -.5px 0 rgba(122, 104, 80, .28);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .12s var(--ease);
  position: relative;
}
.lg-c:hover, .lg-c.hl { background: rgba(200, 156, 58, .18); }
.lg-c:active { background: rgba(200, 156, 58, .3); }
.lg-c[data-v="-1"]::after {
  content: '\2715';
  font-size: calc(var(--cell) * .44);
  color: var(--ink-soft);
  font-family: var(--body);
  line-height: 1;
}
.lg-c[data-v="-1"].auto::after { color: rgba(58, 46, 34, .45); }
.lg-c[data-v="1"]::after {
  content: '';
  width: calc(var(--cell) * .5);
  height: calc(var(--cell) * .5);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, var(--oxblood-bright), var(--oxblood) 55%, var(--oxblood-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(227, 183, 84, .4), 0 1px 3px rgba(61, 15, 18, .4);
}
.legend {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-light);
}
.lx { color: var(--ink-soft); font-weight: 600; font-style: normal; }
.ldot {
  display: inline-block;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, var(--oxblood-bright), var(--oxblood) 60%, var(--oxblood-deep));
  vertical-align: -2px;
}
.ledger-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ---- HUD: candles + accuse seal ---- */

.candles { display: inline-flex; gap: 9px; align-items: flex-end; padding: 0 2px; }
.candle {
  position: relative;
  width: 11px;
  height: 26px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, var(--cream), var(--parchment-deep));
  box-shadow: inset 0 0 0 1px rgba(122, 104, 80, .4);
}
.candle::after {
  content: '';
  position: absolute;
  left: 50%; top: -9px;
  width: 7px; height: 10px;
  transform: translateX(-50%);
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 70%, var(--gold-bright), var(--amber) 65%, rgba(217, 148, 65, 0));
  animation: inq-flicker 1.6s infinite alternate var(--ease);
}
.candle.out { filter: grayscale(.7) brightness(.82); }
.candle.out::after {
  animation: none;
  background: radial-gradient(circle at 50% 40%, rgba(58, 46, 34, .5), rgba(58, 46, 34, 0) 70%);
  height: 7px; top: -6px;
}
@keyframes inq-flicker { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-52%) scale(.86); } }

.seal.ready { animation: inq-beckon 1.4s infinite alternate var(--ease); }
@keyframes inq-beckon {
  from { box-shadow: inset 0 1px 0 rgba(227, 183, 84, .35), inset 0 -3px 8px rgba(0, 0, 0, .35), 0 4px 10px rgba(61, 15, 18, .35); }
  to { box-shadow: inset 0 1px 0 rgba(227, 183, 84, .5), inset 0 -3px 8px rgba(0, 0, 0, .3), 0 4px 18px rgba(200, 156, 58, .55); }
}

/* ---- overlays: help, accuse, result ---- */

.help-body { text-align: left; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.help-body p { margin: 0 0 12px; }
.help-body b { color: var(--oxblood); }

.medallions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 18px;
}
.medallion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(122, 104, 80, .4);
  background: rgba(246, 238, 214, .5);
  cursor: pointer;
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease);
}
.medallion:hover { border-color: var(--oxblood); background: rgba(246, 238, 214, .9); }
.medallion:active { transform: scale(.97); }
.medallion .init {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 600;
  color: var(--parchment);
  background: radial-gradient(circle at 36% 30%, var(--oxblood-bright), var(--oxblood) 60%, var(--oxblood-deep));
}
.medallion.wrong { animation: inq-shake .4s var(--ease); border-color: var(--oxblood); opacity: .45; pointer-events: none; }
@keyframes inq-shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.overlay-stats .tale { display: block; margin-bottom: 8px; }
.overlay-next {
  margin: 14px 0 0;
  font-family: var(--hand);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-light);
}

/* floating feedback toast */
.game-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 20, 16, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 40;
}
.game-toast.on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 430px) {
  .lg-rows .lg-r { max-width: 78px; overflow: hidden; text-overflow: ellipsis; display: block; line-height: var(--cell); text-align: right; }
}
