/* Labelarium — Neoclassical × Bauhaus, "Tabs & rail" structure with "Plates" content.
   Warm opium-tinted paper, white plates with a double rule. Bodoni only for page titles, Jost for everything you read.
   Light only. Phones: bottom tab bar. From 900 px: a left rail. Eleven sections, eleven distinct geometric marks. */
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/bodoni-moda-400.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/bodoni-moda-400-italic.woff2") format("woff2"); }
@font-face { font-family: Jost; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jost-400.woff2") format("woff2"); }
@font-face { font-family: Jost; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jost-500.woff2") format("woff2"); }
@font-face { font-family: Jost; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/jost-600.woff2") format("woff2"); }

:root {
  --paper: #efe7d6; --plate: #ffffff; --plate-2: #f6f1e7;
  --ink: #141414; --ink-2: #5d574c; --rule: #141414; --soft: #d8cfbc;
  --red: #c8342a; --blue: #1f3f8f; --yellow: #e8b820;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --sans: Jost, Futura, "Century Gothic", "Avenir Next", sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --rail: 112px; --content: 1320px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Scrollbar: thin geometric strip — paper track, ink thumb, square ends (Bauhaus, not iOS pill). */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--plate-2);
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track {
  background: var(--plate-2);
  border-left: 1px solid var(--soft);
}
*::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--plate-2);
}
*::-webkit-scrollbar-thumb:hover { background: var(--red); }
*::-webkit-scrollbar-corner { background: var(--plate-2); }

body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.search input:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
h1 { font: 400 32px/1.05 var(--serif); color: var(--ink); }
h1.big { font-size: 48px; letter-spacing: -0.02em; }
h3 { font: 600 17px/1.3 var(--sans); }
h2 { display: flex; align-items: center; gap: 12px; margin: 32px 0 14px; font: 600 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
h2::before, h2::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
h2 .muted, h2 .small { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--ink-2); }
p { margin: 6px 0; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
code { font-family: var(--mono); font-size: .9em; background: var(--plate-2); padding: 1px 5px; }

/* Plates: white, 2 px rule, hairline set 4 px inside.
   .chars lives inside a card, so it is not a plate — nested double-rules collide. */
.plate, .card, .tile, .devcard, .devtile, .search input, .sheet .hero, .symgrid, .framelist {
  background: var(--plate); border: 2px solid var(--rule); box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 5px var(--rule); }
.card { padding: 18px; min-width: 0; }
.card + .card:not(.devtile) { margin-top: 10px; }
.card.link { cursor: pointer; display: flex; align-items: center; gap: 14px; }
.card.link:hover { background: var(--plate-2); }
.card .chev { margin-left: auto; font-size: 20px; }
.card.link .img-card { min-width: 0; max-width: 100%; overflow: hidden; }
.card.link .img-card img { max-height: 22px; width: auto; }

/* Layout */
.app { padding: 0 16px 56px; }
.app .main { min-width: 0; }
.app.device { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
.app.device .main { padding-bottom: 8px; }
.topbar .inner { display: flex; align-items: center; gap: 12px; padding: 22px 16px 10px; }
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { font-size: 28px; overflow-wrap: break-word; }
.topbar .sub { display: block; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.topbar.home .inner { padding-bottom: 0; justify-content: center; }
.topbar.home .title { flex: 0; width: 0; height: 0; overflow: hidden; position: absolute; }
.topbar.home .title h1 { font: 600 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.top-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin-left: auto; }
.iconbtn { background: var(--plate); border: 2px solid var(--rule); color: var(--ink); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; cursor: pointer; line-height: 1; flex: 0 0 auto; }
.iconbtn:hover { background: var(--plate-2); }
.iconbtn.fav { color: var(--red); }
.logo { height: 40px; width: auto; display: block; flex: 0 0 auto; overflow: visible; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.topbar .dev-top { width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain; object-position: center; background: var(--plate); border: 1.5px solid var(--rule); padding: 5px; box-sizing: border-box; }
/* Phone device header: actions on row 1, title on its own row so words do not split. */
@media (max-width: 900px) {
  .topbar.home .inner { justify-content: center; }
}
@media (max-width: 600px) {
  .topbar.home .inner { justify-content: center; }
  .topbar:not(.home) .inner { flex-wrap: wrap; }
  .topbar:not(.home) .title { flex: 1 1 100%; order: 3; }
  .topbar:not(.home) .top-right { order: 2; }
  .topbar:not(.home) .dev-top { width: 40px; height: 40px; }
}
.rail .dev-rail { width: 40px; height: 40px; object-fit: contain; object-position: center; display: block; background: var(--plate); border: 1.5px solid var(--rule); padding: 5px; box-sizing: border-box; }
.rail { display: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--plate); border-top: 2px solid var(--rule); padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); }
.tabs a, .rail a { display: grid; grid-template-rows: 18px auto; justify-items: center; align-items: end; gap: 7px; text-decoration: none; color: var(--ink-2); font: 500 11px/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.tabs a { flex: 1; padding: 6px 2px 2px; }
.tabs a.on, .rail a.on { color: var(--ink); font-weight: 600; }
.tabs a .mark, .rail a .mark { align-self: end; }
/* Wide screens: one centred content container (--content) for header and main, offset by the rail. */
@media (min-width: 900px) {
  .tabs { display: none; }
  .rail { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); background: var(--paper); border-right: 1px solid var(--rule); padding: 18px 0 20px; overflow-y: auto; z-index: 30; }
  .rail .brand { flex-direction: column; gap: 10px; padding: 6px 8px 18px; border-bottom: 1px solid var(--rule); margin: 0 10px 8px; color: var(--ink); }
  .rail .brand b { font: 600 11px/1 var(--sans); letter-spacing: .1em; }
  .rail a { padding: 13px 6px; font-size: 10px; }
  .rail a.on { box-shadow: inset 3px 0 0 var(--red); }
  .rail a:hover { color: var(--ink); }
  .topbar:not(.home), .app.device { padding-left: var(--rail); }
  .topbar .inner, .app .main, .app:not(.device) { max-width: var(--content); margin-left: auto; margin-right: auto; padding-left: 40px; padding-right: 40px; }
  .app.device { padding-right: 0; }
  .app:not(.device) { padding-left: 40px; }
  .topbar:not(.home) .inner { padding-top: 30px; }
  .app { padding-bottom: 60px; }
  h1 { font-size: 38px; }
  h1.big { font-size: 68px; }
}
/* Very wide: two columns where the content has two natural halves */
@media (min-width: 1200px) {
  .twocol { display: grid; grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr); gap: 0 28px; align-items: start; }
  .twocol > .col { min-width: 0; }
  .twocol > .col > h2:first-child, .twocol > .col > .card:first-child { margin-top: 0; }
  .twocol .grid { grid-template-columns: repeat(2, 1fr); }
  .twocol .ctl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Geometric marks: one shape per section */
.mark { display: inline-block; width: 16px; height: 16px; vertical-align: middle; flex: 0 0 auto; }
.mark.ring { border: 2px solid var(--ink); border-radius: 50%; }                   /* search / overview */
.mark.keys { background: linear-gradient(var(--ink), var(--ink)) 0 0 / 6px 6px no-repeat, linear-gradient(var(--ink), var(--ink)) 10px 0 / 6px 6px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 10px / 6px 6px no-repeat, linear-gradient(var(--ink), var(--ink)) 10px 10px / 6px 6px no-repeat; } /* keyboard */
.mark.ci-red { background: var(--red); border-radius: 50%; }                        /* symbols */
.mark.hollow { border: 2px solid var(--blue); }                                      /* frames */
.mark.tr-yellow { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 16px solid var(--yellow); } /* templates */
.mark.half { width: 18px; height: 9px; background: var(--blue); border-radius: 18px 18px 0 0; } /* fonts */
.mark.dia { background: var(--yellow); transform: rotate(45deg) scale(.82); }        /* shortcuts */
.mark.lines { width: 18px; background: linear-gradient(var(--ink) 0 2px, transparent 2px 7px, var(--ink) 7px 9px, transparent 9px 14px, var(--ink) 14px 16px); } /* how-to */
.mark.cross { background: linear-gradient(var(--red), var(--red)) center / 3px 100% no-repeat, linear-gradient(var(--red), var(--red)) center / 100% 3px no-repeat; } /* troubleshooting */
.mark.strip { width: 18px; height: 10px; background: var(--yellow); border: 1.5px solid var(--ink); } /* label preview */
.mark.quarter { background: var(--blue); border-radius: 100% 0 0 0; }               /* specs */
.mark.dots { width: 20px; background: radial-gradient(circle at 3px 8px, var(--ink) 2.5px, transparent 3px), radial-gradient(circle at 10px 8px, var(--ink) 2.5px, transparent 3px), radial-gradient(circle at 17px 8px, var(--ink) 2.5px, transparent 3px); } /* more */
.mark.sq-blue { background: var(--blue); }                                           /* home hero trio only */

/* Section tiles: 2×5 fills ten sections with no widow. */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { padding: 16px 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 118px; text-align: left; }
a.tile, a.card.link, a.iconbtn, a.devtile-hit { text-decoration: none; color: inherit; }
a.iconbtn { display: inline-flex; }
.tile:hover { background: var(--plate-2); }
.tile .ico { height: 18px; display: flex; align-items: flex-end; margin-bottom: 10px; }
.tile b { font: 600 17px/1.2 var(--sans); }
.tile .n { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--rule); color: var(--ink); background: var(--plate); }
.pill.warn { background: var(--yellow); color: #141414; border-color: var(--yellow); }
.badge { position: absolute; top: 6px; left: 8px; font: 500 11px/1 var(--sans); color: var(--ink-2); }

/* Search */
.search { position: sticky; top: 0; z-index: 15; background: var(--paper); padding: 10px 0 8px; display: flex; align-items: center; }
.search input { width: 100%; min-width: 0; flex: 1 1 auto; font: 400 16px/1.2 var(--sans); padding: 14px 44px 14px 46px; color: var(--ink); outline: none; -webkit-appearance: none; border-radius: 0; }
.search input::placeholder { color: var(--ink-2); }
.search input:focus { border-color: var(--blue); }
.search .mag {
  position: absolute; left: 16px; top: 10px; bottom: 8px; margin: 0;
  width: 20px; color: var(--ink); font-size: 20px; line-height: 1; pointer-events: none;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.search .clr {
  position: absolute; right: 10px; top: 10px; bottom: 8px; margin: 0;
  border: 0; background: transparent; color: var(--ink); font-size: 22px; width: 36px;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.chips { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 8px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1.5px solid var(--rule); background: var(--plate); color: var(--ink); padding: 8px 14px; font: 600 13px/1 var(--sans); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--paper); }
.hint { color: var(--ink-2); font-size: 15px; margin: 10px 2px; }

/* Keycaps, LCD, steps */
kbd.key { display: inline-block; font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 7px 9px 6px; border: 1.5px solid var(--rule); background: var(--plate); color: var(--ink); vertical-align: middle; white-space: nowrap; margin: 1px 0; }
kbd.key.ok { background: var(--ink); color: var(--paper); border-color: var(--ink); }
kbd.key.print { border-radius: 999px; padding: 7px 11px 6px; }
.lcd { display: inline-block; font-family: var(--mono); font-size: 13px; background: var(--yellow); color: #141414; padding: 4px 8px; vertical-align: middle; margin: 1px 0; }
.arrow { color: var(--ink-2); padding: 0 4px; }
.steps { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 11px 0 11px 40px; border-top: 1px solid var(--soft); line-height: 1.9; }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 13px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule); font: 600 13px/23px var(--sans); text-align: center; }
.recipe li { cursor: pointer; }
.recipe li.done { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--soft); }
.recipe li.done::before { content: "✓"; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.note { background: var(--plate-2); border-left: 3px solid var(--yellow); padding: 12px 14px; font-size: 15px; margin-top: 12px; line-height: 1.6; }
.note b { color: var(--ink); }

/* Symbols */
.symgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0; padding: 10px; }
.glyph { position: relative; background: var(--plate); aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; border: 0; border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft); padding: 14px 6px 22px; }
.glyph:hover { background: var(--plate-2); }
.glyph img { max-height: 40px; max-width: 56px; width: auto; height: auto; object-fit: contain; object-position: center; background: #fff; padding: 3px; box-sizing: content-box; }
.glyph .ch { font-size: 30px; line-height: 1; }
.glyph .name { position: absolute; bottom: 6px; left: 5px; right: 5px; font: 500 11px/1 var(--sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.img-card img { display: block; margin: 6px auto; max-height: 120px; }
.chars { display: grid; grid-template-columns: repeat(auto-fit, minmax(46px, 1fr)); gap: 0; padding: 0; }
.chars .c { height: 46px; display: grid; place-items: center; font-size: 19px; padding: 0 6px; font-family: var(--mono); border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft); }

/* Frames & templates */
.framelist { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 10px; }
.frame { position: relative; background: var(--plate); padding: 28px 14px 14px; cursor: pointer; border: 0; border-right: 1px solid var(--soft); border-bottom: 1px solid var(--soft); text-align: left; display: flex; flex-direction: column; gap: 10px; }
.frame:hover { background: var(--plate-2); }
.frame-img, .tpl-img { display: block; height: 46px; width: auto; max-width: calc(100% - 20px); object-fit: contain; margin: 0 auto; background: #fff; padding: 4px 10px; box-sizing: content-box; }
.frame .lbl { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.frame .num { font: 600 18px/1 var(--sans); color: var(--ink); }

/* Lists inside one plate: rows separated by soft rules */
.list.plate { padding: 4px 18px; }
.list.plate > .card, .fontlist > .card { border: 0; box-shadow: none; background: transparent; padding: 14px 0; margin: 0; border-top: 1px solid var(--soft); }
.list.plate > .card:first-child, .fontlist > .card:first-child { border-top: 0; }
.list.plate > .card.link:hover { background: transparent; }
/* Fonts */
.fontlist { padding: 4px 18px; }
.fontlist .card { display: flex; align-items: center; gap: 14px; min-width: 0; }
.font-img { height: 28px; max-width: min(42vw, 180px); object-fit: contain; flex: 0 0 auto; }
.font-sample { font-size: 26px; line-height: 1; margin-left: auto; white-space: nowrap; padding-left: 8px; min-width: 0; }

/* Keyboard: phone-sized preview, tap the plate to open the zoom sheet */
button.kbd-card, button.img-card.zoomable { display: block; width: 100%; text-align: inherit; cursor: zoom-in; padding: 14px 14px 10px; }
.kbd-card .kbd-img, .kbd-card img { display: block; width: auto; max-width: 100%; max-height: min(42vh, 280px); height: auto; object-fit: contain; object-position: center; margin: 0 auto; }
.kbd-hint { display: block; text-align: center; margin-top: 8px; font: 500 12px/1.3 var(--sans); color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.img-card.zoomable img { max-height: 120px; max-width: 100%; width: auto; height: auto; object-fit: contain; object-position: center; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 24px; }
.legend div { padding: 10px 0; border-bottom: 1px solid var(--soft); }
.legend div:last-child { border-bottom: 0; }
.legend b { display: inline-block; min-width: 30px; font: 600 15px/1 var(--sans); color: var(--red); }
.legend strong { font-weight: 500; }
.legend .small { font-size: 14px; }

/* Definition lists & accordions */
.kv { display: grid; grid-template-columns: 1fr 2fr; gap: 10px 14px; margin: 0; }
.kv dt { font: 600 12px/1.6 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.kv dd { margin: 0; font-size: 15px; }
details { border-top: 1px solid var(--soft); }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; padding: 14px 0; font: 500 17px/1.3 var(--sans); list-style: none; display: flex; align-items: center; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: auto; font: 400 22px/1 var(--sans); color: var(--ink); }
details[open] summary::after { content: "−"; }
details .body { padding: 0 0 14px; }

/* Bottom sheet */
.sheet { border: 2px solid var(--rule); border-bottom: 0; padding: 0; background: var(--paper); color: var(--ink); width: 100%; max-width: 720px; margin: auto auto 0; max-height: 88vh; box-shadow: none; }
.sheet::backdrop { background: rgba(20, 20, 20, .5); }
.sheet .inner { padding: 14px 18px 30px; overflow: auto; max-height: 88vh; }
.sheet .grab { width: 36px; height: 2px; background: var(--rule); margin: 0 auto 16px; }
.sheet .hero { display: grid; place-items: center; padding: 22px; margin-bottom: 14px; }
.sheet .hero img { max-height: 120px; max-width: 100%; width: auto; height: auto; object-fit: contain; object-position: center; background: #fff; padding: 8px 14px; box-sizing: content-box; }
.sheet .hero .ch { font-size: 56px; }
.sheet .close { position: absolute; right: 14px; top: 14px; }
.sheet h2.t { display: block; font: 400 28px/1.15 var(--serif); letter-spacing: 0; text-transform: none; text-align: left; margin: 0; color: var(--ink); }
.sheet h2.t .muted { font: 400 16px/1.3 var(--sans); display: block; margin-top: 4px; }
.sheet h3 { font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 20px; }
.more a { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--soft); text-decoration: none; }
.more a:first-child { border-top: 0; }
.more a .mark { justify-self: center; }
.more a b { font: 600 17px/1.2 var(--sans); display: block; }
.more a small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.more a.on b { color: var(--red); }
@media (min-width: 700px) { .sheet { margin: auto; border-bottom: 2px solid var(--rule); } }
.sheet.zoom { max-width: min(960px, 100%); max-height: 96vh; }
.sheet.zoom .inner { padding: 10px 10px 22px; max-height: 96vh; }
.sheet.zoom .zoom-hero { overflow: auto; -webkit-overflow-scrolling: touch; max-height: calc(96vh - 56px); background: #fff; padding: 8px; }
.sheet.zoom .zoom-hero img { display: block; width: 100%; height: auto; max-height: none; background: #fff; }

/* Preview / designer */
.tapewrap { background: var(--plate-2); border: 1px solid var(--soft); padding: 26px 14px; overflow: hidden; }
.tapefit { position: relative; margin: 0 auto; }
.tapefit .tape { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tape { position: relative; margin: 0 auto; display: flex; align-items: center; justify-content: center; white-space: nowrap; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.tape .txt { display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.tape .line { line-height: 1.05; }
.tape .frameimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; opacity: .9; }
.tape.mirror .txt { /* mirror is applied via inline scaleX with width — keep class for recipe/state only */ }
.tape .frameimg.mirror { transform: scaleX(-1); }
.tape .dots { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dotted rgba(0,0,0,.4); }
.ctl { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 10px; min-width: 0; }
.ctl label { display: flex; flex-direction: column; gap: 6px; font: 600 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); min-width: 0; }
.ctl select, .ctl input[type=text], .ctl input[type=number] { font: 400 16px/1.2 var(--sans); letter-spacing: 0; text-transform: none; padding: 10px 12px; border: 1.5px solid var(--rule); background: var(--plate); color: var(--ink); border-radius: 0; width: 100%; min-width: 0; max-width: 100%; }
.ctl .full { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1.5px solid var(--rule); }
.seg button { border: 0; background: var(--plate); padding: 9px 14px; cursor: pointer; font: 500 14px/1 var(--sans); }
.seg button.on { background: var(--ink); color: var(--paper); }
.btn { border: 2px solid var(--ink); background: var(--ink); color: var(--paper); padding: 12px 18px; font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); }
.result-h { display: flex; align-items: center; gap: 14px; margin: 24px 0 10px; }
.result-h h2 { flex: 1; margin: 0; }
.result-h h2::before { display: none; }
.result-h .cnt { font: 500 14px/1 var(--sans); color: var(--ink-2); }
mark { background: var(--yellow); color: #141414; padding: 0 2px; }
.empty { text-align: center; color: var(--ink-2); padding: 48px 10px; font-size: 17px; }

/* Home */
.hero-home { padding: 36px 16px 22px; text-align: center; }
.hero-home .kicker { font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 16px; display: flex; align-items: center; justify-content: center; gap: 14px; white-space: nowrap; }
.hero-home .kicker::before, .hero-home .kicker::after { content: ""; width: 32px; border-top: 1px solid var(--rule); }
.hero-home h1.big { max-width: 12ch; margin: 0 auto; }
.hero-home p { color: var(--ink-2); font: 400 17px/1.5 var(--sans); max-width: 42ch; margin: 16px auto 0; }
.hero-home .marks { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
@media (min-width: 900px) {
  .hero-home { padding: 48px 16px 28px; }
}
.devlist { display: grid; gap: 10px; }
@media (min-width: 900px) { .devlist { grid-template-columns: 1fr 1fr; } }
.devgrid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (min-width: 700px) { .devgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .devgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.devtile.card.link {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 0;
  text-align: center;
  align-items: stretch;
}
.devtile-hit {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.devtile .dev-copy {
  padding: 0 10px 2px;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.devtile b {
  font: 600 15px/1.2 var(--sans);
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  min-height: 0;
  height: 2.4em;
}
.devtile .muted {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font: 500 13px/1.3 var(--sans);
  color: var(--ink-2);
  margin: 0;
  min-height: 0;
  height: 2.6em;
}
.devtile .dev-icon {
  min-height: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  justify-self: center;
  display: grid;
  place-items: center;
  background: var(--plate-2);
  border: 1px solid var(--soft);
  padding: 6px;
  overflow: hidden;
  box-sizing: border-box;
}
.devtile .dev-icon img {
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
}
/* Phone / 2-col: keep the square icon well dominant; caption sits inset from the double rule */
@media (max-width: 699px) {
  .devtile.card.link {
    padding: 8px 8px 10px;
  }
  .devtile-hit { gap: 6px; }
  .devtile .dev-copy { padding: 0 8px 2px; }
  .devtile b { font-size: 14px; line-height: 1.2; height: 2.4em; }
  .devtile .muted { font-size: 12px; line-height: 1.3; height: 2.6em; }
  .devtile .dev-icon { padding: 4px; }
}
.devtile .star { position: absolute; top: 8px; right: 8px; z-index: 1; margin: 0; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink); width: 32px; height: 32px; line-height: 1; }
.devtile .star.on { color: var(--red); }
.devcard { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.devcard b { font: 600 18px/1.2 var(--sans); }
.devcard .thumb { width: 56px; height: 56px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; flex: 0 0 auto; position: relative; }
.devcard .thumb::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 16px; transform: translateY(-50%) rotate(-6deg); background: var(--yellow); }
.devcard .thumb span { position: relative; color: #141414; transform: rotate(-6deg); display: block; }
.devcard .star { margin-left: auto; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--ink); width: 36px; height: 36px; }
.devcard .star.on { color: var(--red); }
/* Document-flow footer: stacked link list on a phone, calm three-column on a desk. */
.site-foot {
  margin-top: 40px;
  padding-top: 16px;
  padding-bottom: 8px;
  border-top: 1px solid var(--soft);
}
.footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}
.footer .f-mid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.footer .sep { display: none; }
.footer-legal {
  max-width: 36em;
  margin: 12px 0 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: left;
}
.footer-legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--soft); text-underline-offset: 2px; }

@media (min-width: 600px) {
  .footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
  }
  .footer a { white-space: nowrap; }
  .footer .f-left { justify-self: start; text-align: left; }
  .footer .f-mid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    justify-self: center;
    text-align: center;
    white-space: nowrap;
  }
  .footer .sep { display: inline; }
  .footer .f-right { justify-self: end; text-align: right; }
  .footer-legal {
    max-width: 920px;
    margin: 8px auto 0;
    padding: 0 4px 8px;
    text-align: center;
  }
}

/* PWA install bar: Chrome beforeinstallprompt, or iOS Add to Home Screen hint. */
.install-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--plate);
  border-bottom: 2px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
}
.install-bar[hidden] { display: none !important; }
.install-bar p { margin: 0; flex: 1; min-width: 0; font: 500 14px/1.35 var(--sans); }
.install-bar .btn { padding: 10px 14px; flex: 0 0 auto; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  .install-bar { display: none !important; }
}
