/* The paper look: a printed map on a desk, with nixie tubes in the HUD.
   Everything here is scoped to <html data-theme="paper"> (index.html) and
   overrides style.css's base rules. The maps' colors are in map.js
   (COLORS). */

html[data-theme="paper"] {
  /* Worn rubber-stamp ink: mostly solid, with speckles missing. */
  --ink-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.6 2.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --bg: #d9c9a3;
  --panel: #fbf6e9;
  --panel-raised: #f1e7d0;
  --border: #c8b48c;
  --text: #2f2418;
  --muted: #7d6a52;
  --accent: #2c5d8f;
  --gold: #b7791f;
  --good: #2f7d3b;
  --ok: #c0661a;
  --bad: #b3261e;
  --ink: #4a3826;
  /* The desk lamp (bought in the shop and switched on: <html class=
     "lamp-on">, main.js):
       --lamp-x, --lamp-y      where the light is centred (% of the desk)
       --pool-alpha            how warm and bright its pool is
       --pool-size             the pool's size (% of the desk)
       --dim-start             where the falloff starts (% of its size)
       --dim-alpha             how dark the far corner gets
       --dim-size              the falloff's size (% of the desk)
       --shadow-dx, --shadow-dy  the shadows' direction where nothing works
                               it out (a unit vector: down and to the right)
       --shadow-length, --shadow-alpha  their length and darkness (×); each
                               thing's own direction and length: lamp_shadows.js */
  --lamp-x: 50%;
  --lamp-y: -20%;
  --pool-alpha: 0.27;
  --pool-size: 186%;
  --dim-start: 0%;
  --dim-alpha: 0.05;
  --dim-size: 57%;
  --shadow-dx: 0;
  --shadow-dy: 1;
  --shadow-length: 0.7;
  --shadow-alpha: 0.85;
  /* The shadows' offset, a px per unit of length: by default along
     --shadow-dx/dy; each thing on the desk gets its own (lamp_shadows.js:
     away from the lamp, longer the farther it is). */
  --sx: calc(var(--shadow-dx) * var(--shadow-length) * 1px);
  --sy: calc(var(--shadow-dy) * var(--shadow-length) * 1px);
}

/* Everything on the desk casts its shadow along its --sx, --sy. A paper
   lying flat: a tight contact shadow and a soft cast one; held up, a longer
   one; and so on. Worked out on each thing that has its own offset
   (.casts-shadow), so it's that thing's. */
html[data-theme="paper"], html[data-theme="paper"] .casts-shadow {
  --shadow-flat: calc(var(--sx) * 1.8) calc(var(--sy) * 1.8) 1.5px rgba(40, 25, 10, calc(0.32 * var(--shadow-alpha))), calc(var(--sx) * 9.4) calc(var(--sy) * 9.4) 12px rgba(40, 25, 10, calc(0.24 * var(--shadow-alpha)));
  /* A reference card: lying flat like a slip, plus a faint shadow all round
     its edge, so one lying over another stands out from it. */
  --shadow-card: 0 0 0 0.5px rgba(40, 25, 10, 0.22), 0 0 5px rgba(40, 25, 10, 0.18), var(--shadow-flat);
  --shadow-held: calc(var(--sx) * 5) calc(var(--sy) * 5) 3px rgba(40, 25, 10, calc(0.25 * var(--shadow-alpha))), calc(var(--sx) * 24.4) calc(var(--sy) * 24.4) 24px rgba(40, 25, 10, calc(0.3 * var(--shadow-alpha)));
  --shadow-box: calc(var(--sx) * 3.6) calc(var(--sy) * 3.6) 3px rgba(40, 25, 10, calc(0.38 * var(--shadow-alpha))), calc(var(--sx) * 12.2) calc(var(--sy) * 12.2) 14px rgba(40, 25, 10, calc(0.24 * var(--shadow-alpha)));
  --shadow-sheet: calc(var(--sx) * 3.6) calc(var(--sy) * 3.6) 4px rgba(30, 18, 8, calc(0.3 * var(--shadow-alpha))), calc(var(--sx) * 16.6) calc(var(--sy) * 16.6) 26px rgba(30, 18, 8, calc(0.35 * var(--shadow-alpha)));
  --shadow-sheet-held: calc(var(--sx) * 7.2) calc(var(--sy) * 7.2) 8px rgba(30, 18, 8, calc(0.3 * var(--shadow-alpha))), calc(var(--sx) * 28.8) calc(var(--sy) * 28.8) 38px rgba(30, 18, 8, calc(0.4 * var(--shadow-alpha)));
  --shadow-tube: calc(var(--sx) * 5.8) calc(var(--sy) * 5.8) 10px rgba(40, 25, 10, calc(0.4 * var(--shadow-alpha)));
  --shadow: calc(var(--sx) * 5.8) calc(var(--sy) * 5.8) 12px rgba(74, 56, 38, calc(0.3 * var(--shadow-alpha)));
}

