:root{color-scheme:light;--bg:#f5f1e9;--ink:#262b29;--muted:#686b64;--line:#d9d6ce;--accent:#8c421e;--button:#29372f;--button-text:#fff9ed;--selection:#e9e4d9;--font:Georgia,'Times New Roman',serif}
:root[data-theme=night]{color-scheme:dark;--bg:#171b1a;--ink:#ede9df;--muted:#a2aaa2;--line:#363f39;--accent:#edbc85;--button:#e8bf8e;--button-text:#232b25;--selection:#232c27}
*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif}body{overscroll-behavior:none}button,a,summary{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible,.wheel:focus-visible{outline:2px solid var(--accent);outline-offset:5px}button{touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button[hidden]{display:none}.app{width:100%;max-width:520px;margin:auto;height:100dvh;min-height:360px;position:relative;overflow:hidden;background:var(--bg)}header{position:absolute;z-index:5;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:calc(18px + env(safe-area-inset-top)) 24px 12px;pointer-events:none}header button{pointer-events:auto}.quiet,.theme{border:0;background:var(--bg);min-height:44px}.back{font-size:14px;border-radius:30px;padding:8px 10px;margin-left:-10px}.back span{margin-right:8px;font-size:20px}.theme{margin-left:auto;border:1px solid var(--line);border-radius:30px;display:flex;gap:9px;align-items:center;padding:0 14px;font-size:14px}.theme svg{width:17px;height:17px}main{height:100%}.view{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}.view::-webkit-scrollbar,.wheel::-webkit-scrollbar{display:none}.enter{animation:arrive .36s cubic-bezier(.2,.7,.2,1)}.reverse{animation-name:return} @keyframes arrive{from{opacity:0;transform:translateX(25px)}to{opacity:1;transform:none}}@keyframes return{from{opacity:0;transform:translateX(-25px)}to{opacity:1;transform:none}}
.onboarding{scroll-snap-type:y mandatory;scroll-behavior:smooth}.welcome,.selector{min-height:100%;height:100%;scroll-snap-align:start;position:relative;display:flex;flex-direction:column;padding:100px 32px calc(30px + env(safe-area-inset-bottom))}.welcome{justify-content:center;align-items:center}.brand{transform:translateY(-38px);text-align:center}.logo-space{height:118px;width:118px;margin:0 auto 30px}.wordmark{font-size:clamp(32px,10vw,46px);letter-spacing:.19em;font-weight:400;margin:0;text-indent:.19em}.swipe{position:absolute;bottom:calc(40px + env(safe-area-inset-bottom));border:0;background:none;font-size:14px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:16px;padding:12px 30px}.swipe span{width:8px;height:8px;border-top:1px solid currentColor;border-left:1px solid currentColor;transform:rotate(45deg)}.step{font-size:12px;letter-spacing:.17em;color:var(--accent);text-transform:uppercase;margin:0 0 17px}.selector h1,.catalogue h1{font-family:var(--font);font-size:clamp(34px,9vw,44px);line-height:1.12;font-weight:400;letter-spacing:-.035em;margin:0}.selector h1:focus,.catalogue h1:focus,.reader h1:focus{outline:none}.sub{font-size:14px;line-height:1.5;color:var(--muted);margin:14px 0 0}.wheel-wrap{position:relative;margin:auto -8px;height:264px;flex-shrink:0}.wheel-wrap:before{content:'';position:absolute;pointer-events:none;inset:100px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--selection);border-radius:4px}.wheel{height:264px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;scrollbar-width:none;position:relative;padding:100px 0;mask-image:linear-gradient(transparent,#000 28%,#000 72%,transparent)}.wheel-option{height:64px;scroll-snap-align:center;display:flex;align-items:center;justify-content:center;font-family:var(--font);font-size:29px;color:var(--muted);cursor:pointer;transition:color .15s,transform .15s;transform:scale(.85);white-space:nowrap}.wheel-option[aria-selected=true]{color:var(--ink);transform:scale(1)}.next{width:100%;min-height:56px;border:0;border-radius:6px;background:var(--button);color:var(--button-text);font-size:16px;display:flex;justify-content:space-between;align-items:center;padding:16px 22px}.next span{font-size:21px}.selector footer{margin-top:12px}.level-context{margin-top:12px;color:var(--muted);font-size:14px}.catalogue,.reader{padding:110px 28px calc(40px + env(safe-area-inset-bottom))}.catalogue .sub{margin-bottom:36px}.story{border-top:1px solid var(--line)}.story:last-child{border-bottom:1px solid var(--line)}.story summary{list-style:none;display:flex;align-items:center;gap:16px;cursor:pointer;padding:25px 0}.story summary::-webkit-details-marker{display:none}.story-title{font-family:var(--font);font-size:26px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.story[open] .story-title{white-space:normal}.plus{font-size:23px;font-weight:300;margin-left:auto;flex-shrink:0;color:var(--accent)}.story[open] .plus{transform:rotate(45deg)}.story-info{padding:0 0 25px}.byline{font-size:14px;line-height:1.65;color:var(--muted);margin:0 0 12px}.intro{font-size:16px;line-height:1.7;margin:0 0 20px}.meta{display:flex;gap:12px;align-items:center;margin:18px 0;font-size:12px;letter-spacing:.025em;color:var(--muted)}.badge{padding:5px 8px;border:1px solid var(--line);border-radius:3px}.empty{padding:30px 0;border-top:1px solid var(--line);font-size:16px;line-height:1.7;color:var(--muted)}.empty p{margin-top:0}.empty button{margin-top:16px}.reader h1{font-family:var(--font);font-size:38px;line-height:1.15;letter-spacing:-.025em;font-weight:400;margin:0 0 20px;overflow-wrap:anywhere}.reader .reading-text{margin-top:36px;font-family:var(--font);font-size:20px;line-height:1.85;overflow-wrap:break-word}.reading-text p{margin:0 0 1.3em}.end-mark{width:30px;border:0;border-top:1px solid var(--accent);margin:44px auto}.english-summary{font-size:16px;line-height:1.7;border-top:1px solid var(--line);padding:22px 0}.english-summary summary{cursor:pointer;font-size:14px}.source{font-size:13px;line-height:1.7;color:var(--muted);margin-top:25px}.source a{color:var(--accent)}.no-script{padding:100px 24px;position:fixed;top:0}.language-line{font-size:14px;color:var(--muted);margin-bottom:18px}.reader-nav{margin-top:30px}
@media(min-width:540px){.app{border-left:1px solid var(--line);border-right:1px solid var(--line)}}@media(max-height:650px){.selector{padding-top:82px;min-height:580px}.welcome{min-height:100%}.wheel-wrap{margin:18px -8px}.logo-space{height:90px}.brand{transform:translateY(-20px)}}@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.wheel-option[lang^="pt"]{font-size:clamp(19px,5.7vw,26px)}

/* Desktop reading room. Mobile retains the original welcome and wheels. */
.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}
@media(min-width:900px){
 .app{max-width:none;border:0;min-height:480px}header{padding:22px 36px;left:auto;width:210px;height:88px}header .back{font-size:14px}header .theme{flex-shrink:0}.desktop-intro{height:100%;display:grid;grid-template-columns:minmax(280px,36%) 1fr;overflow:auto}.desktop-brand{display:flex;justify-content:center;align-items:center;border-right:1px solid var(--line);background:var(--selection);min-height:100%}.desktop-brand .brand{transform:translateY(-35px)}.desktop-brand .wordmark{font-size:clamp(32px,3.6vw,54px)}.desktop-brand .logo-space{width:150px;height:150px;margin-bottom:42px}.desktop-picker{padding:110px clamp(32px,5vw,88px) 48px;max-width:1050px;width:100%;align-self:center}.desktop-picker h1,.desktop-empty h1{font-family:var(--font);font-size:clamp(36px,3.4vw,54px);font-weight:400;line-height:1.12;letter-spacing:-.035em;margin:0;max-width:560px}.desktop-picker h1:focus,.desktop-empty h1:focus{outline:0}.choice-grid{border:0;padding:0;margin:38px 0 30px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.choice{position:relative;display:flex;min-width:0;cursor:pointer}.choice input,.level-tabs input{position:absolute;opacity:0;width:1px;height:1px}.choice span{display:flex;align-items:center;justify-content:center;width:100%;min-height:54px;padding:10px 8px;border:1px solid var(--line);border-radius:5px;font-size:16px;text-align:center;line-height:1.4;transition:background .15s,border-color .15s}.choice input:checked+span,.level-tabs input:checked+span{background:var(--button);color:var(--button-text);border-color:var(--button)}.choice input:focus-visible+span,.level-tabs input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}.choice:hover span{border-color:var(--accent)}.desktop-next{max-width:220px;margin-left:auto}.level-grid{grid-template-columns:repeat(4,1fr);margin-top:64px;margin-bottom:64px}.level-grid span{min-height:115px;font-size:30px;font-family:var(--font)}.desktop-library{display:grid;grid-template-columns:340px minmax(0,1fr);height:100%;overflow:hidden}.desktop-sidebar{overflow:auto;padding:38px 26px 40px;border-right:1px solid var(--line);background:var(--selection)}.desktop-home{border:0;background:none;font-size:22px;letter-spacing:.15em;padding:0;min-height:44px;margin-bottom:42px}.filter-label,.level-tabs legend{display:block;font-size:14px;color:var(--muted);margin-bottom:12px}.desktop-sidebar select{width:100%;padding:13px 12px;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:5px;font-size:16px;min-height:48px}.desktop-sidebar select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.level-tabs{border:0;padding:0;margin:25px 0 44px;display:flex;gap:8px}.level-tabs label{position:relative;flex:1;cursor:pointer}.level-tabs span{display:block;text-align:center;border:1px solid var(--line);border-radius:4px;padding:12px 4px;font-size:14px}.desktop-story-list .story-title{font-size:23px}.desktop-story-list .intro{font-size:15px}.desktop-story-list .story summary{padding:20px 0}.desktop-reading{min-width:0;height:100%;overflow:hidden;position:relative}.desktop-reading .reader{padding:110px max(48px,calc((100% - 660px)/2)) 70px;scrollbar-width:thin}.desktop-reading .reader h1{font-size:46px}.desktop-reading .reading-text{font-size:21px;line-height:1.9}.desktop-reading .reader-nav{max-width:240px}.desktop-empty{height:100%;overflow:auto;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:110px clamp(50px,8vw,140px)}.desktop-empty>p:last-child{font-size:17px;line-height:1.8;color:var(--muted);max-width:360px}.desktop-reading .english-summary,.desktop-reading .source{max-width:660px}
}
@media(min-width:1400px){.desktop-library{grid-template-columns:380px minmax(0,1fr)}.desktop-sidebar{padding-left:40px;padding-right:40px}}
@media(min-width:900px) and (max-width:1100px){.choice-grid:not(.level-grid){grid-template-columns:repeat(2,minmax(0,1fr))}.desktop-picker{padding-top:110px}.desktop-brand{position:sticky;top:0;height:100dvh}.desktop-library{grid-template-columns:300px minmax(0,1fr)}.desktop-reading .reader{padding-left:40px;padding-right:40px}}

/* Welcome title is centred independently of navigation and footer spacing. */
.welcome .brand{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}
@media(min-width:900px){
 .desktop-brand{height:100dvh;position:sticky;top:0}
 .desktop-brand .brand{transform:none}
 .desktop-picker{padding-bottom:140px}
 .desktop-next{position:fixed;right:clamp(32px,5vw,88px);bottom:32px;width:220px;z-index:6;margin:0}
 .desktop-next:before{content:'';position:absolute;inset:-16px -16px;z-index:-1;background:var(--bg);border-radius:8px}
}

.back{border:1px solid var(--line);padding:0 14px;margin-left:0;display:flex;gap:8px;align-items:center;justify-content:center}
.back span{margin-right:0}
@media(min-width:900px){
 header{width:244px;gap:10px}
 .desktop-intro{position:relative}
 .desktop-intro .desktop-brand{position:sticky;top:0;height:100dvh}
 .desktop-intro .desktop-brand .brand{position:relative}
 .desktop-intro .desktop-picker{grid-column:2;transition:transform .85s cubic-bezier(.22,.75,.18,1)}
 .desktop-intro.is-greeting,.desktop-intro.is-arriving{overflow:hidden}
 .desktop-intro.is-greeting .desktop-brand,.desktop-intro.is-arriving .desktop-brand{position:absolute;left:0;top:0;width:36%;z-index:2;transition:width .85s cubic-bezier(.22,.75,.18,1),background-color .85s ease,border-color .85s ease}
 .desktop-intro.is-greeting .desktop-brand{width:100%;background:var(--bg);border-color:transparent}
 .desktop-intro.is-greeting .desktop-picker{transform:translateX(100%);visibility:hidden}
 .desktop-intro.is-arriving .desktop-picker{transform:translateX(0);visibility:visible}
 .desktop-intro.is-greeting .desktop-next,.desktop-intro.is-arriving .desktop-next{visibility:hidden}
 .campfire-invite{position:absolute;top:calc(50% + 30px);left:50%;transform:translateX(-50%);white-space:nowrap;background:none;border:0;color:var(--muted);padding:12px 10px;min-height:44px;font-size:14px;opacity:1;transition:opacity .22s ease}
 .campfire-invite span{display:inline-block;margin-left:8px;font-size:18px}
 .is-arriving .campfire-invite{opacity:0;pointer-events:none}
 body.desktop-greeting header{opacity:0;visibility:hidden}
 body.desktop-arriving header{animation:header-reveal .9s ease both}
 @keyframes header-reveal{0%,55%{opacity:0}100%{opacity:1}}
}

.campfire-invite:focus,.campfire-invite:focus-visible{outline:none}

.back{line-height:1}.back .back-icon{display:block;width:18px;height:18px;flex:0 0 18px;align-self:center}

/* Equal navigation outlines, with About confined to desktop for now. */
header .back,header .theme,header .about,header .type-toggle{width:80px;height:44px;min-height:44px;flex:0 0 80px;padding:0 10px;border:1px solid var(--line);border-radius:30px;background:var(--bg);color:var(--ink);font-size:14px;line-height:1;display:flex;align-items:center;justify-content:center;gap:7px}
header button[hidden]{display:none}
header .about{display:none}
header .type-toggle{margin-left:auto;font-family:Georgia,serif;font-size:19px}
header .theme{margin-left:auto}
header:has(.type-toggle:not([hidden])) .theme{margin-left:8px}
.about-page{padding:130px 28px 50px}
.about-page h1{font:400 38px/1.15 var(--font);letter-spacing:-.025em;margin:0 0 24px}
.about-page h1:focus{outline:none}
.about-page p{font-size:17px;line-height:1.7;color:var(--muted)}
.text-size-panel{position:fixed;inset:calc(80px + env(safe-area-inset-top)) 24px auto 24px;margin:0;width:auto;max-width:none;padding:20px;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px #0002}
.text-size-panel label{display:block;font-size:14px;margin-bottom:8px}
.text-size-panel input[type=range]{display:block;width:100%;height:44px;margin:0;padding:0;accent-color:var(--accent);cursor:pointer}
.text-size-panel input[type=range]:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.story-heading{min-width:0;flex:1}
.story-heading .story-title{display:block}
.story-length{display:block;margin-top:7px;font-size:13px;line-height:1.5;color:var(--muted)}
.story-length:empty{display:none}
@media(max-width:899px){.reader .reading-text{font-size:var(--reading-font-size,1.25rem)}}
@media(min-width:900px){header{width:356px;gap:10px}header .back,header .theme,header .about{width:88px;flex-basis:88px}header .about{display:flex;margin-left:auto}header .theme{margin-left:0}header .type-toggle{display:none}.about-page{padding:150px max(60px,calc((100% - 720px)/2)) 80px}.about-page h1{font-size:48px}}

.header-name{font-size:16px;letter-spacing:.12em;text-align:center;white-space:nowrap;line-height:1}
.header-name[hidden]{display:none}
@media(max-width:899px){
 header .back{display:none!important}
 header .about{display:flex;order:1;margin:0}
 body[data-screen=read] header .about{display:none}
 header .type-toggle{order:1;margin:0}
 header .header-name{order:2;margin:0 auto}
 header .theme{order:3;margin-left:auto}
 header:has(.type-toggle:not([hidden])) .theme{margin-left:auto}
}
@media(min-width:900px){
 .desktop-sidebar .desktop-home{display:block;width:100%;text-align:center;font-size:32px;line-height:1.25;margin-left:auto;margin-right:auto}
}

@media(max-width:899px){header:has(.header-name:not([hidden])) .theme{margin-left:0}}

@media(max-width:899px){
 header .about,header .theme,header .type-toggle{width:70px;flex-basis:70px;height:40px;min-height:40px;padding:0 6px;gap:4px}
 header .header-name{border:0;background:none;padding:0;min-width:0;height:40px;line-height:40px;font-size:clamp(20px,calc((100vw - 204px) / 5.8),28px);font-weight:400;letter-spacing:.19em;text-indent:.19em;flex:0 1 auto;color:var(--ink)}
}
