/* Vampire Village - pixel gothic visual system.
   Rules of the house: the page is pure #000000, colour lives only in small accents,
   nothing glows, and art is scaled by whole numbers so pixels stay square. */

:root {
  --bg: #000000;
  --bone: #cfc6b0;
  --bone-dim: #a39a86;
  --ash: #7d7566;
  --line: #222027;
  --blood: #d42436;
  --blood-soft: #e8707a;
  --blood-dim: #6e0f1d;
  --blood-deep: #22050b;
  --ember: #d0822c;
  --gold: #d8b24a;
  --gold-dim: #6d5419;
  --wraith: #7b9aac;
  --teal: #6ec4a8;
  --violet: #9a8ac0;
  --moss: #9fb86a;
  --silver: #b9c4cc;
  --mauve: #c79bc0;
  --sprites: url("../assets/sprites");
  --font-title: "Jacquard 12", "Pixelify Sans", Georgia, serif;
  --font-ui: "Pixelify Sans", ui-monospace, Menlo, monospace;
  --font-body: "Jersey 15", "Pixelify Sans", ui-monospace, Menlo, monospace;
  /* Pixelify's 5 and 8 read as S, so anything with digits uses the body face */
  --font-num: "Jersey 15", ui-monospace, Menlo, monospace;
  --scene-scale: 2;
}

