@font-face { font-family: Inter; src: url('/fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('/fonts/libre-baskerville-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
:root { font-family: Inter, system-ui, sans-serif; color: #f5f5f5; background: #08080a; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, input[type='range'], input[type='checkbox'] { cursor: pointer; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 320px; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; }
.view { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; }
.background { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.background iframe { position: absolute; border: 0; transform-origin: center; }
.reading { display: grid; min-height: 0; padding: 40px 32px 8px; place-items: center; }
.sentence { width: min(100%, 44ch); margin: 0; font-family: 'Libre Baskerville', Baskerville, serif; font-size: clamp(22px, 3vw, 48px); font-weight: 400; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.sentence .current { color: #19160b; background: #ead681; border-radius: 3px; box-shadow: 2px 0 #ead681, -2px 0 #ead681; }
.controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 20px max(28px, env(safe-area-inset-bottom)); }
.play { display: grid; min-width: 110px; min-height: 48px; place-items: center; padding: 12px 24px; border: 1px solid #ead681; border-radius: 9px; background: #ead681; color: #19160b; font-size: 14px; font-weight: 600; line-height: 20px; }
.play:hover, .play:focus-visible { background: #f3e3a5; }
.play:disabled { cursor: wait; opacity: .55; }
button:focus, input:focus, select:focus { outline: none; }
input:focus-visible, select:focus-visible { box-shadow: 0 0 0 2px #ead681; }
.sound-panel { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); border-left: 1px solid #ffffff1c; background: #141519; scrollbar-width: thin; }
.sound-panel h2 { margin: 0 0 24px; font-size: 20px; font-weight: 500; }
.pixel-settings { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #ffffff1c; }
.pixel-settings .setting { margin: 0; }
.setting { margin: 0 0 22px; }
.setting:last-child { margin-bottom: 0; }
.setting-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.setting-heading output { color: #ead681; font-variant-numeric: tabular-nums; white-space: nowrap; }
.select-heading { grid-template-columns: minmax(0, 1fr) auto; }
.check-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: #ead681; }
.setting input[type='range'] { display: block; width: 100%; margin: 0; accent-color: #ead681; }
.setting select { width: 100%; padding: 9px; border: 1px solid #ffffff2b; border-radius: 6px; color: #f5f5f5; background: #202126; font-size: 12px; }
.reset { min-height: 28px; padding: 4px 7px; border: 1px solid #ffffff24; border-radius: 5px; background: #24252b; color: #e0e0e0; font-size: 11px; line-height: 18px; }
.reset:hover:not(:disabled), .reset:focus-visible { background: #3a3b44; }
.reset:disabled { cursor: default; color: #888990; background: #1d1e23; border-color: #ffffff12; }
.status { position: absolute; z-index: 1; right: 20px; bottom: calc(102px + env(safe-area-inset-bottom)); left: 20px; margin: 0; color: #f5f5f5; font-size: 13px; line-height: 1.5; text-align: center; }
@media (max-width: 700px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .reading { padding: 20px 24px 0; }
  .controls { padding-block: 14px; }
  .sound-panel { border-left: 0; border-top: 1px solid #ffffff1c; padding-top: 20px; }
}
@media (max-height: 480px) { .reading { padding-block: 12px 0; } .controls { padding-block: 12px; } }
