/* Kit Ellery · Daily 5x5 Mini-Plan — Brick & Line Studio Editorial Stylesheet */
:root {
  --desk: #e8e0d0;
  --desk-deep: #dcd2be;
  --paper: #fbf8f1;
  --paper-warm: #f5efe2;
  --paper-tag: #fffaf0;
  --ink: #1d1b19;
  --graphite: #655e55;
  --rule: #d6ccb8;
  --rule-soft: #e6dfd0;
  --claret: #5c1a23;
  --claret-ink: #7a2531;
  --claret-wash: rgba(122, 37, 49, 0.10);
  --brass: #b8913f;
  --brass-light: #d8b76c;
  --pencil: #26497a;
  --pencil-wash: rgba(38, 73, 122, 0.09);
  --alert: #a33a2b;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  color-scheme: light;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip; /* clip, unlike hidden, keeps position: sticky working */
  background: var(--desk);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body);
  font-size: 17.5px;
  line-height: 1.45;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 252, 244, 0.45), transparent 70%);
}

button, a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--claret-ink);
  outline-offset: 2px;
}

.caps {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 600;
}

/* Sticky Top Editorial Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(232, 224, 208, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  margin-left: calc(-1 * max(12px, env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(12px, env(safe-area-inset-right, 0px)));
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-kicker {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--claret-ink);
  font-weight: 600;
  line-height: 1.1;
}

.brand {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(17px, 4vw, 21px);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.pill-btn {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.15s, background 0.15s;
}

.pill-btn:hover {
  border-color: var(--claret-ink);
  background: #fffdf9;
}

.pill-btn.lang-btn {
  border-color: var(--claret);
  color: var(--claret);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 12px;
  padding: 4px 8px;
}

.streak-pill {
  color: var(--claret-ink);
  font-weight: 600;
}

.streak-pill .gem {
  color: var(--brass);
  font-size: 11px;
}

.clock {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--graphite);
  min-width: 44px;
  text-align: right;
  font-weight: 600;
}

@media (max-width: 520px) {
  .topbar-inner {
    gap: 6px;
  }
  .brand-kicker {
    font-size: 8.8px;
    letter-spacing: 0.16em;
  }
  .brand {
    font-size: 15.5px;
  }
  .top-actions {
    gap: 4px;
  }
  .pill-btn {
    padding: 3px 6px;
    font-size: 12px;
  }
  .pill-btn.lang-btn {
    padding: 3px 6px;
    font-size: 11px;
  }
  .clock {
    font-size: 11.5px;
    min-width: 36px;
    letter-spacing: 0.05em;
  }
}

/* Main Paper Casebook Sheet */
.sheet {
  max-width: 1080px;
  margin: 14px auto 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 2px 6px rgba(29, 27, 25, 0.05),
    0 18px 42px -24px rgba(42, 30, 20, 0.32);
  padding: 22px clamp(15px, 3.8vw, 40px) 32px;
  position: relative;
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(184, 145, 63, 0.28);
  pointer-events: none;
}

/* Case Header */
.case-head {
  text-align: left;
}

.head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--claret-ink);
}

.today-tag {
  background: var(--claret);
  color: #f6ecda;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}

.solved-tag {
  background: rgba(63, 107, 58, 0.12);
  color: #2f572b;
  border: 1px solid rgba(63, 107, 58, 0.35);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 600;
}

.diamonds {
  color: var(--brass);
  letter-spacing: 0.08em;
  font-size: 13px;
}

.case-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(27px, 5.4vw, 40px);
  line-height: 1.08;
  margin: 6px 0 4px;
  color: var(--ink);
  text-wrap: balance;
}

.case-where {
  color: var(--graphite);
  font-style: italic;
  font-size: 16.5px;
}

.ornament-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--brass);
}

.ornament-rule::before,
.ornament-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.ornament-rule span {
  font-size: 10px;
  line-height: 1;
}

/* Collapsible Brief Story */
details.story-box {
  margin: 4px 0 16px;
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 8px 12px;
}

details.story-box summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--claret-ink);
}

details.story-box summary::-webkit-details-marker {
  display: none;
}

details.story-box summary::after {
  content: attr(data-read);
  font-size: 13.5px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--graphite);
}

details.story-box[open] summary::after {
  content: attr(data-hide);
}

details.story-box p {
  margin: 8px 0 4px;
  max-width: 72ch;
  font-size: 16.5px;
  line-height: 1.48;
}

