/* Tapedeck, the fictional demo board. Deliberately its own look: it must not pass for any real imageboard. */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(/archivo.woff2) format('woff2'); }
:root {
  --bg: #ecebf4; --post: #f9f8fd; --edge: #d4d0e6; --ink: #24213a; --soft: #6a6588;
  --name: #2e6b4f; --subject: #6a2a86; --link: #3c35a8; --quote: #4f7a1c;
  --room: #1e2022; --tape: #9bd14b; --tape-ink: #121212;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
body { margin: 0; font: 14px/1.45 Verdana, 'DejaVu Sans', system-ui, sans-serif; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.banner { background: var(--room); color: #f3f1fb; padding: 12px 16px; font: 15px/1.5 'Archivo', system-ui, sans-serif; }
.banner p { margin: 0 auto; max-width: 980px; }
.banner p + p { margin-top: 6px; color: #c9ccd0; }
.banner a { color: #fff; text-decoration-color: var(--tape); }
.banner b { color: var(--tape); }

.board { max-width: 980px; margin: 0 auto; padding: 22px 16px 10px; text-align: center; border-bottom: 1px solid var(--edge); }
.sitename { margin: 0; font: 700 13px/1 'Archivo', sans-serif; letter-spacing: .08em; color: var(--soft); }
.board h1 { margin: 6px 0 4px; font: 800 30px/1.1 'Archivo', sans-serif; font-stretch: 118%; color: var(--subject); }

.thread { max-width: 980px; margin: 0 auto; padding: 14px 16px 30px; }
.post { margin: 0 0 6px; padding: 6px 10px 8px; overflow: hidden; }
.post.reply { display: table; min-width: min(560px, 100%); max-width: 100%; background: var(--post); border: 1px solid var(--edge); border-left-width: 0; border-top-width: 0; border-radius: 0 0 6px 0; }
.post.op { padding: 4px 0 14px; }
.intro { margin: 0 0 4px; }
.subject { font-weight: 700; color: var(--subject); }
.name { font-weight: 700; color: var(--name); }
.no { color: var(--ink); text-decoration: none; }
.replies { font-size: 12px; }
.fileinfo { margin: 0 0 4px; font-size: 12px; color: var(--soft); }
.thumb { float: left; margin: 2px 18px 6px 0; display: block; cursor: pointer; }
.thumb img { display: block; max-width: 250px; height: auto; border-radius: 3px; }
.body { margin: 4px 0 6px; overflow-wrap: anywhere; }
.quote { color: var(--quote); }
.quotelink { color: var(--link); }
.credit { clear: left; margin: 0; font-size: 11px; color: var(--soft); }
.credit a { color: var(--soft); }
.foot { max-width: 980px; margin: 0 auto; padding: 16px; border-top: 1px solid var(--edge); font-size: 12px; color: var(--soft); }

.try {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--tape); color: var(--tape-ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  font: 700 16px/1 'Archivo', system-ui, sans-serif; font-stretch: 108%;
}
.try small { font-weight: 600; font-size: 12px; opacity: .75; }
@media (max-width: 600px) { .try small { display: none; } }
.try[hidden] { display: none; }

/* Preview player */
.pv { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; font: 14px/1.4 'Archivo', system-ui, sans-serif; touch-action: none; }
.pv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pv .bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(rgba(0,0,0,.75), transparent); transition: opacity .25s; }
.pv.idle .bar, .pv.idle .hint { opacity: 0; }
.pv button { appearance: none; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; min-width: 36px; height: 36px; padding: 0 10px; cursor: pointer; font: 600 14px 'Archivo', sans-serif; }
.pv button:hover { background: rgba(255,255,255,.24); }
.pv .count { font-variant-numeric: tabular-nums; }
.pv .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dcdfe2; }
.pv .label { padding: 4px 8px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font-weight: 700; font-size: 12px; }
.pv .hint { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: #c9ccd0; font-size: 13px; transition: opacity .25s; }
.pv .hint a { color: #fff; text-decoration-color: var(--tape); }
.pv .toast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 10px; background: rgba(0,0,0,.7); font-weight: 600; pointer-events: none; }
.pv .toast[hidden] { display: none; }
.pv .end { position: absolute; inset: auto 0 0 0; padding: 28px 16px 22px; background: linear-gradient(transparent, rgba(0,0,0,.92) 30%); text-align: center; }
.pv .end p { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.pv .end a { display: inline-block; margin: 4px; padding: 12px 18px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font-weight: 700; text-decoration: none; }
.pv .end a + a { background: rgba(255,255,255,.14); color: #fff; }
.pv .end[hidden] { display: none; }

@media (max-width: 600px) {
  .thumb { float: none; margin: 4px 0 8px; }
  .thumb img { max-width: 100%; }
  .pv .fname { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Preview: controls, menu, Chad features */
.pv button { display: inline-flex; align-items: center; gap: 6px; }
.pv svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv [data-a="fav"][aria-pressed="true"] { color: var(--tape); }
.pv [data-a="fav"][aria-pressed="true"] svg { fill: var(--tape); }
.pv [aria-expanded="true"] { background: rgba(255,255,255,.28); }
.pv .n:empty { display: none; }
.pv kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.14); font: 600 12px/1.6 'Archivo', sans-serif; text-align: center; }
.pv .menu, .pv .replies { position: absolute; top: 58px; right: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow: auto; padding: 12px; border-radius: 12px; background: rgba(30, 32, 34, .97); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.pv .menu[hidden], .pv .replies[hidden] { display: none; }
.pv .sw, .pv .field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.pv .field { flex-direction: column; align-items: stretch; gap: 6px; cursor: default; }
.pv .sw input { width: 18px; height: 18px; accent-color: var(--tape); }
.pv .field input, .pv .field select { font: 15px 'Archivo', sans-serif; padding: 7px 9px; border-radius: 8px; border: 0; background: #33373b; color: #fff; }
.pv .chad { margin: 12px 4px 4px; font-weight: 800; font-stretch: 115%; color: var(--tape); }
.pv .chad span { display: block; font-weight: 500; font-stretch: 100%; font-size: 12px; color: #c9ccd0; }
.pv .keys { margin: 10px 4px; font-size: 13px; color: #c9ccd0; line-height: 2; }
.pv .note { margin: 6px 4px 12px; font-size: 12px; color: #a6aaae; }
.pv .join { display: block; margin: 0 4px 4px; padding: 10px 14px; border-radius: 99px; background: var(--tape); color: var(--tape-ink); font-weight: 700; text-align: center; text-decoration: none; }
.pv .replies .h { margin: 0 0 8px; font-weight: 700; }
.pv .replies .r { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.pv .replies .r b { color: var(--tape); }
.pv .replies .muted { color: #a6aaae; margin: 0; }
.pv .replies button { margin-left: 6px; height: 28px; font-size: 13px; }
.pv .seek { position: absolute; left: 12px; right: 12px; bottom: 44px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); transition: opacity .25s; }
.pv.idle .seek { opacity: .25; }
.pv .seek .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #fff; }
.pv .seek .ab { position: absolute; top: -3px; bottom: -3px; border-radius: 3px; background: var(--tape); opacity: .8; }
.pv .seek .ab[hidden] { display: none; }
.pv .seek input { position: absolute; inset: -8px 0; width: 100%; opacity: 0; cursor: pointer; }
.pv .end { padding-bottom: 60px; }

/* Mini player (Chad): a small window while the thread scrolls */
.pv.mini { inset: auto 16px 16px auto; width: min(400px, calc(100% - 32px)); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); touch-action: auto; }
.pv.mini .hint, .pv.mini .label, .pv.mini .fname, .pv.mini .seek, .pv.mini [data-a="save"], .pv.mini [data-a="replies"], .pv.mini [data-a="menu"], .pv.mini [data-a="fav"] { display: none; }
.pv.mini .bar { padding: 6px; }
.pv.mini video { cursor: zoom-in; }
@media (max-width: 600px) { .pv .t { display: none; } .pv .bar { gap: 4px; padding: 8px 6px; } .pv button { min-width: 32px; padding: 0 6px; } }
.pv:focus { outline: none; }

.boardnav { margin: 8px 0 0; font-size: 13px; color: var(--soft); }
.boardnav b { color: var(--ink); }
.catalog { max-width: 1100px; margin: 0 auto; padding: 18px 16px 30px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cthread { display: grid; gap: 4px; align-content: start; justify-items: center; text-align: center; color: var(--ink); text-decoration: none; font-size: 13px; }
.cthread img { width: 100%; max-width: 250px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.cthread:hover img { outline: 3px solid var(--link); }
.cthread .meta { font-size: 11px; color: var(--soft); }
.cthread .teaser { color: var(--soft); }
