/* Layout: a dark reading room; the magazine sits centred as an open book, controls below. Single deliberate dark look. */
@font-face { font-family: "Riforma LL"; src: url("../fonts/RiformaLL-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Riforma LL"; src: url("../fonts/RiformaLL-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Riforma LL"; src: url("../fonts/RiformaLL-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
:root {
  --room: #0f2228;
  --room-2: #052937;
  --ink: #ffffff;
  --ink-soft: rgba(255,255,255,0.72);
  --accent: #ff5200;
  --line: rgba(255,255,255,0.16);
  --sans: "Riforma LL", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
html, body { height: 100%; }
body { margin: 0; background: var(--room); color: var(--ink); font-family: var(--sans); overflow: hidden; }
.app { position: relative; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px; }
.room-art { position: fixed; right: -60px; bottom: -40px; width: 520px; max-width: 70vw; opacity: 0.07; pointer-events: none; }
.bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand b { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.brand b span { color: var(--accent); }
.brand small { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.where { font-size: 13px; color: var(--ink-soft); text-align: right; min-width: 0; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage { overflow: hidden; }
#book { flex: none; }
.page { background: #ffffff; overflow: hidden; }
.page .scaler { width: 794px; height: 1123px; transform-origin: 0 0; transform: scale(var(--s, 0.4)); }
body.noflip .page .scaler { transform: none; zoom: var(--s, 1); }
.page .scaler img { max-width: none; }
.controls { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; }
.controls button { font: inherit; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--room-2); color: var(--ink); cursor: pointer; }
.controls button:hover { border-color: var(--accent); }
.controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls button:disabled { opacity: 0.35; cursor: default; border-color: var(--line); }
.count { min-width: 150px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.count span { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.hint { text-align: center; font-size: 12px; color: var(--ink-soft); }
/* Without the page-flip library the pages simply stack and scroll */
body.noflip { overflow: auto; }
body.noflip .stage { display: block; }
body.noflip #book { width: min(100%, 794px); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
body.noflip .page { width: 100%; aspect-ratio: 794 / 1123; }
body.noflip .controls, body.noflip .hint { display: none; }
@media (prefers-reduced-motion: reduce) { .controls button { transition: none; } }
/* Page styles carried over from the magazine */
.pg1 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg1 .hm-page p{margin:0;font-size:15px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg1 .hm-page b{font-weight:500}
.pg2 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg2 .hm-page p{margin:0;font-size:15px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg2 .hm-page b{font-weight:500}
.pg3 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg3 .hm-page p{margin:0;font-size:14.5px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg3 .hm-page b{font-weight:500}
.pg4 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg4 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg4 .hm-page b{font-weight:500}
.pg5 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg5 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg5 .hm-page b{font-weight:500}
.pg6 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg6 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg6 .hm-page b{font-weight:500}
.pg7 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg7 .hm-page p{margin:0;font-size:13.5px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg7 .hm-page b{font-weight:500}
.pg8 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg8 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg8 .hm-page b{font-weight:500}
.pg9 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg9 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg9 .hm-page b{font-weight:500}
.pg10 .hm-page{font-family:"Riforma LL","Inter",system-ui,-apple-system,"Segoe UI",sans-serif}
.pg10 .hm-page p{margin:0;font-size:14px;line-height:1.45;font-weight:400;color:#052937;text-wrap:pretty}
.pg10 .hm-page b{font-weight:500}