details.story-box p::first-letter {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.35em;
  float: left;
  line-height: 0.82;
  padding: 3px 4px 0 0;
  color: var(--claret);
}

/* Two-Column Spread Layout */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.spread > *,
.board-col,
.plan-frame,
.board-row-wrap {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 860px) {
  .spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* Board & Coordinates */
.board-col {
  display: grid;
  gap: 10px;
}

.plan-frame {
  display: grid;
  gap: 4px;
}

.axis-top {
  display: grid;
  grid-template-columns: 22px repeat(5, 1fr);
  text-align: center;
  font-family: var(--display);
  font-size: 14px;
  color: var(--graphite);
  padding-right: 2.2%;
}

.board-row-wrap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: stretch;
}

.axis-left {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  align-items: center;
  text-align: center;
  font-family: var(--display);
  font-size: 14px;
  color: var(--graphite);
  padding-block: 2.2%;
}

.axis-top span.off,
.axis-left span.off {
  color: var(--rule);
  text-decoration: line-through;
}

.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
  background: var(--paper-tag);
}

.plan-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Exact 5x5 interactive overlay matching PAD=12 / 524 = 2.2901% */
.cells {
  position: absolute;
  inset: 2.2901%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
}

.cell {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

@media (hover: hover) {
  .cell:hover::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1.5px dashed rgba(38, 73, 122, 0.45);
    border-radius: 4px;
    pointer-events: none;
  }
}

.cell.taken::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 5px;
  background: rgba(251, 248, 241, 0.56);
  pointer-events: none;
}

.cell.room-hit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(122, 37, 49, 0.24);
  box-shadow: inset 0 0 0 2px rgba(122, 37, 49, 0.58);
  pointer-events: none;
}

.cell.flash {
  animation: cellFlash 0.42s ease;
}

@keyframes cellFlash {
  0%, 100% { box-shadow: inset 0 0 0 0 transparent; }
  40% { box-shadow: inset 0 0 0 3px var(--alert); }
}

.cell .x {
  position: absolute;
  inset: 24%;
  pointer-events: none;
}

.cell .x::before,
.cell .x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2.6px;
  margin-left: -1.3px;
  background: var(--pencil);
  border-radius: 2px;
  opacity: 0.92;
  box-shadow: 0 0 0 1.5px rgba(255, 252, 245, 0.88);
}

.cell .x::before { transform: rotate(45deg); }
.cell .x::after { transform: rotate(-45deg); }

/* Medallion Badges */
.badge {
  --s: 32px;
  --c: var(--ink);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #ffffff;
  color: var(--c);
  border: 1.6px solid var(--c);
  box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 3px var(--c);
  font-family: var(--display);
  font-size: calc(var(--s) * 0.48);
  line-height: 1;
  font-weight: 600;
  flex-shrink: 0;
}

.badge.victim {
  background: var(--claret);
  color: #fbf6eb;
  border-color: var(--claret);
  box-shadow: inset 0 0 0 2px var(--claret), inset 0 0 0 3.2px #f5e6c8;
}

.cell .badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 62%;
  max-height: 54px;
  aspect-ratio: 1;
  font-size: clamp(15px, 3.8vw, 23px);
  box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 3.4px var(--c), 0 2px 7px rgba(20, 16, 12, 0.34);
  z-index: 2;
}

.cell .badge.victim {
  box-shadow: inset 0 0 0 2px var(--claret), inset 0 0 0 3.4px #f5e6c8, 0 2px 7px rgba(20, 16, 12, 0.38);
}

.cell .badge.fresh {
  animation: badgeDrop 0.2s ease-out;
}

.cell .badge.clash {
  outline: 3px solid var(--alert);
  outline-offset: 1px;
}