html[data-theme="paper"] kbd { border-color: currentColor; }
html[data-theme="paper"] .primary-btn:hover { background: #244e79; }
/* Selling: burgundy ink, not a warning red. */
html[data-theme="paper"] .primary-btn.sell-btn { background: #7a2a33; }
html[data-theme="paper"] .primary-btn.sell-btn:hover { background: #64212a; }
html[data-theme="paper"] .shop-sell-ask, html[data-theme="paper"] .shop-reset-ask { color: #7a2a33; }
/* An item in use (and all it goes on): lit up as by the desk lamp
   (.desk-lamp), a bright warm pool from above falling off to a little dim
   at its foot, on the tile and its border (so the corners match) but under
   what's on it (icon, text, buttons). Bought or
   switched on, the light fades up; put away or sold, it fades out
   (shop.js: switching-on/-off). */
html[data-theme="paper"] .shop-item, html[data-theme="paper"] .shop-set-row { position: relative; isolation: isolate; }
html[data-theme="paper"] .shop-item.lit::after,
html[data-theme="paper"] .shop-set-row.lit::after,
html[data-theme="paper"] .switching-off::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 140% 120% at 50% -10%, rgba(255, 210, 130, 0.75) 0%, rgba(255, 196, 115, 0.4) 40%, rgba(255, 185, 105, 0.12) 75%, rgba(255, 185, 105, 0) 100%),
    radial-gradient(ellipse 110% 120% at 50% -10%, rgba(20, 10, 3, 0) 60%, rgba(16, 8, 2, 0.12) 100%);
}
html[data-theme="paper"] .switching-on::after { animation: shop-light-on 0.35s ease-out both; }
html[data-theme="paper"] .switching-off::after { animation: shop-light-off 0.35s ease-in both; }
@keyframes shop-light-on {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shop-light-off {
  from { opacity: 1; }
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="paper"] .switching-on::after { animation: none; }
  html[data-theme="paper"] .switching-off::after { display: none; }
}
html[data-theme="paper"] .menu-screen, html[data-theme="paper"] .finish-screen { background: radial-gradient(ellipse at center, #eadcbc 0%, var(--bg) 75%); }
html[data-theme="paper"] .briefing-screen { background: radial-gradient(ellipse at center, #ead6c0 0%, var(--bg) 75%); }

/* Paper grain and a darker edge laid over the map, tinting it. Purely
   decorative: clicks pass through. Blended normally, in colours darkened to
   look like multiplying the map's sand: with mix-blend-mode: multiply over
   the map's canvas, Firefox redraws everything above it (100 slips of tilted
   text) on every frame the map moves, panning at 50 fps instead of 120. Both are
   uniform on purpose: the overlay stays put while the map pans under it, so
   anything with a shape (stains, creases) would look like dirt on the screen.
   The grain tile is seamless (stitchTiles). */
html[data-theme="paper"] .paper-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(90, 62, 28, 0.32) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.37 0 0 0 0 0.28 0 0 0 0 0.16 0 0 0 0.33 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
html[data-theme="paper"] .summary-map { position: relative; }

/* The map as a sheet of paper on the desk (map_sheet.js), bought in the
   shop: a plain margin round the printed map (a double neatline at its
   edge) that's held to slide the sheet about, and a turned-up corner at the
   bottom right to resize it by. Not on narrow screens (phones): there the
   map fills the screen (see the end of this block). */
html[data-theme="paper"] .shift-screen, html[data-theme="paper"] .atlas-screen {
  --sheet-margin: 14px;
  background: radial-gradient(ellipse at center, #7d5e40 0%, #5b412a 100%);
}
/* The lamp on: the wood brightest under it. */
html[data-theme="paper"].lamp-on .shift-screen, html[data-theme="paper"].lamp-on .atlas-screen {
  background: radial-gradient(ellipse 90% 100% at var(--lamp-x) var(--lamp-y), #86653f 0%, #6a4c30 45%, #4a3421 100%);
}

/* The desk lamp, on (bought in the shop, switched on from its box on the
   desk): its light over the whole desk, a warm pool under it falling off to
   dim; over everything on the desk (map, slips, cards, boxes), under the
   dialogs. Plain transparency, no blend mode: one layer the compositor
   keeps, the map panning under it as fast as ever (a blend mode would have
   it all redrawn every frame, as with the map's grain). The shadows agree:
   cast away from it (lamp_shadows.js); off, they fall straight down. */
html[data-theme="paper"].lamp-on .desk-lamp {
  display: block;
}
html[data-theme="paper"] .desk-lamp {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background:
    radial-gradient(ellipse var(--pool-size) calc(var(--pool-size) * 8 / 7) at var(--lamp-x) var(--lamp-y), rgba(255, 214, 150, var(--pool-alpha)) 0%, rgba(255, 200, 130, calc(var(--pool-alpha) * 0.45)) 32%, rgba(255, 190, 120, 0) 52%),
    radial-gradient(ellipse var(--dim-size) calc(var(--dim-size) * 22 / 19) at var(--lamp-x) var(--lamp-y), rgba(20, 10, 3, 0) var(--dim-start), rgba(20, 10, 3, calc(var(--dim-alpha) * 0.48)) calc(var(--dim-start) + (100% - var(--dim-start)) * 0.53), rgba(16, 8, 2, var(--dim-alpha)) 100%);
}
/* A phone: the map fills the screen; only a hint of the lamp. */
@media (max-width: 700px) {
  html[data-theme="paper"] .desk-lamp {
    background: radial-gradient(ellipse 110% 90% at 30% 10%, rgba(255, 210, 140, 0.06) 0%, rgba(20, 10, 3, 0) 50%, rgba(20, 10, 3, 0.16) 100%);
  }
}
/* Light from the window on the wall beyond the desk, now and then, as a car
   goes by outside (window_light.js warps the patch onto the desk each
   frame, and sets its brightness and the panes' mask, --panes: four panes
   of light and the dark cross between them, their edges soft, a headlight
   not being a point). Over everything on the desk like the lamp's light,
   plain transparency for the same reason; fainter with the lamp on, and
   brighter the darker the room's got (--shade-headlights: shade.js). */
.window-light { display: none; }
html[data-theme="paper"] .window-light {
  --alpha: calc(var(--window-light-alpha) * var(--shade-headlights, 1));
  display: block;
  position: absolute;
  inset: 0;
  z-index: 44;
  overflow: hidden;
  pointer-events: none;
}
html[data-theme="paper"].lamp-on .window-light { --alpha: calc(var(--window-light-alpha-lamp) * var(--shade-headlights, 1)); }

/* The room getting darker as the shift goes on (shade.js): a colour the
   desk and everything on it is multiplied by, under the window's light and
   the lamp's; its middle, under the window, the lightest. The lamp, on,
   holds it back where its pool falls (its light's shape: .desk-lamp). */
.shade { display: none; }
html[data-theme="paper"] .shade {
  --shade-base: radial-gradient(ellipse 120% 110% at 50% 0%, var(--shade-middle, #fff) 35%, var(--shade-edge, #fff) 100%);
  display: block;
  position: absolute;
  inset: 0;
  z-index: 43;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: var(--shade-base);
}
html[data-theme="paper"] .shade[hidden] { display: none; }
html[data-theme="paper"].lamp-on .shade {
  background:
    radial-gradient(ellipse var(--pool-size) calc(var(--pool-size) * 8 / 7) at var(--lamp-x) var(--lamp-y), rgba(255, 255, 255, var(--shade-lamp)) 0%, rgba(255, 255, 255, calc(var(--shade-lamp) * 0.6)) 30%, rgba(255, 255, 255, 0) 52%),
    var(--shade-base);
}
html[data-theme="paper"] .window-light-patch {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  transform-origin: 0 0;
  opacity: 0;
  will-change: transform, opacity;
  background: rgba(var(--tint, 255, 236, 200), var(--alpha));
  -webkit-mask: var(--panes) 0 0 / 100% 100% no-repeat;
  mask: var(--panes) 0 0 / 100% 100% no-repeat;
}
/* Raining (rain.js): the light is the rain's canvas, drops and all, its
   brightest (its points of light) brighter than the light it fills in. */
html[data-theme="paper"] .window-light-rain {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: calc(var(--alpha) / 0.6);
}
html[data-theme="paper"] .window-light-patch.raining { background: none; }
html[data-theme="paper"] .window-light-patch.raining .window-light-rain { display: block; }

html[data-theme="paper"] .map-sheet {
  inset: auto;
  left: 0;
  top: 0;
  width: var(--sheet-w, 75%);
  height: var(--sheet-h, 75%);
  translate: var(--sheet-x, 12.5%) var(--sheet-y, 12.5%);
  background: #f3e8cc;
  box-shadow: var(--shadow-sheet);
  cursor: grab;
  touch-action: none;
  will-change: translate;
}
html[data-theme="paper"] .map-sheet.sheet-dragging, html[data-theme="paper"] .map-sheet.sheet-resizing {
  cursor: grabbing;
  box-shadow: var(--shadow-sheet-held);
}
html[data-theme="paper"] .map-sheet.sheet-returning { transition: translate 0.35s cubic-bezier(0.3, 0.7, 0.3, 1); }
html[data-theme="paper"] .sheet-corner {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  z-index: 2;
  cursor: nwse-resize;
  touch-action: none;
  /* The corner turned up: the paper's back, and the desk showing where it
     was (about the desk's colour there). */
  background: linear-gradient(135deg, #d8c79e 0%, #e9dcbb 50%, #5e432c 50%);
}
html[data-theme="paper"] .map-sheet > #map {
  inset: var(--sheet-margin);
  cursor: auto;
  box-shadow: 0 0 0 1px #5b4632, 0 0 0 4px #f3e8cc, 0 0 0 5px rgba(91, 70, 50, 0.7);
}
@media (max-width: 700px) {
  html[data-theme="paper"] .map-sheet {
    inset: 0;
    width: auto;
    height: auto;
    translate: none;
    background: none;
    box-shadow: none;
    cursor: auto;
    will-change: auto;
  }
  html[data-theme="paper"] .map-sheet > #map { inset: 0; box-shadow: none; }
  html[data-theme="paper"] .sheet-corner { display: none; }
}

/* The atlas (atlas_page.js): its map a sheet lying square in the middle of
   the desk, like the shift's (it stays put); filling the screen on a phone. */
html[data-theme="paper"] .atlas-sheet {
  background: #f3e8cc;
  box-shadow: var(--shadow-sheet);
}
html[data-theme="paper"] .atlas-map {
  inset: var(--sheet-margin);
  box-shadow: 0 0 0 1px #5b4632, 0 0 0 4px #f3e8cc, 0 0 0 5px rgba(91, 70, 50, 0.7);
}
/* No nixie tubes in its HUD, so none of their glow. */
html[data-theme="paper"].lamp-on .atlas-hud::before { content: none; }
html[data-theme="paper"] .atlas-bar { background: rgba(91, 70, 50, 0.18); box-shadow: inset 0 0 0 1px rgba(91, 70, 50, 0.3); }
html[data-theme="paper"] .atlas-bar-fill { background: var(--good); }
@media (max-width: 700px) {
  html[data-theme="paper"] .atlas-sheet { background: none; box-shadow: none; }
  html[data-theme="paper"] .atlas-map { inset: 0; box-shadow: none; }
}

/* The stack of materials (material_stack.js): on a phone, the map and the
   reference cards lie one above another along the bottom of the screen, as
   wide as it, each folded to its header; the one open shows the rest of
   itself (scrolling if it must), the map all the room there is. The stack
   sets their tops and the open one's height. Above the customer's slip
   (z-index 25, though it rises no higher than its bottom), under the search
   box, its suggestions, the result and the shift's end banner. Headers
   slimmer than on the desk, to leave the open one room. */
.map-sheet-title { display: none; }
html.stacked .map-sheet.in-stack,
html.stacked .desk-card.in-stack {
  left: 8px !important;
  right: 8px;
  width: auto !important;
  translate: none !important;
  rotate: none;
  z-index: 26;
}
html.stacked .search-box, html.stacked .locate-bar, html.stacked .result, html.stacked .shift-over-banner { z-index: 27; }
/* With one open, the customer's slip folds to its stub (their request in
   short), and the headers with no room left are pushed out of view. Not
   a customer to point at the map for: their stub doesn't say where; nor
   one with no tags printed (no autostamp): their stub says nothing. */
html.stacked.stack-any-open .ticket:not(.point-request):not(.untagged) > .ticket-body { display: none; }
html.stacked .in-stack.stack-pushed { visibility: hidden; pointer-events: none; }
html[data-theme="paper"].stacked .map-sheet.in-stack {
  inset: auto;
  right: 8px;
  height: auto;
  background: #fbf7ec;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
}
html.stacked .map-sheet.in-stack > .map-sheet-title {
  display: block;
  position: relative;
  height: 27px;
  box-sizing: border-box;
  padding: 7px 46px 0 10px;
  font: 700 11px/1.3 "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bad);
  cursor: pointer;
}
html.stacked .map-sheet.in-stack.folded > #map { display: none; }
html[data-theme="paper"].stacked .map-sheet.in-stack > #map { inset: 27px 0 0; }
html.stacked .desk-card.in-stack.folded { padding-top: 7px; padding-bottom: 6px; }
html.stacked .in-stack .desk-card-icon { top: 3px; width: 20px; height: 20px; }
/* The cards: a tap on the header, not a drag. Open, the card scrolls
   within the room it has; a booklet keeps its thumb index (out past its
   right edge) in view, and its page gives up height instead. */
html.stacked .desk-card.in-stack { cursor: pointer; touch-action: pan-y; }
html.stacked .desk-card.in-stack.stack-open { cursor: auto; overflow-y: auto; overscroll-behavior: contain; }
html.stacked .booklet.in-stack.stack-open { right: 40px; display: flex; flex-direction: column; overflow: visible; }
html.stacked .booklet.in-stack.stack-open > .booklet-page { flex: 0 1 268px; height: auto; min-height: 0; }
/* The map's instruments: their boxes, small and unlabelled, in a row along
   the top of the map under its header (all of which opens and closes it),
   only while it's open (swiped sideways if they don't fit). Only the boxes
   take taps: between and beside them, the map's own. */
html.stacked .desk-tools { display: none; }
html.stacked.stack-map-open .desk-tools {
  display: flex;
  top: calc(var(--stack-map-top, 0px) + 31px);
  bottom: auto;
  left: 12px;
  right: 12px;
  height: 23px;
  max-width: none;
  flex-wrap: nowrap;
  justify-content: safe flex-end;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 27;
  pointer-events: none;
}
html.stacked.stack-map-open .desk-tools::-webkit-scrollbar { display: none; }
html.stacked .desk-tools .tool-box { flex: none; padding: 1px 3px; border-radius: 2px; }
html.stacked .desk-tools .tool-box svg { width: 31px; height: 21px; }
html.stacked .desk-tools .tool-box-label { display: none; }

/* HUD -------------------------------------------------------------------- */

html[data-theme="paper"] .hud { align-items: flex-start; }
/* The nixie tubes make their own light: the HUD lies above the desk lamp's
   shade (.desk-lamp, z-index 45), not dimmed with the desk, and, the lamp
   on, throws a warm glow of its own onto the desk around it. */
html[data-theme="paper"] .hud { z-index: 46; }
html[data-theme="paper"].lamp-on .hud::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -36px -44px -48px -44px;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 62% 42%, rgba(255, 150, 60, 0.2) 0%, rgba(255, 130, 40, 0.08) 45%, rgba(255, 120, 30, 0) 100%);
}

/* Clock, score, served: nixie digits in one rounded glass tube on a dark
   socket. The .stat box around them goes; the label moves to the socket. */
html[data-theme="paper"] .stat.nixie {
  min-width: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
html[data-theme="paper"] .stat.nixie > .stat-label { display: none; }
html[data-theme="paper"] .nixie-glass {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 84px; /* never narrower than its socket label */
  padding: 6px 12px 5px;
  border-radius: 11px;
  background:
    radial-gradient(ellipse 75% 65% at 50% 55%, rgba(255, 120, 30, 0.2), transparent 72%), /* the glow filling the tube */
    linear-gradient(180deg, #34231a 0%, #1a0f09 45%, #120a06 75%, #2a1910 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 228, 196, 0.28), /* the glass wall */
    inset 0 3px 4px rgba(255, 240, 222, 0.28),
    inset 0 -4px 8px rgba(255, 140, 60, 0.2),
    0 0 0 1.5px rgba(45, 30, 18, 0.7),
    0 0 22px rgba(255, 120, 30, 0.35), /* glow spilling onto the map */
    var(--shadow-tube);
}
/* Honeycomb anode mesh in front of the digits, then reflections on the glass */
html[data-theme="paper"] .nixie-glass::before,
html[data-theme="paper"] .nixie-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
html[data-theme="paper"] .nixie-glass::before {
  inset: 5px 8px;
  border-radius: 6px;
  opacity: 0.3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10.4'%3E%3Cpath d='M3 0 6 1.73v3.47L3 6.93 0 5.2V1.73zM3 6.93v3.47M0 1.73V0M6 1.73V0' fill='none' stroke='%23080402' stroke-width='0.5'/%3E%3C/svg%3E");
}
html[data-theme="paper"] .nixie-glass::after {
  background:
    linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, 0.14) 8%, transparent 13%), /* streak down the left of the glass */
    radial-gradient(ellipse 60% 22% at 50% 4%, rgba(255, 250, 240, 0.22), transparent 70%); /* window light on the top */
}

html[data-theme="paper"] .nixie-tube { position: relative; display: grid; place-items: center; width: 21px; height: 40px; }
html[data-theme="paper"] .nixie-tube > span {
  grid-area: 1 / 1;
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  font-size: 37px;
  font-weight: 300;
  line-height: 1;
}
/* Two neon dots between minutes and seconds */
html[data-theme="paper"] .nixie-colon { position: relative; width: 8px; }
html[data-theme="paper"] .nixie-colon::before,
html[data-theme="paper"] .nixie-colon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #ffe6c2;
  box-shadow: 0 0 3px #ffa64d, 0 0 7px #ff7d1f, 0 0 14px rgba(255, 100, 20, 0.6);
}
html[data-theme="paper"] .nixie-colon::before { top: 37%; }
html[data-theme="paper"] .nixie-colon::after { top: 62%; }

/* The clock: glow pulses when short, dims when stopped, flashes when out */
html[data-theme="paper"] #hud-timer.low .nixie-lit, html[data-theme="paper"] #hud-timer.low .nixie-colon { animation: nixie-pulse 1s ease-in-out infinite; }
html[data-theme="paper"] #hud-timer.paused .nixie-lit, html[data-theme="paper"] #hud-timer.paused .nixie-colon { opacity: 0.5; }
html[data-theme="paper"] #hud-timer.over .nixie-lit, html[data-theme="paper"] #hud-timer.over .nixie-colon { animation: nixie-flash 0.8s steps(1, end) infinite; }
@keyframes nixie-pulse { 50% { opacity: 0.45; } }
@keyframes nixie-flash { 50% { opacity: 0.08; } }

/* Unlit cathodes: fine grey wire */
html[data-theme="paper"] .nixie-cathode { color: transparent; -webkit-text-stroke: 0.5px rgba(190, 165, 140, 0.13); }
html[data-theme="paper"] .nixie-lit {
  color: #ffe6c2;
  text-shadow:
    0 0 1px #fff3e0,
    0 0 4px #ffa64d,
    0 0 9px #ff7d1f,
    0 0 18px rgba(255, 100, 20, 0.75),
    0 0 32px rgba(255, 80, 10, 0.4);
}

html[data-theme="paper"] .nixie-base {
  display: block;
  margin-top: -1px;
  padding: 1px 10px 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d9c6a4;
  background: linear-gradient(180deg, #3a2a20, #1d140e);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 0 0 1px rgba(45, 30, 18, 0.7), calc(var(--sx) * 3.6) calc(var(--sy) * 3.6) 6px rgba(40, 25, 10, calc(0.35 * var(--shadow-alpha)));
}

/* Points landing: the tube flares rather than the box popping */
html[data-theme="paper"] .stat.nixie.fx-pop { animation: none; }
html[data-theme="paper"] .stat.nixie.fx-pop .nixie-glass { animation: nixie-glass-flare calc(0.6s * var(--fx-time, 1)) ease-out; }
@keyframes nixie-glass-flare {
  25% { box-shadow: inset 0 0 0 1px rgba(255, 228, 196, 0.35), inset 0 3px 4px rgba(255, 240, 222, 0.28), 0 0 0 1.5px rgba(45, 30, 18, 0.7), 0 0 40px rgba(255, 130, 40, 0.75), 0 4px 10px rgba(40, 25, 10, 0.4); }
}
html[data-theme="paper"] .stat.nixie.fx-pop .nixie-lit { animation: nixie-flare calc(0.5s * var(--fx-time, 1)) ease-out; }
@keyframes nixie-flare {
  25% { color: #fffaf0; text-shadow: 0 0 2px #fff, 0 0 7px #ffc27a, 0 0 16px #ff8a2a, 0 0 30px rgba(255, 110, 20, 0.9), 0 0 50px rgba(255, 90, 10, 0.6); }
}
@keyframes paper-stat-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); border-color: var(--gold); box-shadow: 0 0 16px rgba(183, 121, 31, 0.55); }
  100% { transform: scale(1); }
}
html[data-theme="paper"] .stat:not(.nixie).fx-pop { animation-name: paper-stat-pop; }

/* NOTAMs --------------------------------------------------------------------- */

html[data-theme="paper"] .notam-btn { border-color: #c98a80; }
html[data-theme="paper"] .notam-btn .stat-value { color: var(--bad); }
html[data-theme="paper"] .notam-panel { top: 104px; }
html[data-theme="paper"] .notam.fresh .notam-title .muted { color: var(--bad); }
html[data-theme="paper"] .notam-text {
  color: #2b2a24;
  background: #f4f1e4;
  border-color: #cfc6aa;
  border-left-color: #c98a80;
}
html[data-theme="paper"] .notam.fresh .notam-text { border-left-color: var(--bad); }
html[data-theme="paper"] .notam-nil { border-left-color: #cfc6aa; }
html[data-theme="paper"] .notam.cancelled .notam-text { border-left-color: var(--good); color: #5d6a55; }
html[data-theme="paper"] .shift-over-banner { top: 104px; background: #f8e3dc; color: var(--bad); }

/* Tags ------------------------------------------------------------------- */

html[data-theme="paper"] .tag { background: #f6efdd; border-color: #b9a57f; }
html[data-theme="paper"] .tag-continent { border-color: #4f7fae; color: #2c5d8f; }
html[data-theme="paper"] .tag-country { border-color: #8a6bb8; color: #5b3f8a; }
html[data-theme="paper"] .tag-capital { border-color: #c79a3a; color: #8a5a00; }
html[data-theme="paper"] .tag-population { border-color: #5f9a63; color: #2f6b34; }
html[data-theme="paper"] .tag-tropics { border-color: #3f9a7a; color: #1f6b52; }
html[data-theme="paper"] .tag-largestInCountry { border-color: #c06a92; color: #8a2f5a; }
html[data-theme="paper"] .tag-elevationAbove { border-color: #8a8f99; color: #4c525c; }
html[data-theme="paper"] .tag-extremeCapital { border-color: #c7793a; color: #8f4510; }
html[data-theme="paper"] .tag-pair { border-color: #9b6bc0; color: #6a3a8f; }
html[data-theme="paper"] .tag-locate { border-color: #4f7fae; color: #2c5d8f; background: #e6edf2; }
html[data-theme="paper"] .tag-eu { border-color: #4f7fae; color: #1f4e8c; background: #e6ecf5; }
html[data-theme="paper"] .tag-subregion { border-color: #8a8f99; color: #4c525c; }
html[data-theme="paper"] .tag-needsHelp { border-color: #c4574f; color: var(--bad); background: #f8e3dc; }
html[data-theme="paper"] .tag-script { border-color: #3f8f88; color: #1d5f59; }
html[data-theme="paper"] .tag-language { border-color: #a95fae; color: #74307a; }
html[data-theme="paper"] .tag-empire { border-color: #9a7440; color: #6b4a1c; background: #f1e4c6; }
html[data-theme="paper"] .tag-byRoad { border-color: #b5452f; color: #7a1f12; background: #f4e2d2; }
html[data-theme="paper"] .tag-restricted,
html[data-theme="paper"] .tag-closed { border-color: var(--bad); color: var(--bad); background: #f8e3dc; }

/* Search box and result -------------------------------------------------- */

html[data-theme="paper"] .search-box input::placeholder { color: #9a8a72; }
html[data-theme="paper"] .skip-btn { background-color: var(--panel-raised); }
html[data-theme="paper"] .skip-btn:hover { background-color: #e6d9bc; }
html[data-theme="paper"] .autocomplete-item:hover { background-color: var(--panel-raised); }
html[data-theme="paper"] .autocomplete-item.highlighted:hover { background-color: var(--accent); }
html[data-theme="paper"] .autocomplete-item.closed.highlighted { background-color: #9a3b33; }
html[data-theme="paper"] .ac-closed { color: var(--bad); }
html[data-theme="paper"] .autocomplete-item.closed.highlighted .ac-closed { color: white; }
html[data-theme="paper"] .autocomplete-notice { color: var(--bad); background: #f8e3dc; }
html[data-theme="paper"] .autocomplete-item.highlighted mark { color: #ffe08a; }
html[data-theme="paper"] .pair-hint { background: rgba(251, 246, 233, 0.92); border: 1px solid var(--border); }
html[data-theme="paper"] .pair-hint.pair-miss-message { color: var(--bad); border-color: #c98a80; }
html[data-theme="paper"] .pair-name { border-color: #9b6bc0; }
html[data-theme="paper"] .pair-match .pair-country { box-shadow: 0 0 14px rgba(47, 125, 59, 0.4); }

html[data-theme="paper"] .fit-bar { background: #e2d6bb; }
html[data-theme="paper"] .result-points.fx-perfect { text-shadow: 0 0 10px rgba(47, 125, 59, 0.45); }
@keyframes paper-glow { to { text-shadow: 0 0 16px rgba(47, 125, 59, 0.8), 0 0 2px rgba(255, 255, 255, 0.9); } }
html[data-theme="paper"] .result-points.fx-perfect { animation-name: fx-pop, paper-glow; }
html[data-theme="paper"] .fx-flyer { text-shadow: 0 0 8px rgba(255, 250, 235, 0.95), 0 2px 0 rgba(74, 56, 38, 0.35); }
html[data-theme="paper"] .fx-flyer-ok { color: var(--ok); }

/* Map markers and cards -------------------------------------------------- */

html[data-theme="paper"] .city-marker .dot { border-color: #fbf6e9; box-shadow: 0 0 0 1.5px var(--ink); }
html[data-theme="paper"] .city-marker .label {
  background: rgba(251, 246, 233, 0.94);
  border: 1px solid rgba(74, 56, 38, 0.45);
  box-shadow: 0 1px 3px rgba(74, 56, 38, 0.25);
}
html[data-theme="paper"] .city-marker.guess .label { color: var(--accent); }
html[data-theme="paper"] .city-marker.best .label { color: #8a5a00; }
html[data-theme="paper"] .city-marker.guess.ok .dot { background: var(--ok); }
html[data-theme="paper"] .city-marker.guess.good .label { color: var(--good); }
html[data-theme="paper"] .city-marker.guess.ok .label { color: var(--ok); }
html[data-theme="paper"] .city-marker.guess.bad .label { color: var(--bad); }
html[data-theme="paper"] .city-marker.origin .dot { border-color: var(--muted); box-shadow: none; }

/* The customer's slip ---------------------------------------------------- */

/* A typed slip of paper lying on the map at an angle (--slip-tilt, new for
   each customer), in two parts joined by a perforation: the stub (customer
   number) and the body (the request). The player
   drags it anywhere (slip.js); picked up, it lifts and straightens a little.
   Once answered, the stub is stamped and torn off: the body falls away, the
   stub stays on the board (.board-stub). The slip turns about a point inside
   the stub, so the stub left behind lines up with it.
   The slip
   lies on top of the search box (under the NOTAM list), so wherever the
   player drops it stays readable; once answered, it slips under the result
   panel, so it can't hide the "Next customer" button. */
html[data-theme="paper"] .ticket,
html[data-theme="paper"] .board-stub {
  --slip: #fdf9ee;
  /* The perforation: a row of small round holes punched through, centred on
     the line between stub and body, starting and ending with a half hole cut
     into each edge (the notch a tear starts from). Each part draws its half
     of every hole, from the same numbers, so the halves left on a torn-off
     stub are exactly the ones the whole slip had.
     How: each part keeps a strip of --hole-band along the line clear of its
     paper (a transparent border) and tiles it with a little image (stretched
     a little so whole tiles fit the width) of paper with a quarter hole cut
     into each corner on the line: every tile boundary gets half a hole, the
     two ends a quarter. The holes are see-through, a little shaded, as if by
     the slip's shadow under them. A background, not a mask: a mask makes the
     browser render the part off-screen on its own, which a desk of 100 slips
     can't afford. */
  --hole-pitch: 5px;
  --hole-band: 3px;
  --stub-holes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' preserveAspectRatio='none'%3E%3Cpath fill='%23fdf9ee' fill-rule='evenodd' d='M0 0H10V6H0Z M0 3A3 3 0 0 1 3 6L0 6Z M10 3A3 3 0 0 0 7 6L10 6Z'/%3E%3Cpath fill='rgba(74,56,38,0.32)' d='M0 3A3 3 0 0 1 3 6L0 6Z M10 3A3 3 0 0 0 7 6L10 6Z'/%3E%3C/svg%3E") left bottom / var(--hole-pitch) var(--hole-band) round no-repeat border-box;
  --body-holes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' preserveAspectRatio='none'%3E%3Cpath fill='%23fdf9ee' fill-rule='evenodd' d='M0 0H10V6H0Z M0 3A3 3 0 0 0 3 0L0 0Z M10 3A3 3 0 0 1 7 0L10 0Z'/%3E%3Cpath fill='rgba(74,56,38,0.32)' d='M0 3A3 3 0 0 0 3 0L0 0Z M10 3A3 3 0 0 1 7 0L10 0Z'/%3E%3C/svg%3E") left top / var(--hole-pitch) var(--hole-band) round no-repeat border-box;
  --slip-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.36 0 0 0 0 0.24 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* A box-shadow, not a drop-shadow filter (which would follow the holes):
     a filter re-renders and blurs the whole slip whenever anything near it
     repaints, so a desk of 100 slips dragged at 10 fps instead of 120. The
     holes are too small for the difference to show. */
  box-shadow: var(--shadow-flat);
  transform: rotate(var(--slip-tilt, -1deg));
  transform-origin: 50% 26px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
html[data-theme="paper"] .ticket {
  z-index: 25;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
html[data-theme="paper"] .shift-screen:has(> .result:not([hidden])) .ticket { z-index: 15; }
html[data-theme="paper"] .ticket.slip-dragging,
html[data-theme="paper"] .board-stub.slip-dragging {
  cursor: grabbing;
  transform: rotate(calc(var(--slip-tilt, -1deg) * 0.4)) scale(1.03);
  box-shadow: var(--shadow-held);
  transition: transform 0.12s ease, box-shadow 0.12s ease, scale 0.15s ease;
  /* Its own layer while it moves (by translate, slip.js draggable): the
     slips under it aren't repainted. */
  will-change: transform, translate;
}
html[data-theme="paper"] .ticket.slip-arrive { animation: slip-arrive 0.38s cubic-bezier(0.2, 0.8, 0.3, 1.1); }
@keyframes slip-arrive {
  from {
    opacity: 0;
    transform: translateY(-18px) rotate(calc(var(--slip-tilt, -1deg) - 4deg)) scale(1.04);
  }
}

/* The stub: the customer's number, and room for the stamp. */
html[data-theme="paper"] .ticket-stub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px 5px 20px;
  /* The paper stops short of the perforation strip, which has the holes. */
  border-bottom: var(--hole-band) solid transparent;
  background: var(--stub-holes), var(--slip-grain) padding-box, var(--slip) padding-box;
}
/* The customer's number: a small label in the corner, leaving the stub's
   width to the score's stamps (a row of them, then the total on the right). */
html[data-theme="paper"] .ticket-head {
  position: absolute;
  top: 4px;
  left: 18px;
  color: #9a3b2a;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 2px;
}
html[data-theme="paper"] .ticket-stub .ticket-stamp { margin-left: auto; max-width: 43%; }

/* A customer's stub (.request-stub), the part that stays: under their
   number, a row of the request in short (its tags), and at its right end
   room kept, always, for the total's stamp. It's paper: what's on it is
   laid out once, when the customer arrives, and scoring only stamps ink
   over it (slip.js stampLine): nothing on it moves, it never changes size. */
html[data-theme="paper"] .ticket-stub.request-stub {
  --stamp-room: 40%;
  display: block;
  min-height: 0;
  padding: 19px 16px 6px 20px;
}
html[data-theme="paper"] .stub-marks {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding-right: var(--stamp-room);
}
html[data-theme="paper"] .request-stub .ticket-tags { position: relative; flex: 1; align-items: center; gap: 11px 7px; min-width: 0; padding: 5px 0 3px; }
/* The tags small, printed: the stub's mostly for what's stamped on it. */
html[data-theme="paper"] .request-stub .tag {
  position: relative;
  padding: 1px 6px;
  border-width: 1.2px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
}
html[data-theme="paper"] .stub-marks .ticket-stamp {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  height: fit-content;
  max-width: calc(var(--stamp-room) - 8px);
  margin: auto 0;
}

/* The stamp: where the customer was sent, in ink by how well it went. */
html[data-theme="paper"] .ticket-stamp {
  --ink: #2c5d8f;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 68%;
  padding: 2px 9px 3px;
  border: 2.5px solid var(--ink);
  border-radius: 5px;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  line-height: 1.1;
  opacity: 0.86;
  transform: rotate(var(--stamp-tilt, -4deg));
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
}
html[data-theme="paper"] .ticket-stamp[hidden] { display: none; }
html[data-theme="paper"] .ticket-stamp.ink-good { --ink: #2f7d3b; }
html[data-theme="paper"] .ticket-stamp.ink-ok { --ink: #b0601c; }
html[data-theme="paper"] .ticket-stamp.ink-bad { --ink: #b3261e; }
html[data-theme="paper"] .ticket-stamp.ink-skipped { --ink: #6f6252; }
html[data-theme="paper"] .stamp-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
}
html[data-theme="paper"] .stamp-where { align-items: center; }
html[data-theme="paper"] .stamp-score {
  padding-left: 9px;
  border-left: 2px solid var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
html[data-theme="paper"] .stamp-detail {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
html[data-theme="paper"] .ticket.slip-stamped .ticket-stamp { animation: stamp-in 0.26s cubic-bezier(0.3, 0.9, 0.4, 1.25) both; }
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(var(--stamp-tilt, -4deg)) scale(1.9); }
  60% { opacity: 0.95; }
}
/* The stamp's thump. */
html[data-theme="paper"] .ticket.slip-stamped { animation: slip-thump 0.3s 0.12s ease-out; }
@keyframes slip-thump {
  40% { transform: rotate(var(--slip-tilt, -1deg)) scale(0.985) translateY(1px); }
}

/* The score, stamped line by line onto the stub (score_fx.js
   playSlipScore): a small one-line rubber stamp per reason ("+40 NOT IN
   AFRICA"), in ink by how well it fitted, over the tag it's about (else
   after the tags), left of the total (slip.js stampLine). The torn-off stub
   keeps them: a log of the score. */
html[data-theme="paper"] .line-stamp {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  align-self: center;
  transform: rotate(var(--stamp-tilt, -3deg));
  mix-blend-mode: multiply;
  pointer-events: none;
}
html[data-theme="paper"] .line-stamp-ink {
  --ink: #2c5d8f;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 0 4px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  opacity: 0.9;
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
}
html[data-theme="paper"] .line-stamp-ink b { flex: none; font-size: 12px; font-weight: 800; letter-spacing: 0.3px; }
html[data-theme="paper"] .line-stamp-ink span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
/* Lines with no tag of their own ("NOT THE CAPITAL", "312 KM OFF"):
   stamped over the foot of the tags, one after another. */
html[data-theme="paper"] .line-stamp.over-tags {
  position: absolute;
  bottom: -9px;
  max-width: 100%;
}
html[data-theme="paper"] .line-stamp.over-tags .line-stamp-ink { background: color-mix(in srgb, var(--slip) 60%, transparent); }
/* On a chip: what it added, stamped on its top right corner. */
html[data-theme="paper"] .line-stamp.on-tag-corner {
  position: absolute;
  top: -11px;
  right: -12px;
  max-width: none;
}
/* A tag the answer missed: struck through with a rubber-stamped stroke, red
   (orange half-way), a little askew. */
html[data-theme="paper"] .tag.tag-struck::after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: var(--strike, #b3261e);
  opacity: 0.85;
  transform: rotate(var(--strike-tilt, -3deg));
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
  pointer-events: none;
}
html[data-theme="paper"] .tag.struck-ok { --strike: #b0601c; }
html[data-theme="paper"] .ticket .tag.tag-struck::after { animation: strike-in 0.2s ease-out both; }
@keyframes strike-in { from { clip-path: inset(0 100% 0 0); } }
html[data-theme="paper"] .ticket.slip-copy .tag.tag-struck::after { animation: none; }
html[data-theme="paper"] .ticket .line-stamp { animation: line-stamp-in 0.22s cubic-bezier(0.3, 0.9, 0.4, 1.25) both; }
@keyframes line-stamp-in {
  from { opacity: 0; transform: rotate(var(--stamp-tilt, -3deg)) scale(1.8); }
  60% { opacity: 1; }
}
html[data-theme="paper"] .line-stamp.ink-good .line-stamp-ink { --ink: #2f7d3b; }
html[data-theme="paper"] .line-stamp.ink-ok .line-stamp-ink { --ink: #b0601c; }
html[data-theme="paper"] .line-stamp.ink-bad .line-stamp-ink { --ink: #b3261e; }
html[data-theme="paper"] .line-stamp.ink-bonus .line-stamp-ink { --ink: #7a4fa0; }
/* The copy that falls when the slip is torn (slip.js tearOff): its stamps
   are already there. */
html[data-theme="paper"] .ticket.slip-copy .line-stamp,
html[data-theme="paper"] .ticket.slip-copy .ticket-stamp { animation: none; }
@keyframes line-stamp-in {
  from { opacity: 0; transform: rotate(var(--stamp-tilt, -4deg)) scale(1.8); }
  60% { opacity: 1; }
}
html[data-theme="paper"] .line-stamp.ink-good .line-stamp-ink { --ink: #2f7d3b; }
html[data-theme="paper"] .line-stamp.ink-ok .line-stamp-ink { --ink: #b0601c; }
html[data-theme="paper"] .line-stamp.ink-bad .line-stamp-ink { --ink: #b3261e; }
html[data-theme="paper"] .line-stamp.ink-bonus .line-stamp-ink { --ink: #7a4fa0; }
html[data-theme="paper"] .line-stamp-text { font-size: 15px; font-weight: 800; letter-spacing: 0.5px; white-space: nowrap; }
html[data-theme="paper"] .line-stamp-detail {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* While its score is stamped, the slip stays on top of the result panel. */
html[data-theme="paper"] .shift-screen:has(> .result:not([hidden])) .ticket.slip-scoring { z-index: 25; }
/* The score and its reasons are stamped on the slip: the result panel just
   says where they went and the best answers. */
html[data-theme="paper"] .result-points,
html[data-theme="paper"] .result-breakdown { display: none; }

/* The body: the other half of the holes along its top, and the request. */
html[data-theme="paper"] .ticket-body {
  position: relative;
  padding: 7px 20px 14px;
  border-top: var(--hole-band) solid transparent;
  background: var(--body-holes), var(--slip-grain) padding-box, var(--slip) padding-box;
}
/* Torn off: the body peels away from one end of the perforation and drops.
   The slip's box-shadow would stay behind where the body was: for the tear
   (one slip, briefly) the shadow is a filter, following each part. */
html[data-theme="paper"] .ticket.slip-tearing {
  box-shadow: none;
  filter: drop-shadow(calc(var(--sx) * 1.8) calc(var(--sy) * 1.8) 1.5px rgba(40, 25, 10, calc(0.32 * var(--shadow-alpha)))) drop-shadow(calc(var(--sx) * 9.4) calc(var(--sy) * 9.4) 12px rgba(40, 25, 10, calc(0.24 * var(--shadow-alpha))));
}
html[data-theme="paper"] .ticket.slip-tearing .ticket-body {
  transform-origin: 0 0;
  animation: slip-tear 0.56s cubic-bezier(0.5, 0, 0.75, 0.4) forwards;
}
@keyframes slip-tear {
  25% { transform: rotate(3deg); }
  to { transform: translate(24px, 150px) rotate(16deg); opacity: 0; }
}
/* The request, typed. */
html[data-theme="paper"] .ticket-text {
  margin: 0;
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.5;
  color: #2a2016;
}
/* Chips as rubber stamps, on the slip and on its torn-off stub alike. */
/* The compass's disc, the colour of the slip it's pinned to. */
html[data-theme="paper"] :is(.ticket, .board-stub) .tag-compass { --compass-bg: var(--slip); }
html[data-theme="paper"] :is(.ticket, .board-stub) .tag.has-compass { padding-left: 2.75em; }
html[data-theme="paper"] :is(.ticket, .board-stub) .tag {
  background: transparent;
  border-width: 1.5px;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Stubs torn off earlier this shift, left on the board over the map (under
   the panels and the slip). Each can be dragged about. */
.slip-board {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}
html[data-theme="paper"] .board-stub {
  position: absolute;
  pointer-events: auto;
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), box-shadow 0.2s ease;
}
html[data-theme="paper"] .board-stub.settling {
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), left 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), top 0.5s cubic-bezier(0.3, 0.7, 0.3, 1), box-shadow 0.2s ease;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="paper"] .ticket.slip-arrive,
  html[data-theme="paper"] .ticket.slip-stamped,
  html[data-theme="paper"] .ticket.slip-stamped .ticket-stamp { animation: none; }
  html[data-theme="paper"] .ticket.slip-tearing .ticket-body { animation: none; opacity: 0; }
}

/* Overcrowding notices (notice.js) ----------------------------------------- */

/* A slip posted on the right under the HUD: the closed country in red on
   the stub, with a red CLOSED stamp; why, typed on the body. Next customer:
   the body tears off, the stub stays on the board. The NOTAM list shows a
   copy, whole (.notice-copy). */
html[data-theme="paper"] .ticket.notice-slip {
  top: 0;
  left: auto;
  right: 16px;
  width: 270px;
  max-width: calc(100% - 32px);
  z-index: 22;
}
html[data-theme="paper"] .notice-stub { min-height: 50px; padding-top: 16px; padding-bottom: 5px; }
html[data-theme="paper"] .notice-stub .ticket-head { color: #9a3b2a; }
/* The country in full, on two lines if it has to be. */
html[data-theme="paper"] .notice-country {
  min-width: 0;
  overflow-wrap: break-word;
  line-height: 1.2;
  color: var(--bad);
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 17px;
  font-weight: 700;
}
html[data-theme="paper"] .notice-closed {
  --ink: #b3261e;
  flex: none;
  padding: 0 5px 1px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.1;
  opacity: 0.88;
  transform: rotate(-7deg);
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
}
html[data-theme="paper"] .notice-closed[hidden] { display: none; }
html[data-theme="paper"] .ticket.notice-slip.slip-stamped .notice-closed { animation: notice-stamp-in 0.26s cubic-bezier(0.3, 0.9, 0.4, 1.25) both; }
@keyframes notice-stamp-in {
  from { opacity: 0; transform: rotate(-7deg) scale(1.9); }
}
html[data-theme="paper"] .notice-body { padding: 6px 18px 12px; }
html[data-theme="paper"] .notice-headline {
  margin: 0 0 4px;
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #2a2016;
}
html[data-theme="paper"] .notice-text {
  margin: 0;
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
  color: #2a2016;
}
/* In the NOTAM list: lying flat, not to be picked up. */
html[data-theme="paper"] .ticket.notice-copy {
  position: relative;
  inset: auto;
  width: auto;
  max-width: none;
  margin: 2px 4px 6px;
  transform: rotate(-0.6deg);
  cursor: default;
  user-select: text;
  -webkit-user-select: text;
}
html[data-theme="paper"] .notam-list .ticket.notice-copy:nth-child(odd) { transform: rotate(0.5deg); }
/* The result panel doesn't repeat it. */
html[data-theme="paper"] .result-notice { display: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-theme="paper"] .ticket.notice-slip.slip-stamped .notice-closed { animation: none; }
}

/* All at once: the blotter ------------------------------------------------ */

/* A green leather desk blotter with stitched edges, a rubber stamp at rest in
   its corner: where a customer's slip goes to be served. Torn-off stubs pile
   up on it. */
html[data-theme="paper"] .desk-zone {
  border: none;
  border-radius: 6px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 20%, #3f6150 0%, #2c4a3b 60%, #233c30 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 2px 10px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(40, 30, 20, 0.35);
}
html[data-theme="paper"] .desk-zone::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(222, 196, 136, 0.55);
  border-radius: 3px;
}
html[data-theme="paper"] .desk-zone-label {
  left: 18px;
  bottom: 12px;
  color: #d9bd7e;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}
html[data-theme="paper"] .desk-zone-hint {
  color: rgba(232, 214, 170, 0.75);
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 15px;
}
html[data-theme="paper"] .desk-zone-stamp {
  right: 16px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  stroke: #d9bd7e;
  stroke-width: 1.8;
  fill: rgba(0, 0, 0, 0.18);
}

/* The slips on the desk: thrown about, under the search box and result;
   the one on the blotter on top, as the one-at-a-time slip is. */
html[data-theme="paper"] .ticket.desk-slip { z-index: 18; }
html[data-theme="paper"] .ticket.desk-slip.in-zone { z-index: 25; }
html[data-theme="paper"] .ticket.desk-slip.slip-dragging { z-index: 26; }
html[data-theme="paper"] .shift-screen:has(> .result:not([hidden])) .ticket.desk-slip { z-index: 15; }
html[data-theme="paper"] .ticket.desk-slip.slip-gliding { transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, transform 0.3s ease, box-shadow 0.18s ease; will-change: transform; }
html[data-theme="paper"] .board-stub { padding: 0; background: none; border: none; border-radius: 0; }
/* A slip lying on the desk shows a picture of itself (slip_picture.js): the
   live slip is there, unseen, for when it's taken. */
html[data-theme="paper"] .desk-slip > .slip-picture { display: none; position: absolute; left: 0; top: 0; pointer-events: none; }
html[data-theme="paper"] .desk-slip.baked > .slip-picture { display: block; }
html[data-theme="paper"] .desk-slip.baked > :not(.slip-picture) { visibility: hidden; }

html[data-theme="paper"] .time-spare.spare { background: #e3eedc; color: var(--good); }
html[data-theme="paper"] .time-spare.spare b { color: var(--good); }

/* The desk's extras from the shop ----------------------------------------- */

/* The slip box: a little wooden box, its lid a shade lighter, the slot cut
   through it, a brass label plate on its front. */
html[data-theme="paper"] .slip-box {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 3px, rgba(0, 0, 0, 0.05) 3px 7px, rgba(255, 255, 255, 0.02) 7px 12px),
    linear-gradient(#8d5d36, #6c4325);
  border: none;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 235, 200, 0.25), var(--shadow-box);
}
html[data-theme="paper"] .slip-box-lid {
  background: linear-gradient(#a26d42, #8a5a33);
  border-bottom: 2px solid #4f3019;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 235, 200, 0.3);
}
html[data-theme="paper"] .slip-box-slot { background: #1e1209; box-shadow: inset 0 2px 3px #000, 0 1px 0 rgba(255, 235, 200, 0.3); }
/* A stub carried over it: the box lights up, warm. */
html[data-theme="paper"] .slip-box.box-ready { outline-color: #e2c27a; }
html[data-theme="paper"] .slip-box.box-ready .slip-box-slot { box-shadow: inset 0 2px 3px #000, 0 0 0 2px #e2c27a; }
html[data-theme="paper"] .slip-box-front { color: #f1dfc0; font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; font-weight: 700; letter-spacing: 1.5px; }
html[data-theme="paper"] .slip-box-label {
  padding: 1px 8px 0;
  color: #3b2a12;
  background: linear-gradient(#e2c27a, #b8913f);
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 245, 210, 0.6);
}
html[data-theme="paper"] .slip-box-count { color: #f1dfc0; }

/* The capitals list: a ruled index card, a red line under its title. */
html[data-theme="paper"] .capitals-card {
  background:
    repeating-linear-gradient(transparent 0 16px, rgba(70, 110, 160, 0.16) 16px 17px) 0 calc(100% - 10px) / 100% calc(13 * 17px) no-repeat,
    #fbf7ec;
  border: none;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
}
html[data-theme="paper"] .capitals-title { color: var(--bad); }
html[data-theme="paper"] .capitals-region { border-top: 1.5px solid rgba(179, 38, 30, 0.55); }
html[data-theme="paper"] .capitals-tab { background: #efe4c8; box-shadow: inset 0 -1px 0 rgba(74, 56, 38, 0.2); }
html[data-theme="paper"] .capitals-tab.current { color: #fbf7ec; background: var(--ink); }

/* The booklets: the cards' paper, red ink for the letters and rules, page
   numbers and grid squares in blue. */
html[data-theme="paper"] .booklet {
  background: #fbf7ec;
  border: none;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
}
html[data-theme="paper"] .booklet-title, html[data-theme="paper"] .booklet-letter { color: var(--bad); }
html[data-theme="paper"] .booklet-letter, html[data-theme="paper"] .booklet-head { border-bottom: 1.5px solid rgba(179, 38, 30, 0.55); }
html[data-theme="paper"] .booklet-entry-page, html[data-theme="paper"] .atlas-square { color: #1f5aa8; }
/* The thumb index: tabs of the booklet's paper, the open one the page's. */
html[data-theme="paper"] .booklet-tab {
  color: rgba(29, 23, 18, 0.6);
  background: #ece0c2;
  border-color: rgba(74, 56, 38, 0.45);
  /* Their own shadow, as the card's, so they stand out from another card's
     tabs or page under them; none on the side they're bound into. */
  box-shadow: 0 0 0 0.5px rgba(40, 25, 10, 0.22), 1px 1px 3px rgba(40, 25, 10, 0.3);
  clip-path: inset(-6px -6px -6px 0);
}
html[data-theme="paper"] .booklet-tab.current { color: var(--bad); background: #fbf7ec; }
html[data-theme="paper"] .booklet-corner { background: linear-gradient(225deg, transparent 50%, rgba(74, 56, 38, 0.35) 50%, #e6d7b2 56%); }
html[data-theme="paper"] .languages-native, html[data-theme="paper"] .scripts-native { color: var(--ink); }
html[data-theme="paper"] .atlas-letter:hover { background: #efe4c8; }
html[data-theme="paper"] .atlas-letter.current { color: #fbf7ec; background: var(--bad); }

/* The namesake grid: a card like the others, red ink for the rules, the
   counts in blue. */
html[data-theme="paper"] .namesake-grid-card {
  background: #fbf7ec;
  border: none;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
}
html[data-theme="paper"] .namesake-grid-title, html[data-theme="paper"] .namesake-grid-also-head { color: var(--bad); }
html[data-theme="paper"] .namesake-grid-note, html[data-theme="paper"] .namesake-grid-also-head { border-color: rgba(179, 38, 30, 0.55); }
html[data-theme="paper"] .namesake-grid-name { border-color: rgba(179, 38, 30, 0.45); }
html[data-theme="paper"] .namesake-grid-cell, html[data-theme="paper"] .namesake-grid-also-row b { color: #1f5aa8; }
html[data-theme="paper"] .namesake-grid-cell.none { color: rgba(29, 23, 18, 0.5); }



/* The highest capitals list: a card like the others. */
html[data-theme="paper"] .altitudes-card {
  background: #fbf7ec;
  border: none;
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
}
html[data-theme="paper"] .altitudes-title, html[data-theme="paper"] .altitudes-rule { color: var(--bad); }
html[data-theme="paper"] .altitudes-rule span { background: #fbf7ec; }

/* The cards' icons in black ink, a little worn. */
html[data-theme="paper"] .desk-card-icon { color: #1d1712; opacity: 0.85; }

/* The instruments' boxes: cardboard. */
html[data-theme="paper"] .tool-box {
  background: linear-gradient(#d2b07a, #b8925a);
  border: none;
  border-radius: 3px;
  box-shadow: var(--shadow-box);
}
html[data-theme="paper"] .tool-box-body { fill: #a87d46; stroke: #6f4f2a; }
html[data-theme="paper"] .tool-box-contents > rect { fill: #dcebf2; stroke: #6b8796; }
html[data-theme="paper"] .tool-box-contents > .tool-box-sheet { fill: rgba(220, 235, 242, 0.9); stroke: #1f45a8; }
html[data-theme="paper"] .tool-box-contents > .tool-box-sheet.smoked { stroke: #464a52; }
html[data-theme="paper"] .tool-box-contents > .tool-box-sheet.inked { stroke: #2a2420; }
html[data-theme="paper"] .tool-box-contents > .tool-box-sheet.gridded { stroke: #1f5aa8; }
html[data-theme="paper"] .tool-box-contents > .tool-box-sheet.purple { stroke: #6a1b8f; }
html[data-theme="paper"] .tool-box-label { color: #3b2a12; font-weight: 700; }
/* The rulers on the paper map: the line in red ink. */
html[data-theme="paper"] .lat-ruler { color: rgba(179, 38, 30, 0.8); }
html[data-theme="paper"] .straightedge-tab, html[data-theme="paper"] .map-stencil-mark { font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; }
html[data-theme="paper"] .countries-stencil { --edge: 40, 36, 32; }
html[data-theme="paper"] .empires-stencil { --edge: 106, 27, 143; }
html[data-theme="paper"] .empire-button { font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; font-size: 11px; background: rgba(246, 236, 214, 0.92); }
html[data-theme="paper"] .empire-button:hover { background: #ecdcb8; }
html[data-theme="paper"] .empire-button[aria-checked="true"] { background: rgb(var(--edge)); color: #fbf3e2; }
html[data-theme="paper"] .grid-stencil { --edge: 31, 90, 168; }
html[data-theme="paper"] .straightedge-tab b { font-size: 12px; letter-spacing: 0.5px; }
html[data-theme="paper"] .lat-label { font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* Finish and briefing ---------------------------------------------------- */

html[data-theme="paper"] .history tbody tr[data-customer]:hover td { background: var(--panel-raised); }
html[data-theme="paper"] .history tbody tr.selected td { background: #e3ebf2; }
html[data-theme="paper"] .history td { border-bottom-color: #e3d7bd; }
/* A torn-off stub as on the board, but in the table's flow, not dragged. */
html[data-theme="paper"] .board-stub.history-stub { position: relative; cursor: inherit; touch-action: auto; transition: none; }
@media (max-width: 700px) {
  html[data-theme="paper"] .history tr { border-bottom-color: #e3d7bd; }
}
html[data-theme="paper"] .news { background: #f4efe2; border: 1px solid #d6ccb4; border-radius: 3px; }

/* Narrow screens --------------------------------------------------------- */

@media (max-width: 700px) {
  html[data-theme="paper"] .stat.nixie { flex: none; }
  html[data-theme="paper"] .nixie-glass { min-width: 64px; padding: 4px 8px 3px; }
  html[data-theme="paper"] .nixie-base { padding: 1px 7px 2px; letter-spacing: 1.2px; }
  html[data-theme="paper"] .nixie-tube { width: 15px; height: 30px; }
  html[data-theme="paper"] .nixie-tube > span { font-size: 27px; }
  html[data-theme="paper"] .nixie-colon { width: 6px; }
  html[data-theme="paper"] .nixie-colon::before,
  html[data-theme="paper"] .nixie-colon::after { width: 3px; height: 3px; margin-left: -1.5px; }
  html[data-theme="paper"] .ticket { top: 84px; }
  html[data-theme="paper"] .desk-zone { top: 84px; }
  html[data-theme="paper"] .notam-panel { top: 84px; }
  html[data-theme="paper"] .shift-over-banner { top: auto; }
  /* The stamp in two lines (style.css): tighter, the score smaller. */
  html[data-theme="paper"] .ticket-stamp { gap: 0 6px; padding: 1px 7px 2px; }
  /* Long names: as much as fits, then "…" (letters set tighter, to fit more). */
  html[data-theme="paper"] .stamp-title { font-size: 13px; letter-spacing: 0.3px; text-overflow: ellipsis; }
  html[data-theme="paper"] .stamp-code { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
  html[data-theme="paper"] .stamp-score { font-size: 15px; padding-left: 6px; }
}
/* Folded to its title, the capitals cards lose their ruled lines (they'd run
   through the title). */
html[data-theme="paper"] .capitals-card.folded { background: #fbf7ec; }
/* The points on a chip's corner: as small as the chips. */
html[data-theme="paper"] .line-stamp.on-tag-corner .line-stamp-ink b { font-size: 10px; }

/* Three strikes' citations (citations.js): small printed slips on pink
   carbon paper, a torn-off notice stub's height (narrower), piled in the desk's
   bottom left corner: "Citation · No. 1 of 3"; the last one stamped SHIFT
   VOID. */
html[data-theme="paper"] .citation {
  position: absolute;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 190px;
  height: 50px; /* as a notice's stub, torn off (.notice-stub) */
  box-sizing: border-box;
  padding: 0 12px 0 14px;
  background: #f7dcd6;
  border-top: 3px solid #b3261e;
  box-shadow: var(--shadow-flat);
  transform: rotate(var(--slip-tilt, -2deg));
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
html[data-theme="paper"] .citation.slip-dragging { cursor: grabbing; z-index: 26; will-change: translate; }
html[data-theme="paper"] .citation.slip-arrive { animation: slip-arrive 0.38s cubic-bezier(0.2, 0.8, 0.3, 1.1); }
html[data-theme="paper"] .citation-title,
html[data-theme="paper"] .citation-no {
  color: #b3261e;
  font-family: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  font-size: 17px;
  font-weight: 700;
}
/* "No. 1 of 3", as citations are numbered: smaller, condensed, spaced. */
html[data-theme="paper"] .citation-no {
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
html[data-theme="paper"] .citation-void {
  --ink: #2a1d15; /* black ink: it reads over the red print */
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0 7px 1px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  font-family: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.86;
  translate: -50% -50%;
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--ink-mask);
  mask-image: var(--ink-mask);
  pointer-events: none;
  --stamp-tilt: -8deg;
}
html[data-theme="paper"] .citation-void[hidden] { display: none; }
/* Its landing, once (citations.js takes the class off after: picking the
   slip up moves it in the page, which would play an animation again). */
html[data-theme="paper"] .citation-void.stamping { animation: stamp-in 0.26s cubic-bezier(0.3, 0.9, 0.4, 1.25) both; }
/* The last one: its print up top, the stamp under it, both readable. */
html[data-theme="paper"] .citation:has(> .citation-void) { align-items: flex-start; padding-top: 6px; }
html[data-theme="paper"] .citation:has(> .citation-void) .citation-void { top: auto; bottom: 5px; translate: -50% 0; transform: rotate(-3deg); --stamp-tilt: -3deg; }
