/* ==========================================================
   The Ducks Club: house style
   Rich blacks, cream, racing green, navy, oxblood, brass.
   ========================================================== */

/* Jane Austen's hand (Pia Frauss, 2005; free for personal use, see
   fonts/JaneAusten-licence.txt). The font keeps extra letters on some
   symbol keys (+ ( ) < > = { } | # $ and others), so those characters
   are left out here and come from the ordinary text face instead. */
@font-face {
  font-family: "Jane Austen";
  src: url("fonts/JaneAusten.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0020-0022, U+0025-0027, U+002A, U+002C-003B, U+003F-007A, U+007E, U+00A0-00A4, U+00A8-00AF,
    U+00B1-017F, U+01FA-01FF, U+02C6-02DD, U+1E80-1EF3, U+2010-201E, U+2022, U+2026, U+2030-2044, U+2122, U+2212;
}

:root {
  --ink:        #0a0503;
  --ink-2:      #150d09;
  --ink-3:      #1d130c;
  --cream:      #ece3cf;
  --cream-dim:  #b9b09c;
  --parchment:  #e9dfc6;
  --paper-ink:  #231f19;
  --green:      #12271b;
  --green-deep: #0b1b12;
  --navy:       #1a2536;
  --oxblood:    #6a1d22;
  --oxblood-hi: #8a2a30;
  --brass:      #b8955a;
  --brass-dim:  #8a7046;
  --rule:       rgba(184, 149, 90, .28);

  --script: "Pinyon Script", "Snell Roundhand", cursive;
  /* Caslon small capitals, as an 18th-century printer set them,
     for the menu, titles and labels */
  --caps:   "Libre Caslon Text", Georgia, serif;
  --serif:  "EB Garamond", Garamond, Georgia, serif;
  --display: "Libre Caslon Text", Georgia, serif;
  --body:   "EB Garamond", Garamond, Georgia, serif;
  --hand:   "Jane Austen", "EB Garamond", Georgia, serif;
  --wire:   "Courier Prime", "Courier New", monospace;
  --flip:   "IBM Plex Mono", "Consolas", monospace;

  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  /* the wallpaper: the club's duck in a half-drop repeat, a shade
     lighter than the wall, like a damask seen by lamplight */
  background:
    radial-gradient(ellipse at 50% -10%, rgba(184,149,90,.06), transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.45)),
    url("wallpaper.png") 0 0 / 138px 158px repeat,
    var(--ink);
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }

:focus-visible { outline: 1px solid var(--brass); outline-offset: 3px; }

/* Hide member pages until the porter has checked the door */
html.locked body { visibility: hidden; }

/* ---------- The duck emblem, tinted to any colour ---------- */
.duck {
  display: inline-block;
  aspect-ratio: 736 / 952;
  position: relative;
  color: var(--brass);
}
.duck img { width: 100%; height: 100%; display: block; mix-blend-mode: screen; }
@supports (mask-mode: luminance) {
  .duck {
    background: currentColor;
    mask: url("duck.jpg") center / contain no-repeat;
    mask-mode: luminance;
  }
  .duck img { visibility: hidden; }
}

/* ---------- Shared type ---------- */
.script { font-family: var(--script); font-weight: 400; font-variant: normal; letter-spacing: 0; line-height: 1; }
.caps   { font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; text-transform: none; }
.kicker {
  font-family: var(--caps); font-variant: small-caps;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--brass);
  margin: 0 0 .75rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0; margin: 0; line-height: 1.15; }

.rule {
  display: flex; align-items: center; gap: 14px;
  color: var(--brass); margin: 28px auto; max-width: 320px;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.rule span { font-size: .7rem; }

/* ==========================================================
   THE DOOR (index.html)
   ========================================================== */
.entrance {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--ink);
}