@keyframes badgeDrop {
  from { transform: translate(-50%, -62%) scale(1.14); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Suspect & Victim Tray */
.tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 500px) {
  .tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.who-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 1px solid var(--rule);
  background: #fffdf9;
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.who-btn:hover {
  border-color: var(--graphite);
}

.who-btn.sel {
  border-color: var(--pencil);
  box-shadow: 0 0 0 2px var(--pencil);
  background: #ffffff;
}

.who-btn.done .badge {
  opacity: 0.58;
}

.who-meta {
  min-width: 0;
  flex: 1;
}

.who-meta .nm {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who-meta .at {
  display: block;
  font-size: 12.5px;
  color: var(--graphite);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action Toolbar */
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 2px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.seg button {
  border: 0;
  background: #fffdf9;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 500;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.tool-btn {
  border: 1px solid var(--rule);
  background: #fffdf9;
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 15px;
}

.tool-btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.tool-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.spacer {
  flex: 1;
}

.accuse-btn {
  border: 1px solid var(--brass);
  background: var(--claret);
  color: #fbf4e4;
  border-radius: 6px;
  padding: 8px 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(92, 26, 35, 0.22);
  transition: background 0.15s, transform 0.1s;
}

.accuse-btn:hover:not(:disabled) {
  background: var(--claret-ink);
}

.accuse-btn:disabled {
  background: var(--rule-soft);
  border-color: var(--rule);
  color: var(--graphite);
  box-shadow: none;
  cursor: default;
}

/* Step-by-Step Hint Callout */
.hint-box {
  border-left: 3px solid var(--claret-ink);
  background: var(--claret-wash);
  padding: 9px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 15.5px;
  line-height: 1.4;
}

/* Compact Case Furniture Key */
.furn-key {
  border-top: 1px solid var(--rule-soft);
  padding-top: 10px;
  margin-top: 2px;
  display: grid;
  gap: 8px;
}

.key-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.key-label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--claret-ink);
  font-weight: 600;
  margin-right: 2px;
}

.key-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  color: var(--graphite);
  background: var(--paper-warm);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 2px 6px 2px 3px;
}

.key-chip svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Right Column: Case File (People & Clues) */
.file-col h2 {
  font-family: var(--body);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--claret-ink);
  font-weight: 600;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 5px;
}

.people-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.people-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  border-radius: 4px;
}

.people-list li:hover {
  background: rgba(245, 239, 226, 0.65);
}

.people-list li .badge {
  --s: 28px;
  margin-top: 2px;
}

.people-list b {
  font-weight: 600;
}

.people-list i {
  color: var(--graphite);
}

.people-list small {
  display: block;
  color: var(--graphite);
  font-size: 14.5px;
  line-height: 1.32;
  margin-top: 1px;
}

.clues-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.clue-btn {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 6px 5px;
  border-radius: 6px;
  line-height: 1.38;
}

.clue-btn:hover {
  background: var(--paper-warm);
}

.clue-btn .num {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid var(--claret-ink);
  color: var(--claret-ink);
  font-family: var(--display);
  font-size: 12.5px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.clue-btn.used .txt {
  text-decoration: line-through;
  text-decoration-color: var(--pencil);
  text-decoration-thickness: 1.6px;
  color: var(--graphite);
  opacity: 0.78;
}

.clue-btn.used .num {
  background: var(--pencil);
  border-color: var(--pencil);
  color: #ffffff;
}

.rules-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
  font-size: 14px;
  color: var(--graphite);
  font-style: italic;
}

/* Editorial Book Promo Card (Bottom of Sheet & Victory Modal) */
.book-card {
  background: linear-gradient(155deg, #5c1a23 0%, #3d1017 100%);
  color: #f6ebd6;
  border: 1px solid var(--brass);
  box-shadow: inset 0 0 0 3px #4b141c, inset 0 0 0 3.7px rgba(201, 163, 90, 0.55);
  padding: 18px 20px;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

@media (max-width: 560px) {
  .book-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 12px;
    padding: 16px 14px;
  }
}

.book-cover-svg {
  width: 74px;
  height: 104px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.book-copy .bk-kicker {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass-light);
  font-weight: 600;
}

.book-copy h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 21px;
  margin: 3px 0 5px;
  color: #fff8eb;
  line-height: 1.15;
}

.book-copy p {
  margin: 0 0 11px;
  font-size: 15px;
  line-height: 1.38;
  color: #eadcc3;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

@media (max-width: 560px) {
  .store-links {
    justify-content: center;
  }
}

.store-btn {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 4px;
  border: 1px solid var(--brass-light);
  color: #f9efe0;
  background: rgba(201, 163, 90, 0.14);
  transition: background 0.15s, color 0.15s;
}

.store-btn.primary,
.store-btn:hover {
  background: var(--brass-light);
  color: #2c0b10;
}

/* Footer */
.foot {
  max-width: 1080px;
  margin: 14px auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--graphite);
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--brass);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100% - 28px);
  z-index: 40;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modals (Accuse, Victory, Archive, Rules) */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 15, 0.62);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 14px;
}