@media (min-width: 960px) { :root { --scene-scale: 3; } }
@media (min-width: 1500px) { :root { --scene-scale: 6; } }

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* The page itself never moves: only .vv-fill lists and the like scroll, inside the viewport. */
html, body {
  background-color: #000000 !important;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { position: fixed; inset: 0; width: 100%; }

input, textarea { user-select: text; -webkit-user-select: text; }

.vv-icon { display: inline-block; flex-shrink: 0; vertical-align: -0.15em; }

/* Layout -------------------------------------------------------------- */

/* --app-height is set by pwa.js while an on-screen keyboard covers part of the page */
.oled-container {
  background-color: #000000;
  height: 100vh;
  height: var(--app-height, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.oled-container > * { flex-shrink: 0; }

/* A screen takes what the header and scene leave. If a very short window can't fit even its
   fixed parts, it scrolls by itself rather than the page. */
.oled-container > .vv-screen {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.vv-screen > * { flex-shrink: 0; }
.vv-grow { flex: 1 1 auto; min-height: 0; }

/* The one list on a screen that may be longer than the phone */
.oled-container .vv-fill {
  flex: 1 1 0;
  min-height: 72px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Folded-out text never pushes a screen's list and buttons away */
.vv-capped {
  max-height: 26vh;
  max-height: 26dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 6px;
}

/* A playing host's script floats over the bottom of the screen, as their list is still needed */
#hostScriptDetails .vv-capped {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 55;
  max-height: 55vh;
  max-height: 55dvh;
  max-width: 27rem;
  margin: 0 auto;
  padding: 10px;
  background: #000;
  border: 2px solid var(--gold-dim);
}

/* The daytime sky tells everyone the hour, so it shows on every phone, standing on its own ground */
.oled-container > .vv-scene--strip:is([data-scene="square-day"], [data-scene="gallows"], [data-scene="gallows-dusk"]) {
  --sky-h: clamp(72px, 11dvh, 92px);
  display: block;
  height: var(--sky-h);
  background-position: center calc(var(--sky-h) - var(--sky-floor, 104) * 1px * var(--scene-scale));
  -webkit-mask-image: none;
  mask-image: none;
}
/* Its sunrise can't be squeezed away either */
.oled-container > .vv-scene--tall[data-scene="dawn"] { min-height: 72px; }
@media (max-height: 760px) { .oled-container > .vv-scene--tall[data-scene="dawn"] { min-height: 44px; } }

/* A small phone with Safari's toolbar showing: lists and buttons get every pixel */
@media (max-height: 620px) {
  .vv-roomy-only, .oled-container > .vv-scene--strip { display: none; }
  /* Only a slim band of the sky, sun and rooftops: enough to tell the hour */
  .oled-container > .vv-scene--strip:is([data-scene="square-day"], [data-scene="gallows"], [data-scene="gallows-dusk"]) { --sky-h: 52px; --sky-floor: 92; }
  .vv-capped { max-height: 18vh; max-height: 18dvh; }
  .oled-container .vv-fill { min-height: 44px; }
  .vv-screen .vv-center .spr-avatar { --s: 2 !important; }
  .oled-container > .vv-screen { padding: 6px 12px 8px; gap: 6px; }
}

/* Extras that only earn their room on a taller phone */
@media (max-height: 760px) {
  /* Beats any display a component sets, such as .vv-tag's, wherever it sits in this file */
  .vv-tall-only { display: none !important; }
  .spr-role { --s: 2 !important; }
  .spr-seal { --s: 3 !important; }
}

.vv-stack { display: flex; flex-direction: column; gap: 8px; }
.vv-row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vv-center { text-align: center; }
.vv-gap { display: flex; align-items: center; gap: 6px; }

/* Type ---------------------------------------------------------------- */

.vv-logo {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(40px, 13vw, 64px);
  line-height: .95;
  color: var(--bone);
  white-space: nowrap;
}
.vv-logo b { font-weight: 400; color: var(--blood); }

.vv-h1 { font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 7dvh, 44px); line-height: 1; color: var(--bone); }
.vv-h1--blood { color: var(--blood); }
.vv-h1--gold { color: var(--gold); }
.vv-h1--wraith { color: var(--wraith); }
.vv-h1--teal { color: var(--teal); }
.vv-h1--violet { color: var(--violet); }
.vv-h1--ember { color: var(--ember); }
.vv-h1--moss { color: var(--moss); }
.vv-h1--silver { color: var(--silver); }
.vv-h1--mauve { color: var(--mauve); }
.vv-h2 { font-family: var(--font-ui); font-weight: 600; font-size: 17px; letter-spacing: .03em; color: var(--bone); text-transform: uppercase; }
.vv-eyebrow { font-family: var(--font-ui); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); }
.vv-eyebrow--blood { color: var(--blood-soft); }
.vv-eyebrow--gold { color: var(--gold); }
.vv-eyebrow--wraith { color: var(--wraith); }
.vv-eyebrow--teal { color: var(--teal); }
.vv-eyebrow--violet { color: var(--violet); }
.vv-eyebrow--ember { color: var(--ember); }
.vv-eyebrow--moss { color: var(--moss); }
.vv-eyebrow--silver { color: var(--silver); }
.vv-eyebrow--mauve { color: var(--mauve); }
.vv-text { font-size: 18px; color: var(--bone-dim); line-height: 1.15; }
.vv-text strong, .vv-text b { color: var(--bone); font-weight: 400; }
.vv-small { font-size: 16px; color: var(--ash); line-height: 1.1; }
.vv-mono { font-family: var(--font-num); font-weight: 400; font-variant-numeric: tabular-nums; }
.vv-blood { color: var(--blood-soft); }
.vv-gold { color: var(--gold); }
.vv-teal { color: var(--teal); }
.vv-wraith { color: var(--wraith); }
.vv-violet { color: var(--violet); }
.vv-ember { color: var(--ember); }
.vv-moss { color: var(--moss); }
.vv-silver { color: var(--silver); }
.vv-mauve { color: var(--mauve); }
.vv-bone { color: var(--bone); }
.vv-ash { color: var(--ash); }

/* Sprites ------------------------------------------------------------- */

.spr {
  display: inline-block;
  flex-shrink: 0;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  --s: 2;
}

.spr-role {
  width: calc(64px * var(--s));
  height: calc(64px * var(--s));
  /* 24 frames of 64 x 64, hand-drawn, at 90 ms each (tools/sprites/portraits.py) */
  background-size: calc(1536px * var(--s)) calc(64px * var(--s));
  animation: spr-role 2.16s steps(24) infinite;
}
@keyframes spr-role { to { background-position-x: calc(-1536px * var(--s)); } }

.spr-avatar {
  width: calc(24px * var(--s));
  height: calc(24px * var(--s));
  /* One 64px frame per avatar, hand-drawn, in a strip (tools/sprites/avatars.py); --i picks the frame */
  background-image: url("../assets/sprites/avatars.png");
  background-size: auto 100%;
  background-position: calc(-24px * var(--s) * var(--i, 0)) 0;
}
.spr-avatar.is-ghost { background-image: url("../assets/sprites/avatars-ghost.png"); }
/* At 24px, half the picture's size, smoothing keeps the face; dropping every other pixel loses it */
.spr-avatar--small { image-rendering: auto; }

.spr-seal {
  width: calc(48px * var(--s));
  height: calc(48px * var(--s));
  background-image: url("../assets/sprites/seal.png");
  background-size: calc(288px * var(--s)) calc(48px * var(--s));
  animation: spr-seal 3s steps(6) infinite;
}
@keyframes spr-seal { to { background-position-x: calc(-288px * var(--s)); } }

.spr-candle {
  width: calc(12px * var(--s));
  height: calc(24px * var(--s));
  background-image: url("../assets/sprites/candle.png");
  background-size: calc(48px * var(--s)) calc(24px * var(--s));
  animation: spr-candle .64s steps(4) infinite;
}
@keyframes spr-candle { to { background-position-x: calc(-48px * var(--s)); } }

.spr-bat {
  width: calc(16px * var(--s));
  height: calc(12px * var(--s));
  background-image: url("../assets/sprites/bat.png");
  background-size: calc(64px * var(--s)) calc(12px * var(--s));
  animation: spr-bat .4s steps(4) infinite;
}
@keyframes spr-bat { to { background-position-x: calc(-64px * var(--s)); } }

.vv-bat-path {
  position: absolute;
  left: 0;
  z-index: 1;
  animation: bat-fly linear infinite;
  will-change: transform;
}
@keyframes bat-fly {
  0%   { transform: translate3d(-40px, 0, 0); }
  25%  { transform: translate3d(25vw, -10px, 0); }
  50%  { transform: translate3d(50vw, 6px, 0); }
  75%  { transform: translate3d(75vw, -8px, 0); }
  100% { transform: translate3d(calc(100vw + 40px), 0, 0); }
}

/* Scenes -------------------------------------------------------------- */

.vv-scene {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #000;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: calc(320px * var(--scene-scale)) calc(110px * var(--scene-scale));
  image-rendering: pixelated;
}
/* Gives up its height before anything else on the screen does. Flex shares a squeeze by shrink factor
   times size, so at only 1000 a tall screen still lost a fraction of a pixel, and showed as overflowing. */
.oled-container > .vv-scene--tall { flex: 0 1000000 calc(110px * var(--scene-scale)); min-height: 0; }
.oled-container > .vv-scene--titled { min-height: 60px; }
.vv-scene--strip {
  height: min(calc(46px * var(--scene-scale)), 8vh);
  height: min(calc(46px * var(--scene-scale)), 8dvh);
  background-position: center calc(var(--crop, 14) * var(--scene-scale) * -1px);
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}
.vv-scene--strip .vv-fog { display: none; }
.vv-scene[data-scene="home"]    { background-image: url("../assets/sprites/scene-home.png");    --crop: 14; }
.vv-scene[data-scene="night"]   { background-image: url("../assets/sprites/scene-night.png");   --crop: 14; }
.vv-scene[data-scene="dawn"]    { background-image: url("../assets/sprites/scene-dawn.png");    --crop: 48; }
.vv-scene[data-scene="square"]  { background-image: url("../assets/sprites/scene-square.png");  --crop: 46; }
.vv-scene[data-scene="square-day"] { background-image: url("../assets/sprites/scene-square-day.png"); --crop: 46; }
.vv-scene[data-scene="gallows"] { background-image: url("../assets/sprites/scene-gallows.png"); --crop: 12; }
.vv-scene[data-scene="gallows-dusk"] { background-image: url("../assets/sprites/scene-gallows-dusk.png"); --crop: 12; }
.vv-scene[data-scene="castle"]  { background-image: url("../assets/sprites/scene-castle.png");  --crop: 12; }
.vv-scene[data-scene="sunrise"] { background-image: url("../assets/sprites/scene-sunrise.png"); --crop: 44; }

.vv-fog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(8px * var(--scene-scale));
  background: url("../assets/sprites/fog.png") repeat-x 0 0 / calc(160px * var(--scene-scale)) 100%;
  image-rendering: pixelated;
  animation: fog-drift 40s linear infinite;
  opacity: .7;
}
.vv-scene[data-scene="dawn"] .vv-fog, .vv-scene[data-scene="sunrise"] .vv-fog, .vv-scene[data-scene="square-day"] .vv-fog, .vv-scene[data-scene="gallows"] .vv-fog, .vv-scene[data-scene="gallows-dusk"] .vv-fog { display: none; }
@keyframes fog-drift { to { background-position-x: calc(160px * var(--scene-scale)); } }

/* Online games aren't played in a dark room (section 1 of the roadmap), so their night scenes are the
   lit copies, with a glowing moon and lit windows, and the fog shows, even in a busy screen's strip. */
:root[data-play="online"] .vv-scene[data-scene="night"]  { background-image: url("../assets/sprites/scene-night-lit.png"); }
:root[data-play="online"] .vv-scene[data-scene="square"] { background-image: url("../assets/sprites/scene-square-lit.png"); }
:root[data-play="online"] .vv-scene[data-scene="castle"] { background-image: url("../assets/sprites/scene-castle-lit.png"); }
:root[data-play="online"] .vv-scene:is([data-scene="night"], [data-scene="square"], [data-scene="castle"]) .vv-fog { display: block; opacity: .8; filter: brightness(1.4); }
:root[data-play="online"] .vv-scene--strip .vv-fog { bottom: 30%; height: calc(5px * var(--scene-scale)); opacity: .55; }

.vv-scene-title {
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  text-align: center;
  z-index: 2;
  padding: 0 8px;
}

/* Frames: 8px of art doubled, so the slice stays on the pixel grid ------ */

.vv-panel {
  border-style: solid;
  border-width: 16px;
  border-image: url("../assets/sprites/frame-iron.png") 8 fill / 16px / 0 round;
  image-rendering: pixelated;
  background: transparent;
  color: var(--bone);
}
.vv-panel > *, .vv-scene > * { image-rendering: auto; }
.vv-panel--blood { border-image-source: url("../assets/sprites/frame-blood.png"); }
.vv-panel--gold { border-image-source: url("../assets/sprites/frame-gold.png"); }
.vv-panel--ghost { border-image-source: url("../assets/sprites/frame-ghost.png"); }
.vv-panel--flush { border-width: 10px; border-image-width: 10px; }
.vv-divider {
  height: 18px;
  width: 100%;
  background: url("../assets/sprites/divider.png") center / 240px 18px no-repeat;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* Buttons ------------------------------------------------------------- */

.vv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  width: 100%;
  padding: 0 6px;
  border-style: solid;
  border-width: 12px;
  border-image: url("../assets/sprites/btn-iron.png") 6 fill / 12px / 0 stretch;
  image-rendering: pixelated;
  background: transparent;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bone);
  cursor: pointer;
  text-align: center;
  line-height: 1.05;
}
.vv-btn:active:not(:disabled) { transform: translateY(2px); filter: brightness(.85); }
.vv-btn:disabled { opacity: .45; cursor: not-allowed; }
/* A request is on its way: dimmed, never brightened, and a second tap goes nowhere */
.is-busy { pointer-events: none; animation: vv-dim 1s steps(2) infinite; filter: brightness(.8); }
.vv-btn--blood { border-image-source: url("../assets/sprites/btn-blood.png"); color: #eab0b0; }
.vv-btn--gold { border-image-source: url("../assets/sprites/btn-gold.png"); color: var(--gold); }
.vv-btn--ghost { border-image-source: url("../assets/sprites/btn-ghost.png"); color: #a9c2d0; }
.vv-btn--sm { min-height: 36px; width: auto; font-size: 13px; padding: 0 2px; border-width: 8px; border-image-width: 8px; gap: 4px; }
.vv-btn--on { color: var(--bone); filter: brightness(1.2); }

/* Square icon button used across the header */
.vv-iconbtn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-style: solid;
  border-width: 8px;
  border-image: url("../assets/sprites/btn-iron.png") 6 fill / 8px / 0 stretch;
  image-rendering: pixelated;
  background: transparent;
  color: var(--bone-dim);
  cursor: pointer;
  padding: 0;
}
.vv-iconbtn:active { transform: translateY(1px); }
.vv-iconbtn--blood { border-image-source: url("../assets/sprites/btn-blood.png"); color: #eab0b0; }
.vv-iconbtn--gold { border-image-source: url("../assets/sprites/btn-gold.png"); color: var(--gold); }

/* Forms --------------------------------------------------------------- */

.vv-label { display: block; font-family: var(--font-ui); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: 4px; }
.vv-input {
  width: 100%;
  height: 46px;
  padding: 0 10px;
  background: #000;
  border: 2px solid #34313a;
  border-radius: 0;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 20px;
  outline: none;
}
.vv-input:focus { border-color: var(--blood-dim); }
.vv-input::placeholder { color: #55504a; }
.vv-input--code { font-family: var(--font-num); font-size: 30px; letter-spacing: .3em; text-align: center; text-transform: uppercase; color: var(--blood-soft); }
.vv-select { background: #000; border: 2px solid #34313a; color: var(--bone); font-family: var(--font-body); font-size: 17px; height: 36px; padding: 0 4px; border-radius: 0; max-width: 170px; }
.vv-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vv-auth-row > .vv-btn { width: 100%; }
.vv-name-claim-row { display: flex; gap: 6px; align-items: stretch; }
.vv-name-claim-row > .vv-input { flex: 1 1 auto; min-width: 0; }
.vv-name-claim-row > .vv-btn { flex-shrink: 0; min-height: 46px; padding: 0 8px; }
/* A host with the settings folded out is looking at those, so the roster gives up more of its room */
.vv-screen:has(#lobbySettingsDetails[open]) .vv-fill { min-height: 44px; }
/* The open Gates' panel: the list takes what the panel has, and scrolls inside it */
.vv-modal-card.vv-gates { gap: 8px; height: min(100%, 36rem); }
.vv-gates > .vv-fill { flex: 1 1 0; min-height: 104px; }
.vv-gates > .vv-fill > p { padding-top: 6px; }
/* The code and its button share a row, which leaves the first screen room for the Gates */
.vv-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.vv-code-row > .vv-btn { width: auto; padding: 0 14px; }
.vv-gate-words { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.vv-gate-words > span, .vv-gate-words > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-row { width: 100%; text-align: left; cursor: pointer; }
/* Quick play's three queues sit side by side above the open Gates */
.vv-quick-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vv-quick-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 8px; background: #000; border: 2px solid #34313a; color: var(--bone); text-align: left; font-family: var(--font-body); cursor: pointer; }
.vv-quick-pick strong { font-family: var(--font-ui); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.vv-quick-pick .vv-small { line-height: 1.15; font-size: 13px; }
.vv-quick-pick:active { border-color: var(--gold-dim); transform: translateY(1px); }
.vv-linkbtn.vv-talebtn { color: var(--gold); font-size: inherit; }
.vv-customroles { gap: 4px; padding-left: 8px; border-left: 2px solid #34313a; }
.vv-stepbtn { min-width: 40px; font-family: var(--font-ui); font-size: 16px; }
.vv-stepcount { min-width: 2ch; text-align: center; font-size: 20px; color: var(--bone); }
.vv-identity-pending { min-height: 74px; display: flex; align-items: center; justify-content: center; opacity: .6; }
.vv-linkbtn { background: none; border: 0; padding: 0; font-family: var(--font-ui); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); cursor: pointer; text-decoration: underline; }
.vv-linkbtn:active { color: var(--bone); }
.vv-mod-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: 1px solid #2a2730;
  color: var(--ash);
  cursor: pointer;
}
.vv-mod-btn:active { color: var(--blood-soft); border-color: var(--blood-dim); }

/* Header -------------------------------------------------------------- */

.vv-header {
  z-index: 40;
  width: 100%;
  background: #000;
  border-bottom: 2px solid #17151b;
  padding: 6px 12px;
}
.vv-header-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; max-width: 1760px; margin: 0 auto; }
.vv-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.vv-header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vv-logo-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--blood); }
.vv-wordmark { display: none; font-family: var(--font-title); font-size: 26px; color: var(--bone); white-space: nowrap; }
.vv-wordmark b { font-weight: 400; color: var(--blood); }
@media (min-width: 640px) { .vv-wordmark { display: inline; } }

.vv-room-chip { display: flex; flex-direction: column; line-height: 1; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.vv-room-chip small { font-family: var(--font-ui); font-size: 9px; letter-spacing: .14em; color: var(--ash); }
.vv-room-chip span { font-family: var(--font-num); font-size: 21px; letter-spacing: .1em; color: var(--blood-soft); }

#connectionStatusIndicator { display: inline-flex; align-items: center; justify-content: center; width: 10px; height: 10px; flex-shrink: 0; }
#connectionStatusIndicator span { border-radius: 0 !important; box-shadow: none !important; width: 6px !important; height: 6px !important; }

.vv-who { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 0 0; max-width: 1760px; margin: 0 auto; }
.vv-who-name { font-family: var(--font-body); font-size: 18px; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vv-notesbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  min-height: 24px;
  padding: 0 6px;
  background: none;
  border: 1px solid #2a2730;
  color: var(--bone-dim);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
}

.vv-notesbtn + .vv-notesbtn { margin-left: 0; }

/* Private notes float over the bottom of the screen, above the keyboard, and leave the top of the
   ledger in view. They live outside #app, so nothing here belongs to any one screen. */
.vv-notes {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--app-height, 100dvh);
  z-index: 58;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.vv-notes.hidden { display: none; }
.vv-notes-card {
  width: 100%;
  max-width: 27rem;
  height: min(56%, 340px);
  min-height: 150px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: #000;
  border: 2px solid #2a2730;
  pointer-events: auto;
}
.vv-notes-text {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  resize: none;
  padding: 6px;
  background: #000;
  border: 1px solid #1a181e;
  outline: none;
  color: var(--bone-dim);
  caret-color: var(--bone-dim);
  /* Asks for the dark keyboard too. 16px stops iOS zooming in on focus. */
  color-scheme: dark;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.25;
}
.vv-notes-text::placeholder { color: #4f4a40; }

/* The record covers most of the screen, and only its list scrolls */
.vv-notes-card.vv-record-card { height: min(92%, 620px); }
.vv-record-tabs { flex: 1 1 auto; min-width: 0; }
.vv-record-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; }
.vv-record-day { display: flex; flex-direction: column; gap: 3px; padding-bottom: 8px; border-bottom: 1px solid #1a181e; }
.vv-record-day:last-child { border-bottom: 0; }
.vv-record-journal { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.vv-record-journal .vv-btn:disabled { opacity: .35; }

/* The Unmasking: the whole story after the game, on its own panel and on the TV */
.vv-unmask-line { display: flex; align-items: flex-start; gap: 6px; font-size: 16px; line-height: 1.25; color: var(--bone-dim); }
.vv-unmask-line > span:first-child { flex-shrink: 0; padding-top: 2px; }
.vv-unmask-who { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.vv-unmask-who strong { color: var(--bone); font-weight: 400; }
.vv-unmask-pager { margin-top: auto; flex-shrink: 0; gap: 6px; }
.vv-unmask-pager .vv-btn:disabled { opacity: .35; }
.vv-unmask-pager .vv-small { text-align: center; }
.vv-tv-unmasking .vv-unmask-line, .vv-tv-unmasking .vv-text { font-size: 22px; }

/* A Ghost's wager on the day's verdict */
button.vv-seat { font: inherit; color: inherit; background: none; text-align: left; cursor: pointer; }
.vv-seat.is-wagered { border-color: var(--gold); outline: 1px solid var(--gold-dim); outline-offset: -2px; }
.vv-seat.is-accused { border-color: var(--blood); outline: 1px solid var(--blood-dim); outline-offset: -2px; }
.vv-num { font-family: var(--font-num); flex-shrink: 0; }

/* Timer --------------------------------------------------------------- */

.vv-timer { width: 100%; }
.vv-timer-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.vv-timer-label { font-family: var(--font-ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); display: flex; align-items: center; gap: 4px; min-width: 0; }
.vv-timer-num { font-family: var(--font-num); font-weight: 400; font-size: 28px; line-height: 1; color: var(--blood-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vv-timer-num.is-paused { color: var(--gold); }
.vv-timer-num.is-urgent { color: var(--blood); animation: vv-dim 1s steps(2) infinite; }
.vv-timer-track { width: 100%; height: 10px; background: #0d0c10; border: 2px solid #222027; padding: 0; }
.vv-timer-fill { height: 100%; background: var(--blood-dim); transition: width 1s linear; background-image: repeating-linear-gradient(90deg, transparent 0 6px, #000 6px 8px); }
.vv-timer-fill.is-paused { background-color: var(--gold-dim); }
.vv-timer-fill.is-urgent { background-color: var(--blood); }
@keyframes vv-dim { 50% { opacity: .55; } }
.pulse-subdued { animation: vv-dim 2.4s steps(4) infinite; }

/* Player rows --------------------------------------------------------- */

.vv-list { display: flex; flex-direction: column; gap: 4px; }
/* Rows keep one height however long the list is, for every role alike */
.vv-list > * { flex-shrink: 0; }

/* Two compact columns for a big table. Still a thumb's width and height per name. */
.vv-list--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; align-content: start; }
.vv-list--grid > .vv-playerrow { min-height: 44px; gap: 4px; padding: 1px 4px 1px 2px; }
.vv-list--grid .vv-name { font-size: 18px; }
.vv-list--grid > .vv-spare-row { grid-column: 1 / -1; }
.vv-list--grid .vv-count { font-size: 20px; min-width: 18px; }
.vv-list--grid .vv-tag { font-size: 13px; padding: 1px 3px; }
/* One column, for rows that also carry a word like a role */
.vv-list--slim > .vv-playerrow { min-height: 34px; }

.vv-playerrow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 2px 8px 2px 2px;
  background: #000;
  border: 2px solid #1a181e;
  color: var(--bone);
  text-align: left;
  font-family: var(--font-body);
  position: relative;
}
button.vv-playerrow { cursor: pointer; }
button.vv-playerrow:active:not(:disabled) { transform: translateY(1px); border-color: #4c4852; }
.vv-playerrow:disabled { cursor: default; }
.vv-playerrow.is-dim { opacity: .5; }
/* A fleeting omen. syncOmens sets the opacity from the clock, so a re-render can't restart a fade */
.vv-rune { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--gold); background: #000; pointer-events: none; opacity: 0; line-height: 0; }
.vv-omen-edge {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  gap: 2px;
  padding: 2px 8px;
  background: #000;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}
.vv-omen-edge.is-above .vv-icon:last-child { transform: rotate(180deg); }
.vv-playerrow.is-me { border-color: #34313a; }
/* The night mark means only "you tapped this last": strong enough to find, but it can't look like a kill */
.vv-playerrow.is-marked { border-color: var(--bone); background: #26231e; outline: 1px solid var(--bone); outline-offset: -2px; }
/* A day ballot really is an accusation, and every role casts one */
.day-vote-btn.is-marked { border-color: var(--blood-dim); background: var(--blood-deep); outline: none; }
.vv-playerrow.is-skip.is-marked { border-color: #517084; background: #0b1319; }
.vv-playerrow.is-lead { border-color: #430a14; }
.vv-name { font-size: 20px; line-height: 1; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone); }
.vv-name small { font-size: 15px; color: var(--ash); }

.vv-tag {
  font-family: var(--font-num);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .03em;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 5px;
  border: 1px solid #34313a;
  color: var(--bone-dim);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.vv-tag--pick { color: #000; background: var(--bone); border-color: var(--bone); }
/* Names can run long, so the coven's picks give way before the player's own name does */
.vv-tag--coven { display: block; flex-shrink: 1; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.vv-playerrow:has(.vv-tag--coven) .vv-pick-word { display: none; }
/* A bare count has nothing to give up, so here the name makes the room */
.vv-list--grid .vv-tag--coven { flex-shrink: 0; max-width: none; overflow: visible; }
.vv-tag--blood { color: var(--blood-soft); border-color: var(--blood-dim); }
.vv-tag--gold { color: var(--gold); border-color: var(--gold-dim); }
.vv-tag--wraith { color: var(--wraith); border-color: #2f4659; }
.vv-tag--teal { color: var(--teal); border-color: #22604f; }
.vv-tag--violet { color: var(--violet); border-color: #382f4e; }
.vv-tag--ember { color: var(--ember); border-color: #5a3612; }
.vv-tag--moss { color: var(--moss); border-color: #3a4a22; }
.vv-tag--silver { color: var(--silver); border-color: #3d454b; }
.vv-tag--mauve { color: var(--mauve); border-color: #4a3347; }
.vv-tag--plain { border-color: transparent; color: var(--ash); padding: 2px 0; }

/* Compact seats, two to a line */
.vv-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; align-content: start; }
.vv-seat { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 30px; padding: 1px 4px 1px 1px; border: 1px solid #1a181e; }
.vv-seat.is-me { border-color: #4c4852; }
.vv-seat.is-gone > :not(.vv-tag) { opacity: .6; }
.vv-seat-name { font-size: 17px; line-height: 1; color: var(--bone); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ballot count on a voting row */
.vv-voters { display: block; font-size: 14px; color: var(--ash); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.vv-count { font-family: var(--font-num); font-weight: 400; font-size: 26px; color: var(--blood-soft); min-width: 26px; text-align: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.vv-count.is-zero { color: #34313a; }
.vv-count.is-majority { color: var(--blood); }
.vv-playerrow.is-skip .vv-count:not(.is-zero) { color: var(--wraith); }

.vv-deck { display: flex; flex-direction: column; gap: 3px; }
.vv-deck > .vv-btn { min-height: 40px; border-width: 10px; border-image-width: 10px; }
.vv-deck-row { display: flex; gap: 3px; }
.vv-deck-row > .vv-btn { padding: 0; letter-spacing: 0; font-size: 12px; gap: 2px; }
.mod-adjust-btn { font-family: var(--font-num); font-weight: 400; font-size: 18px; letter-spacing: 0; text-transform: none; }
.vv-deck-row > .vv-btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.vv-deck-row > .vv-deck-wide { flex-grow: 2.2; }

.vv-moment img { display: block; width: 100%; max-width: 320px; height: auto; margin: 6px auto 0; border: 1px solid var(--line); background: #000; }
.vv-rule + .vv-rule { border-top: 2px solid #17151b; padding-top: 8px; }

/* A morning with more than one thing to tell: a row each, in whatever room the screen has left */
.vv-screen > .vv-events { display: flex; flex-direction: column; gap: 4px; flex: 0 1 auto; min-height: 44px; overflow-y: auto; overscroll-behavior: contain; }
.vv-event { display: flex; align-items: center; gap: 8px; padding: 2px 4px 2px 2px; border: 2px solid #1a181e; flex-shrink: 0; }
.vv-event-words { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
.vv-event .vv-eyebrow { font-size: 12px; letter-spacing: .06em; line-height: 1.1; }
.vv-event .vv-small strong { color: var(--bone-dim); font-weight: 400; }
.vv-event .vv-name { flex: none; }
@media (max-height: 620px) { .vv-event .spr-avatar { --s: 1 !important; image-rendering: auto; } }
.vv-event .spr-role { --s: 1 !important; flex-shrink: 0; }
@media (max-height: 620px) { .vv-event .spr-role { --s: .75 !important; } }

/* Verdicts rise out of the dark, with no flash */
.vv-rise { animation: vv-rise 1.2s steps(10) both; }
@keyframes vv-rise { from { opacity: 0; transform: translateY(10px); } }

/* Seal & peek --------------------------------------------------------- */

.vv-seal-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  cursor: pointer;
  touch-action: none;
}
.vv-seal-cover:active .spr-seal { transform: scale(.97); }

.vv-peekbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  background: none;
  border: 2px dashed #2a2730;
  color: var(--bone-dim);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: none;
}
.vv-peekbtn:active { border-color: var(--blood-dim); color: var(--bone); }
/* A true vision is waiting under this button */
.vv-peekbtn.is-lit, .vv-peekbtn.is-lit:active { background: #a5822c; border: 2px solid var(--gold); color: #000; }
#omenCall { margin-bottom: 4px; }

/* Every secret on a player's phone is this one box. Nearby eyes must get nothing from it, so it has
   one size, one colour and one kind of type for every role: small and dim on pure black, every line
   full to both edges, and a set number of lines. Nothing in it may set its own colour or weight. */
.vv-private {
  --rows: 7;
  width: 288px;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 8px;
  background: #000;
  border: 1px solid #17151b;
  color: var(--ash);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 18px;
}
.vv-private--tall { --rows: 10; }
.vv-private--journal { --rows: 13; }
/* Not left to Tailwind's CDN: this rule is what keeps a role off the screen */
.vv-private.hidden { display: none; }
.vv-private * { color: inherit; font-weight: 400; font-size: inherit; }
.vv-private-head { display: flex; align-items: baseline; gap: 6px; height: 18px; margin-bottom: 2px; overflow: hidden; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.vv-private-head i { flex: 1 1 0; min-width: 0; border-bottom: 2px dotted #4a4539; }
.vv-private-body { height: calc(18px * var(--rows)); overflow: hidden; text-align: justify; overflow-wrap: anywhere; }

/* Room kept in the layout whether or not it's showing. A host's controls can squeeze it on a small
   phone, and then the block draws over the seal's upper part, clear of the thumb. */
.vv-screen > .vv-private-slot { position: relative; flex: 0 1000 160px; min-height: 0; }
.vv-private-slot > .vv-private { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; }
@media (max-height: 620px) { .spr-seal { --s: 2 !important; } }
/* A host's controls leave a small phone no room for a full portrait above the verdict */
@media (max-height: 760px) { .vv-screen:has(.vv-deck) .spr-role { --s: 1 !important; } }
/* Nor for a dead host's reminder that Ghosts keep quiet: they were told as they died, and the wager says the rest */
@media (max-height: 760px) { .vv-screen:has(.vv-deck) [data-ghost-line] { display: none; } }
/* On the smallest, a Ghost has no vote to weigh tactics for */
@media (max-height: 620px) { .vv-screen:has(.vv-deck):has([data-ghost-line]) #skipTacticsDetails { display: none; } }
/* Centred while it fits. "safe" keeps a tall verdict from spilling up over the controls above it. */
.vv-verdict { display: flex; flex-direction: column; justify-content: safe center; overflow-y: auto; overscroll-behavior: contain; }

/* Held secrets float in place, so nothing on the page jumps and they can't land off-screen */
.vv-held { position: fixed; left: 50%; top: 28%; transform: translateX(-50%); z-index: 60; margin: 0; pointer-events: none; }

/* iOS has no install prompt, so the menu says how. Dim, like everything else in a dark room. */
.vv-hint { display: flex; align-items: center; gap: 6px; padding-left: 6px; border: 1px solid #1a181e; color: var(--ash); font-size: 15px; line-height: 1; }
.vv-hint > span { flex: 1 1 auto; min-width: 0; }
.vv-hint-close { flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0; color: var(--ash); cursor: pointer; }

/* Modals -------------------------------------------------------------- */

.vv-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); }
.vv-modal.hidden { display: none; }
.vv-modal--dialog { z-index: 60; }
.vv-dialog-lines { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; text-align: left; }
.vv-dialog-lines li { padding-left: 12px; border-left: 2px solid var(--blood-dim); }
.vv-modal-card { width: 100%; max-width: 32rem; max-height: 100%; display: flex; flex-direction: column; }
.vv-bots-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.vv-bots-row .vv-btn { padding: 0 2px; }
.vv-tabs { display: flex; gap: 2px; border-bottom: 2px solid #1a181e; }
.vv-tabs button { flex: 1; min-height: 40px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: var(--font-ui); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ash); display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
/* main.js toggles these utility classes on the active tab */
.vv-tabs button.text-white, .vv-tabs button.is-active { color: var(--bone); background: #000 !important; border-bottom-color: var(--blood); }
.vv-tabs button.bg-\[\#2b0505\] { background: #000 !important; }

/* Tally --------------------------------------------------------------- */

.vv-tally-row { padding: 6px 8px; border: 2px solid #1a181e; }
.vv-tally-row.is-lead { border-color: var(--blood-dim); }
.vv-tally-row.is-skip { border-color: #2f4659; }
.vv-tally-track { height: 8px; background: #0d0c10; margin: 4px 0; }
.vv-tally-fill { height: 100%; background: var(--blood-dim); transition: width .3s steps(6); background-image: repeating-linear-gradient(90deg, transparent 0 6px, #000 6px 8px); }
.vv-tally-fill.is-lead { background-color: var(--blood); }
.vv-tally-fill.is-skip { background-color: #517084; }

.vv-stat { border: 2px solid #1a181e; padding: 6px; text-align: center; }
.vv-stat b { display: block; font-family: var(--font-num); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--bone); }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .vv-chevron { transform: rotate(180deg); }

/* QR must stay on its own light plate or phones can't read it */
.vv-qr { display: flex; justify-content: center; }
.vv-qr svg { max-width: 100%; height: auto; display: block; }

/* TV ------------------------------------------------------------------ */

.oled-container > .vv-tv { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1760px; margin: 0 auto; padding: 8px 32px 16px; display: flex; flex-direction: column; gap: 12px; --tv-art: 2; overflow: hidden; }
.vv-tv-hero { flex: none; }
.vv-tv-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.vv-tv-col > * { flex-shrink: 0; }
.vv-tv-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 24px; }
.vv-tv-hero .vv-scene { --scene-scale: var(--tv-art); width: calc(320px * var(--tv-art)); max-width: 100%; height: calc(110px * var(--tv-art)); }
.vv-tv-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-self: center; }
.vv-tv-join { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vv-tv-code { font-size: clamp(30px, 3vw, 52px); letter-spacing: .1em; line-height: 1; }
.vv-tv-clock { font-family: var(--font-num); font-weight: 400; font-size: clamp(72px, 10vw, 200px); line-height: 1; min-height: 1em; color: var(--blood-soft); font-variant-numeric: tabular-nums; }
.vv-tv-clock.is-paused { color: var(--gold); }
.vv-tv-clock.is-urgent { color: var(--blood); animation: vv-dim 1s steps(2) infinite; }
.vv-tv-title { text-wrap: balance; font-family: var(--font-title); font-weight: 400; font-size: clamp(52px, 6.4vw, 124px); line-height: 1; color: var(--bone); }
.vv-tv-sub { font-family: var(--font-ui); font-weight: 500; font-size: clamp(15px, 1.4vw, 26px); letter-spacing: .06em; text-transform: uppercase; }
.vv-tv-columns { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: minmax(0, 1fr); gap: 28px; }
.vv-tv-columns--one { grid-template-columns: minmax(0, 1fr); }
.vv-tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; align-content: start; }
.vv-tv-seat { display: flex; align-items: center; gap: 8px; border: 2px solid #1a181e; padding: 1px 8px 1px 1px; min-width: 0; }
.vv-tv-seat.is-gone > :not(.vv-tag, .vv-tv-awards) { opacity: .7; }
.vv-tv-seat .vv-name { font-size: 22px; }
/* At the end a seat also names its role, on a line of its own under the name. Any titles go at the
   end of the name's line, which gives way to them, so every seat stays the same height. */
.vv-tv-seat.is-over { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.vv-tv-seat.is-over > :first-child { grid-row: 1 / span 2; }
.vv-tv-seat.is-over > .vv-name { grid-column: 2; grid-row: 1; }
.vv-tv-seat.is-over > .vv-tag { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
.vv-tv-awards { grid-column: 3; grid-row: 1; display: flex; gap: 2px; }
.vv-tv-awards .vv-tag { padding-left: 2px; padding-right: 2px; }
.vv-tv .vv-tally-row .vv-name { font-size: 24px; }
/* A full village has to fit: a TV has nobody to scroll it */
.vv-tv.is-crowded .vv-tv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px; }
.vv-tv.is-crowded .spr-avatar { --s: 1 !important; image-rendering: auto; }
.vv-tv.is-crowded .vv-tv-seat { padding-right: 4px; }
.vv-tv.is-crowded .vv-tv-seat .vv-name { font-size: 20px; }
.vv-tv.is-crowded .vv-tally-row > .vv-small { display: none; }
.vv-tv.is-crowded .vv-tally-row { padding: 2px 8px; }
/* The seats get the room when the room is full, or the screen is small */
@media (max-height: 800px) and (min-width: 721px) {
  .vv-tv-hero { grid-template-columns: minmax(0, 1fr) auto; }
  .vv-tv-hero .vv-scene { display: none; }
  .vv-tv-hero-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
  .vv-tv-sub { grid-column: 1 / -1; }
  .vv-tv-title { font-size: 56px; text-wrap: nowrap; }
  .vv-tv-clock { font-size: 72px; }
  .vv-tv-join { flex-direction: row; gap: 12px; }
  .vv-tv-join .vv-qr svg { width: 88px; height: 88px; }
}
@media (min-width: 1500px) {
  .vv-header { padding-left: 32px; padding-right: 32px; }
  .vv-tv { --tv-art: 3; }
  /* Couch distance: bigger seats, in the room the phone layout doesn't have */
  .vv-tv .spr-avatar { --s: 3 !important; }
  .vv-tv-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; }
  .vv-tv-seat .vv-name { font-size: 32px; }
  .vv-tv .vv-tally-row .vv-name { font-size: 32px; }
  .vv-tv .vv-tally-row .vv-mono { font-size: 28px; }
  .vv-tv .vv-tally-row .vv-small { font-size: 22px; }
  .vv-tv .vv-tally-track { height: 12px; }
  .vv-tv .vv-h2 { font-size: 22px; }
  .vv-tv-code { font-size: 60px; }
  .vv-tv-title { font-size: 5vw; }
  .vv-tv-clock { font-size: 7.5vw; }
  /* Second column stays tight so a full table fits without scrolling */
  .vv-tv-grid--tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .vv-tv-grid--tight .spr-avatar { --s: 2 !important; }
  .vv-tv-grid--tight .vv-tv-seat .vv-name { font-size: 24px; }
  .vv-tv.is-crowded .vv-tv-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; }
  .vv-tv.is-crowded .spr-avatar { --s: 2 !important; }
  .vv-tv.is-crowded .vv-tv-seat .vv-name { font-size: 24px; }
}
@media (max-width: 1100px) { .vv-tv-hero { grid-template-columns: minmax(0, 1fr) auto; } .vv-tv-hero .vv-scene { display: none; } }
@media (max-width: 720px) {
  .oled-container > .vv-tv { padding: 6px 12px 8px; gap: 6px; }
  .vv-tv-hero { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .vv-tv-title { font-size: 34px; }
  .vv-tv-clock { font-size: 40px; }
  .vv-tv-join .vv-qr { display: none; }
  .vv-tv-columns { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 2fr) minmax(0, 1fr); gap: 6px; }
  .vv-tv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vv-tv .spr-avatar { --s: 1 !important; image-rendering: auto; }
  .vv-tv-seat .vv-name { font-size: 18px; }
  .vv-tv-join { flex-direction: row; justify-content: center; gap: 12px; }
}

/* Test lab bar -------------------------------------------------------- */

.vv-labbar { z-index: 45; display: flex; align-items: center; gap: 4px; background: #0b0903; border-bottom: 2px solid var(--gold-dim); padding: 4px 8px; }
.vv-labbar-scroll { display: flex; gap: 3px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.vv-labbar-scroll::-webkit-scrollbar { display: none; }
.vv-labbtn { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; min-height: 30px; padding: 0 6px; background: #000; border: 1px solid var(--gold-dim); color: var(--gold); font-family: var(--font-ui); font-size: 11px; cursor: pointer; white-space: nowrap; }
.vv-labbtn.is-current { background: var(--gold-dim); color: #000; border-color: var(--gold); }

/* Scrollbars ---------------------------------------------------------- */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #222027; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---- Online: nobody can see your phone, so secrets are simply on it ---- */
.vv-mode-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  background: #000;
  border: 2px solid #34313a;
  color: var(--bone);
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
}
.vv-mode-pick strong { font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.vv-mode-pick:active:not(:disabled) { border-color: var(--gold-dim); transform: translateY(1px); }
.vv-mode-pick .vv-small { line-height: 1.15; }

/* What a role does tonight, or what it learnt, said plainly */
.vv-orders {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: #000;
  border: 1px solid #2a2730;
  color: var(--bone-dim);
  font-size: 17px;
  line-height: 1.2;
}
.vv-orders strong { color: var(--bone); font-weight: 400; }
.vv-orders.is-lit { border-color: var(--gold); }

.vv-open-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #2a2730;
  color: var(--bone-dim);
  font-size: 17px;
  line-height: 1.2;
}
.vv-open-card-head { font-family: var(--font-title); font-weight: 400; font-size: 34px; line-height: 1; color: var(--bone); }
.vv-open-card strong { color: var(--gold); font-weight: 400; }
.vv-open-card [data-coven] { color: var(--blood-soft); }

/* The role reveal: the portrait large, the card beside it, or under it on a phone */
.vv-reveal-open { display: flex; flex-wrap: wrap; align-items: center; align-content: safe center; justify-content: center; gap: 12px; }
.vv-reveal-portrait { display: flex; justify-content: center; }
.vv-reveal-open > .vv-open-card { flex: 1 1 260px; max-width: 420px; }

/* Online big moments. Each plays once, on the way into its screen, and none makes a phase longer or a
   screen taller. Their sounds are timed to them in main.js (REVEAL_FLIP_MS, WOUND_MS, GAVEL_STRIKE_MS). */

/* The role card turns over, from the seal on its back to the portrait */
.vv-card { position: relative; display: inline-flex; transform-style: preserve-3d; }
.vv-card > .spr-role { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.vv-card-back {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0d0a12; border: 2px solid var(--gold-dim);
  transform: rotateY(180deg);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.vv-card.is-flipping { animation: vv-card-flip .9s cubic-bezier(.3, .1, .25, 1) both; }
@keyframes vv-card-flip {
  0%, 30% { transform: perspective(800px) rotateY(180deg); }
  to { transform: perspective(800px) rotateY(0deg); }
}

/* Cast the Bones: the card's frame rolls through the roles, slower and slower, and lands on yours
   (public/src/bone-roll.js). Each face drops in from above, and the last lands with a gold flash. */
.vv-boneroll {
  position: relative; display: inline-flex; line-height: 0; overflow: hidden;
  background: #0d0a12; border: 2px solid var(--gold-dim);
}
.vv-boneroll-face { display: inline-flex; }
.vv-boneroll-face.is-tumbling { animation: vv-bone-tumble 70ms steps(3) both; filter: brightness(.8); }
@keyframes vv-bone-tumble {
  from { transform: translateY(-34%); opacity: .4; }
  to { transform: translateY(0); opacity: 1; }
}
.vv-boneroll-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 4px; line-height: 1.1;
  font-family: var(--font-title); font-size: 18px; text-align: center;
  background: linear-gradient(transparent, rgba(5, 3, 8, .92) 45%);
}
.vv-boneroll-label:empty { display: none; }
.vv-boneroll.is-landing { animation: vv-bone-land .55s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes vv-bone-land {
  0% { transform: translateY(-10%); border-color: var(--gold); box-shadow: 0 0 0 0 rgba(216, 178, 74, .7); }
  45% { transform: translateY(2%); box-shadow: 0 0 22px 6px rgba(216, 178, 74, .55); }
  to { transform: translateY(0); border-color: var(--gold-dim); box-shadow: 0 0 0 0 rgba(216, 178, 74, 0); }
}
/* The card waits for the roll, keeping its room so nothing jumps when it lands */
.vv-reveal-open.is-rolling > .vv-open-card { visibility: hidden; }
.vv-reveal-open:has(.vv-boneroll.is-landing) > .vv-open-card { animation: vv-bone-card .45s ease-out .15s both; }
@keyframes vv-bone-card { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* The killer's marks over the morning's portrait */
.vv-wound { position: relative; display: inline-flex; line-height: 0; }
.vv-wound-mark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vv-fang { fill: #6e0f1d; }
.vv-drip { fill: none; stroke: #a01527; stroke-width: 1; }
.vv-slash { fill: none; stroke: #c0283a; stroke-width: 1.5; }
.vv-rise .vv-fang { transform-box: fill-box; transform-origin: center; animation: vv-fang .2s .25s steps(2) both; }
@keyframes vv-fang { from { transform: scale(0); } }
.vv-rise .vv-drip { stroke-dasharray: 1; animation: vv-draw 1.6s .45s steps(8) both; }
.vv-rise .vv-slash { stroke-dasharray: 1; animation: vv-draw .14s calc(.25s + var(--i) * 90ms) linear both; }
@keyframes vv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* The gavel comes down on the exiled player's portrait, which jolts */
.vv-gavelled { position: relative; display: inline-flex; }
.vv-gavel { position: absolute; right: -22px; top: -6px; line-height: 0; transform-origin: 92% 60%; }
.vv-rise .vv-gavel { animation: vv-gavel 1s ease-in both; }
@keyframes vv-gavel {
  0% { opacity: 0; transform: rotate(30deg); }
  40% { opacity: 1; transform: rotate(45deg); }
  60% { transform: rotate(-10deg); }
  72% { transform: rotate(3deg); }
  to { transform: rotate(0deg); }
}
.vv-rise .vv-gavelled { animation: vv-jolt .24s .6s steps(3) both; }
@keyframes vv-jolt { 33% { transform: translateY(3px); } 66% { transform: translateY(-1px); } }

/* The host's settings and an online player's role card fold out over the roster. On a short phone
   they scroll sooner, so the buttons below stay on screen. */
@media (max-height: 680px) { #lobbySettingsDetails .vv-capped, #myRoleDetails .vv-capped { max-height: 18vh; max-height: 18dvh; } }

/* A row this role can't pick tonight */
.vv-playerrow.is-idle { opacity: .45; }

/* ---- The chats. On a phone they rise over the bottom of the screen, above the keyboard. On a
   wide screen they stand in a column of their own beside the game, as on a computer. ---- */
:root { --chat-dock-w: 380px; }
.vv-chat {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--app-height, 100dvh);
  z-index: 57;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.vv-chat.hidden { display: none; }
.vv-chat-card {
  width: 100%;
  max-width: 27rem;
  height: min(62%, 460px);
  min-height: 200px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px 8px;
  background: #000;
  border: 2px solid #2a2730;
  pointer-events: auto;
}
.vv-chat[data-channel="whisper"] .vv-chat-card { border-color: var(--blood-dim); }
.vv-chat[data-channel="graveyard"] .vv-chat-card { border-color: #2c3d48; }
.vv-chat[data-channel="seance"] .vv-chat-card { border-color: #4a3347; }
.vv-chat-head { display: flex; align-items: flex-end; gap: 6px; }
.vv-chat-tabs { flex: 1 1 auto; min-width: 0; }
.vv-chat-tabs button span:not(.vv-chat-unread) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vv-chat-close { flex-shrink: 0; margin-bottom: 4px; }
.vv-chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0;
  user-select: text;
  -webkit-user-select: text;
}
.vv-chat-msg { font-size: 17px; line-height: 1.2; color: var(--bone-dim); overflow-wrap: anywhere; }
.vv-chat-name { color: var(--gold); }
.vv-chat-msg .spr-avatar { display: inline-block; vertical-align: -6px; margin: -3px 4px -3px 0; }
button.vv-chat-name.is-other { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
button.vv-chat-name.is-other:hover, button.vv-chat-name.is-other:active { text-decoration: underline; }
.vv-chat-msg.is-me .vv-chat-name { color: var(--bone); }
.vv-chat[data-channel="whisper"] .vv-chat-name { color: var(--blood-soft); }
.vv-chat[data-channel="graveyard"] .vv-chat-name { color: var(--wraith); }
.vv-chat[data-channel="seance"] .vv-chat-name { color: var(--mauve); }
.vv-chat-voicemark { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; vertical-align: -6px; margin: -3px 4px -3px 0; color: var(--mauve); }
.vv-chat-day { margin-top: 4px; font-family: var(--font-ui); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ash); border-bottom: 1px solid #1a181e; }
.vv-chat-empty { margin: auto 0; text-align: center; }
.vv-chat-note { text-align: center; }
.vv-chat-note.hidden, .vv-chat-form.hidden { display: none; }
.vv-chat-form { display: flex; gap: 6px; }
.vv-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 8px;
  background: #000;
  border: 1px solid #34313a;
  outline: none;
  color: var(--bone);
  caret-color: var(--bone);
  color-scheme: dark;
  font-family: var(--font-body);
  /* 16px or more stops iOS zooming in on focus */
  font-size: 17px;
}
.vv-chat-input:focus { border-color: var(--bone-dim); }
.vv-chat-send { width: 48px; flex-shrink: 0; }
.vv-chat-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 3px; background: var(--blood); color: #000; font-family: var(--font-num); font-size: 13px; line-height: 1; }
.vv-chat-unread.hidden { display: none; }
.vv-chatbtn { gap: 4px; }
.vv-square-btn .vv-icon { flex-shrink: 0; }

/* ---- On a computer. The phone layout is one narrow column; a wide window gets a screen that
   fills it, as Town of Salem's does: the seats spread into as many columns as fit, text stays at a
   width that reads well, and buttons stay a size a mouse can find rather than stretching edge to
   edge. Every role's screen changes the same way, so a Gathering's screens still look alike. ---- */
@media (min-width: 1000px) {
  .oled-container > .vv-screen { max-width: min(88rem, 100%); padding: 12px 28px 16px; gap: 10px; }

  /* Seats: a grid of as many columns as fit */
  #app main .vv-list, #app main .vv-list--grid, #app main .vv-seats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
    align-content: start;
  }
  #app main .vv-list > .vv-playerrow { min-height: 52px; gap: 8px; padding: 2px 8px 2px 2px; }
  #app main .vv-list .vv-name { font-size: 19px; }
  #app main .vv-list > .vv-spare-row { grid-column: 1 / -1; max-width: 440px; justify-self: center; width: 100%; }
  #app main .vv-seat { min-height: 40px; }

  /* Buttons a mouse can find, centred */
  #app main .vv-btn:not(.vv-btn--sm) { max-width: 440px; margin-left: auto; margin-right: auto; }
  #app main .vv-deck { width: 100%; max-width: 500px; margin: 0 auto; }
  #app main .vv-deck > .vv-btn { max-width: none; }
  #app main .vv-bots-row { max-width: 500px; width: 100%; margin: 0 auto; }
  #app main .vv-peekbtn { max-width: 440px; margin: 0 auto; }

  /* Text at a width that reads well */
  #app main .vv-timer, #app main .vv-orders, #app main .vv-open-card, #app main details, #app main .vv-tabs,
  #app main > .vv-text, #app main > .vv-small, #app main > p { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
  #app main .vv-row-between:has(> .vv-h1) { width: 100%; max-width: 860px; margin: 0 auto; }
  #app main > .vv-panel { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }

  /* The reveal: the portrait large and the card beside it */
  #app main .vv-reveal-open { gap: 32px; }
  #app main .vv-reveal-open > .vv-open-card { flex: 0 1 520px; max-width: 520px; margin: 0; font-size: 19px; }

  /* The first screen: joining on one side, hosting on the other */
  #app main.vv-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: min-content; align-content: center; column-gap: 40px; row-gap: 16px; max-width: 1040px; }
  #app main.vv-home > :not(.vv-panel):not(.vv-stack) { grid-column: 1 / -1; }
  #app main.vv-home > .vv-panel { max-width: none; margin: 0; }
  #app main.vv-home > .vv-stack { align-self: center; }
  #app main.vv-home > .vv-stack .vv-btn { max-width: 440px; }
  #app main.vv-home > .vv-divider, #app main.vv-home > [class*=divider] { display: none; }
  /* Joining stays beside hosting, with the open Gates under both */
  .vv-modal-card.vv-gates { max-width: 44rem; height: min(100%, 32rem); }
  .vv-gates > .vv-fill > p { grid-column: 1 / -1; }
}
@media (min-width: 1000px) and (min-height: 820px) {
  #app main .vv-reveal-portrait .spr-role { --s: 4 !important; }
}

@media (min-width: 1000px) {
  body.has-chat-dock #app { width: calc(100% - var(--chat-dock-w)); }
  .vv-chat.is-docked { left: auto; width: var(--chat-dock-w); padding: 0; align-items: stretch; }
  .vv-chat.is-docked .vv-chat-card { height: auto; max-width: none; border-width: 0 0 0 2px; padding: calc(10px + env(safe-area-inset-top)) 14px 14px; }
  .vv-chat.is-docked .vv-chat-close { display: none; }
  body.has-chat-dock #chatBtn, body.has-chat-dock #openSquareBtn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spr-role, .spr-seal, .spr-candle, .spr-bat, .vv-bat-path, .vv-fog, .pulse-subdued, .vv-rise, .vv-timer-num.is-urgent, .vv-tv-clock.is-urgent, .is-busy { animation: none; }
  .vv-boneroll-face.is-tumbling, .vv-boneroll.is-landing, .vv-reveal-open:has(.vv-boneroll.is-landing) > .vv-open-card { animation: none; }
  .vv-card.is-flipping, .vv-rise .vv-fang, .vv-rise .vv-drip, .vv-rise .vv-slash, .vv-rise .vv-gavel, .vv-rise .vv-gavelled { animation: none; }
  .vv-bat-path { display: none; }
}

/* Your avatar: the dressing screen (public/src/wardrobe.js) -------------- */
/* Your bust beside your name on the first screen: tap it to change your look */
.vv-ident-row { display: flex; gap: 10px; align-items: center; }
.vv-ident-main { flex: 1; min-width: 0; }
.vv-wear-me { position: relative; flex-shrink: 0; padding: 3px; background: rgba(255,255,255,.03); border: 1px solid rgba(216,178,74,.35); cursor: pointer; line-height: 0; }
.vv-wear-me:hover, .vv-wear-me:focus-visible { border-color: var(--gold); }
.vv-wear-badge { position: absolute; right: -6px; bottom: -6px; color: var(--gold); background: #000; border: 1px solid rgba(216,178,74,.5); padding: 2px; line-height: 0; }
.vv-modal-card.vv-wardrobe { gap: 8px; height: min(100%, 44rem); }
.vv-wear-top { display: flex; gap: 12px; align-items: center; }
.vv-wear-preview { flex-shrink: 0; padding: 4px; background: radial-gradient(circle at 50% 40%, rgba(123,154,172,.18), transparent 70%); }
.vv-wear-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vv-wear-name { color: var(--bone); }
.vv-wear-sprites { overflow-y: auto; min-height: 120px; flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.vv-wear-sprites .vv-label { margin-bottom: 4px; }
.vv-wear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 4px; }
.vv-wear-opt { position: relative; display: flex; align-items: center; justify-content: center; height: 56px; padding: 0; background: rgba(255,255,255,.03); border: 2px solid rgba(207,198,176,.12); cursor: pointer; overflow: hidden; }
.vv-wear-opt.is-premium { border-color: rgba(216,178,74,.6); background: rgba(216,178,74,.06); }
.vv-wear-opt.is-on { border-color: var(--bone); background: rgba(207,198,176,.12); }
.vv-wear-opt.is-locked > :first-child { opacity: .55; }
.vv-wear-lock { position: absolute; right: 2px; bottom: 2px; color: var(--bone); background: rgba(0,0,0,.7); line-height: 0; padding: 1px; }
.vv-wear-note { min-height: 2.6em; }

/* Your Chronicle (public/src/chronicle.js) and the title a seat wears ---------- */
.vv-modal-card.vv-chronicle { gap: 8px; height: min(100%, 44rem); }
.vv-chron-body { overflow-y: auto; min-height: 120px; flex: 1 1 0; display: flex; flex-direction: column; gap: 12px; padding-right: 2px; }
.vv-chron-sides { display: flex; flex-direction: column; gap: 4px; }
.vv-chron-side { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 8px; align-items: center; }
.vv-chron-bar { height: 8px; background: rgba(207,198,176,.1); border: 1px solid rgba(207,198,176,.15); display: block; }
.vv-chron-fill { display: block; height: 100%; background: var(--bone); }
.vv-chron-fill--gold { background: var(--gold); }
.vv-chron-fill--blood { background: var(--blood); }
.vv-chron-fill--ember { background: var(--ember); }
.vv-chron-fill--violet { background: var(--violet); }
.vv-chron-section { display: flex; flex-direction: column; gap: 4px; }
.vv-chron-titles, .vv-chron-next, .vv-chron-rivals, .vv-chron-recent { display: flex; flex-direction: column; gap: 4px; }
.vv-chron-title { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 8px; background: rgba(255,255,255,.03); border: 2px solid rgba(123,154,172,.4); cursor: pointer; font: inherit; color: var(--bone); text-align: left; }
.vv-chron-title.is-on { border-color: var(--gold); background: rgba(216,178,74,.08); }
.vv-chron-goal { padding: 4px 8px; border-left: 2px solid rgba(207,198,176,.18); }
.vv-chron-news { text-align: center; }
button.vv-chron-news { text-transform: none; font-size: 14px; letter-spacing: 0; text-decoration: none; }
.vv-linkbtn.vv-gold { color: var(--gold); }
.vv-seat-title { display: block; font-size: 12px; line-height: 1.1; color: var(--wraith); letter-spacing: .02em; }
.vv-chron-villages { display: flex; flex-direction: column; gap: 4px; }
.vv-village-game { display: flex; flex-direction: column; gap: 2px; }

/* Vows (roadmap 7.3): a seal beside a kept Vow on the end screen, and everyone's Vows at the foot
   of its roster, inside the roster's scroll, so opening them never pushes the buttons off a phone */
#everyVow { padding: 6px 2px 2px; grid-column: 1 / -1; }
.vv-vow-seal { display: inline-flex; align-items: center; }
.vv-vow-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.vv-vow-list li { overflow-wrap: anywhere; }

/* The end screen's last two buttons share a row, so the roster keeps its room on a short phone */
.vv-end-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vv-end-row > .vv-btn { min-width: 0; white-space: nowrap; }
