/* Content only. The shell owns the bar, the signpost and the theme. */
:root { color-scheme: light; --paper: #f6f7fa; --card: #fff; --ink: #111a2d; --muted: #536078; --rule: #8193bc; --accent: #374151; --link: #002eac; --glass: rgb(246 247 250 / 94%); }
:root[data-theme="dark"] { color-scheme: dark; --paper: #0b1324; --card: #0f1d37; --ink: #f3f6ff; --muted: #b3bfd8; --rule: #465c8f; --accent: #b3bfd8; --link: #93b4ff; --glass: rgb(11 19 36 / 94%); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font: 13px/1.5 Arial, Helvetica, sans-serif; }
main { width: min(1120px, 100%); margin: auto; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
h1 { margin: 0; font-size: 20px; line-height: 1.3; }
h2 { margin: 16px 0 8px; font-size: 16px; }
p { margin: 8px 0; }
.lede { font-weight: 700; }
.quiet, .sub { color: var(--muted); }
a { color: var(--link); }
.actions, .jump { display: flex; flex-wrap: wrap; gap: 8px; }
.button, .card, .close { min-height: 44px; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
.button, .close { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; text-decoration: none; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card { display: grid; gap: 4px; padding: 8px; text-align: left; cursor: pointer; min-width: 0; }
.card strong, .sheet-caption { overflow-wrap: anywhere; }
.card img, .cameo { width: 72px; height: 72px; object-fit: contain; background: var(--paper); border-radius: 4px; }
.pending { min-height: 44px; display: flex; align-items: center; color: var(--muted); }
.scale { width: 100%; height: auto; border-radius: 8px; background: var(--card); }
.scrim { position: fixed; inset: 0; z-index: 2; border: 0; background: rgb(4 16 46 / 35%); }
.scrim[hidden], .drawer[hidden] { display: none; }
.drawer { position: fixed; z-index: 3; top: 0; left: 0; width: min(100%, 393px); height: 100dvh; overflow: auto; background: var(--glass); color: var(--ink); border-right: 1px solid var(--rule); padding: max(8px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
.close { float: right; }
.sheet, .angles { width: 100%; height: auto; background: var(--card); border-radius: 8px; }
.angles-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.angles-row figure { margin: 0; }
figcaption { font-size: 11px; color: var(--muted); }
dl { display: grid; grid-template-columns: 9em 1fr; gap: 4px 8px; margin: 8px 0; }
dt { color: var(--muted); }
dd { margin: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
@supports (backdrop-filter: blur(18px)) { .drawer { background: color-mix(in srgb, var(--paper) 74%, transparent); backdrop-filter: blur(18px) saturate(150%); } }
@media (prefers-reduced-transparency: reduce) { .drawer, .scrim { backdrop-filter: none; } .drawer { background: var(--paper); } }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .drawer { left: auto; right: 0; width: min(440px, 40vw); border-right: 0; border-left: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
