/* Front of house. The brass fittings and the light continue into the playing hall. */
body:not(.is-in-game) {
  --coal: #101c20;
  --paper: #f5efde;
  --gold: #e5c381;
  --muted: #b0beb6;
  --border: #52615a;
  --foyer-serif: "Bodoni 72", Didot, "Times New Roman", serif;
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 26% 25%, #254c46 0, transparent 53%),
    radial-gradient(ellipse at 95% 0%, #473133 0, transparent 36%),
    linear-gradient(150deg, #172d2d, #101d22 60%, #231b27);
}
body:not(.is-in-game) .grain { display: none; }

body:not(.is-in-game) .masthead,
.district-preview,
.hero,
body:not(.is-in-game) .page-footer {
  width: min(100%, 1540px);
  margin-inline: auto;
  padding-inline: clamp(24px, 6vw, 96px);
}

body:not(.is-in-game) .masthead {
  height: 82px;
  border: 0;
  background: none;
}
body:not(.is-in-game) .brand { gap: 12px; font: 700 22px/1 Georgia, serif; letter-spacing: .12em; }
body:not(.is-in-game) .brand small { font: 600 8px/1.3 Arial, sans-serif; letter-spacing: .15em; color: #b4c1b5; }
body:not(.is-in-game) .brand-sigil {
  width: 46px; height: 46px;
  border: 0; box-shadow: none; transform: none;
  color: transparent;
  background: url('/assets/foyer-monogram.svg') center / contain no-repeat;
}
body:not(.is-in-game) .masthead nav { gap: clamp(14px, 2.1vw, 32px); }
body:not(.is-in-game) .masthead .nav-link,
body:not(.is-in-game) .icon-button {
  color: #d6ddd0;
  border: none; min-height: 42px;
  font-weight: 500;
}
body:not(.is-in-game) .nav-link:hover,
body:not(.is-in-game) .icon-button:hover { color: #ffe5a7; }
body:not(.is-in-game) .tiny { border: 0; margin-left: 2px; padding: 0; color: #d8b974; font-size: 10px; }
body:not(.is-in-game) .sound-state { color: #c3c7ba; }

.hero {
  overflow: visible;
  min-height: auto;
  gap: clamp(35px, 7vw, 130px);
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, .88fr);
  align-items: center;
  padding-block: clamp(28px, 4vw, 58px) clamp(40px, 5vw, 78px);
  border: 0;
}
.hero::before, .hero::after,
.entry-panel::before, .entry-panel::after { content: none; }
.hero-copy { min-width: 0; position: relative; }
.hero-copy .eyebrow, .lobby .eyebrow, .retry-panel .eyebrow {
  gap: 12px;
  color: var(--gold);
  font: 600 10px/1.4 Arial, sans-serif;
  letter-spacing: .22em;
}
.hero-copy .eyebrow::before, .lobby .eyebrow::before, .retry-panel .eyebrow::before {
  width: 7px; height: 7px;
  background: #ddbd7f;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1px #ffe6ab;
}
.hero h1 {
  position: relative; z-index: 1;
  font: 400 clamp(86px, 10.5vw, 162px)/.94 var(--foyer-serif);
  margin: 11px 0 0 -.055em; letter-spacing: .005em;
  color: #fbefd0;
  text-shadow: 0 2px 4px #1d231d42;
  transform: none;
}
.city-print {
  display: block;
  width: 112%; max-width: none; height: auto;
  position: relative;
  margin: -8% 0 -2% -5%;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.hero-description {
  max-width: 520px;
  color: #d5dfd4;
  font: 400 clamp(15px, 1.3vw, 19px)/1.55 Georgia, serif;
  text-wrap: pretty;
}
.hero-stats {
  gap: clamp(26px, 3.6vw, 60px);
  max-width: none; padding: 0; border: 0;
  margin-top: 22px;
}
.hero-stat { display: flex; align-items: baseline; gap: 7px; }
.hero-stat b { font: 400 clamp(23px, 2vw, 33px)/1 var(--foyer-serif); color: var(--gold); font-variant-numeric: lining-nums; }
.hero-stat span { color: #b3c2b7; font: 600 9px/1.2 Arial, sans-serif; letter-spacing: .14em; }

.entry-panel {
  width: 100%; max-width: 420px; justify-self: end;
  padding: 0; margin: 0;
  border: 0; box-shadow: none; background: none;
}
.entry-panel h2, .district-preview h2, .lobby h1, .retry-panel h1 {
  margin: 0; color: var(--paper);
  font: 400 clamp(26px, 2.5vw, 42px)/1.1 var(--foyer-serif);
  letter-spacing: -.025em;
}
.entry-panel .tabs { gap: 18px; margin: 14px 0 20px; border: 0; }
.entry-panel .tab {
  flex: none; padding: 8px 0; min-height: 40px;
  font-size: 13px; font-weight: 500;
  color: #bdc7bd; border: 0; background: none;
  text-decoration: underline 2px transparent;
  text-underline-offset: 8px;
}
.entry-panel .tab.active { color: #ffdfa1; text-decoration-color: #c4a271; }
.entry-panel .tab:hover { color: #fff2cc; }
.entry-panel .field { display: block; margin: 0 0 15px; }
.entry-panel .field > span, .entry-panel .field-caption {
  display: block; margin: 0 0 6px;
  font: 600 12px/1.4 Arial, sans-serif;
  text-transform: none;
  color: #e5e8d9; letter-spacing: .02em;
}
.entry-panel :is(input, select) {
  display: block; width: 100%; height: 44px;
  font: 400 14px/1.4 Arial, sans-serif;
  padding: 8px 12px; border: 1px solid #68786a;
  border-radius: 4px;
  color: #f1edda;
  background-color: #122529;
  box-shadow: inset 0 1px 4px #07141c77;
}
.entry-panel input::placeholder { color: #a6b4ac; opacity: 1; }
.entry-panel input:hover, .entry-panel select:hover { border-color: #99a58b; }
.entry-panel .field small, .entry-note, .lobby-sub, .keep-seat, .retry-panel p {
  font: 400 12px/1.5 Arial, sans-serif;
  color: #b8c3b9;
}
.entry-panel .field small { display: block; margin-top: 5px; }
.entry-panel .segmented {
  display: flex; width: 100%; margin: 0 0 15px;
  border: 0; background: none; padding: 0; gap: 7px;
}
.entry-panel .segment {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 41px; border: 1px solid #64736a; border-radius: 4px;
  background: #15292b; color: #c5cfc3;
  font-size: 13px;
}
.entry-panel .segment::before {
  content: ''; width: 11px; height: 11px;
  border: 1px solid currentColor; border-radius: 50%;
}
.entry-panel .segment.active {
  background: #334540; border-color: #b59d6c; color: #f7dd9e;
}
.entry-panel .segment.active::before {
  background: radial-gradient(circle, currentColor 0 35%, transparent 42%);
}
.entry-panel .segment:hover { border-color: #d2bc8d; }
body:not(.is-in-game) :is(.entry-panel, .lobby, .retry-panel) .btn {
  border-radius: 4px; font-size: 13px; min-height: 42px;
  color: #e3e5d7; border-color: #6e7b70; background: #263e3b;
}
body:not(.is-in-game) :is(.entry-panel, .lobby, .retry-panel) .btn.primary {
  min-height: 46px; border: 1px solid #efd69e;
  color: #292c23; background: linear-gradient(110deg, #d9b677, #f4dba4 48%, #caa86d);
  box-shadow: inset 0 1px 0 #fff3c4, 0 2px 0 #816b47, 0 5px 13px #11131e55;
  letter-spacing: .025em;
}
body:not(.is-in-game) :is(.entry-panel, .lobby, .retry-panel) .btn.primary:hover:not(:disabled) {
  background: linear-gradient(110deg, #edcd91, #fae6b8 48%, #dec18a);
}
body:not(.is-in-game) :is(.entry-panel, .lobby, .retry-panel) .btn.primary:active:not(:disabled) {
  transform: translateY(2px); box-shadow: inset 0 1px 4px #77644866;
}
.entry-note { margin: 12px 0 0; text-align: center; }
.entry-panel .watch-entry { margin-top: 9px; }
body:not(.is-in-game) :is(button, a, input, select):focus-visible {
  outline: 2px solid #f5da92; outline-offset: 3px;
}

.district-preview { padding-block: 12px 52px; }
.district-preview .section-heading { margin-bottom: 18px; }
.district-preview h2 { font-size: clamp(24px, 2.15vw, 32px); }
.district-strip { grid-template-columns: repeat(8, minmax(0, 1fr)); border: 0; column-gap: 12px; }
.district-strip .district-cell {
  display: grid; justify-items: start; align-content: start;
  padding: 7px 0 9px; border: 0; text-align: left;
  background: none; overflow: visible;
}
.district-cell::after { content: none; }
.district-cell .district-icon {
  display: grid; place-items: center; width: 32px; height: 35px;
  color: color-mix(in srgb, var(--district) 63%, #decfad);
  filter: drop-shadow(0 2px 2px #0a1922);
}
.district-cell svg { display: block; width: 29px; height: 29px; }
.district-cell b { margin: 9px 0 2px; color: #e9ecdc; font: 600 12px/1.3 Arial, sans-serif; letter-spacing: 0; }
.district-cell small { color: #b0bdb2; font: 400 11px/1.4 Arial, sans-serif; }
.district-cell:hover b { color: #ffe8af; text-decoration: underline; text-underline-offset: 3px; }
body:not(.is-in-game) .page-footer { border: 0; padding-block: 16px 25px; color: #a3b3ab; font-size: 11px; }

.lobby-wrap { padding-block: 55px 70px; isolation: isolate; }
.lobby-wrap::before {
  inset: auto 0 0; height: min(44vw, 450px); opacity: .14;
  background: url('/assets/midnight-broadway.svg') right bottom / contain no-repeat;
  pointer-events: none;
}
.lobby, .retry-panel { border: 0; background: none; padding: 0; }
.lobby { width: min(100%, 700px); }
.lobby h1, .retry-panel h1 { margin-block: 12px 14px; }
.lobby-sub { max-width: 51ch; font-size: 15px; }
.lobby-code { border: 0; gap: 22px; margin-block: 26px; padding: 0; flex-wrap: wrap; }
.lobby-code b { color: var(--gold); font-size: 27px; }
.lobby .seats { gap: 20px; margin-block: 30px; }
.lobby .seat { border: 0; padding: 0; min-width: 0; }
.lobby .seat strong { overflow-wrap: anywhere; font-size: 14px; }
.lobby .seat small { font-size: 12px; }
.lobby .seat.empty { opacity: 1; }
.lobby .seat.empty strong { font-weight: 400; color: #c4cdc2; }
.lobby .avatar {
  background: linear-gradient(145deg, #647a68, #344940 55%, #3b3440);
  color: #f0d699; border: 0; clip-path: none; border-radius: 50%;
  box-shadow: inset 0 0 0 1px #9c9973, 0 2px 4px #0a1a21;
}
.lobby .empty .avatar { background: #203639; }
.keep-seat { padding: 0; border: 0; margin-top: 22px; background: none; }
.retry-panel { margin: min(15vh, 110px) auto; width: min(88%, 480px); }
.retry-panel .eyebrow { justify-content: center; }
.retry-panel p { font-size: 15px; }
.retry-panel .btn { margin-top: 6px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr); gap: 34px; }
  .district-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 12px; }
}
@media (max-width: 740px) {
  body:not(.is-in-game) .masthead { height: 63px; }
  body:not(.is-in-game) .brand { gap: 5px; font-size: 17px; }
  body:not(.is-in-game) .brand-sigil { width: 32px; height: 37px; }
  body:not(.is-in-game) .brand small { margin-top: 4px; font-size: 6px; }
  body:not(.is-in-game) .masthead nav { gap: 14px; }
  body:not(.is-in-game) .masthead .nav-link { font-size: 11px; }
  body:not(.is-in-game) .masthead .icon-button { min-width: 26px; padding: 0; }
  .hero { display: grid; grid-template-columns: 1fr; gap: 34px; padding-block: 24px 40px; }
  .hero-copy { width: min(100%, 540px); justify-self: center; }
  .hero h1 { font-size: clamp(76px, 16vw, 114px); margin-top: 8px; }
  .city-print { width: 108%; margin: -11% 0 -2% -4%; }
  .hero-description { font-size: 15px; max-width: 43ch; }
  .hero-stats { gap: 25px; margin-top: 14px; }
  .hero-stat { gap: 5px; }
  .hero-stat b { font-size: 23px; }
  .hero-stat span { font-size: 8px; }
  .entry-panel { justify-self: center; max-width: 540px; }
  .entry-panel h2 { font-size: 31px; }
  .entry-panel .tabs { margin: 8px 0 16px; }
  .entry-panel :is(input, select) { font-size: 16px; }
  .district-preview { padding-block: 5px 25px; }
  .district-preview .section-heading { margin-bottom: 10px; }
  .district-strip { column-gap: 10px; row-gap: 12px; }
  .district-cell b, .district-cell small { font-size: 11px; }
  .lobby-wrap { padding-block: 38px; }
  .lobby-code { gap: 12px; }
  .lobby .lobby-code .btn { margin: 0; }
  .lobby .seats { gap: 20px 12px; }
}
@media (max-width: 400px) {
  .hero, .district-preview, body:not(.is-in-game) .masthead, body:not(.is-in-game) .page-footer { padding-inline: 17px; }
  body:not(.is-in-game) .masthead nav { gap: 10px; }
  .hero-copy .eyebrow { font-size: 9px; }
  .district-strip { column-gap: 6px; }
  .lobby .seats { grid-template-columns: 1fr; }
}

/* The live table keeps its engraving readable when its arc lamps dim. */
.game-v2:has(.connection-engraving) .table-layout {
  filter: brightness(.55) saturate(.65);
}
.game-v2 .turn-thought:not([hidden]) {
  display: inline-flex; align-items: center; gap: 3px;
  flex: none;
  color: #e2cf99; font: italic 12px/1 Georgia, serif;
}
.game-v2 .turn-thought svg { width: 12px; height: 17px; }
/* The foyer gives its floor to an open reading room. Keep the page's scroll position. */
body:not(.is-in-game):has(#modal-root .modal) > :is(.masthead, #app, .page-footer) {
  visibility: hidden;
}
body:not(.is-in-game) .table-ceremony {
  padding: max(16px, env(safe-area-inset-top)) clamp(12px, 4vw, 64px) max(16px, env(safe-area-inset-bottom));
  background: none;
  backdrop-filter: none;
}
body:not(.is-in-game) .table-choice {
  display: flex; flex-direction: column;
  width: min(100%, 560px); max-height: 100%; max-width: none;
  overflow: hidden; color: var(--paper);
}
body:not(.is-in-game) .table-choice[data-ceremony=rules] { width: min(100%, 790px); }
body:not(.is-in-game) .table-choice[data-ceremony=catalog] { width: min(100%, 1080px); }
body:not(.is-in-game) .table-choice[data-ceremony=card] { width: min(100%, 430px); }
body:not(.is-in-game) .table-choice .modal-head {
  position: static; flex: none; align-items: center;
  padding: 4px 9px 17px; border: 0; background: none;
}
body:not(.is-in-game) .table-choice .modal-head h2 {
  margin: 0; color: var(--paper); letter-spacing: -.02em;
  font: 400 clamp(25px, 3.1vw, 40px)/1.12 var(--foyer-serif);
}
body:not(.is-in-game) .table-choice .modal-close {
  flex: 0 0 42px; height: 42px;
  border: 0; background: none; color: var(--gold); font-size: 30px;
}
body:not(.is-in-game) .table-choice .modal-content {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 3px 9px 22px; scrollbar-width: thin; scrollbar-color: #ac9567 #193132;
}
body:not(.is-in-game) .table-choice .modal-content > p,
body:not(.is-in-game) .table-choice .rule-step p {
  margin: 6px 0 18px; color: #dce2d6; font: 400 14px/1.55 Arial, sans-serif;
}
body:not(.is-in-game) .table-choice .modal-content > h3,
body:not(.is-in-game) .table-choice .rule-step h3 {
  margin: 12px 0 6px; color: #f2dfac;
  font: 400 22px/1.16 var(--foyer-serif);
}
body:not(.is-in-game) .table-choice .rules-stats { padding: 0; border: none; margin-bottom: 23px; gap: 12px 24px; }
body:not(.is-in-game) .rules-stats span, body:not(.is-in-game) .rule-step b { color: #c9cdb8; }
body:not(.is-in-game) .rules-stats b { color: var(--gold); }
body:not(.is-in-game) .table-choice .rule-step { border: none; padding: 0; }
body:not(.is-in-game) .table-choice .modal-content > .flavor { font: italic 22px/1.4 Georgia, serif; color: #f1deb1; margin-top: 18px; }
body:not(.is-in-game) .table-choice .btn {
  min-height: 34px; padding: 6px 11px; border-radius: 3px;
  color: #e8e6d2; background: #243b39; border: 1px solid #6a786b;
}
body:not(.is-in-game) .table-choice .btn:hover { border-color: #d5bc88; }
body:not(.is-in-game) .table-choice .btn.primary { color: #272e27; background: #e4c48b; border-color: #edd9af; }
body:not(.is-in-game) .catalog-toolbar { margin-bottom: 11px; }
body:not(.is-in-game) .catalog-toolbar :is(input,select) {
  min-height: 43px; padding: 8px 12px; border: 1px solid #68786a; border-radius: 4px;
  color: #f1edda; background: #122529; font-size: 14px;
}
body:not(.is-in-game) .catalog-toolbar input::placeholder { color: #b6c0b7; }
body:not(.is-in-game) .catalog-export { margin-bottom: 22px; }
body:not(.is-in-game) .catalog-count { color: #cfcec0; }
body:not(.is-in-game) .catalog-grid { gap: clamp(12px, 1.7vw, 24px); }
body:not(.is-in-game) .catalog-grid .playing-card { min-height: 225px; }
body:not(.is-in-game) :is(.catalog-grid, .card-inspector) .card-art {
  flex: 0 0 auto; height: auto; min-height: 0; aspect-ratio: 220 / 112;
}
body:not(.is-in-game) .catalog-grid .card-body { padding: 10px 11px 9px; gap: 5px; }
body:not(.is-in-game) .catalog-grid .card-body h3 { margin: 0; }
body:not(.is-in-game) .catalog-grid .card-rules { margin: 0; font-size: 12px; line-height: 1.35; }
body:not(.is-in-game) .table-choice .card-inspector { padding-top: 0; }
@media (max-width: 600px) {
  body:not(.is-in-game) .table-ceremony { padding-inline: 6px; }
  body:not(.is-in-game) .table-choice .modal-head { padding-bottom: 10px; }
  body:not(.is-in-game) .table-choice .modal-head h2 { font-size: 26px; }
  body:not(.is-in-game) .table-choice .rule-grid { grid-template-columns: 1fr; gap: 3px; }
  body:not(.is-in-game) .catalog-toolbar :is(input,select) { font-size: 16px; }
  body:not(.is-in-game) .catalog-export { margin-bottom: 16px; }
  body:not(.is-in-game) .catalog-grid { gap: 13px 10px; }
  body:not(.is-in-game) .catalog-grid .card-body { padding: 8px; }
}
