:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #20251f; background: #f8f6f0; }
* { box-sizing: border-box; }
body { margin: 0; }
header { padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d9ddd3; background: #fffdf7; }
header strong { font-size: 24px; }
header span { margin-left: 20px; color: #61675e; }
main { max-width: 1500px; margin: auto; padding: 24px 32px; }
h1 { font-size: 28px; margin: 0 0 10px; }
p { line-height: 1.65; }
button, .open { background: #fff; border: 1px solid #a5ad9f; border-radius: 12px; padding: 12px 16px; cursor: pointer; font-size: 16px; color: inherit; }
button:hover, .open:hover { background: #eaf0e4; }
button:focus-visible, .open:focus-within { outline: 3px solid #526648; outline-offset: 3px; }
button:disabled { opacity: .4; cursor: default; }
.open input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.reading-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
[hidden] { display: none !important; }
.page-image { position: relative; border-radius: 12px; overflow: hidden; background: white; }
.page-image img { display: block; width: 100%; height: auto; }
#regions { position: absolute; inset: 0; }
.region { position: absolute; padding: 0; border: 2px solid #617254; border-radius: 5px; background: rgba(255, 255, 255, .08); }
.region:hover, .region.active { background: rgba(220, 230, 192, .25); border-width: 3px; }
.reading-panel { background: #fffdf7; border: 1px solid #d9ddd3; border-radius: 18px; padding: 22px; }
.paragraph { padding: 14px; border: 2px solid transparent; border-radius: 12px; margin-bottom: 10px; }
.paragraph.active { border-color: #849772; background: #f1f4eb; }
.paragraph p { font-size: 30px; line-height: 1.8; margin: 8px 0; font-family: Georgia, serif; }
.word { border: 0; border-radius: 5px; padding: 0 2px; font: inherit; background: transparent; }
.word.active { background: #dce6c0; }
.word-card { border-top: 1px solid #d9ddd3; border-bottom: 1px solid #d9ddd3; padding: 20px 0; margin: 18px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#word-text { font-size: 38px; font-family: Georgia, serif; margin-right: 12px; }
.controls, nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.speed-control { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.speed-control select { font: inherit; color: inherit; background: #fff; border: 1px solid #a5ad9f; border-radius: 12px; padding: 12px; }
.primary { background: #334b35; color: white; border-color: #334b35; }
.primary:hover { background: #445f46; }
.hint, #status, #notice { font-size: 15px; color: #596052; }
details { margin-top: 24px; color: #596052; }
summary { cursor: pointer; }
@media (max-width: 850px) { .reading-layout { grid-template-columns: 1fr; } header, main { padding: 18px; } header span { display: none; } .paragraph p { font-size: 28px; } }