.modal {
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
  width: min(560px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 22px 22px 20px;
  position: relative;
}

.modal h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.12;
  margin: 4px 0 8px;
}

.stamp {
  display: inline-block;
  border: 2.5px solid var(--claret-ink);
  color: var(--claret-ink);
  padding: 3px 11px;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  transform: rotate(-3deg);
  margin-bottom: 6px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

@media (max-width: 420px) {
  .pick-grid {
    grid-template-columns: 1fr;
  }
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  padding: 10px 8px;
  margin: 14px 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stats-bar b {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--claret);
  line-height: 1.1;
}

.share-box {
  background: #fffdf9;
  border: 1px dashed var(--rule);
  padding: 10px 12px;
  border-radius: 5px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.share-preview {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--graphite);
  white-space: pre-line;
  font-variant-numeric: tabular-nums;
}

.share-btn {
  border: 1px solid var(--brass);
  background: var(--claret);
  color: #fbf4e4;
  border-radius: 5px;
  padding: 8px 14px;
  font-weight: 600;
  white-space: nowrap;
}

.walk-details {
  margin-top: 12px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 8px;
}

.walk-details summary {
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--claret-ink);
  font-weight: 600;
}

.walk-details ol {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.4;
}

.walk-details li {
  margin-bottom: 4px;
}

/* Archive Grid inside Modal */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  margin: 14px 0;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 2px;
}

.arch-item {
  text-align: left;
  border: 1px solid var(--rule);
  background: #fffdf9;
  border-radius: 5px;
  padding: 7px 9px;
  display: grid;
  gap: 2px;
}

.arch-item:hover {
  border-color: var(--claret-ink);
}

.arch-item.current {
  border-color: var(--claret);
  box-shadow: inset 0 3px 0 var(--claret);
  background: var(--paper-warm);
}

.arch-item.done .arch-k {
  color: #2f572b;
}

