/* Kiosk: a street kiosk with posters pasted on it and a split-flap board for days and times. Tokens first. */
@font-face { font-family: "Anton"; src: url("/static/fonts/anton-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/static/fonts/space-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-display: swap; }

:root {
  --bg: #efe6d2; --surface: #fbf6ea; --text: #1d1a16; --muted: #6b6151; --border: #d6cab0; --ink: #1d1a16;
  --shadow: #1d1a16; --accent: #c8361c; --accent-text: #fff8ee; --error: #b42318; --awning-2: #f7efdf;
  --board: #1b1a17; --flap: #2d2b27; --flap-fg: #ffd23f; --flap-line: rgba(0, 0, 0, .55);
  --tape: rgba(236, 214, 150, .78); --paper-noise: .05;
  --c-music: #7c3aed; --c-stage: #c2410c; --c-film: #be123c; --c-exhibitions: #0e7490; --c-food: #a16207; --c-outdoors: #15803d;
  --c-talks: #1d4ed8; --c-hobby: #be185d; --c-community: #047857; --c-family: #b45309; --c-nightlife: #4338ca; --c-other: #6b7280;
  --display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130f; --surface: #221e18; --text: #efe6d2; --muted: #a89c86; --border: #3d362c; --ink: #4a4236;
    --shadow: #000; --accent: #ff6a45; --accent-text: #16130f; --error: #f97066; --awning-2: #3a2a22;
    --board: #0c0b09; --flap: #2a2620; --flap-fg: #ffd54f; --flap-line: rgba(0, 0, 0, .7);
    --tape: rgba(200, 180, 120, .32); --paper-noise: .08;
    --c-music: #a78bfa; --c-stage: #fb923c; --c-film: #fb7185; --c-exhibitions: #22d3ee; --c-food: #facc15; --c-outdoors: #4ade80;
    --c-talks: #60a5fa; --c-hobby: #f472b6; --c-community: #34d399; --c-family: #fde047; --c-nightlife: #818cf8; --c-other: #9ca3af;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background-color: var(--bg);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Paper grain. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' 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 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background-blend-mode: soft-light; } }
a { color: inherit; }
h1 { font: 400 clamp(30px, 7vw, 40px)/1.05 var(--display); margin: 0 0 10px; letter-spacing: .01em; }
h2 { font: 700 13px/1.4 var(--mono); margin: 0; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
p { margin: 0 0 12px; }
code { font: 13px var(--mono); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--error); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The awning: striped canvas with a scalloped edge, unrolled on load. */
.awning { height: 30px; background: repeating-linear-gradient(90deg, var(--accent) 0 30px, var(--awning-2) 30px 60px);
  -webkit-mask: radial-gradient(15px 11px at 15px 0, #000 98%, transparent) 0 19px / 30px 11px repeat-x, linear-gradient(#000 0 0) top / 100% 19px no-repeat;
          mask: radial-gradient(15px 11px at 15px 0, #000 98%, transparent) 0 19px / 30px 11px repeat-x, linear-gradient(#000 0 0) top / 100% 19px no-repeat;
  transform-origin: top; animation: unroll .7s cubic-bezier(.2,.8,.2,1.15) both; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); }
@keyframes unroll { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px;
  padding-bottom: 8px; }
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 400 30px/1 var(--display); color: var(--accent);
  text-decoration: none; letter-spacing: .04em; text-transform: uppercase; flex-shrink: 0; }
.logo { width: 32px; height: 32px; transition: transform .3s cubic-bezier(.2,.8,.2,1.4); }
.brand:hover .logo { transform: rotate(-6deg) scale(1.08); }
.logo-roof, .logo-scallop { fill: var(--accent); }
.logo-stripe { fill: var(--awning-2); }
.logo-body { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.logo-window { fill: var(--accent); opacity: .25; }

/* Language switch: two flap tiles. */
.langs { display: inline-flex; gap: 2px; flex-shrink: 0; }
.langs a { font: 700 12px/1 var(--mono); padding: 6px 6px; border-radius: 3px; text-decoration: none;
  background: var(--flap); color: color-mix(in srgb, var(--flap-fg) 45%, transparent); }
.langs a.on { color: var(--flap-fg); }
.langs a:hover { color: var(--flap-fg); }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 36px; padding-bottom: 44px;
  color: var(--muted); font-size: 14px; }
.coffee { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; text-decoration: none; font-weight: 700;
  color: var(--text); background: var(--surface); border: 2px solid var(--shadow); border-radius: 4px;
  box-shadow: 3px 3px 0 var(--shadow); transform: rotate(-1deg); transition: transform .15s, box-shadow .15s; }
.coffee svg { width: 20px; height: 20px; color: var(--accent); }
.coffee:hover { transform: rotate(0) translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.coffee:hover svg { animation: steam .6s ease-in-out; }
@keyframes steam { 50% { transform: translateY(-2px) rotate(-8deg); } }

/* Buttons and controls: printed-ticket feel, hard offset shadows. */
.button { display: inline-block; border: 2px solid var(--shadow); border-radius: 4px; padding: 9px 16px; font: inherit; font-weight: 700;
  background: var(--accent); color: var(--accent-text); text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--shadow); }
.button.ghost { background: var(--surface); color: var(--text); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
input[type=text], input[type=password] { font: inherit; color: inherit; background: var(--surface);
  border: 2px solid var(--shadow); border-radius: 4px; padding: 8px 12px; min-width: 0; }

/* The panel hangs from the header (not from the button), so it always stays on screen. */
.where { position: static; min-width: 0; }
.where summary { list-style: none; cursor: pointer; padding: 5px 10px; border: 2px solid var(--shadow); border-radius: 4px;
  background: var(--surface); white-space: nowrap; max-width: 48vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 2px 2px 0 var(--shadow); }
.where summary::-webkit-details-marker { display: none; }
.where-panel { position: absolute; right: 16px; top: calc(100% + 2px); z-index: 6; width: min(360px, calc(100% - 32px));
  background: var(--surface); border: 2px solid var(--shadow); border-radius: 4px; padding: 14px; box-shadow: 5px 5px 0 var(--shadow); }
.label { font-weight: 700; margin: 14px 0 6px; }
.picker { display: grid; gap: 12px; }
.picker form { display: flex; gap: 8px; }
.picker input { flex: 1; }
.welcome { padding: 6px 0 32px; max-width: 560px; }

/* When: five equal segments in one row, also on a phone. */
.when { display: flex; gap: 4px; margin: 14px 0 10px; }
.tab { flex: 1 1 auto; padding: 6px 5px; border-radius: 3px; text-decoration: none; white-space: nowrap; color: var(--muted);
  font-weight: 600; font-size: 14px; text-align: center; border: 2px solid var(--border); background: var(--surface); }
@media (max-width: 359px) { .when { gap: 3px; } .tab { font-size: 13px; padding: 6px 3px; } }
@media (min-width: 560px) { .tab { font-size: 15px; } }
.tab:hover { border-color: var(--border); }
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* Kind: on a phone one bar that opens into all chips; on wider screens the chips are always shown. */
.kinds { margin: 0 0 18px; }
.kinds summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; padding: 7px 12px;
  border: 2px solid var(--shadow); border-radius: 4px; background: var(--surface); box-shadow: 2px 2px 0 var(--shadow);
  white-space: nowrap; overflow: hidden; }
.kinds summary::-webkit-details-marker { display: none; }
.kinds summary b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kinds summary::after { content: "▾"; margin-left: auto; padding-left: 8px; color: var(--accent); transition: transform .2s; }
.kinds[open] summary::after { transform: rotate(180deg); }
.cats { margin-top: 10px; }
.cats .chip { white-space: nowrap; padding: 5px 10px; }
@media (min-width: 700px) {
  .kinds summary { display: none; }
  .cats { margin-top: 0; }
  .cats .chip { padding: 3px 10px; }
}
.pin { width: 14px; height: 14px; fill: var(--accent); vertical-align: -2px; }
.chip { padding: 3px 10px; border: 2px solid var(--border); border-radius: 3px; text-decoration: none; font-size: 14px;
  font-weight: 600; background: var(--surface); }
.chip:hover { border-color: var(--shadow); }
.chip.on { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }

/* Split-flap board: one dark panel per word, letters flip in one by one, then sit still and easy to read. */
.flap { display: inline-block; }
.flap-tiles { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; }
.flap-word { position: relative; display: inline-flex; padding: 0 .3em; border-radius: 4px;
  background: linear-gradient(var(--flap) 50%, color-mix(in srgb, var(--flap) 88%, #000) 50%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.flap-word::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--flap-line); opacity: .35; }
.flap i { display: inline-block; font: 700 18px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-style: normal; color: var(--flap-fg); letter-spacing: .01em; }
.flap.small .flap-word { padding: 0 .28em; }
.flap.small i { font: 700 16px/1.6 var(--mono); }
.js .in .flap i, .js .in.flap i { animation: flip .32s cubic-bezier(.3,.6,.3,1.3) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes flip { from { transform: perspective(200px) rotateX(-90deg); } }
.flap i.tick { animation: tick .08s linear; }
@keyframes tick { from { transform: perspective(200px) rotateX(-70deg); } }

/* News ticker as a dot-matrix strip on the kiosk's front. */
.ticker { overflow: hidden; margin: 6px -16px 12px; background: var(--board); color: var(--flap-fg);
  font: 700 13px/1 var(--mono); white-space: nowrap; border-block: 3px solid var(--accent); }
@media (min-width: 760px) { .ticker { margin: 6px 0 14px; border: 3px solid var(--accent); border-radius: 4px; } }
.ticker-track { display: inline-flex; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; padding: 10px 0; }
.ticker a, .ticker b { margin-right: 28px; text-decoration: none; }
.ticker a:hover { text-decoration: underline; }
.ticker a::before, .ticker span > b:not(.ticker-label)::before { content: "◆"; margin-right: 8px; font-size: 10px; vertical-align: 1px;
  color: var(--c, var(--accent)); filter: brightness(1.35) saturate(1.2); }
.ticker-label { background: var(--accent); color: var(--accent-text); padding: 3px 8px; border-radius: 2px; text-transform: uppercase;
  letter-spacing: .06em; margin-left: 16px; }
@keyframes ticker { to { transform: translateX(-50%); } }
.welcome .ticker { margin-bottom: 26px; }
.welcome .ticker-track { animation-duration: 40s; }

.hero { font: 400 clamp(52px, 15vw, 92px)/.92 var(--display); text-transform: uppercase; letter-spacing: .005em; margin-bottom: 18px; }
.hero em { display: inline-block; font-style: normal; color: var(--accent-text); background: var(--accent); padding: 0 .12em .02em;
  margin-top: .06em; transform: rotate(-1.5deg); box-shadow: 5px 5px 0 var(--shadow); }
.js .welcome > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.js .welcome > :nth-child(2) { animation-delay: .1s; } .js .welcome > :nth-child(3) { animation-delay: .2s; }
.js .welcome > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.day-group { margin: 26px 0 8px; }
/* The day sticks to the top as a flap board while you scroll through it. */
.day-label { position: sticky; top: 0; z-index: 3; padding: 8px 0 10px; margin: 0; color: inherit;
  background: linear-gradient(var(--bg) 72%, transparent); }
.day-label .flap { background: var(--board); padding: 5px; border-radius: 5px; box-shadow: 3px 3px 0 color-mix(in srgb, var(--shadow) 60%, transparent); }
.ongoing summary, .films summary { cursor: pointer; list-style: none; }
.ongoing summary h2, .films summary h2 { display: inline; }
.ongoing summary::-webkit-details-marker, .films summary::-webkit-details-marker { display: none; }
.ongoing summary h2::after, .films summary h2::after { content: " ▸"; color: var(--accent); }
.ongoing[open] summary h2::after, .films[open] summary h2::after { content: " ▾"; }

/* The film listing: one ticket per film, its times per cinema as small board tiles. */
.film-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.film { position: relative; padding: 12px 14px 10px 18px; background: var(--surface); border: 2px solid var(--shadow);
  border-radius: 3px; box-shadow: 3px 3px 0 var(--shadow); }
.film::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c-film);
  /* Perforated like a ticket stub. */
  -webkit-mask: radial-gradient(circle 3px at 3px 6px, transparent 98%, #000) 0 0 / 6px 12px;
          mask: radial-gradient(circle 3px at 3px 6px, transparent 98%, #000) 0 0 / 6px 12px; }
.film-title { display: block; font-weight: 700; font-size: 17px; line-height: 1.28; text-decoration: none; overflow-wrap: anywhere; }
.film-title:hover { text-decoration: underline; }
.film-cinema { display: grid; gap: 4px; margin-top: 8px; }
@media (min-width: 560px) { .film-cinema { grid-template-columns: minmax(0, 200px) 1fr; align-items: start; gap: 10px; } }
.film-where { font-size: 14px; color: var(--muted); padding-top: 2px; }
.film-times { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.film-times a { font: 700 13px/1 var(--mono); padding: 5px 6px; border-radius: 3px; text-decoration: none;
  color: var(--flap-fg); background: var(--flap); }
.film-times a:hover { outline: 2px solid var(--accent); }
.film-day { color: color-mix(in srgb, var(--flap-fg) 65%, transparent); }
.js .film[data-reveal] { opacity: 0; transform: translateY(14px); }
.js .film[data-reveal].in { opacity: 1; transform: none; transition: opacity .4s ease var(--delay, 0s), transform .45s ease var(--delay, 0s); }

/* Event cards: posters pasted on the kiosk, a little crooked, some with tape. */
.events { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.event { position: relative; background: var(--surface); border: 2px solid var(--shadow); border-radius: 3px;
  box-shadow: 3px 3px 0 var(--shadow); --tilt: 0deg; transform: rotate(var(--tilt));
  transition: transform .25s cubic-bezier(.2,.8,.2,1.3), box-shadow .25s; }
.event:nth-child(3n+1) { --tilt: -.45deg; } .event:nth-child(3n+2) { --tilt: .35deg; }
.event::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c, var(--c-other)); }
.event:nth-child(4n+1)::after, .event:nth-child(4n+3)::after { content: ""; position: absolute; top: -9px; width: 58px; height: 18px;
  background: var(--tape); box-shadow: 0 1px 1px rgba(0,0,0,.08); pointer-events: none; }
.event:nth-child(4n+1)::after { right: 22px; transform: rotate(4deg); }
.event:nth-child(4n+3)::after { left: 40%; transform: rotate(-3deg); }
.event:hover { transform: translate(-2px, -2px) rotate(0deg); box-shadow: 5px 5px 0 var(--shadow); }
/* Scroll reveal: posters slap onto the wall as they come into view (only with JavaScript, never with reduced motion). */
.js .event[data-reveal] { opacity: 0; transform: translateY(18px) rotate(calc(var(--tilt) * 4)) scale(.97); }
.js .event[data-reveal].in { opacity: 1; transform: rotate(var(--tilt));
  transition: opacity .45s ease var(--delay, 0s), transform .5s cubic-bezier(.2,.8,.2,1.2) var(--delay, 0s), box-shadow .25s; }
.js .event[data-reveal].in:hover { transition-delay: 0s; transform: translate(-2px, -2px) rotate(0deg); }
.event a { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 13px 14px 13px 18px; text-decoration: none; align-items: start; }
.event a:hover .title { text-decoration: underline; }
.time { padding-top: 1px; }
.time-text { font: 700 12px/1.3 var(--mono); text-transform: uppercase; color: var(--muted); }
.what { min-width: 0; }
.title { display: block; font-weight: 700; font-size: 17px; line-height: 1.28; overflow-wrap: anywhere; }
.meta { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.more { color: var(--accent); }
.tag { font: 400 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px 3px; border-radius: 2px;
  white-space: nowrap; color: var(--surface); background: var(--c, var(--c-other)); }
.kind { display: inline-block; margin-top: 5px; font: 400 13px/1 var(--display); letter-spacing: .07em; text-transform: uppercase;
  color: var(--c, var(--c-other)); }
.tag-music { --c: var(--c-music); } .tag-stage { --c: var(--c-stage); } .tag-film { --c: var(--c-film); } .tag-exhibitions { --c: var(--c-exhibitions); }
.tag-food { --c: var(--c-food); } .tag-outdoors { --c: var(--c-outdoors); } .tag-talks { --c: var(--c-talks); }
.tag-hobby { --c: var(--c-hobby); } .tag-community { --c: var(--c-community); } .tag-family { --c: var(--c-family); }
.tag-nightlife { --c: var(--c-nightlife); }
.empty { padding: 40px 0; color: var(--muted); }
.subscribe { margin-top: 12px; }
.tip { margin-top: 28px; font-weight: 600; }
.tip a { color: var(--accent); }

/* Event page: one big poster. */
.detail { position: relative; margin-top: 8px; padding: 22px 20px 18px 26px; background: var(--surface); border: 2px solid var(--shadow);
  border-radius: 3px; box-shadow: 5px 5px 0 var(--shadow); }
.detail::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: var(--c, var(--c-other)); }
.detail::after { content: ""; position: absolute; top: -10px; left: 50%; width: 76px; height: 20px; margin-left: -38px;
  background: var(--tape); transform: rotate(-2deg); }
.detail .back { display: inline-block; margin-bottom: 14px; color: var(--muted); }
.detail .tag { display: inline-block; margin: 0 0 10px 10px; }
.detail h1 { font-size: clamp(32px, 8vw, 48px); text-transform: uppercase; }
.detail dl { display: grid; grid-template-columns: 76px 1fr; gap: 8px 12px; margin: 18px 0; }
.detail dt { font: 700 12px/1.9 var(--mono); text-transform: uppercase; color: var(--muted); }
.detail dd { margin: 0; }
.desc { white-space: pre-line; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.dates { padding-left: 18px; }
.prose ul { padding-left: 20px; }
.prose h2 { margin: 26px 0 8px; }

/* Back office. */
.admin-login { max-width: 360px; padding: 20px 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.admin h2 { margin: 28px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 14px; }
.tile { background: var(--surface); border: 2px solid var(--shadow); border-radius: 3px; padding: 10px 12px; box-shadow: 3px 3px 0 var(--shadow); }
.tile-n { display: block; font: 400 34px/1.1 var(--display); }
.tile-l { font-size: 13px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding: 8px 0 0; border-bottom: 1px solid var(--border); }
.bar-slot { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-slot:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.bar { width: 100%; min-height: 1px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .82; }
.bar-slot.today .bar, .bar-slot:hover .bar { opacity: 1; }
.bar-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 2; display: none;
  white-space: nowrap; font-size: 13px; padding: 5px 8px; border-radius: 3px; background: var(--text); color: var(--bg); }
.bar-slot:hover .bar-tip { display: block; }
.bar-slot:nth-child(-n+6) .bar-tip { left: 0; transform: none; }
.bar-slot:nth-last-child(-n+6) .bar-tip { left: auto; right: 0; transform: none; }
.bars-axis { display: flex; justify-content: space-between; margin: 4px 0 8px; }
.cols { display: grid; gap: 0 24px; }
@media (min-width: 640px) { .cols { grid-template-columns: 1fr 1fr; } }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font: 700 11px var(--mono); text-transform: uppercase; color: var(--muted); padding: 6px 8px 6px 0; }
.admin-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--border); vertical-align: top; }
.admin-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table.sources td:last-child { text-align: left; }
.admin-table tr.off { opacity: .55; }
.admin-table .sum td { font-weight: 700; border-top: 2px solid var(--shadow); }
.table-scroll { overflow-x: auto; }
.meter { height: 8px; margin: 10px 0; background: var(--border); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--shadow); }
.admin-nav a { padding: 4px 10px; border-radius: 3px; text-decoration: none; font-weight: 600; color: var(--muted); }
.admin-nav a.on { background: var(--text); color: var(--bg); }
.admin-nav form { margin-left: auto; }
.badge { display: inline-block; min-width: 1.5em; padding: 0 5px; border-radius: 9px; font-size: 12px; text-align: center;
  background: var(--accent); color: var(--accent-text); }
.admin-head { gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-head h1 { margin: 0; }
.admin-form { display: grid; gap: 12px; max-width: 640px; margin: 14px 0; }
.admin-form label { display: grid; gap: 4px; font-weight: 600; }
.admin-form label.check { display: flex; align-items: center; gap: 8px; }
.admin-form .actions { margin: 6px 0 0; }
.form-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 2fr 2fr 1fr; } }
select, textarea { font: inherit; color: inherit; background: var(--surface); border: 2px solid var(--shadow);
  border-radius: 4px; padding: 8px 10px; min-width: 0; max-width: 100%; }
textarea { font: 13px/1.5 var(--mono); font-weight: 400; }
.admin form { margin: 0; }
.actions form { display: inline; }
.danger { margin-top: 30px; }
.pill { display: inline-block; font: 700 11px/1 var(--mono); text-transform: uppercase; padding: 3px 6px; border-radius: 3px;
  border: 1px solid var(--border); color: var(--muted); vertical-align: 1px; }
.pill.free { border-color: var(--c-outdoors); color: var(--c-outdoors); }
.pill.ai { border-color: var(--accent); color: var(--accent); }
.area-filter { margin: 6px 0 14px; }
.area-filter .n { font: 700 11px var(--mono); opacity: .7; margin-left: 2px; }
.inbox-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 0;
  border-top: 1px solid var(--border); }
.inbox-item.off { opacity: .55; }
.inbox-main { min-width: 0; flex: 1 1 320px; overflow-wrap: anywhere; }
.inbox-actions { display: flex; gap: 14px; align-items: flex-start; }
.job-log { font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--board); color: var(--flap-fg);
  padding: 12px 14px; border-radius: 4px; max-height: 50vh; overflow: auto; }
.admin-table.preview td:last-child { text-align: left; }
.suggest .admin-form { max-width: 520px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tab, .chip, .button { transition: background .2s, color .2s, border-color .2s, transform .12s, box-shadow .12s; }
.chip:active, .tab:active { transform: scale(.95); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1 !important; }
  .ticker { overflow-x: auto; }
}