/* Left: the crest, oxblood with a fine brass diamond pattern */
.crest-panel {
  position: relative;
  background-color: var(--oxblood);
  background-image:
    radial-gradient(circle, rgba(201,166,103,.32) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(201,166,103,.32) 1px, transparent 1.6px),
    linear-gradient(160deg, rgba(255,255,255,.04), rgba(0,0,0,.25));
  background-size: 18px 18px, 18px 18px, 100% 100%;
  background-position: 0 0, 9px 9px, 0 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.crest-panel::before { /* double brass frame, as on the letterhead crest */
  content: "";
  position: absolute; inset: 22px;
  border: 1px solid rgba(201,166,103,.7);
  box-shadow: 0 0 0 4px var(--oxblood), 0 0 0 5px rgba(201,166,103,.45);
  pointer-events: none;
}
.crest-panel .duck {
  width: min(52%, 360px);
  color: #c9a667;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

/* Right: cream card, set like the letterhead */
.card {
  background: var(--parchment);
  color: var(--paper-ink);
  display: flex; flex-direction: column; justify-content: center;
  margin: 0; max-width: none;
  padding: 64px clamp(28px, 7vw, 96px);
}
.card h1 {
  font-family: var(--script);
  color: var(--oxblood);
  font-size: clamp(3rem, 6.4vw, 5rem);
  line-height: 1.05;
  margin: 0;
}
.card .motto {
  font-family: var(--caps); font-variant: small-caps;
  letter-spacing: .08em;
  font-size: .9rem;
  color: #3b342a;
  margin: 10px 0 0;
}

/* The motto on the way in: Latin loosens into English */
.motto-veil {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; align-content: center; gap: 28px; padding: 24px;
  background: radial-gradient(ellipse at center, #1b120b 0%, var(--ink) 70%);
  opacity: 0; transition: opacity 1s ease;
  cursor: pointer;
}
.motto-veil.shown { opacity: 1; }
.motto-veil.leaving { transition: opacity 1.3s ease; opacity: 0; }
.motto-line {
  margin: 0; max-width: 22ch; text-align: center;
  font-family: var(--caps); font-variant: small-caps; font-size: clamp(1.5rem, 4.4vw, 3.2rem); letter-spacing: .08em; line-height: 1.5;
  color: var(--cream);
  text-shadow: 0 0 18px rgba(232,201,122,.18);
  transition: opacity .6s ease, text-shadow 1.6s ease, color 1.6s ease;
}
.motto-line.swap { opacity: 0; }
.motto-line.settled { color: #f3e3b4; text-shadow: 0 0 22px rgba(232,201,122,.55); }
.motto-word { display: inline-block; white-space: nowrap; }
.motto-ch { display: inline-block; min-width: .62em; text-align: center; transition: color .5s ease; }
/* a loose letter drifts off the line and turns over */
.motto-ch.swim { color: #c9a667; animation: motto-swim var(--swim, 1s) ease-in-out infinite alternate; filter: blur(.4px); }
@keyframes motto-swim {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  50%  { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.92); opacity: .55; }
  100% { transform: translate(calc(var(--dx) * -.6), calc(var(--dy) * -.5)) rotate(calc(var(--rot) * -.5)); opacity: .85; }
}
.motto-ch.set { animation: motto-set .7s ease-out both; }
@keyframes motto-set {
  from { transform: translateY(-6px) scale(1.12); color: #fff4d0; text-shadow: 0 0 14px rgba(255,236,180,.9); }
  to   { transform: none; }
}
.motto-skip { font-family: var(--body); font-style: italic; font-size: .95rem; color: rgba(236,227,207,.4); }

/* The room fades in after the motto */
html.arriving { background: var(--ink); }
html.arriving body { animation: arrive 1.6s ease both; }
@keyframes arrive { from { opacity: 0; } }
/* through a door from the hall: the page comes up out of the dark */
html.through-door body::after { content: ""; position: fixed; inset: 0; z-index: 9999; background: #000; pointer-events: none;
  animation: out-of-the-dark 1.6s ease .25s forwards; }
@keyframes out-of-the-dark { to { opacity: 0; visibility: hidden; } }
.card hr {
  border: 0; height: 1px; background: var(--oxblood);
  width: 100%; max-width: 380px; margin: 36px 0 32px;
  opacity: .6;
}

.porter { max-width: 380px; }
.porter > label {
  display: block;
  font-family: var(--body);
  font-size: 1.05rem;
  color: #3b342a;
  margin-bottom: 8px;
}
.porter .field { display: flex; gap: 0; }
.porter input[type="password"] {
  flex: 1; min-width: 0;
  font-family: var(--body);
  font-size: 1.15rem;
  padding: 11px 14px;
  color: var(--paper-ink);
  background: #f6f0e1;
  border: 1px solid #b8ab8e;
  border-right: 0;
  border-radius: 0;
  outline: none;
}
.porter input[type="password"]:focus { border-color: var(--oxblood); background: #fbf7ec; }
.porter button {
  font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .9rem;
  padding: 0 22px;
  background: var(--ink); color: var(--parchment);
  border: 1px solid var(--ink); border-radius: 0;
  cursor: pointer;
}
.porter button:hover { background: var(--oxblood); border-color: var(--oxblood); }
.porter .remember {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; font-size: .98rem; color: #5a5040; cursor: pointer;
}
.porter .remember input { accent-color: var(--oxblood); width: 15px; height: 15px; }
.porter .msg { min-height: 1.5em; margin: 12px 0 0; font-style: italic; color: var(--oxblood); font-size: 1.02rem; }
.porter .msg.ok { color: var(--green); }
.porter.shake .field { animation: shake .4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.card .fogg {
  margin: 56px 0 0;
  max-width: 380px;
  font-style: italic;
  font-size: 1.05rem;
  color: #4a4236;
}
.card .fogg span { font-style: normal; font-size: .95rem; color: #6d6352; }
.card .small {
  margin-top: 14px;
  font-size: .9rem; color: #7a705e;
}

.entrance.opening .card > * { transition: opacity .8s; opacity: 0; }

@media (max-width: 820px) {
  .entrance { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .crest-panel { min-height: 34vh; padding: 36px 0; }
  .crest-panel::before { inset: 12px; }
  .crest-panel .duck { width: 120px; }
  .card { justify-content: flex-start; padding: 40px 22px 48px; }
  .card hr { margin: 26px 0 24px; }
  .card .fogg { margin-top: 40px; }
}

/* ==========================================================
   MEMBER PAGES: header, clocks, nav, footer
   ========================================================== */
/* ---------- World clocks: split-flap board ---------- */
.clocks {
  background: linear-gradient(rgba(0,0,0,.38), rgba(0,0,0,.18) 70%, rgba(0,0,0,0));
  overflow-x: auto;
  scrollbar-width: none;
}
.clocks::-webkit-scrollbar { display: none; }
.board {
  display: flex; gap: 30px; justify-content: center;
  width: max-content; min-width: 100%;
  margin: 0 auto; padding: 12px 16px 14px;
}
.city { display: flex; flex-direction: column; gap: 5px; }
.city .name {
  font-family: var(--caps); font-variant: small-caps; font-size: .66rem; letter-spacing: .08em;
  color: var(--brass); white-space: nowrap;
}
.time { display: flex; align-items: center; font-size: 17px; }
.colon {
  width: .55em; text-align: center;
  font-family: var(--flip); color: var(--brass-dim);
}

.flap {
  position: relative;
  display: inline-block;
  width: 1.05em; height: 1.55em;
  margin: 0 1px;
  perspective: 120px;
  font-family: var(--flip); font-weight: 500;
  color: var(--cream);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.flap .h {
  position: absolute; left: 0; right: 0; height: 50%;
  overflow: hidden;
  backface-visibility: hidden;
}
.flap .t, .flap .ft { top: 0; border-radius: 2px 2px 0 0; background: linear-gradient(#2e221a, #241a14); }
.flap .b, .flap .fb { bottom: 0; border-radius: 0 0 2px 2px; background: linear-gradient(#20170f, #18110c); }
.flap b {
  display: block; height: 200%;
  line-height: 1.55em; text-align: center; font-weight: 500;
}
.flap .b b, .flap .fb b { transform: translateY(-50%); }
.flap::after { /* the hinge */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; margin-top: -.5px;
  background: rgba(0,0,0,.85); z-index: 3;
}
.flap .ft, .flap .fb { display: none; z-index: 2; }
.flap .ft { transform-origin: 50% 100%; }
.flap .fb { transform-origin: 50% 0; transform: rotateX(90deg); }
.flap.go .ft, .flap.go .fb { display: block; }
.flap.go .ft { animation: flap-down .15s ease-in forwards; }
.flap.go .fb { animation: flap-up .15s .15s ease-out forwards; }
@keyframes flap-down { from { transform: rotateX(0); } to { transform: rotateX(-90deg); filter: brightness(.6); } }
@keyframes flap-up   { from { transform: rotateX(90deg); filter: brightness(1.4); } to { transform: rotateX(0); } }

.bar {
  max-width: var(--wrap); margin: 0 auto;
  padding: 18px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand .duck { width: 30px; }
.brand .script { font-size: 2rem; }
.bar ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; padding: 0; align-items: center; }
.bar a, .bar button {
  font-family: var(--caps); font-variant: small-caps; font-size: .92rem; letter-spacing: .05em; font-weight: 700;
  line-height: 1.6; display: inline-block; vertical-align: baseline;
  color: #e6dcc6; text-decoration: none;
  background: none; border: 0; cursor: pointer; padding: 6px 0;
  position: relative;
  transition: color .3s, text-shadow .3s;
}
.bar a:hover, .bar button:hover { color: #f7f0e1; text-shadow: 0 0 10px rgba(245,232,205,.3); }
.bar a[aria-current="page"] { color: #fbf5e8; text-shadow: 0 0 12px rgba(245,232,205,.5), 0 0 26px rgba(245,232,205,.2); }
/* a pool of lamplight beneath the page you are on */
.bar a[aria-current="page"]::after {
  content: ""; position: absolute; left: -14px; right: -14px; bottom: -10px; height: 18px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(245,232,205,.24), rgba(245,232,205,0) 70%);
  filter: blur(2px);
}
/* Take Leave: the same brass, set a little apart from the rooms */
.bar li:has(> button) { padding-left: 18px; }

main { max-width: var(--wrap); margin: 0 auto; padding: 24px 16px 80px; }

.page-head { padding: 44px 0 30px; }
.page-head h1 { font-family: var(--display); font-variant: small-caps; font-weight: 700; font-size: clamp(2.2rem, 5.4vw, 3.2rem); letter-spacing: .02em; }
.page-head .kicker { display: none; }

.page-head p.lede { max-width: 560px; margin: 8px 0 0; color: var(--cream-dim); font-style: italic; }

.foot {
  text-align: center; padding: 36px 16px 48px; color: var(--cream-dim);
}
.foot .duck { width: 26px; color: var(--brass-dim); }
.foot p { margin: 8px 0 0; font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .74rem; }

/* ==========================================================
   THE ITINERARY (events.html)
   ========================================================== */
.ticket {
  display: grid;
  grid-template-columns: 190px 1fr;
  background: var(--green);
  border-radius: 3px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.ticket .stub {
  padding: 28px 20px;
  text-align: center;
  border-right: 2px dashed rgba(236,227,207,.22);
  background: var(--green-deep);
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.stub .leg { font-family: var(--caps); font-variant: small-caps; font-size: .72rem; letter-spacing: .08em; color: var(--brass); }
.stub .day { font-family: var(--serif); font-size: 3.6rem; line-height: 1; }
.stub .month { font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .9rem; }
.stub .year { color: var(--cream-dim); font-size: .9rem; }
.ticket .body { padding: 28px 32px; }
.ticket h2 { font-size: clamp(2rem, 4.4vw, 2.7rem); margin-bottom: 12px; }
.ticket .countdown { display: block; font-style: italic; color: var(--brass); font-size: 1.05rem; margin-bottom: 4px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 14px 0 0; }
.facts dt { font-style: italic; color: var(--brass); font-size: 1rem; }
.facts dd { margin: 0; }
.ticket p.details { margin: 16px 0 0; color: var(--cream); opacity: .9; }
.btn {
  display: inline-block; margin-top: 20px;
  font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .78rem;
  color: var(--cream); text-decoration: none;
  border: 1px solid var(--brass); padding: 10px 20px;
  background: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--brass); color: var(--ink); }

.section-title {
  font-family: var(--serif); font-weight: 500; font-size: 1.55rem; color: var(--cream);
  margin: 64px 0 10px;
}

.legs { list-style: none; margin: 0; padding: 0; }
.legs li {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 8px 28px; align-items: baseline;
  padding: 18px 0;
}
.legs .when { color: var(--brass); font-size: 1rem; }
.legs h3 { font-size: 1.5rem; }
.legs .where { color: var(--cream-dim); font-style: italic; margin-top: 2px; }
.legs .dress { font-style: italic; font-size: .98rem; color: var(--cream-dim); white-space: nowrap; }
.legs.past li { opacity: .55; }

.empty { color: var(--cream-dim); font-style: italic; text-align: center; padding: 30px 0; }

/* ==========================================================
   THE CLUBHOUSE (clubhouse.html and room.html)
   A strategy-game view: the stage on the left, HUD on the right
   ========================================================== */
.game-page .foot { display: none; }

.game {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "stage plaque" "stage side";
  height: calc(100vh - var(--head, 140px));
  height: calc(100dvh - var(--head, 140px));
  min-height: 560px;
}

.stage {
  grid-area: stage;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(90,52,26,.14), transparent 60%);
}
.stage .scene {
  position: absolute; inset: 20px;
  width: calc(100% - 40px); height: calc(100% - 40px);
  animation: camera .9s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes camera { from { opacity: 0; transform: scale(1.06); } }

/* The side panels: shaded like a leather-topped desk */
.hud {
  position: relative;
  padding: 16px 18px 18px;
  border-radius: 3px;
  background: rgba(42,25,15,.55);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.hud-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--caps); font-variant: small-caps; font-size: .72rem; letter-spacing: .08em;
  color: var(--brass); margin-bottom: 10px;
}


.key {
  display: inline-block; min-width: 1em; text-align: center;
  font-family: var(--caps); font-variant: small-caps; font-size: .9rem; color: var(--brass);
  line-height: 1;
}

.side {
  grid-area: side;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.side-h { font-family: var(--display); font-variant: small-caps; font-weight: 700; font-size: 1.6rem; }
.side-p { margin: 6px 0 0; color: var(--cream-dim); font-style: italic; font-size: 1rem; line-height: 1.45; }

.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.roster a {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center;
  padding: 8px 10px; text-decoration: none; color: var(--cream);
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.roster a:hover, .roster a.hot { background: rgba(201,166,103,.08); border-color: rgba(184,149,90,.4); }
.r-name { display: block; font-family: var(--serif); font-size: 1.05rem; line-height: 1.2; }
.r-tag { display: block; font-style: italic; color: var(--cream-dim); font-size: .92rem; line-height: 1.3; }

.hint {
  position: absolute; left: 16px; bottom: 12px; z-index: 2;
  margin: 0; font-size: .85rem; font-style: italic; color: rgba(185,176,156,.6);
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  pointer-events: none;
}

.tip {
  position: absolute; z-index: 5; display: none;
  transform: translate(14px, 14px);
  pointer-events: none;
  padding: 5px 10px;
  background: rgba(11,6,4,.95); border: 1px solid var(--brass);
  font-family: var(--caps); font-variant: small-caps; font-size: .74rem; letter-spacing: .08em; color: var(--cream);
  white-space: nowrap;
}
.tip.on { display: block; }

/* Floor plan */
.plan-room { cursor: pointer; outline: none; }
.plan-room .hl { fill: rgba(201,166,103,0); stroke: transparent; stroke-width: 4; transition: fill .2s, stroke .2s; }
.plan-room:hover .hl, .plan-room.hot .hl, .plan-room:focus-visible .hl { fill: rgba(201,166,103,.1); stroke: var(--brass); }
.plate { transition: opacity .25s; pointer-events: none; }
.plate rect { fill: rgba(11,6,4,.82); stroke: rgba(184,149,90,.55); stroke-width: .6; }
.plate-name { font-family: var(--caps); font-variant: small-caps; font-size: 16px; letter-spacing: 1.5px; fill: var(--cream); }
.plate-key { font-family: var(--caps); font-variant: small-caps; font-size: 10px; letter-spacing: 1.5px; fill: var(--brass); }
.plan-room:hover .plate, .plan-room.hot .plate { opacity: .15; }

/* Furniture you can select */
.spot { cursor: pointer; outline: none; transition: filter .15s; }
.spot:hover:not(:has(.photo:hover)), .spot:focus-visible, .spot.on { filter: brightness(1.22) drop-shadow(0 0 3px rgba(232,201,122,.65)); }
/* Members' portraits in the Gallery, each one clickable */
.photo { cursor: pointer; outline: none; transition: filter .15s; }
.photo:hover, .photo:focus-visible, .photo.on { filter: brightness(1.18) drop-shadow(0 0 3px rgba(232,201,122,.75)); }
.sel-box, .sel-corners { display: none; }
@keyframes march { to { stroke-dashoffset: -14; } }
/* The stairs to the Gallery breathe gently so they're easy to find */
.beckon { animation: beckon 2.6s ease-in-out infinite alternate; }
@keyframes beckon { from { stroke-opacity: .45; fill-opacity: .6; } to { stroke-opacity: 1; fill-opacity: 1.6; } }

/* Fire and lamplight */
.flame { transform-box: fill-box; transform-origin: center; animation: flick 1.7s ease-in-out infinite alternate; }
@keyframes flick { 0% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08, 1.15); } 100% { opacity: .9; transform: scale(.95, 1); } }
.glow.fire { animation: fireglow 2.3s ease-in-out infinite alternate; }
@keyframes fireglow { from { opacity: .7; } to { opacity: 1; } }

/* The old portrait in the Gallery: no glow, nothing to give it away */
.secret { cursor: pointer; outline: none; }
.upstairs { margin: 0; color: var(--cream-dim); font-style: italic; }

.vault {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5,3,2,.72);
  animation: vault-in .3s ease both;
}
@keyframes vault-in { from { opacity: 0; } }
.vault-box { width: 100%; max-width: 380px; padding: 24px 24px 18px; text-align: center; }
.vault-lead { margin: 0; color: var(--cream-dim); font-style: italic; font-size: 1rem; }
.vault-ins { margin: 10px 0 16px; font-family: var(--script); font-size: 2rem; color: #e8c97a; line-height: 1.2; }
.vault input {
  width: 100%; font: inherit; font-size: 1.1rem; text-align: center; letter-spacing: .08em;
  color: var(--cream); background: #150d09; border: 1px solid rgba(184,149,90,.4); padding: 9px;
}
.vault input:focus { outline: none; border-color: var(--brass); }
.vault-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.vault-row button { font-family: var(--caps); font-variant: small-caps; font-size: .74rem; letter-spacing: .08em; padding: 9px 14px; cursor: pointer; border: 1px solid rgba(184,149,90,.5); background: none; color: var(--cream-dim); }
.vault-row .vault-yes { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.vault-msg { min-height: 1.3em; margin: 10px 0 0; font-style: italic; color: var(--cream-dim); }
.vault.open .vault-box { transition: transform .7s ease, opacity .7s; transform: perspective(600px) rotateY(-70deg); transform-origin: left center; opacity: 0; }

/* The Members' Book, open on the Library lectern */
.ledger {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5,3,2,.78);
  animation: vault-in .3s ease both;
}
.ledger-book {
  position: relative; width: 100%; max-width: 900px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: #4a1a1d; padding: 14px; border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7), inset 0 0 0 1px rgba(201,166,103,.4);
  outline: none;
}
.ledger-book header {
  text-align: center; padding: 18px 20px 12px;
  background: var(--parchment); color: var(--paper-ink);
  border-bottom: 1px solid rgba(35,31,25,.25);
}
.ledger-book header .script { font-size: 1.6rem; color: var(--oxblood); display: block; line-height: 1; }
.ledger-book header h2 { font-family: var(--caps); font-variant: small-caps; font-weight: 400; font-size: 1.3rem; letter-spacing: .08em; margin: 4px 0 0; color: var(--paper-ink); }
.ledger-pages {
  overflow-y: auto; padding: 18px 28px 28px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(35,31,25,.28) 50%, transparent calc(50% + 1px)),
    repeating-linear-gradient(transparent 0 31px, rgba(42,58,85,.16) 31px 32px),
    var(--parchment);
  color: var(--paper-ink);
  columns: 2; column-gap: 56px;
  min-height: 320px;
}
.ledger .entry { break-inside: avoid; padding: 10px 0 14px; border-bottom: 1px solid rgba(35,31,25,.18); }
.ledger .entry-no { font-family: var(--caps); font-variant: small-caps; font-size: .68rem; letter-spacing: .08em; color: var(--oxblood); }
.ledger .entry h3 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; margin: 2px 0 0; color: var(--paper-ink); }
.ledger .entry-sub { font-style: italic; color: #5a4f40; }
.ledger dl { display: grid; grid-template-columns: 84px 1fr; gap: 2px 12px; margin: 8px 0 0; }
.ledger dt { font-family: var(--caps); font-variant: small-caps; font-size: .66rem; letter-spacing: .08em; color: #7a6a52; padding-top: .3em; }
.ledger dd { margin: 0; overflow-wrap: anywhere; }
.ledger dd a { color: var(--paper-ink); }
.ledger .entry-notes { margin: 8px 0 0; font-style: italic; color: #4a4134; }
.ledger-empty { column-span: all; text-align: center; font-style: italic; color: #7a6a52; margin: 120px 0; }
.ledger-close {
  position: absolute; top: 18px; right: 22px; z-index: 1;
  width: 34px; height: 34px; border: 0; background: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--paper-ink);
}
.ledger-lead { margin: 6px 0 0; font-style: italic; color: #5a4f40; }
.fines-book .ledger-book { max-width: 760px; background: #1a1714; }
.ledger .fine-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.ledger .fine-amount { font-family: var(--serif); font-size: 1.1rem; }
.ledger .stamp {
  font-family: var(--caps); font-variant: small-caps; font-size: .7rem; letter-spacing: .08em;
  padding: 3px 8px; border: 1.5px solid var(--oxblood); color: var(--oxblood);
  transform: rotate(-4deg); opacity: .85;
}
.ledger .fine.paid .stamp { border-color: #3e6f4f; color: #2f5a3e; }
/* Members' own additions: the add form under a book */
.add-form { background: #ddd0b2; color: var(--paper-ink); padding: 14px 28px 16px; border-top: 1px solid rgba(35,31,25,.3); }
.add-title { font-family: var(--caps); font-variant: small-caps; font-size: .74rem; letter-spacing: .08em; color: var(--oxblood); margin-bottom: 8px; }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.add-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.add-field.wide { grid-column: 1 / -1; }
.add-field span { font-family: var(--caps); font-variant: small-caps; font-size: .64rem; letter-spacing: .08em; color: #6a5a42; }
.add-form input, .add-form textarea, .pin-form input, .pin-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--paper-ink);
  background: #f3ead4; border: 1px solid rgba(35,31,25,.3); padding: 6px 9px; border-radius: 0;
}
.add-form input:focus, .add-form textarea:focus, .pin-form input:focus, .pin-form textarea:focus { outline: none; border-color: var(--oxblood); }
.add-row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; }
.add-msg { font-style: italic; color: #5a4f40; margin-right: auto; }
.ledger .btn, .atlas .btn { margin: 0; color: var(--paper-ink); border-color: var(--oxblood); }
.ledger .btn:hover, .atlas .btn:hover { background: var(--oxblood); color: var(--parchment); }
.pick-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: .95rem; }
.pick-by { font-style: italic; color: #5a4f40; margin-right: auto; }
.pick-foot a { color: var(--oxblood); }
.pick-del { font: inherit; font-size: .9rem; font-style: italic; color: #7a3a30; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.records-book .ledger-book { background: #1e3d29; }
.books-book .ledger-book { background: #2a3a55; }
.ledger-book:has(.add-form) .ledger-pages { min-height: 200px; }
.panel .btn + .btn { margin-left: 8px; }

/* The Bar list: tabs for bottles, bars and restaurants */
.pick-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 28px; background: var(--parchment); border-bottom: 1px solid rgba(35,31,25,.2); }
.pick-tabs button { font-family: var(--caps); font-variant: small-caps; font-size: .7rem; letter-spacing: .08em; padding: 6px 12px; cursor: pointer; color: var(--paper-ink); background: none; border: 1px solid rgba(35,31,25,.3); }
.pick-tabs button.on { background: var(--oxblood); color: var(--parchment); border-color: var(--oxblood); }
.add-form select { width: 100%; font: inherit; font-size: 1rem; color: var(--paper-ink); background: #f3ead4; border: 1px solid rgba(35,31,25,.3); padding: 6px 9px; }
.drinks-book .ledger-book { background: #6a1d22; }

/* The Morning Room chat */
.chat-room .ledger-book { max-width: 760px; background: #1d3a2a; }
.chat-log { flex: 1; min-height: 260px; overflow-y: auto; padding: 14px 24px; background: var(--parchment); color: var(--paper-ink); }
.chat-msg { padding: 8px 0; border-bottom: 1px solid rgba(35,31,25,.12); }
.chat-msg.mine { background: rgba(47,90,62,.07); margin: 0 -10px; padding: 8px 10px; }
.chat-head { display: flex; align-items: baseline; gap: 10px; }
.chat-head b { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; color: var(--oxblood); }
.chat-head span { font-family: var(--caps); font-variant: small-caps; font-size: .62rem; letter-spacing: .08em; color: #7a6a52; }
.chat-head .pick-del { margin-left: auto; font-size: .82rem; }
.chat-msg p { margin: 3px 0 0; overflow-wrap: anywhere; }
.chat-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: end; }
.chat-form .add-msg:empty { display: none; }
.chat-form .add-msg { display: block; margin-top: 6px; }

/* The chess table */
.chess-room .ledger-book { max-width: 980px; background: #3a2414; overflow-y: auto; }
.chess-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; padding: 18px 24px 24px; background: var(--parchment); color: var(--paper-ink); }
.chess-boardbox { min-width: 0; }
.chess-board {
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; max-width: 560px; margin: 0 auto;
  border: 10px solid #5e3c22; box-shadow: inset 0 0 0 1px #c9a667, 0 6px 18px rgba(0,0,0,.35);
}
.chess-board .sq { position: relative; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; font: inherit; min-width: 0; min-height: 0; overflow: hidden; }
.chess-board .light { background: #ecd9b0; }
.chess-board .dark { background: #a87a4e; }
.chess-board .last { box-shadow: inset 0 0 0 100px rgba(232,201,122,.38); }
.chess-board .sel { box-shadow: inset 0 0 0 3px #2f5a3e, inset 0 0 0 100px rgba(47,90,62,.25); }
.chess-board .to::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: rgba(47,90,62,.55); }
.chess-board .hit { box-shadow: inset 0 0 0 4px rgba(47,90,62,.7); }
.chess-board .check { box-shadow: inset 0 0 18px 6px rgba(160,30,30,.75); }
.chess-board .sq:focus-visible { outline: 2px solid #2f5a3e; outline-offset: -2px; z-index: 1; }
.chess-board .rk, .chess-board .fl { position: absolute; font-style: normal; font-family: var(--caps); font-variant: small-caps; font-size: .62rem; color: rgba(35,31,25,.6); pointer-events: none; }
.chess-board .rk { top: 2px; left: 3px; }
.chess-board .fl { bottom: 1px; right: 4px; }
.pc { font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", "Apple Symbols", serif; line-height: 1; pointer-events: none; }
.chess-board .pc { font-size: clamp(22px, 5.4vw, 50px); }
.pc.w { color: #fbf6ea; text-shadow: 0 0 1px #1a1714, 0 0 1px #1a1714, 0 1px 1px #1a1714, 0 2px 3px rgba(0,0,0,.35); }
.pc.b { color: #1a1714; text-shadow: 0 1px 0 rgba(255,255,255,.25), 0 2px 3px rgba(0,0,0,.3); }
.chess-taken { min-height: 26px; max-width: 560px; margin: 4px auto; font-size: 20px; letter-spacing: 1px; }
.chess-status { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 12px; }
.chess-promo { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; font-style: italic; }
.chess-promo button { width: 44px; height: 44px; font-size: 32px; display: grid; place-items: center; cursor: pointer; background: #ecd9b0; border: 1px solid #5e3c22; }
.chess-moves { margin: 0; padding: 0 0 0 28px; max-height: 300px; overflow-y: auto; font-family: var(--body); font-size: 1.05rem; }
.chess-moves li { padding: 1px 0; }
.chess-moves li span { display: inline-block; min-width: 64px; }
.chess-moves li.none { list-style: none; margin-left: -28px; font-family: var(--body); font-style: italic; color: #5a4f40; }
.chess-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chess-when { font-style: italic; color: #5a4f40; font-size: .92rem; }

/* The rule book at the whist table */
.rules-book .ledger-book { max-width: 980px; background: #245638; }
.rules-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 0; flex: 1; background: var(--parchment); color: var(--paper-ink); overflow: hidden; }
.rules-index { display: flex; flex-direction: column; padding: 14px 0; border-right: 1px solid rgba(35,31,25,.2); overflow-y: auto; background: #e2d4b2; }
.rules-index button { text-align: left; font: inherit; font-size: 1.02rem; padding: 7px 18px; background: none; border: 0; border-left: 3px solid transparent; cursor: pointer; color: var(--paper-ink); }
.rules-index button.on { border-left-color: var(--oxblood); background: rgba(106,29,34,.08); color: var(--oxblood); }
.rules-page { overflow-y: auto; padding: 18px 30px 28px; max-height: calc(100vh - 210px); }
.rules-page h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; margin: 0; }
.rules-who { font-style: italic; color: #5a4f40; margin: 4px 0 6px; }
.rules-page h4 { font-family: var(--caps); font-variant: small-caps; font-weight: 400; font-size: .78rem; letter-spacing: .08em; color: var(--oxblood); margin: 18px 0 4px; }
.rules-page p { margin: 0 0 8px; line-height: 1.55; max-width: 64ch; }

/* Minutes, albums and the lightbox */
.minutes-book .ledger-book { background: #2a241c; }
.album-book .ledger-book { background: #2a241c; }
.ledger .entry-body p { margin: 6px 0 0; }
.album-book .ledger-pages { columns: 1; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.album-shot { padding: 4px; border: 0; cursor: zoom-in; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: rotate(-.6deg); }
.album-shot:nth-child(2n) { transform: rotate(.7deg); }
.album-shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.album-shot:hover { transform: none; }
.lightbox { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; background: rgba(5,3,2,.92); outline: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: #111; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.lightbox figcaption { color: var(--cream); font-style: italic; text-align: center; padding: 0 8px; }
.lightbox button { font: inherit; background: none; border: 0; color: var(--cream); cursor: pointer; }
.lb-prev, .lb-next { font-size: 3rem; height: 100%; }
.lb-close { position: absolute; top: 10px; right: 16px; font-size: 2rem; }

/* The Morning Papers: cuttings pinned up on old newsprint */
.papers .papers-sheet {
  position: relative; width: 100%; max-width: 1100px; max-height: calc(100vh - 32px); overflow-y: auto; outline: none;
  padding: 22px 30px 26px;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.35), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(120,90,40,.18), transparent 60%),
    #d9cba6;
  color: #1f1a12;
  box-shadow: 0 20px 60px rgba(0,0,0,.7), inset 0 0 80px rgba(110,80,30,.25);
  font-family: "Old Standard TT", var(--body);
}
.papers .ledger-close { color: #1f1a12; top: 12px; right: 14px; }
.masthead { text-align: center; border-bottom: 4px double #1f1a12; padding-bottom: 6px; margin-bottom: 18px; }
.mast-ears { display: flex; justify-content: space-between; padding-right: 34px; font-family: "Old Standard TT", serif; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid #1f1a12; padding-bottom: 4px; }
.masthead h2 { font-family: "UnifrakturMaguntia", var(--serif); font-weight: 400; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.05; margin: 6px 0 4px; letter-spacing: .01em; }
.mast-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #1f1a12; padding-top: 4px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.papers-page { margin: 0 0 22px; }
.papers-page h3 {
  font-family: "Old Standard TT", serif; font-weight: 700; font-size: 1.6rem; text-transform: uppercase; letter-spacing: .06em;
  margin: 0 0 12px; padding-bottom: 4px; border-bottom: 2px solid #1f1a12; display: flex; align-items: baseline; gap: 14px;
}
.papers-page h3 span { order: 2; font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; font-size: .95rem; color: #4a3f2c; }
.cuttings { columns: 3 230px; column-gap: 22px; }
.cutting {
  display: block; break-inside: avoid; margin: 0 0 18px; padding: 16px 16px 14px;
  background: linear-gradient(180deg, #f2e8cc, #e9dcb8); color: #1f1a12; text-decoration: none;
  transform: rotate(var(--tilt, 0deg));
  filter: drop-shadow(1px 3px 3px rgba(40,25,5,.35));
  transition: transform .2s ease;
  position: relative;
}
.cutting:hover, .cutting:focus-visible { transform: rotate(0deg) scale(1.02); outline: none; }
.cutting h4 { font-family: "Old Standard TT", serif; font-weight: 700; font-size: 1.22rem; line-height: 1.15; margin: 0 0 6px; }
.cutting p { margin: 0 0 8px; font-size: .98rem; line-height: 1.38; text-align: justify; hyphens: auto; }
.cutting .byline { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #5a4a30; border-top: 1px solid rgba(31,26,18,.35); padding-top: 5px; }
.cutting.lead { column-span: all; padding: 20px 26px 16px; margin-bottom: 22px; }
.cutting.lead h4 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); text-align: center; line-height: 1.08; }
.cutting.lead p { font-size: 1.12rem; max-width: 68ch; margin-left: auto; margin-right: auto; text-align: center; }
.cutting.lead .byline { text-align: center; }
.stop-press {
  display: inline-block; margin-bottom: 6px; padding: 1px 7px;
  font-family: "Old Standard TT", serif; font-weight: 700; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: #8a1a1a; border: 1.5px solid #8a1a1a; transform: rotate(-2deg);
}
.papers-wait { text-align: center; font-style: italic; padding: 80px 0; margin: 0; }
.papers-foot { border-top: 1px solid #1f1a12; padding-top: 8px; font-size: .82rem; font-style: italic; color: #4a3f2c; }
@media (max-width: 700px) {
  .papers .papers-sheet { padding: 16px 14px; }
  .mast-ears { font-size: .6rem; }
  .papers-page h3 { font-size: 1.25rem; flex-direction: column; gap: 0; }
}

/* The book club's notices */
.bookclub-book .ledger-book { background: #6a1d22; }
.bookclub-book .ledger-pages, .album-book .ledger-pages {
  columns: 1;
  background: repeating-linear-gradient(transparent 0 31px, rgba(42,58,85,.16) 31px 32px), var(--parchment);
}
.bc-entry { display: flex; gap: 18px; align-items: flex-start; }
.bc-text { min-width: 0; flex: 1; }
.bc-cover { width: 92px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.35); transform: rotate(-1.5deg); }
.bc-lead { background: rgba(106,29,34,.06); border: 1px solid rgba(106,29,34,.35); border-bottom-width: 1px; padding: 16px 18px; margin: 4px 0 10px; }
.bc-lead .bc-cover { width: 120px; }
.bc-lead h3 { font-size: 1.6rem; }
.bc-flag { display: inline-block; font-family: var(--caps); font-variant: small-caps; font-size: .66rem; letter-spacing: .08em; color: var(--parchment); background: var(--oxblood); padding: 3px 9px; margin-bottom: 8px; }
@media (max-width: 700px) {
  .bc-entry { flex-direction: column; }
  .bc-cover, .bc-lead .bc-cover { width: 110px; }
}

/* The slate, chalked up in the Card Room */
.slate-board .slate-frame {
  position: relative; width: 100%; max-width: 860px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 26px 30px 30px; outline: none;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.06), transparent 60%), #1d221e;
  border: 14px solid #6e4a28; box-shadow: inset 0 0 0 2px #4a2e14, 0 20px 60px rgba(0,0,0,.7);
  color: #e9e6dc; font-family: var(--wire);
}
.slate-frame h2 { font-family: var(--script); font-size: 2.6rem; color: #f3f0e6; text-align: center; margin: 0; font-weight: 400; }
.slate-lead { text-align: center; font-style: italic; color: rgba(233,230,220,.7); margin: 0 0 16px; font-family: var(--body); }
.slate-frame table { width: 100%; border-collapse: collapse; }
.slate-frame th { text-align: left; font-family: var(--caps); font-variant: small-caps; font-weight: 400; font-size: .72rem; letter-spacing: .08em; color: rgba(233,230,220,.65); border-bottom: 1px dashed rgba(233,230,220,.35); padding: 6px 8px; }
.slate-frame td { padding: 8px; border-bottom: 1px dashed rgba(233,230,220,.15); vertical-align: top; }
.slate-frame td.win { color: #f5e7a8; }
.slate-empty { text-align: center; font-style: italic; color: rgba(233,230,220,.6); margin: 50px 0; font-family: var(--body); }
.slate-frame .ledger-close { color: #e9e6dc; top: 10px; right: 12px; }

@media (max-width: 700px) {
  .chat-row { grid-template-columns: 1fr; }
  .chess-wrap { grid-template-columns: 1fr; padding: 12px; }
  .chess-board { border-width: 6px; }
  .rules-wrap { grid-template-columns: 1fr; }
  .rules-index { flex-direction: row; overflow-x: auto; padding: 6px; border-right: 0; border-bottom: 1px solid rgba(35,31,25,.2); }
  .rules-index button { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .rules-index button.on { border-bottom-color: var(--oxblood); }
  .rules-page { padding: 14px 16px 20px; max-height: none; }
  .slate-frame { padding: 18px 12px; border-width: 8px; font-size: .9rem; }
  .slate-frame td, .slate-frame th { padding: 6px 4px; }
  .lightbox { grid-template-columns: 36px 1fr 36px; }
}

/* The atlas behind the Map Room globe */
.atlas .ledger-book { max-width: 1240px; background: #3a2a18; overflow-y: auto; }
.atlas-stage { position: relative; background: #e8d9b0; line-height: 0; }
.atlas-stage .ledger-empty { line-height: 1.5; margin: 0; padding: 160px 0; }
.atlas-map { display: block; width: 100%; height: auto; aspect-ratio: 1060 / 560; cursor: grab; touch-action: none; user-select: none; }
.atlas-map:active { cursor: grabbing; }
.atlas-stage.marking .atlas-map { cursor: crosshair; }
.atlas-stage.marking .pin { pointer-events: none; opacity: .75; }
.atlas-map .sea { fill: #d9cfa8; }
.atlas-map .lines path { stroke: #8a6f45; stroke-width: .5; stroke-opacity: .45; fill: none; vector-effect: non-scaling-stroke; }
.atlas-map .lines.special path { stroke: #8a3a2a; stroke-dasharray: 5 4; stroke-opacity: .55; }
.atlas-map .coast { fill: none; stroke: #7d8f86; stroke-linejoin: round; }
.atlas-map .coast.c1 { stroke-width: 3; stroke-opacity: .32; }
.atlas-map .coast.c2 { stroke-width: 7; stroke-opacity: .16; }
.atlas-map .coast.c3 { stroke-width: 12; stroke-opacity: .09; }
.atlas-map .land { fill: #ecdcae; stroke: #5e4523; stroke-width: .7; stroke-linejoin: round; }
.atlas-map .borders { fill: none; stroke: #9a6a3a; stroke-width: .45; stroke-dasharray: 2 1.6; stroke-opacity: .7; }
.atlas-map .seas text { font-family: var(--script); font-size: 17px; fill: #5e4a2c; fill-opacity: .7; }
.atlas-map .lat-labels text { font-family: var(--body); font-style: italic; font-size: 7px; fill: #7a3a2a; fill-opacity: .8; }
.atlas-map .rose path.rose-a { fill: #5e4523; }
.atlas-map .rose path.rose-b { fill: #efe2bd; stroke: #5e4523; stroke-width: .4; }
.atlas-map .rose-ring { fill: none; stroke: #5e4523; stroke-width: .6; }
.atlas-map .rose text { font-family: var(--caps); font-variant: small-caps; font-size: 11px; fill: #5e4523; }
.atlas-map .cartouche path { fill: #efe2bd; stroke: #5e4523; stroke-width: 1.2; }
.atlas-map .cartouche path.inner { fill: none; stroke-width: .5; }
.atlas-map .cartouche .k1 { font-family: var(--script); font-size: 19px; fill: #6a1d22; }
.atlas-map .cartouche .k2 { font-family: var(--caps); font-variant: small-caps; font-size: 8px; letter-spacing: 1.5px; fill: #3a2a18; }
.atlas-map .paper { pointer-events: none; fill: #fff; }
.atlas-map .frame rect { fill: none; stroke: #4a3418; stroke-width: 1; }
.atlas-map .frame path { stroke: #4a3418; stroke-width: .6; }
.atlas-map .frame text { font-family: var(--body); font-size: 7px; fill: #4a3418; }
.atlas-map .pin { cursor: pointer; outline: none; }
.atlas-map .pin-k { transform: scale(var(--k, 1)); }
.atlas-map .pin-needle { stroke: #3a2a18; stroke-width: 1.2; }
.atlas-map .pin-head { fill: #8a2a30; stroke: #4a1015; stroke-width: .7; }
.atlas-map .pin.mine .pin-head { fill: #2f5a3e; stroke: #1e3d29; }
.atlas-map .pin-shine { fill: #fff; fill-opacity: .55; }
.atlas-map .pin-name { font-family: var(--body); font-size: 9px; fill: #2b1d0e; paint-order: stroke; stroke: #efe2bd; stroke-width: 2.6px; stroke-linejoin: round; }
.atlas-map .pin:hover .pin-head, .atlas-map .pin:focus-visible .pin-head { stroke: #e8c97a; stroke-width: 1.4; }
.atlas-card {
  position: absolute; z-index: 2; width: 260px; line-height: 1.4;
  background: #f3ead4; color: var(--paper-ink); padding: 12px 14px 12px;
  border: 1px solid #5e4523; box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.atlas-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 0 22px 0 0; }
.atlas-card .card-place { font-style: italic; color: #5a4f40; }
.atlas-card p { margin: 6px 0 0; }
.atlas-card .card-when { font-family: var(--caps); font-variant: small-caps; font-size: .62rem; letter-spacing: .08em; color: #7a6a52; margin-top: 8px; }
.atlas-card .card-close { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--paper-ink); }
.atlas-card .pick-del { margin-top: 8px; }
.pin-form { display: grid; gap: 6px; }
.pin-form h3 { margin-bottom: 2px; }
.pin-form .add-row { margin-top: 2px; }
.atlas-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 18px; background: var(--parchment); color: var(--paper-ink); border-top: 1px solid rgba(35,31,25,.25); }
.atlas-tools { display: flex; align-items: center; gap: 12px; }
.atlas-zoom { display: inline-flex; }
.atlas-zoom button { width: 34px; height: 34px; font: inherit; font-size: 1.1rem; cursor: pointer; color: var(--paper-ink); background: #f3ead4; border: 1px solid rgba(35,31,25,.35); margin-left: -1px; }
.atlas-zoom button:hover { background: #fff8e6; }
.atlas-msg { margin: 0; font-style: italic; color: #5a4f40; }
.atlas-list { background: #ddd0b2; color: var(--paper-ink); padding: 12px 18px 16px; }
.atlas-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.atlas-list li button { width: 100%; text-align: left; font: inherit; color: var(--paper-ink); background: none; border: 0; padding: 4px 0; cursor: pointer; display: flex; flex-direction: column; }
.atlas-list li button:hover b { color: var(--oxblood); }
.atlas-list b { font-weight: 500; }
.atlas-list span { font-style: italic; font-size: .92rem; color: #5a4f40; }
.atlas-none { margin: 0; font-style: italic; color: #5a4f40; }

@media (max-width: 700px) {
  .add-grid { grid-template-columns: 1fr; }
  .add-form { padding: 12px 16px 14px; }
  .atlas-card { width: min(260px, calc(100% - 16px)); }
  .ledger-pages { columns: 1; padding: 14px 18px 20px; background: repeating-linear-gradient(transparent 0 31px, rgba(42,58,85,.16) 31px 32px), var(--parchment); }
  .ledger-book { padding: 8px; }
}

/* Room page HUD */
.plaque { grid-area: plaque; margin: 16px 16px 0; }
.plaque .up { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--cream-dim); text-decoration: none; margin-bottom: 10px; }
.plaque .up:hover { color: var(--cream); }
.plaque .num { font-family: var(--caps); font-variant: small-caps; font-size: .74rem; letter-spacing: .08em; color: var(--brass); }
.plaque h1 { font-family: var(--display); font-variant: small-caps; font-weight: 700; font-size: 1.5rem; margin-top: 2px; }
.plaque .tag { font-style: italic; color: var(--cream-dim); font-size: 1rem; }
.plaque .chip {
  display: inline-block; margin-top: 10px; padding: 3px 9px;
  border: 1px solid rgba(184,149,90,.5); font-family: var(--caps); font-variant: small-caps; font-size: .68rem; letter-spacing: .08em; color: var(--brass);
}

.minimap svg { display: block; width: 100%; height: auto; }
.minimap a rect { transition: opacity .15s; }
.minimap a:hover rect { opacity: .75; }

.panel h2 { font-size: 1.35rem; }
.panel .sub { font-style: italic; color: var(--cream-dim); font-size: .95rem; }
.panel p { margin: 12px 0 0; color: var(--cream); opacity: .9; font-size: 1.02rem; line-height: 1.5; }
.panel .btn { margin-top: 16px; }
.panel .nokey { color: var(--brass-dim); font-style: italic; }
.panel .hint-inline { color: var(--cream-dim); font-style: italic; font-size: .95rem; }
.panel .back {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--body); font-size: .95rem; color: var(--cream-dim);
}
.panel .back:hover { color: var(--cream); }
.unit { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.portrait {
  width: 92px; height: 92px;
  border: 1px solid rgba(184,149,90,.5);
  background: #0b0604;
  box-shadow: inset 0 0 18px rgba(0,0,0,.8);
}
.portrait svg { display: block; width: 100%; height: 100%; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.panel .picture {
  margin: 14px 0 0; padding: 6px;
  background: linear-gradient(135deg, #c9a667, #8a7046);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.panel .picture img { display: block; width: 100%; max-height: 340px; object-fit: contain; background: #0b0604; }

.tabs { display: none; }

@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "plaque" "stage" "side" "tabs"; height: auto; min-height: 0; }
  .stage { aspect-ratio: 416 / 316; border-right: 0; }
  .tabs { grid-area: tabs; }
  .stage:has(.plan) { aspect-ratio: 1228 / 628; }
  .stage .scene { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .hint { display: none; }
  .plaque { margin: 14px 16px; }
  .side { border-left: 0; border-top: 1px solid rgba(184,149,90,.35); }
  .minimap-box { display: none; }
  .tabs {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 24px; background: #0d0705;
  }
  .tabs a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px; border: 1px solid rgba(184,149,90,.3);
    color: var(--cream-dim); text-decoration: none; font-size: .95rem;
  }
  .tabs a[aria-current="page"] { color: var(--cream); border-color: var(--brass); }
}

/* ==========================================================
   THE SECRETARY'S OFFICE (admin.html)
   ========================================================== */
.of-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.of-door { width: 100%; max-width: 400px; text-align: center; padding: 32px 28px; }
.of-door .duck { width: 56px; }
.of-door h1 { font-size: 1.7rem; margin: 10px 0 22px; }
.of-door label { display: block; text-align: left; font-size: 1rem; color: var(--cream-dim); margin-bottom: 6px; }
.of-door a { display: inline-block; margin-top: 18px; font-size: .95rem; color: var(--cream-dim); }
.of-row { display: flex; gap: 8px; }
.of-row input { flex: 1; min-width: 0; }
.of-msg { min-height: 1.4em; margin: 10px 0 0; color: #e07a7f; font-style: italic; }

.office input[type="text"], .office input[type="password"], .office input[type="date"], .office input[type="time"],
.office input[type="email"], .office input[type="tel"],
.office textarea, .office select {
  width: 100%;
  font: inherit; font-size: 1.02rem;
  color: var(--cream); background: #150d09;
  border: 1px solid rgba(184,149,90,.35); border-radius: 2px;
  padding: 8px 10px;
  color-scheme: dark;
}
.office textarea { resize: vertical; line-height: 1.45; }
.office input:focus, .office textarea:focus, .office select:focus { outline: none; border-color: var(--brass); background: #1a110b; }

.of-btn {
  font-family: var(--caps); font-variant: small-caps; font-size: .76rem; letter-spacing: .08em;
  padding: 9px 14px; cursor: pointer; white-space: nowrap;
  color: var(--cream); background: transparent;
  border: 1px solid rgba(184,149,90,.55); border-radius: 2px;
}
.of-btn:hover { border-color: var(--brass); background: rgba(201,166,103,.08); }
.of-btn.primary { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.of-btn.primary:hover { background: #d8b878; }
.of-btn.primary:disabled { opacity: .4; cursor: default; }
.of-btn.ghost { border-color: transparent; color: var(--cream-dim); }

.of-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 12px 20px;
  background: rgba(14,8,6,.96);
  border-bottom: 1px solid rgba(184,149,90,.35);
}
.of-brand { display: flex; align-items: center; gap: 12px; }
.of-brand .duck { width: 28px; }
.of-brand .script { font-size: 1.8rem; display: block; }
.of-brand small { display: block; font-family: var(--caps); font-variant: small-caps; font-size: .66rem; letter-spacing: .08em; color: var(--brass); margin-top: 2px; }
.of-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.of-status { font-size: .95rem; font-style: italic; color: var(--cream-dim); margin-right: 6px; }
.of-status::before { content: "●"; font-style: normal; margin-right: 6px; color: #5f8f6a; }
.of-status.dirty::before { color: #e8c97a; }
.of-status.done { color: #9cc7a6; }
.of-status.bad { color: #e8a06a; }
.of-status.bad::before { color: #e07a7f; }
label.of-btn { display: inline-flex; align-items: center; justify-content: center; }

.of-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }
.of-nav { display: flex; flex-direction: column; gap: 2px; padding: 24px 12px; position: sticky; top: 70px; align-self: start; }
.of-nav button {
  text-align: left; font: inherit; font-size: 1.05rem;
  color: var(--cream-dim); background: none; border: 0; border-left: 2px solid transparent;
  padding: 8px 12px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.of-nav button:hover { color: var(--cream); }
.of-nav button.on { color: var(--cream); border-left-color: var(--brass); background: rgba(201,166,103,.06); }
.of-count { font-family: var(--flip); font-size: .72rem; color: var(--brass); }

.of-main { padding: 28px 24px 80px; min-width: 0; margin: 0; max-width: 860px; width: 100%; }
.of-main h1 { font-size: 2rem; }
.of-intro { color: var(--cream-dim); font-style: italic; max-width: 640px; margin: 8px 0 22px; }
.of-empty { color: var(--cream-dim); font-style: italic; }
.of-add {
  font-family: var(--caps); font-variant: small-caps; font-size: .78rem; letter-spacing: .08em;
  color: var(--ink); background: var(--brass); border: 0; padding: 10px 16px; cursor: pointer; margin-bottom: 16px;
}
.of-list { display: grid; gap: 10px; }
.of-card { border: 1px solid rgba(184,149,90,.28); background: #130b08; }
.of-card[open] { border-color: rgba(184,149,90,.55); }
.of-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; cursor: pointer; list-style: none;
}
.of-card summary::-webkit-details-marker { display: none; }
.of-sum { min-width: 0; display: flex; flex-direction: column; }
.of-sum b { font-weight: 500; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-sum i { color: var(--cream-dim); font-size: .92rem; }
.of-tools { display: flex; gap: 4px; flex-shrink: 0; }
.of-tools button {
  font: inherit; font-size: .9rem; min-width: 32px; height: 30px;
  color: var(--cream-dim); background: none; border: 1px solid rgba(184,149,90,.25); cursor: pointer;
}
.of-tools button:hover:not(:disabled) { color: var(--cream); border-color: var(--brass); }
.of-tools button:disabled { opacity: .3; cursor: default; }
.of-tools .of-del { padding: 0 10px; }
.of-tools .of-del:hover { color: #e07a7f !important; border-color: #a0393f !important; }

.of-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 4px 14px 18px; }
.of-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.of-field.wide { grid-column: 1 / -1; }
.of-field.check { flex-direction: row; align-items: center; gap: 10px; grid-column: 1 / -1; cursor: pointer; }
.of-field.check input { width: 18px; height: 18px; accent-color: var(--brass); }
.of-label { font-family: var(--caps); font-variant: small-caps; font-size: .7rem; letter-spacing: .08em; color: var(--brass); }
.of-field.check .of-label { font-family: var(--body); font-size: 1rem; letter-spacing: 0; color: var(--cream); }
.of-hint { color: var(--cream-dim); font-size: .88rem; font-style: italic; margin: 0; }
.of-warn { color: #e8a06a; font-size: .88rem; }
.of-warn:empty { display: none; }
.of-spot { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; border: 1px solid rgba(184,149,90,.2); padding: 12px 14px 14px; margin: 4px 0 0; }
.of-spot legend { font-family: var(--serif); font-size: 1.05rem; padding: 0 6px; }
.of-pic { grid-column: 1 / -1; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.of-pic-view {
  width: 120px; height: 90px; display: grid; place-items: center; overflow: hidden;
  background: #0b0604; border: 1px solid rgba(184,149,90,.45);
  color: var(--cream-dim); font-style: italic; font-size: .9rem; text-align: center;
}
.of-doc .of-pic-view a { color: #e8c97a; font-style: normal; }
.of-pic-view img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; grid-area: 1 / 1; }
.of-pic-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.of-pic-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.of-hang { grid-column: 1 / -1; border: 1px solid rgba(184,149,90,.2); padding: 12px 14px 14px; }
.of-hang h3 { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; margin: 0 0 4px; }
.of-adds { padding: 0 14px 12px; }
.of-add-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(184,149,90,.15); }
.of-add-row b { font-weight: 500; display: block; }
.of-pass { padding: 16px; }
.of-pass h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 0 0 10px; }
.of-passrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.of-steps ol { padding-left: 22px; line-height: 1.7; }
.of-steps code { font-family: var(--flip); font-size: .9em; color: #e8c97a; }
.of-steps p { max-width: 640px; color: var(--cream-dim); }

@media (max-width: 820px) {
  .of-body { grid-template-columns: 1fr; }
  .of-nav { flex-direction: row; overflow-x: auto; position: static; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .of-nav button { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; gap: 8px; }
  .of-nav button.on { border-bottom-color: var(--brass); }
  .of-top { position: static; }
  .of-fields, .of-spot, .of-passrow { grid-template-columns: 1fr; }
  .of-pic { grid-template-columns: 96px 1fr; }
  .of-pic-view { width: 96px; height: 72px; }
  .of-main { padding: 20px 16px 60px; }
}

/* ---------- Announcements and the admin's preview bar ---------- */
.announce {
  overflow: hidden;
  /* the words fade out slowly first, then the band folds away */
  transition: opacity 2.2s ease, height 1.1s ease 2s, border-width 1.1s ease 2s;
  /* "backwards" so the arrival doesn't hold the band visible and spoil the fade */
  animation: announce-in .6s ease backwards;
  background: linear-gradient(90deg, var(--oxblood), #7a2228 50%, var(--oxblood));
  border-top: 1px solid rgba(201,166,103,.5);
  border-bottom: 1px solid rgba(201,166,103,.5);
}
.announce-in {
  max-width: var(--wrap); margin: 0 auto; padding: 9px 48px 9px 16px;
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px;
  text-align: center; font-size: 1.02rem; color: var(--cream);
}
.announce.gone { opacity: 0; height: 0 !important; border-width: 0; }
@keyframes announce-in { from { opacity: 0; } }
.announce-k { font-family: var(--caps); font-variant: small-caps; font-size: .68rem; letter-spacing: .08em; color: #e8c97a; }
.announce a { color: #e8c97a; white-space: nowrap; }
.announce button {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; background: none; border: 0; cursor: pointer;
  color: rgba(236,227,207,.7); font-size: 1.3rem; line-height: 1;
}
.announce button:hover { color: var(--cream); }

.preview-bar {
  position: fixed; left: 50%; bottom: 16px; translate: -50% 0; z-index: 50;
  max-width: calc(100% - 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 10px 16px;
  background: #e8c97a; color: var(--ink);
  font-size: .98rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.preview-bar a { color: var(--ink); font-weight: 500; }
.preview-bar button { font: inherit; background: var(--ink); color: #e8c97a; border: 0; padding: 4px 10px; cursor: pointer; }

/* ==========================================================
   THE NOTICEBOARD (noticeboard.html)
   ========================================================== */
.baize {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, #173323, var(--green-deep) 80%);
  border: 10px solid #2a1d12;
  outline: 1px solid var(--brass-dim);
  box-shadow: inset 0 0 60px rgba(0,0,0,.5), 0 20px 50px rgba(0,0,0,.4);
  padding: 44px 32px;
  columns: 3 280px;
  column-gap: 32px;
}
.notice {
  break-inside: avoid;
  display: block;
  margin: 0 0 32px;
  background: var(--parchment);
  color: var(--paper-ink);
  padding: 26px 24px 22px;
  position: relative;
  box-shadow: 0 8px 18px rgba(0,0,0,.4);
  transform: rotate(var(--tilt, 0deg));
}
.notice::before { /* brass pin */
  content: ""; position: absolute; top: 9px; left: 50%; translate: -50% 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d79c, var(--brass) 45%, #6b5530);
  box-shadow: 0 2px 3px rgba(0,0,0,.5);
}
.notice .date { font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .7rem; color: var(--oxblood); }
.notice h2 { font-size: 1.35rem; margin: 6px 0 10px; color: var(--paper-ink); }
.notice p { margin: 0 0 .7em; font-size: 1.05rem; line-height: 1.5; }
.notice .from { font-style: italic; margin: 12px 0 0; text-align: right; color: #4a4236; }
.notice.pinned { outline: 1px solid var(--oxblood); outline-offset: -6px; }

.notice.telegram { background: #efe5c9; padding-top: 30px; }
.telegram .wirehead {
  border-bottom: 2px solid var(--oxblood);
  padding-bottom: 8px; margin-bottom: 14px;
  text-align: center;
}
.telegram .wirehead strong { display: block; font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--oxblood); }
.telegram .wirehead span { font-family: var(--caps); font-variant: small-caps; letter-spacing: .08em; font-size: .62rem; color: #5a5040; }
.telegram .meta { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; font-family: var(--caps); font-variant: small-caps; font-size: .68rem; letter-spacing: .08em; color: #5a5040; margin-bottom: 12px; }
.telegram .tape {
  font-family: var(--wire); text-transform: uppercase; font-size: .9rem; line-height: 1.7;
  background: #f7f0dc; padding: 10px 12px; border: 1px solid rgba(0,0,0,.08);
}
.telegram .tape .stop { color: var(--oxblood); font-weight: 700; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .bar { justify-content: center; }
  .bar ul { justify-content: center; }
  .ticket { grid-template-columns: 1fr; }
  .ticket .stub { border-right: 0; border-bottom: 2px dashed rgba(236,227,207,.22); flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; padding: 18px; }
  .stub .leg, .stub .year { flex-basis: 100%; }
  .stub .day { font-size: 2.4rem; }
  .ticket .body { padding: 22px 20px; }
  .legs li { grid-template-columns: 1fr; gap: 2px; }
  .baize { padding: 32px 18px; border-width: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Written by hand: entries in the club's books, and the atlas ---------- */
.ledger .entry h3, .ledger .entry-sub, .ledger .entry-notes, .ledger .entry-body,
.ledger dd, .ledger .pick-by, .ledger .fine-amount, .ledger-empty, .atlas-none {
  font-family: var(--hand);
}
.ledger .entry h3 { font-size: 1.75rem; letter-spacing: 0; line-height: 1.15; }
.ledger .bc-lead h3 { font-size: 2.1rem; }
.ledger .entry-sub, .ledger .entry-notes, .ledger .entry-body, .ledger dd { font-size: 1.22rem; font-style: normal; line-height: 1.4; }
.ledger .pick-by { font-size: 1.12rem; font-style: normal; }
.ledger .fine-amount { font-size: 1.4rem; }
.ledger-empty { font-size: 1.3rem; font-style: normal; }
.atlas-map .seas text { font-family: var(--hand); font-size: 19px; }
.atlas-map .pin-name { font-family: var(--hand); font-size: 12px; }
.atlas-card h3, .atlas-card .card-place, .atlas-card p, .atlas-list b, .atlas-list span { font-family: var(--hand); font-style: normal; }
.atlas-card h3 { font-size: 1.5rem; }
.atlas-card p, .atlas-card .card-place { font-size: 1.15rem; }
.atlas-list b { font-size: 1.25rem; font-weight: 400; }
.atlas-list span { font-size: 1.05rem; }

/* ---------- The wireless: a little set in the corner ---------- */
.wireless {
  position: fixed; left: 16px; bottom: 16px; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 7px 14px 7px 8px; border: 0; border-radius: 22px; cursor: pointer;
  background: rgba(42,25,15,.82); color: var(--cream-dim);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  font-family: var(--body); font-size: .95rem; font-style: italic; text-align: left;
}
.wireless:hover { color: var(--cream); }
.wireless-set {
  position: relative; flex-shrink: 0; width: 30px; height: 26px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(#7a5232, #4a2e18); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.wireless-set::before {   /* the speaker cloth */
  content: ""; position: absolute; left: 4px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: repeating-linear-gradient(90deg, #c9b48a 0 1px, #8a7046 1px 3px);
}
.wireless-set i {         /* the dial, which glows when the set is on */
  position: absolute; right: 4px; top: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: #3a2414; transition: background .4s, box-shadow .4s;
}
.wireless.on .wireless-set i { background: #ffcf7a; box-shadow: 0 0 6px 2px rgba(255,207,122,.6); }
.wireless.on { color: var(--cream); }
.wireless-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* switched off, it is just the little set; the words show on hover */
.wireless:not(.on) { padding-right: 8px; gap: 0; }
.wireless:not(.on) .wireless-label { max-width: 0; transition: max-width .3s; }
.wireless:not(.on):hover, .wireless:not(.on):focus-visible { padding-right: 14px; gap: 10px; }
.wireless:not(.on):hover .wireless-label, .wireless:not(.on):focus-visible .wireless-label { max-width: 240px; }
/* in the rooms it sits in the corner of the room, above the key hints */
.game-page .wireless { left: 16px; bottom: 12px; }
.game-page .hint { left: auto; right: 16px; }
.of-sound { grid-template-columns: 240px 1fr; }
.of-sound .of-pic-view { width: 240px; height: 60px; }
.of-rooms { grid-template-columns: 1fr 1fr; }

/* ---------- Privacy & contact ---------- */
.privacy-page .bar { padding-top: 26px; }
.privacy { max-width: 760px; }
.privacy section { margin: 0 0 30px; }
.privacy h2 { font-size: 1.5rem; margin: 0 0 8px; }
.privacy p, .privacy li { color: var(--cream); opacity: .92; line-height: 1.6; }
.privacy p { margin: 0 0 12px; }
.privacy ul { margin: 0 0 12px; padding-left: 22px; }
.privacy li { margin-bottom: 6px; }
.privacy strong { font-weight: 600; color: var(--cream); }
.privacy a { color: #e8d3a4; }
.privacy code { font-family: var(--flip); font-size: .85em; color: #e8d3a4; }
.foot-link { display: inline-block; margin-top: 10px; color: var(--cream-dim); font-size: .92rem; }
.foot-link:hover { color: var(--cream); }
.card .small a { color: inherit; }

/* ---------- The entrance hall, in first person ---------- */
/* A tall stone hall in the St James's manner, lit partly by
   chandeliers and partly by the morning coming in off the street */
.h3d {
  --p: 640px;
  --stone: #e2d8c2; --stone-dk: #c9bda2; --mahog: #4a2216; --gilt: #c9a24f;
  position: absolute; inset: 0; overflow: hidden;
  perspective: var(--p); perspective-origin: 50% 50%;
  background: #1a120c; cursor: grab; touch-action: none; user-select: none;
  transition: opacity .6s ease;
}
.h3d:active { cursor: grabbing; }
.h3d::after { content: ""; position: absolute; inset: 0; z-index: 6; background: #000; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.h3d.h3d-leaving::after { opacity: 1; }
.h3d-dive { position: absolute; z-index: 5; pointer-events: none; background: radial-gradient(ellipse at 50% 70%, #0b0705, #000 70%);
  transition: left 1s cubic-bezier(.5,0,.8,.4), top 1s cubic-bezier(.5,0,.8,.4), width 1s cubic-bezier(.5,0,.8,.4), height 1s cubic-bezier(.5,0,.8,.4); }
.h3d-dive.in { left: -10% !important; top: -10% !important; width: 120% !important; height: 120% !important; }
.h3d-world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.h3d-world > div { position: absolute; left: 0; top: 0; backface-visibility: hidden; }
.h3d-vignette { position: absolute; inset: 0; pointer-events: none;
  background:
    url("hall/grain.png") 0 0 / 256px 256px,
    radial-gradient(ellipse at 50% 46%, rgba(255,214,150,.06), transparent 45%, rgba(20,12,6,.35) 78%, rgba(12,7,4,.75)); }

/* walls: dressed stone with moulded panels, a deep cornice, and mahogany panelling below */
.h3d-wall {
  height: 640px;
  background:
    /* ambient shadow gathering in the corners of the room */
    linear-gradient(to bottom, rgba(40,25,12,.35), transparent 14%, transparent 80%, rgba(20,10,4,.5)),
    /* cornice */
    linear-gradient(to bottom, #f1e9d6 0 10px, #b9ab8c 10px 13px, #eae1cb 13px 26px, #a8987a 26px 29px, rgba(0,0,0,.18) 29px 36px, transparent 36px),
    /* dado rail */
    linear-gradient(to bottom, transparent calc(100% - 206px), #7a4228 calc(100% - 206px) calc(100% - 200px), #2e140c calc(100% - 200px) calc(100% - 196px), transparent calc(100% - 196px)),
    /* raised panels in the mahogany */
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0,0,0,.4) 18px 20px, rgba(255,210,170,.12) 20px 22px, transparent 22px 128px, rgba(255,210,170,.1) 128px 130px, rgba(0,0,0,.35) 130px 132px, transparent 132px 150px) 0 100% / 100% 168px no-repeat,
    url("hall/mahogany.jpg") 0 100% / 150px 196px repeat-x,
    /* moulded panels in the stone */
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.35) 40px 41px, rgba(110,94,66,.4) 41px 43px, transparent 43px 277px, rgba(110,94,66,.4) 277px 279px, rgba(255,255,255,.35) 279px 280px, transparent 280px 320px),
    url("hall/stone.jpg") 0 0 / 384px 384px;
}
.h3d-floor {
  width: 700px;
  background:
    /* the polish: a soft reflection of the lit hall, and shadow at the skirting */
    linear-gradient(90deg, rgba(10,5,2,.45), transparent 9%, rgba(255,250,235,.08) 35%, rgba(255,250,235,.08) 65%, transparent 91%, rgba(10,5,2,.45)),
    url("hall/marble.jpg") 0 0 / 320px 320px;
}
.h3d-runner {
  width: 200px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 6%, transparent 94%, rgba(0,0,0,.35)),
    url("hall/runner.jpg") 0 0 / 200px 200px;
  box-shadow: 0 0 6px rgba(0,0,0,.4);
}
/* a coffered plaster ceiling picked out in gilt */
.h3d-ceiling {
  width: 700px;
  background:
    /* a dentil moulding and a gilt bead running along both sides */
    repeating-linear-gradient(0deg, #f4ecd8 0 9px, #a8987a 9px 14px) 0 0 / 16px 100% no-repeat,
    repeating-linear-gradient(0deg, #f4ecd8 0 9px, #a8987a 9px 14px) 100% 0 / 16px 100% no-repeat,
    linear-gradient(90deg, #c9a24f 0 3px, transparent 3px calc(100% - 3px), #c9a24f calc(100% - 3px)) 34px 0 / calc(100% - 72px) 100% no-repeat,
    linear-gradient(90deg, rgba(60,40,20,.35), transparent 12%, transparent 88%, rgba(60,40,20,.35)),
    repeating-linear-gradient(0deg, rgba(120,100,70,.45) 0 16px, rgba(201,162,79,.75) 16px 18px, transparent 18px 300px),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(120,100,70,.4) 36px 52px, rgba(201,162,79,.75) 52px 54px, transparent 54px 207px),
    url("hall/stone.jpg") 0 0 / 300px 300px;
}
/* crystal chandeliers, hanging from moulded ceiling roses */
.h3d-chandelier { width: 260px; height: 300px; pointer-events: none; }
.h3d-chandelier svg { width: 100%; height: 100%; display: block; }
.h3d-rose { width: 220px; height: 220px; border-radius: 50%;
  background:
    radial-gradient(circle, #c9a24f 0 6%, #f4ecd8 6% 14%, #b9ab8c 14% 15.5%, transparent 15.5%),
    repeating-conic-gradient(from 0deg, #efe6d1 0 7.5deg, #d4c6a6 7.5deg 15deg) ,
    #e9dfc8;
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%); mask: radial-gradient(circle, #000 60%, transparent 61%);
  box-shadow: 0 0 40px rgba(255,220,150,.35); }
.h3d-pilaster { width: 46px; height: 640px;
  background:
    linear-gradient(to bottom, transparent 0 29px, #f3ecdc 29px 52px, #b9ab8c 52px 55px, transparent 55px),
    repeating-linear-gradient(90deg, #efe7d4 0 6px, #cfc3a6 6px 8px, #efe7d4 8px 12px),
    #e9e0ca;
  box-shadow: 4px 0 10px rgba(60,40,20,.25), -4px 0 10px rgba(60,40,20,.25); }

/* doors: tall mahogany, six-panelled, under a stone pediment and a lit fanlight */
.h3d-door, .h3d-board, .h3d-notices, .h3d-stairs { cursor: pointer; outline: none; }
.h3d-door { width: 190px; height: 390px; display: flex; flex-direction: column; padding: 0 12px;
  background: linear-gradient(to bottom, transparent 85%, rgba(0,0,0,.25)), url("hall/stone.jpg") 0 0 / 200px 200px;
  box-shadow: inset 0 0 0 12px rgba(230,220,198,.4), inset 0 0 0 14px #b3a483, 0 0 18px rgba(30,15,5,.35); }
.h3d-pediment { height: 30px; margin: 0 -12px; background: linear-gradient(to bottom, #f1e9d6, #cdbf9f);
  clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.h3d-fan { height: 54px; margin: 2px 0 4px; border-radius: 85px 85px 0 0;
  background:
    repeating-conic-gradient(from -90deg at 50% 100%, transparent 0 14deg, #3a1a10 14deg 16deg),
    radial-gradient(ellipse at 50% 100%, #fff1c8, #e4b86c 50%, #8a5a2c 95%);
  box-shadow: inset 0 0 0 4px #3a1a10; }
.h3d-leaf { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: .8fr 1.4fr; gap: 12px; padding: 16px 14px;
  background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,220,180,.06) 50%, rgba(0,0,0,.25)), url("hall/mahogany.jpg") 0 0 / 120px 240px;
  box-shadow: inset 0 0 0 3px #2c120a, inset 8px 0 14px rgba(0,0,0,.35); transition: transform .6s ease; transform-origin: 0 50%; }
.h3d-leaf i { border: 3px solid #36160c; box-shadow: inset 2px 2px 0 rgba(0,0,0,.45), inset -2px -2px 0 rgba(255,200,150,.18), inset 0 0 22px rgba(0,0,0,.35);
  background: url("hall/mahogany.jpg") 30% 0 / 90px 200px; }
.h3d-leaf b { position: absolute; right: 14px; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c8, var(--gilt) 50%, #6e5226); }
.h3d-plate {
  position: absolute; left: 50%; top: -38px; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 14px; background: linear-gradient(#f0d891, #b8913f); color: #2a1709;
  font-family: var(--caps); font-variant: small-caps; font-weight: 700; font-size: 16px; letter-spacing: .04em;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.h3d-door .h3d-plate { top: auto; bottom: calc(100% - 26px); font-size: 15px; }
.h3d-door:hover .h3d-leaf, .h3d-door:focus-visible .h3d-leaf { filter: brightness(1.22); }
.h3d-door:hover .h3d-plate, .h3d-door:focus-visible .h3d-plate,
.h3d-board:hover .h3d-plate, .h3d-notices:hover .h3d-plate, .h3d-stairs:hover .h3d-plate { box-shadow: 0 0 16px rgba(255,220,150,.85); }
.h3d-way { position: relative; flex: 1; display: flex; background: radial-gradient(ellipse at 50% 70%, #0b0705, #000 70%); }
.h3d-way .h3d-leaf { width: 100%; transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(.3,.1,.3,1); }
.h3d-door.h3d-open .h3d-leaf { transform: perspective(600px) rotateY(-82deg); }
.h3d-door.h3d-open .h3d-plate { box-shadow: none; }

/* portraits of past members, in gilt frames, each with its picture light */
.h3d-portrait { width: 150px; height: 190px; padding: 12px;
  background: linear-gradient(135deg, #f0d48a, #a57a2c 40%, #e6c26e 60%, #8a6222);
  box-shadow: 0 8px 18px rgba(40,25,10,.45), inset 0 0 0 2px #6e4f1c; }
.h3d-canvas { position: absolute; inset: 12px;
  background:
    radial-gradient(ellipse 22% 16% at 50% 34%, #c79a78 0 70%, transparent 72%),
    radial-gradient(ellipse 46% 40% at 50% 92%, #1b1612 0 70%, transparent 72%),
    radial-gradient(ellipse 10% 8% at 50% 60%, #ece3cf 0 70%, transparent 72%),
    radial-gradient(ellipse at 50% 40%, #4a3a24, #241a10 80%); }
.h3d-light { position: absolute; left: 30%; right: 30%; top: -14px; height: 6px; border-radius: 3px; background: var(--gilt);
  box-shadow: 0 10px 28px 10px rgba(255,220,150,.28); }

/* sash windows onto St James's Street, with heavy curtains */
.h3d-window { width: 210px; height: 400px; padding: 12px;
  background: #f4efe3; box-shadow: inset 0 0 0 3px #c9bda2, 0 0 60px rgba(255,248,225,.35); }
.h3d-view { position: absolute; inset: 12px; background: url("hall/stjames.jpg") 50% 60% / 430px auto no-repeat, #dfe5e3; }
.h3d-sash { position: absolute; inset: 12px;
  background:
    linear-gradient(to bottom, transparent calc(50% - 4px), #f4efe3 calc(50% - 4px) calc(50% + 4px), transparent calc(50% + 4px)),
    linear-gradient(to bottom, transparent 0 calc(25% - 1.5px), #f4efe3 calc(25% - 1.5px) calc(25% + 1.5px), transparent calc(25% + 1.5px) calc(75% - 1.5px), #f4efe3 calc(75% - 1.5px) calc(75% + 1.5px), transparent calc(75% + 1.5px)),
    linear-gradient(90deg, transparent calc(50% - 1.5px), #f4efe3 calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 40%); }
.h3d-drape { position: absolute; top: -6px; bottom: -14px; width: 46px;
  background: repeating-linear-gradient(90deg, #5e161c 0 6px, #7a1e24 6px 12px, #4a1015 12px 15px);
  box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.h3d-drape.l { left: -30px; clip-path: polygon(0 0, 100% 0, 70% 55%, 100% 100%, 0 100%); }
.h3d-drape.r { right: -30px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 55%); }
.h3d-pelmet { position: absolute; left: -36px; right: -36px; top: -28px; height: 30px;
  background: linear-gradient(#8a2a30, #5e161c); border-bottom: 3px solid var(--gilt); }
/* the morning sun, falling across the floor and up the opposite wall */
.h3d-sunfloor { width: 520px; height: 220px;
  background:
    repeating-linear-gradient(0deg, transparent 0 52px, rgba(80,60,30,.18) 52px 58px),
    linear-gradient(to left, rgba(255,240,205,.42), rgba(255,240,205,.12) 70%, transparent);
  clip-path: polygon(100% 4%, 100% 96%, 0 70%, 0 30%); }
.h3d-sunwall { width: 260px; height: 300px;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,242,210,.38), rgba(255,242,210,0) 70%); }

.h3d-board { width: 240px; height: 130px; padding: 18px 16px 12px; background: #0d0b09;
  box-shadow: inset 0 0 0 4px var(--gilt), 0 0 0 6px #2a1709, 0 8px 18px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 10px; }
.h3d-board-k { font-family: var(--caps); font-variant: small-caps; color: #e8c97a; font-size: 14px; letter-spacing: .08em; }
.h3d-board-l { height: 13px; background: repeating-linear-gradient(90deg, #2a2620 0 13px, transparent 13px 16px); }
.h3d-notices { width: 240px; height: 160px; background: #2a4a33; box-shadow: inset 0 0 0 8px #4a2216, 0 8px 18px rgba(0,0,0,.4);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px; }
.h3d-notices i { background: #efe6cf; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.h3d-notices i:nth-child(2) { transform: rotate(3deg); background: #e9d9a8; }
.h3d-notices i:nth-child(3) { transform: rotate(-2deg); }

/* the far end: stone, an arched window, and the grand staircase */
.h3d-end { background:
    repeating-linear-gradient(to bottom, transparent 0 78px, rgba(120,104,76,.3) 78px 80px),
    linear-gradient(to bottom, var(--stone), var(--stone-dk)); }
.h3d-arch { width: 220px; height: 300px; padding: 12px; border-radius: 110px 110px 0 0;
  background: #f4efe3; box-shadow: inset 0 0 0 3px #c9bda2, 0 0 90px rgba(255,248,225,.5); }
.h3d-arch .h3d-view, .h3d-arch .h3d-sash { border-radius: 98px 98px 0 0; }
.h3d-arch .h3d-view { background-size: 420px auto; background-position: 50% 52%; }
.h3d-stairs { width: 380px; height: 300px; overflow: visible; background: transparent; }
.h3d-stairs .h3d-plate { top: -10px; bottom: auto; }
.h3d-steps { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 32%, #7a1e24 32% 68%, transparent 68%),
    repeating-linear-gradient(to top, #e8dfca 0 24px, #b3a483 24px 28px),
    #e8dfca;
  clip-path: polygon(0 100%, 8% 0, 92% 0, 100% 100%); }
.h3d-steps::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0), rgba(60,40,20,.35)); }
.h3d-newel { position: absolute; bottom: 0; width: 26px; height: 120px; background: linear-gradient(90deg, #4a1f12, #6e3a24, #4a1f12);
  box-shadow: 0 -10px 0 -4px var(--gilt); }
.h3d-newel.l { left: -14px; } .h3d-newel.r { right: -14px; }
.h3d-stairs .h3d-plate { top: auto; bottom: -46px; }

.h3d-hint { position: absolute; left: 16px; bottom: 12px; margin: 0; z-index: 2; pointer-events: none;
  font-style: italic; font-size: .85rem; color: rgba(255,248,232,.8); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.h3d-plan { position: absolute; right: 16px; top: 14px; z-index: 2; color: #2a1709; font-size: .95rem;
  background: rgba(244,239,227,.85); padding: 3px 10px; text-decoration: none; }
.h3d-plan:hover { background: #fff8e8; }
.hall-game { grid-template-columns: 1fr; grid-template-areas: "stage" "stage"; }
@media (max-width: 700px) {
  .h3d { --p: 420px; }
  .h3d-hint { display: none; }
  .hall-game .stage { aspect-ratio: auto; height: calc(100vh - var(--head, 200px)); height: calc(100dvh - var(--head, 200px)); min-height: 440px; }
}

/* ---------- The concierge and his desk ---------- */
.h3d-desk { width: 320px; height: 440px; cursor: pointer; outline: none; }
.h3d-desk svg { width: 100%; height: 100%; display: block; }
.h3d-desk .cg-jaw { transition: transform .05s steps(1); }
.h3d-desk.speaking .cg-jaw { transform: translateY(7px); }
.h3d-desk.speaking .cg-mouth { height: 9px; y: 165px; }
.h3d-desk.blink .cg-eyes rect { height: 1.5px; transform: translateY(3px); }
.h3d-desk:hover, .h3d-desk:focus-visible { filter: brightness(1.15) !important; }

/* The dialogue: laid out like a game's subtitles and replies, dressed as a
   1912 liner's printed card: cream stock, gilt rules, navy and gold */
.talk {
  position: absolute; left: 50%; bottom: 16px; z-index: 5; width: min(820px, calc(100% - 32px));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .4s ease, transform .4s ease;
}
.talk.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.talk-card {
  position: relative; padding: 12px 26px 12px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(#f6efdc, #ebe0c4);
  color: #1d2433;
  box-shadow: 0 0 0 1px #8a6a2c, 0 0 0 5px #f6efdc, 0 0 0 6px #b8913f, 0 14px 36px rgba(0,0,0,.55);
}
.talk-card::before, .talk-card::after {   /* art-nouveau corner flourishes */
  content: "\2766"; position: absolute; top: 4px; font-size: 18px; color: #b8913f; line-height: 1;
}
.talk-card::before { left: 8px; transform: scaleX(-1); }
.talk-card::after { right: 8px; }
.talk-who { display: flex; align-items: center; gap: 14px; margin: 0 0 8px; }
.talk-who::before, .talk-who::after { content: ""; flex: 1; height: 0; border-top: 3px double #b8913f; }
.talk-who span { font-family: var(--caps); font-variant: small-caps; font-weight: 700; font-size: 1.02rem; letter-spacing: .12em; color: #1a2536; }
.talk-line { margin: 0; min-height: 1.4em; text-align: center; font-family: var(--body); font-size: 1.2rem; line-height: 1.4; color: #1d2433; cursor: pointer; }
.talk-opts { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid rgba(138,106,44,.55); display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.talk-opts button {
  width: 100%; display: flex; align-items: baseline; gap: 12px; text-align: left; cursor: pointer;
  padding: 3px 10px; border: 0; background: none; color: #1d2433;
  font-family: var(--caps); font-variant: small-caps; font-size: .95rem; letter-spacing: .02em;
}
.talk-n { min-width: 2.2em; color: #8a6a2c; font-weight: 700; }
.talk-opts button:hover, .talk-opts button:focus-visible { outline: none; background: #1a2536; color: #f3e3b4; }
.talk-opts button:hover .talk-n, .talk-opts button:focus-visible .talk-n { color: #e0c070; }
@media (max-width: 700px) {
  .talk { bottom: 10px; }
  .talk-card { padding: 14px 16px; }
  .talk-line { font-size: 1.1rem; }
  .talk-opts { grid-template-columns: 1fr; }
  .talk-opts button { font-size: .95rem; }
}

/* the door you are looking at glows a little, and its plate brightens */
.h3d-looking { filter: brightness(1.2) !important; }
.h3d-looking .h3d-plate { box-shadow: 0 0 18px rgba(255,220,150,.95); }

/* the club's forebears: ducks in oils, between the street windows */
.h3d-forebear { width: 190px; height: 240px; padding: 15px;
  background: linear-gradient(135deg, #f6dc94, #8a6222 18%, #e6c26e 34%, #7a5418 52%, #f0d48a 70%, #8a6222 88%, #c9a24f);
  box-shadow: 0 10px 22px rgba(40,25,10,.45), inset 0 0 0 2px #6e4f1c, inset 0 0 0 9px #c9a24f, inset 0 0 0 11px #6e4f1c; }
.h3d-oil { position: absolute; inset: 15px; overflow: hidden; }
.h3d-oil::after, .h3d-canvas::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,235,190,.28), transparent 60%), url("hall/canvas.png") 0 0 / 128px 128px;
  mix-blend-mode: overlay; }
.h3d-oil svg { filter: url(#oilpaint); }
.h3d-oil svg { width: 100%; height: 100%; display: block; }
.h3d-forebear .h3d-light { left: 32%; right: 32%; top: -16px; }
.h3d-tablet { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); white-space: nowrap;
  padding: 2px 10px; background: linear-gradient(#f0d891, #b8913f); color: #2a1709;
  font-family: var(--caps); font-variant: small-caps; font-weight: 700; font-size: 11px; letter-spacing: .03em; box-shadow: 0 2px 4px rgba(0,0,0,.4); }

/* the name of the door you are looking at, glowing softly at the foot of the screen */
.h3d-caption {
  position: absolute; left: 50%; bottom: 46px; z-index: 3; margin: 0; transform: translate(-50%, 8px);
  font-family: var(--caps); font-variant: small-caps; font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: .06em;
  color: #f6dd9a; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 12px rgba(255,214,130,.85), 0 0 28px rgba(255,190,90,.55), 0 0 56px rgba(255,170,60,.35), 0 2px 3px rgba(40,20,0,.6);
  opacity: 0; transition: opacity .5s ease, transform .5s ease;
}
.h3d-caption.on { opacity: 1; transform: translate(-50%, 0); animation: caption-breathe 3.2s ease-in-out .5s infinite alternate; }
@keyframes caption-breathe { to { text-shadow: 0 0 16px rgba(255,214,130,.95), 0 0 36px rgba(255,190,90,.65), 0 0 70px rgba(255,170,60,.4), 0 2px 3px rgba(40,20,0,.6); } }
.talk.on ~ .h3d-caption, .h3d:has(.talk.on) .h3d-caption { opacity: 0; }

/* the sides of things that stand out from the walls */
.h3d-face { backface-visibility: visible !important; }
.f-stone.side { background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,.08)), url("hall/stone.jpg") 0 0 / 120px 240px; }
.f-stone.top { background: linear-gradient(#f4ecd8, #cdbf9f); }
.f-reveal.side { background: linear-gradient(90deg, rgba(60,40,20,.12), rgba(255,250,235,.25)), url("hall/stone.jpg") 0 0 / 120px 240px; }
.f-reveal.top { background: linear-gradient(#cdbf9f, #e8dfca); }
.f-reveal.sill { background: linear-gradient(#f4efe3, #d9cdb0); box-shadow: 0 0 20px rgba(255,248,225,.4); }
.f-gilt { background: linear-gradient(90deg, #8a6222, #e6c26e 50%, #8a6222); }
.f-wood { background: url("hall/mahogany.jpg") 0 0 / 60px 120px; }
.f-desk.top { background: linear-gradient(rgba(255,220,170,.18), rgba(0,0,0,.15)), url("hall/mahogany.jpg") 0 0 / 120px 160px; }
.f-desk.side { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,.15)), url("hall/mahogany.jpg") 0 0 / 80px 160px; }
.h3d-riser { background: linear-gradient(90deg, transparent 31%, #6a1a20 31% 69%, transparent 69%), linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.05)), url("hall/stone.jpg") 0 0 / 200px 200px; }
.h3d-tread { background: linear-gradient(90deg, transparent 31%, #8a242a 31% 69%, transparent 69%), linear-gradient(90deg, transparent 31%, #c9a24f 31% 31.6%, transparent 31.6% 68.4%, #c9a24f 68.4% 69%, transparent 69%), url("hall/stone.jpg") 0 0 / 200px 200px; }
.h3d-newel3 { background: linear-gradient(90deg, #3a180c, #7a4228 50%, #3a180c); box-shadow: 0 -8px 0 -2px #c9a24f; }

/* two flights at the end of the hall: the Gallery on the left, the Canvas Room on the right */
.h3d-stairs.l, .h3d-stairs.r { width: 190px; }

/* ---------- The Canvas Room: a safari tent at the top of the stairs ---------- */
.cr3d {
  --p: 640px;
  position: absolute; inset: 0; overflow: hidden;
  perspective: var(--p); perspective-origin: 50% 50%;
  background: #1c140c; cursor: grab; touch-action: none; user-select: none; outline: none;
}
.cr3d:active { cursor: grabbing; }
.cr-world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.cr-f { position: absolute; left: 0; top: 0; transform-origin: 0 0; backface-visibility: visible; }
.cr-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    url("hall/grain.png") 0 0 / 256px 256px,
    radial-gradient(ellipse at 50% 40%, rgba(255,200,120,.10), transparent 45%, rgba(30,16,4,.35) 76%, rgba(14,8,2,.78)); }

/* canvas, coir and the far end open on the savannah */
.cr-floor, .cr-wall, .cr-roof { --at: var(--bx, 0) var(--by, 0); --all: var(--sw, 100%) var(--sh, 100%); }
.cr-floor { background: linear-gradient(rgba(20,10,0,.35), rgba(255,200,120,.08)) var(--at) / var(--all), url("tent/coir.jpg") var(--at) / 180px 180px; }
.cr-wall { background: linear-gradient(rgba(255,214,150,.10) 0, rgba(40,22,6,.25) calc(100% - 10px), rgba(70,46,20,.7) calc(100% - 10px)) var(--at) / var(--all), url("tent/canvas.jpg") var(--at) / 260px 260px; }
.cr-wall::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 218px, rgba(90,60,26,.35) 218px 222px, transparent 222px 226px) var(--bx, 0) 0 / 440px 100%; }
.cr-roof { background: linear-gradient(rgba(60,34,10,.4), rgba(255,220,160,.12)) var(--at) / var(--all), url("tent/canvas.jpg") var(--at) / 260px 260px; }
.cr-roof::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 270px, rgba(80,52,20,.4) 270px 274px) var(--bx, 0) 0 / 274px 100%; }
.cr-gable::after { display: none; }
.cr-flap { position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: url("tent/savannah.jpg") 50% 55% / cover; box-shadow: inset 0 0 40px rgba(60,30,0,.4); }
.cr-flap i { position: absolute; inset: 0;
  background:
    linear-gradient(105deg, #b9a37a 0 18%, rgba(0,0,0,.35) 18% 19%, transparent 19%),
    linear-gradient(-105deg, #b9a37a 0 18%, rgba(0,0,0,.35) 18% 19%, transparent 19%); }
.cr-pole { background: linear-gradient(90deg, #3d2412, #6b4224 50%, #3d2412); }
.cr-pole.top { background: #5a3820; }

/* rug, wood, leather and brass */
.cr-kilim { background: url("tent/kilim.jpg") 0 0 / 100% 100%; box-shadow: 0 0 0 4px #6a2a16; }
.cr-wood { background: linear-gradient(rgba(255,210,150,.08), rgba(0,0,0,.2)), url("hall/mahogany.jpg") 0 0 / 120px 160px; }
.cr-wood.side, .cr-wood.back { filter: brightness(.7); }
.cr-wood.leg { background: linear-gradient(90deg, #3a1c0e, #6a3a1e, #3a1c0e); }
.cr-leather { background: linear-gradient(#7a4a24, #5a3216); box-shadow: inset 0 0 12px rgba(0,0,0,.45); }
.cr-leather.top { background: radial-gradient(ellipse at 50% 60%, #8a5a2e, #5a3216); }
.cr-leather.side { filter: brightness(.7); }
.cr-brass { background: linear-gradient(#f2d48a, #a7802f 60%, #6a4f16); }
.cr-map { box-shadow: 0 0 0 2px rgba(60,40,10,.4); }
.cr-map svg, .cr-figure svg, .cr-lantern svg { width: 100%; height: 100%; display: block; }

/* the campaign chest, with brass corners and sunken handles */
.cr-chest {
  background:
    radial-gradient(circle at 50% 50%, #f0d080 0 3px, transparent 4px) 50% 50% / 100% 100%,
    linear-gradient(#c9a24f, #c9a24f) 0 0 / 14px 14px no-repeat,
    linear-gradient(#c9a24f, #c9a24f) 100% 0 / 14px 14px no-repeat,
    linear-gradient(#c9a24f, #c9a24f) 0 100% / 14px 14px no-repeat,
    linear-gradient(#c9a24f, #c9a24f) 100% 100% / 14px 14px no-repeat,
    linear-gradient(rgba(255,210,150,.08), rgba(0,0,0,.18)),
    url("hall/mahogany.jpg") 0 0 / 120px 160px;
  box-shadow: inset 0 0 0 1px rgba(30,12,4,.6);
}
.cr-chest.front::after { content: ""; position: absolute; left: 50%; top: 40%; width: 46px; height: 12px; transform: translateX(-50%);
  border: 3px solid #c9a24f; border-top: 0; border-radius: 0 0 8px 8px; }
.cr-chest.side, .cr-chest.back { filter: brightness(.7); }

/* the steamer trunk, banded and labelled */
.cr-trunk {
  background:
    linear-gradient(90deg, transparent 0 16%, #5a3416 16% 20%, transparent 20% 80%, #5a3416 80% 84%, transparent 84%),
    linear-gradient(transparent 0 46%, #c9a24f 46% 50%, transparent 50%),
    linear-gradient(#3c5a3a, #24382a);
  box-shadow: inset 0 0 0 3px #5a3416;
}
.cr-trunk.front::before, .cr-trunk.front::after { content: ""; position: absolute; border-radius: 3px; transform: rotate(-8deg); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cr-trunk.front::before { left: 26%; top: 14%; width: 38px; height: 26px; background: radial-gradient(circle, #f4e8c8 0 30%, #b8323a 32%); }
.cr-trunk.front::after { right: 24%; top: 58%; width: 44px; height: 24px; transform: rotate(6deg);
  background: linear-gradient(#f4e8c8 0 40%, #2a4a7a 40% 60%, #f4e8c8 60%); }
.cr-trunk.side, .cr-trunk.back { filter: brightness(.7); }

/* the camp bed and its net */
.cr-bedding { background: linear-gradient(#e8e0cc, #cfc4a8); }
.cr-bedding.top { background: repeating-linear-gradient(90deg, #ece4d0 0 20px, #e2d8c0 20px 22px); }
.cr-pillow { background: #f6f0e2; border-radius: 6px; }
.cr-net { background: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 2px, transparent 2px 5px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 5px), rgba(250,246,236,.10);
  box-shadow: inset 0 0 30px rgba(255,255,255,.08); }
.cr-net.top { background: rgba(250,246,236,.16); }

/* turned and modelled pieces */
.cr-disc { border-radius: 50%; }
.cr-f.cr-turn { background: none; box-sizing: content-box; }
.cr-brass.side, .cr-brass.back { filter: brightness(.72); }
.cr-brass.top { background: linear-gradient(135deg, #fff0b8, #d9b25e 40%, #8a6a2c); }
.cr-gram { background: linear-gradient(rgba(255,220,170,.1), rgba(0,0,0,.25)), url("hall/mahogany.jpg") 0 0 / 90px 120px;
  box-shadow: inset 0 0 0 3px rgba(40,18,6,.7), inset 0 0 0 5px rgba(201,162,79,.55), inset 0 0 0 7px rgba(40,18,6,.6); }
.cr-gram.side, .cr-gram.back { filter: brightness(.68); }
.cr-gram-lid { background: url("hall/mahogany.jpg") 0 0 / 90px 120px; }
.cr-felt { background: #2c4a2e; }
.cr-felt.cr-disc { background: radial-gradient(circle, #3a5e3c, #22382a); }
.cr-record { background: repeating-radial-gradient(circle, #141414 0 1.5px, #262626 1.5px 2.5px); box-shadow: 0 0 0 1px #000; }
.cr-record i { position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, #111 0 6%, #8a1a1a 7% 100%); box-shadow: inset 0 0 0 2px #c9a24f; }
.cr-record::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%); }
.cr-soundbox { background: radial-gradient(circle, #fff0c0, #a7802f 60%, #5a4416); }
.cr-horn { background: linear-gradient(90deg, #8a6a2c, #e8c46e 35%, #fff2c0 50%, #d9b25e 65%, #7a5a20); }
.cr-horn-lip { background: #f0d48a; }
.cr-band { background: #6a4a2a; }
.cr-cap { background: linear-gradient(135deg, #fff0b8, #c9a24f 45%, #7a5a20); box-shadow: inset 0 0 0 1px rgba(60,40,10,.5); }
.cr-lock { background: radial-gradient(circle at 50% 38%, #1a1208 0 2.5px, transparent 3px), linear-gradient(135deg, #fff0b8, #c9a24f 50%, #7a5a20);
  border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(60,40,10,.6); }
.cr-strap { background: linear-gradient(#6a3a1a, #3e2010); }
.cr-label { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 4px; gap: 1px;
  background: radial-gradient(ellipse, #f6ecd2 0 52%, var(--ink) 54%); color: #2a1a0a; box-shadow: 0 1px 2px rgba(0,0,0,.4);
  font-family: var(--caps); font-variant: small-caps; line-height: 1; text-align: center; overflow: hidden; }
.cr-label b { font-size: 5px; letter-spacing: .02em; }
.cr-label span { font-size: 6.5px; font-weight: 700; color: var(--ink); }
.cr-mahog { background: linear-gradient(90deg, #4a2414, #8a4a26 45%, #5a2c16); }
.cr-ring { background: linear-gradient(90deg, #8a6a2c, #f0d48a 50%, #8a6a2c); }
.cr-pith { background: linear-gradient(90deg, #cdbf98, #efe6c8 50%, #c4b48a); }
.cr-pith.cr-band { background: linear-gradient(90deg, #6a4a2a, #8a6440 50%, #6a4a2a); }
.cr-pith.cr-brim { background: linear-gradient(90deg, #c4b48a, #e6dcbc 50%, #b8a87e); }
.cr-glass { background: linear-gradient(90deg, #111, #3a3a3a 45%, #161616); }
.cr-glass.cr-ring { background: linear-gradient(90deg, #6a5a3a, #c9a24f 50%, #6a5a3a); }
.cr-lantern { filter: drop-shadow(0 0 30px rgba(255,190,90,.6)); }

/* picking things out */
.cr-pick { cursor: pointer; transition: filter .3s ease; }
.cr-pick.cr-on { filter: brightness(1.3) drop-shadow(0 0 10px rgba(255,214,130,.55)) !important; }
.cr-caption {
  position: absolute; left: 50%; bottom: 46px; z-index: 3; margin: 0; transform: translate(-50%, 8px);
  font-family: var(--caps); font-variant: small-caps; font-weight: 700; font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: .06em;
  color: #f6dd9a; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 12px rgba(255,214,130,.85), 0 0 28px rgba(255,190,90,.55), 0 0 56px rgba(255,170,60,.35), 0 2px 3px rgba(40,20,0,.6);
  opacity: 0; transition: opacity .5s ease, transform .5s ease;
}
.cr-caption.on { opacity: 1; transform: translate(-50%, 0); animation: caption-breathe 3.2s ease-in-out .5s infinite alternate; }
.cr3d .h3d-hint, .cr3d .h3d-plan { z-index: 2; }
@media (max-width: 700px) { .cr3d { --p: 420px; } }
.h3d-stairs.l .h3d-plate, .h3d-stairs.r .h3d-plate { top: 4px; bottom: auto; font-size: 14px; }