.arch-k {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.arch-t {
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.rules-list {
  margin: 10px 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Subtle motion v1 (27-11). Everything here is switched off by prefers-reduced-motion above. --- */
:root { --ease-soft: cubic-bezier(.22, .8, .24, 1); }

/* The badge settles on the square like a counter set down on paper */
.cell .badge.fresh { animation: badgeSettle .42s var(--ease-soft); }
@keyframes badgeSettle {
  0%   { transform: translate(-50%, -78%) scale(1.06); opacity: 0; filter: drop-shadow(0 10px 6px rgba(20,16,12,.18)); }
  55%  { transform: translate(-50%, -47%) scale(.985); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); filter: none; }
}

/* A cross is drawn with two pencil strokes */
.cell .x.fresh::before { animation: strokeA .16s ease-out both; }
.cell .x.fresh::after  { animation: strokeB .16s ease-out .12s both; }
@keyframes strokeA { from { transform: rotate(45deg) scaleY(0); } to { transform: rotate(45deg) scaleY(1); } }
@keyframes strokeB { from { transform: rotate(-45deg) scaleY(0); } to { transform: rotate(-45deg) scaleY(1); } }

/* Crossed-out rows and columns fade in instead of snapping */
.cell::before { transition: background-color .25s ease, opacity .25s ease; }

/* A used clue is struck through with a pen line, left to right */
.clue-btn .txt .ink {
  background: linear-gradient(var(--pencil), var(--pencil)) no-repeat 0 58% / 0% 1.6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .38s var(--ease-soft), color .3s ease, opacity .3s ease;
}
.clue-btn.used .txt { text-decoration: none; }
.clue-btn.used .txt .ink { background-size: 100% 1.6px; }
.clue-btn .num { transition: background-color .3s ease, border-color .3s ease, color .3s ease; }

/* Case sheet arrives softly; the plan inks in */
.sheet { animation: sheetIn .5s var(--ease-soft) both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.plan-svg { animation: inkIn .7s ease-out both; }
@keyframes inkIn { from { opacity: 0; filter: blur(1.5px) saturate(.6); } to { opacity: 1; filter: none; } }

/* Dialogs rise a little; the backdrop dims */
.scrim:not([hidden]) { animation: dimIn .22s ease-out both; }
.scrim:not([hidden]) .modal { animation: riseIn .32s var(--ease-soft) both; }
@keyframes dimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* Buttons respond to touch with a slight press */
.who-btn, .tool-btn, .seg button, .accuse-btn, .pill-btn, .clue-btn { transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.who-btn:active, .tool-btn:active, .seg button:active, .accuse-btn:active, .pill-btn:active { transform: translateY(1px) scale(.985); }
.accuse-btn:not(:disabled) { transition: background-color .3s ease, box-shadow .3s ease; box-shadow: 0 0 0 0 rgba(122,37,49,.35); animation: readyPulse 2.4s ease-in-out 1; }
@keyframes readyPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(122,37,49,0); } 40% { box-shadow: 0 0 0 6px rgba(122,37,49,.16); } }

/* --- Header v2 (27-11): one line in both languages --- */
.brand-kicker, .brand { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-meta { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 520px) {
  .brand { font-size: clamp(13px, 4vw, 15.5px); }
  .head-meta { gap: 5px; font-size: 10.5px; letter-spacing: .12em; }
  .today-tag, .solved-tag { font-size: 9px; letter-spacing: .12em; padding: 1px 5px; }
}
.arch-ico { display: none; }
@media (max-width: 520px) {
  .kick-tail { display: none; }
  .arch-ico { display: inline; font-size: 13px; line-height: 1; }
  .arch-txt { display: none; }
}
.share-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.share-btn.ghost { background: transparent; color: var(--claret); box-shadow: inset 0 0 0 1.5px var(--claret); }

/* =====================================================================
   Play layout v3 (27-11, review C1–C4, A1, M5, M6).
   Phones and tablets: the plan, the people and the tools stay together at the TOP,
   under the top bar, and the clues scroll underneath. Nothing is pinned to the
   bottom edge, where the floating Safari bar and the Android gesture bar sit.
   ===================================================================== */
.who-meta .nm-s { display: none; }
.play-dock { display: grid; gap: 10px; }
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } }
.cell { -webkit-touch-callout: none; }
.tool-btn .ico { font-size: 15px; line-height: 1; }

@media (max-width: 860px) {
  .spread { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .board-col, .file-col { display: contents; }
  .play-dock {
    order: 1;
    position: sticky;
    top: var(--topbar-h, 52px);
    z-index: 6;
    gap: 6px;
    background: var(--paper);
    padding: 4px var(--dock-bleed, 0px) 7px;
    margin: 0 calc(-1 * var(--dock-bleed, 0px));
    box-shadow: 0 12px 12px -12px rgba(40, 25, 10, 0.32);
  }
  /* The board is as wide as the screen allows, but leaves room for the people, the tools and a few clues */
  .plan-frame {
    width: min(100%, 540px, max(240px, calc(100svh - var(--topbar-h, 52px) - 282px)));
    margin: 0 auto;
    gap: 2px;
  }
  .tray, .tools, .hint-box { width: min(100%, 540px); margin: 0 auto; }
  #h-evidence { order: 2; margin-top: 4px; }
  .clues-list { order: 3; }
  .rules-note { order: 4; }
  .furn-key { order: 5; }
  .print-btn { order: 6; align-self: flex-start; }
  #h-present { order: 7; margin-top: 12px; }
  .people-list { order: 8; }
  .case-head { margin-bottom: 4px; }
  .case-title { font-size: 24px; line-height: 1.1; }
  .tray { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .tools { flex-wrap: nowrap; gap: 6px; margin-top: 0; }
  .hint-box {
    max-height: 24svh;
    overflow-y: auto;
    background: #f6ece7;
    font-size: 15px;
    padding: 7px 36px 7px 10px;
  }
  /* Toasts appear under the top bar instead of at the bottom edge */
  .toast {
    bottom: auto;
    top: calc(var(--topbar-h, 52px) + 10px);
    transform: translateX(-50%) translateY(-12px);
  }
  .toast.show { transform: translateX(-50%) translateY(0); }
}
/* Short screens (a phone on its side): no sticky block, it would fill the screen */
@media (max-width: 860px) and (max-height: 540px) {
  .play-dock { position: static; box-shadow: none; }
  .plan-frame { width: min(100%, 360px); }
}

@media (max-width: 600px) {
  /* Board edge to edge: no body gutter, a narrow sheet margin */
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  .topbar {
    margin-left: calc(-1 * env(safe-area-inset-left, 0px));
    margin-right: calc(-1 * env(safe-area-inset-right, 0px));
  }
  .sheet {
    --dock-bleed: 8px;
    margin-top: 0;
    border-left: 0;
    border-right: 0;
    padding: 14px 8px 24px;
  }
  .sheet::before { display: none; }
  details.story-box { margin-bottom: 10px; }
  .axis-top { grid-template-columns: 15px repeat(5, 1fr); font-size: 12.5px; }
  .board-row-wrap { grid-template-columns: 15px minmax(0, 1fr); }
  .axis-left { font-size: 12.5px; }
  .case-title { font-size: 23px; }

  .tray .who-btn {
    flex-direction: column;
    gap: 3px;
    padding: 5px 2px 4px;
    text-align: center;
    min-height: 50px;
  }
  .tray .who-btn .badge { --s: 28px; }
  .tray .who-meta { width: 100%; }
  .tray .who-meta .nm,
  .tray .who-meta .at { display: none; }
  .tray .who-meta .nm-s {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tools .lbl,
  #btn-clear { display: none; }
  /* Touch targets of at least 44 px */
  .seg button,
  .tool-btn {
    min-height: 42px;
    min-width: 44px;
    padding: 6px 10px;
    font-size: 14.5px;
  }
  .accuse-btn {
    min-height: 42px;
    padding: 7px 11px;
    font-size: 14.5px;
    white-space: nowrap;
  }
  .file-col h2 { margin-bottom: 4px; font-size: 12px; }
  .clue-btn { font-size: 15.5px; line-height: 1.28; padding: 4px 2px; }
  .hint-x { width: 36px; height: 36px; }
}

/* Desktop (review A2): the people and the tools sit beside the plan, at the top of the right-hand
   page, with the clues straight under them, so a laptop screen needs no scrolling between moves. */
@media (min-width: 861px) {
  .spread {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas: "plan tray" "plan tools" "plan hint" "plan file" "key file";
    column-gap: 34px;
    row-gap: 10px;
  }
  .board-col, .play-dock { display: contents; }
  .plan-frame { grid-area: plan; align-self: start; }
  .tray { grid-area: tray; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .tools { grid-area: tools; margin-top: 0; }
  .hint-box { grid-area: hint; }
  .furn-key { grid-area: key; align-self: start; }
  .file-col { grid-area: file; display: flex; flex-direction: column; margin-top: 6px; }
  #h-evidence { order: 1; }
  .clues-list { order: 2; }
  .rules-note { order: 3; }
  .print-btn { order: 4; align-self: flex-start; }
  #h-present { order: 5; margin-top: 18px; }
  .people-list { order: 6; }
  .tray .who-btn { flex-direction: column; gap: 3px; padding: 6px 3px 5px; text-align: center; }
  .tray .who-meta { width: 100%; }
  .tray .who-meta .nm { font-size: 13.5px; }
  .tray .who-meta .at { font-size: 11.5px; }
}

/* The case header may wrap on narrow screens instead of cutting words off (M5) */
@media (max-width: 520px) {
  .head-meta { flex-wrap: wrap; white-space: normal; row-gap: 3px; }
}

/* Hint box: a close button and a soft entrance each time it answers */
.hint-box { position: relative; padding-right: 36px; }
.hint-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--claret-ink);
  font-size: 15px;
  border-radius: 4px;
}
.hint-x:hover { background: rgba(122, 37, 49, 0.08); }
.hint-box.pop { animation: hintPop 0.3s var(--ease-soft); }
@keyframes hintPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Streak pill: hollow gem with a slow glow while today's case is still open */
.streak-pill.pending .gem { animation: gemGlow 2.8s ease-in-out infinite; }
@keyframes gemGlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Accuse dialog: full names, role and square on every screen (C3) */
.pick-btn { align-items: flex-start; padding: 8px 10px; }
.pick-btn .badge { margin-top: 2px; }
.pick-btn .who-meta .nm,
.pick-btn .who-meta .at { white-space: normal; }
.pick-btn .who-meta .where { color: var(--claret-ink); font-weight: 600; }
.victim-at { margin: 0 0 4px; font-size: 15.5px; }

/* First visit and rules */
.intro-list {
  margin: 10px 0 4px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  font-size: 16.5px;
}
.rules-list { list-style: upper-roman; padding-left: 32px; }
.print-btn { margin-top: 12px; font-size: 14.5px; }

/* Archive: locked future cases and the streak line */
.arch-item.locked { opacity: 0.55; cursor: default; background: var(--paper-warm); }
.arch-item.locked:hover { border-color: var(--rule); }
.arch-item.today .arch-k { color: var(--claret-ink); }
.streak-line { margin: 0 0 6px; font-size: 15.5px; }
.muted { color: var(--graphite); font-size: 13.5px; }

/* Win screen: next case countdown, streak note, share legend */
.next-case {
  text-align: center;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  background: var(--paper-warm);
}
.next-case .count {
  font-family: var(--display);
  font-size: 22px;
  color: var(--claret);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.next-case .tom { margin-top: 2px; }
.streak-note { text-align: center; font-style: italic; color: var(--claret-ink); margin: 0 0 8px; }
.share-legend { width: 100%; font-size: 12.5px; color: var(--graphite); line-height: 1.35; }

/* =====================================================================
   Print (4.11): one A4 sheet with the plan, the people, the clues and the brand.
   The pieces, the marks, the hints and the answer never print.
   ===================================================================== */
.print-only { display: none; }
@media print {
  @page { size: A4 portrait; margin: 10mm 12mm; }
  html, body { background: #fff !important; }
  body { padding: 0 !important; font-size: 11pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .topbar, .tray, .tools, .hint-box, .cells, .toast, .scrim, #sheet-book-promo, .foot,
  .print-btn, .rules-note, .today-tag, .solved-tag, details.story-box summary { display: none !important; }
  .print-only { display: block !important; }
  .sheet { margin: 0 !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none !important; background: #fff !important; }
  .sheet::before { display: none !important; }
  .print-head {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 4px;
    margin-bottom: 8px;
  }
  .ph-brand { font-size: 8.5pt; letter-spacing: 0.14em; text-transform: uppercase; color: var(--claret-ink); }
  .ph-brand b { letter-spacing: 0.04em; text-transform: none; }
  .ph-title { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 13pt; }
  .head-meta { flex-wrap: wrap !important; }
  .case-title { font-size: 22pt !important; }
  details.story-box { background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 0 0 6px; margin: 4px 0 10px; }
  details.story-box p { font-size: 10.5pt; max-width: none; margin: 4px 0 0; }
  .spread { display: grid !important; grid-template-columns: 1.05fr 1fr !important; gap: 8mm !important; align-items: start; }
  .board-col, .file-col { display: block !important; }
  .play-dock { position: static !important; display: block !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  .plan-frame { width: 100% !important; }
  .axis-top span.off, .axis-left span.off { color: var(--graphite) !important; text-decoration: none !important; }
  .furn-key { margin-top: 8px; }
  .file-col h2 { margin-top: 0; }
  .people-list { margin-bottom: 10px; }
  .people-list li { padding: 3px 0; }
  .people-list small { font-size: 9.5pt; }
  .clue-btn { padding: 2px 0 !important; font-size: 10.5pt !important; line-height: 1.3 !important; }
  .clue-btn.used .txt, .clue-btn.used .txt .ink { opacity: 1 !important; color: inherit !important; background-size: 0 1.6px !important; }
  .clue-btn.used .num { background: none !important; color: var(--claret-ink) !important; border-color: var(--claret-ink) !important; }
  .print-tail { margin-top: 7mm; break-inside: avoid; }
  .pt-killer { font-family: var(--display); font-size: 13pt; display: flex !important; gap: 8px; align-items: baseline; }
  .pt-line { display: inline-block; width: 90mm; border-bottom: 1px solid var(--ink); }
  .pt-rules { font-size: 8.8pt; line-height: 1.35; margin-top: 5mm; color: #333; }
  .pt-rules span { margin-right: 3px; }
  .pt-foot { margin-top: 4mm; font-size: 9pt; text-align: center; color: var(--graphite); }
  .plan-frame, .clues-list li, .people-list li { break-inside: avoid; }
  /* 28-11: page 2 of the printed sheet: a large work grid (as in the book), the answer line and the rules */
  .print-page2 { break-before: page; page-break-before: always; }
  .p2-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-bottom: 1.5px solid var(--ink); padding-bottom: 4px; margin-bottom: 8mm;
  }
  .p2-head .caps { font-size: 8.5pt; letter-spacing: 0.14em; text-transform: uppercase; color: var(--claret-ink); }
  .p2-title { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 15pt; }
  .work-grid { break-inside: avoid; }
  .work-grid h2 {
    font-family: var(--body); font-size: 9pt; letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--claret-ink); font-weight: 600; margin: 0 0 4mm; border-bottom: 1px solid var(--rule); padding-bottom: 4px;
  }
  .wg-svg { display: block; width: 150mm; height: 150mm; margin: 0 auto; }
  .wg-svg text { font-family: "EB Garamond", Georgia, serif; }
  .wg-key { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 3mm 0 0; font-size: 10.5pt; color: #333; }
  .wg-swatch { display: inline-block; width: 4mm; height: 4mm; background: #d6d2ca; border: 0.5px solid #8f8a81; flex: none; }
  .print-side { margin-top: 10mm; break-inside: avoid; }
  .print-side .pt-line { width: auto; flex: 1; max-width: 110mm; }
  .print-side .pt-rules { margin-top: 6mm; font-size: 9.8pt; line-height: 1.4; }
  /* One footer, pinned to the foot of every printed page */
  #p2-foot { display: none !important; }
  .print-tail { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 !important; }
  .print-tail .pt-foot { margin: 0; }
}

/* 28-11: phone clue strip inside the pinned block (one clue at a time) */
.clue-strip { display: none; }
@media (max-width: 860px) and (min-height: 541px) {
  .clue-strip {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 34px; align-items: center; gap: 4px;
    width: min(100%, 540px); margin: 0 auto; min-height: 46px;
    border-top: 1px solid var(--rule, #d8ccb6); padding-top: 4px;
  }
  .cs-clue { font-size: 15.5px; line-height: 1.25; text-align: left; }
  .cs-count { font-size: 11px; color: var(--graphite, #6b5a4a); letter-spacing: .08em; }
  .cs-nav { height: 34px; border-radius: 50%; border: 1px solid var(--rule, #d8ccb6); background: var(--paper); font-size: 20px; line-height: 1; color: var(--claret); }
  .cs-nav:disabled { opacity: .3; }
}

/* 28-11 (author): board NOT pinned; only the people tray + tools are pinned to the bottom, as before. Clue strip off. */
@media (max-width: 860px) {
  .play-dock { display: contents; position: static; box-shadow: none; }
  .clue-strip { display: none !important; }
  .plan-frame { order: 1; width: min(100%, 540px); }
  #h-evidence { order: 2; }
  .clues-list { order: 3; }
  .rules-note { order: 4; }
  .hint-box { order: 5; position: sticky; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 6; box-shadow: 0 -6px 12px -8px rgba(40,25,10,.3); }
  .tray, .tools { position: sticky; z-index: 6; background: var(--paper); width: 100%; box-sizing: border-box; }
  .tray { order: 6; bottom: calc(50px + env(safe-area-inset-bottom)); padding-top: 8px; box-shadow: 0 -10px 12px -10px rgba(40,25,10,.25); }
  .tools { order: 7; bottom: 0; padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); }
  .furn-key { order: 8; }
  .print-btn { order: 9; }
  #h-present { order: 10; }
  .people-list { order: 11; }
}
@media (max-width: 860px) {
  .tray { bottom: calc(var(--tools-h, 52px) + env(safe-area-inset-bottom) + 6px); }
  .hint-box { bottom: calc(var(--tools-h, 52px) + var(--tray-h, 60px) + env(safe-area-inset-bottom) + 12px); }
}
@media (max-width: 860px) {
  /* fill the 6px gap under the pinned tray with paper so scrolling text doesn't show through */
  .tray { box-shadow: 0 -10px 12px -10px rgba(40,25,10,.25), 0 8px 0 0 var(--paper); }
}

/* 28-11: desktop tool rows, the same at every width and in both languages:
   line 1 = Place/Cross out, Undo, Clear; line 2 = Hint + "Name the killer" filling the rest.
   (Before, "Name the killer" dropped alone to a second line at some widths and not at others.) */
@media (min-width: 861px) {
  .tools .spacer { display: none; }
  .tools::before { content: ""; order: 1; flex-basis: 100%; height: 0; }
  .tools #btn-hint { order: 2; }
  .tools .accuse-btn { order: 3; flex: 1 1 auto; padding: 9px 15px; }
  /* Tray: the full name may take two lines instead of being cut off ("Miss Fenni…").
     A surname too long for the card gets a smaller font (fitTrayNames in app.js), never a break. */
  .tray .who-meta .nm { white-space: normal; text-wrap: balance; text-overflow: clip; }
}
@media (min-width: 861px) and (max-width: 1279px) {
  .tray .who-meta .nm { font-size: 13px; }
}