:root{color-scheme:dark;--bg:#101518;--panel:#182025;--raised:#1e292f;--line:#34444a;--gold:#f3c66d;--text:#f6f2e8;--muted:#b4c0c4;--mint:#9ed6ba;--red:#f5b1a9;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);line-height:1.55}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}a{color:var(--gold)}button{border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--text);min-height:48px;padding:11px 16px;font-weight:650}button:hover:not(:disabled){border-color:var(--gold)}button:active:not(:disabled){transform:translateY(1px)}button.primary{background:var(--gold);color:#1b211f;border-color:var(--gold);font-weight:800}.secondary{background:transparent}.danger{color:var(--red);border-color:#824c46}.text-button{background:none;border:0;color:var(--muted);padding:8px 4px;min-height:44px;font-size:13px}.app-shell{max-width:980px;min-height:100dvh;margin:auto;padding:0 28px 112px}.topbar{min-height:84px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:12px}.brand{color:var(--text);text-decoration:none;font-weight:950;letter-spacing:.035em;font-size:29px;line-height:1.02}.brand span{display:block;font-size:9px;font-weight:650;letter-spacing:.35em;color:var(--gold);margin-top:6px}.header-right{display:flex;align-items:center;gap:18px}.edition{font-size:10px;letter-spacing:.15em;color:var(--muted)}.icon-button{width:46px;padding:0;font-size:22px;background:transparent;min-height:46px}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:15;width:min(100%,980px);display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:12px 28px max(12px,env(safe-area-inset-bottom));background:#101518f5;border-top:1px solid var(--line);backdrop-filter:blur(12px)}.bottom-nav button{border:0;background:transparent;color:var(--muted);font-size:11px;letter-spacing:.09em}.bottom-nav .active{background:#26332f;color:var(--gold)}main{padding-top:28px;min-width:0}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(28px,5vw,44px);line-height:1.13;letter-spacing:-.035em;margin-bottom:17px;font-weight:850}h2{font-size:22px;line-height:1.25;letter-spacing:-.02em}h3{font-size:17px}p{font-size:15px;color:var(--muted);margin-bottom:16px}.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:800;color:var(--gold);display:block;margin-bottom:13px}.small{font-size:12px;line-height:1.6}.muted{color:var(--muted)}.hero{display:grid;grid-template-columns:1.02fr 1fr;border:1px solid var(--line);border-radius:18px;overflow:hidden;margin-bottom:24px;background:var(--panel)}.hero-copy{padding:34px 30px}.hero h1{font-size:clamp(36px,5vw,52px);line-height:1.08}.hero p{max-width:29em}.hero-image{min-height:320px;position:relative;background:#1b252b}.hero-image img{width:100%;height:100%;object-fit:cover;position:absolute}.hero-image:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#18202566,transparent 40%)}.image-caption{position:absolute;bottom:18px;left:20px;z-index:1;padding:5px 9px;font-size:9px;letter-spacing:.13em;background:#101518d9;color:#e9d7b2;border:1px solid #6a6456}.hero .primary{min-width:200px;margin-top:7px}.home-note{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:3px 0 20px;margin-bottom:26px}.home-note span{font-size:13px;color:var(--muted)}.home-note strong{color:var(--text);display:block;font-size:14px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:24px 0 14px}.section-heading h2{margin:0}.card{padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:14px;margin-bottom:18px}.card p:last-child{margin-bottom:0}.draft-card{border-color:#806b45;display:flex;align-items:center;justify-content:space-between;gap:14px}.draft-card h2{font-size:18px;margin-bottom:5px}.draft-card p{margin:0;font-size:13px}.actions{display:flex;gap:10px;flex-wrap:wrap}.actions>button{flex:1}.page-heading{display:flex;justify-content:space-between;align-items:start;gap:15px;margin-bottom:22px}.page-heading h1{margin:0}.back{margin-bottom:16px}.form-field{margin-bottom:20px}.form-field>label,.group-label{display:block;font-size:12px;font-weight:750;letter-spacing:.03em;margin-bottom:9px;color:var(--muted)}input,select{width:100%;background:#11191d;border:1px solid var(--line);color:var(--text);border-radius:9px;padding:12px;min-height:48px;max-width:100%}input[type=file]{font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.class-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:20px}.class-tile{display:flex;align-items:center;text-align:left;gap:10px;padding:7px;min-height:70px;font-size:13px;background:#151e23}.class-tile img{width:45px;height:51px;object-fit:cover;object-position:50% 20%;border-radius:5px}.selected,[aria-pressed=true]{border-color:var(--gold)!important;background:#353426!important;box-shadow:inset 0 0 0 1px #f3c66d44}.chips{display:flex;gap:8px;flex-wrap:wrap}.chips button{flex:1;white-space:nowrap;font-size:13px;padding:10px 12px}.chips.lengths button{min-width:120px}.context-card{max-width:720px;margin:auto}.context-summary{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 18px}.context-summary span{background:var(--panel);border:1px solid var(--line);border-radius:5px;padding:4px 8px;font-size:11px;color:var(--muted)}.question-shell{max-width:650px;margin:0 auto}.question-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.question-top .eyebrow{margin:0}.progress{display:flex;gap:5px;margin:16px 0 27px}.progress i{height:3px;flex:1;background:var(--line);border-radius:4px}.progress i.on{background:var(--gold)}.question-title{font-size:clamp(27px,5vw,36px);margin-bottom:13px}.question-help{font-size:13px;margin-bottom:23px;max-width:46em}.answers{display:grid;gap:9px}.answer{padding:16px 18px;display:flex;align-items:center;justify-content:space-between;text-align:left;background:var(--panel);font-weight:600;min-height:57px}.answer .choice-mark{width:18px;height:18px;min-width:18px;border:1px solid #72868d;border-radius:50%;margin-left:14px}.answer.selected .choice-mark{border:5px solid var(--gold)}.answer small{display:block;color:var(--muted);font-size:11px}.question-footer{display:flex;gap:10px;justify-content:space-between;margin-top:24px;padding-top:17px;border-top:1px solid var(--line)}.question-footer .primary{min-width:150px}.question-footer .secondary{min-width:95px}.skip-row{display:flex;justify-content:space-between;gap:10px;margin-top:8px}.enemy-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.enemy-grid button{font-size:13px;text-align:left}.enemy-rest{margin:11px 0}.enemy-rest summary{padding:12px 0;color:var(--gold);font-size:13px;cursor:pointer;min-height:44px}.enemy-outcome{margin-top:16px}.enemy-outcome .chips button{white-space:normal}.review-list{margin:0}.review-row{border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;padding:15px 0}.review-row:last-child{border-bottom:0}.review-row dt{font-size:11px;color:var(--muted);margin-bottom:3px}.review-row dd{margin:0;font-size:14px}.review-row button{font-size:12px}.private-note{font-size:12px;color:var(--mint);display:flex;gap:9px;align-items:start;margin:17px 0}.private-note:before{content:'●';font-size:9px;line-height:2}.story-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.story-card{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:var(--panel);display:block;text-decoration:none;color:var(--text);text-align:left;width:100%;padding:0}.story-thumb{height:158px;overflow:hidden;background:#1b262b}.story-thumb img{width:100%;height:100%;object-fit:cover;object-position:center}.story-card-copy{padding:18px}.story-card h3{font-size:20px;margin:7px 0 10px;line-height:1.2}.story-card .story-meta{font-size:11px;letter-spacing:.03em;color:var(--muted)}.story-card .status{font-size:10px;color:var(--mint);letter-spacing:.09em;text-transform:uppercase}.empty{padding:35px 24px;border:1px dashed var(--line);border-radius:14px;text-align:center}.empty h2{margin-bottom:10px}.reader-toolbar{display:flex;align-items:center;gap:10px;position:sticky;top:0;background:#101518ef;backdrop-filter:blur(10px);padding:8px 0 14px;z-index:10}.reader-toolbar .reader-label{flex:1;font-size:10px;letter-spacing:.12em;color:var(--muted)}.reader-toolbar button{font-size:12px}.reader-bottom{border-top:1px solid var(--line);padding-top:22px;margin-top:26px}.reader-bottom>p{margin-top:12px}.war-chronicle{max-width:800px!important;margin:10px auto!important}.war-chronicle .chronicle-title{padding-left:0!important;padding-right:0!important}.war-chronicle .chronicle-title h1{font-size:clamp(34px,6vw,56px)!important;line-height:1.05!important}.war-chronicle .chronicle-prose{font-family:Georgia,"Times New Roman",serif}.chronicle-passage p{font-size:clamp(17px,2.4vw,21px)!important;line-height:1.8!important;color:#efece2!important}.chronicle-record li{margin-bottom:10px}.chronicle-result{background:var(--panel)!important}.recollection-list li small{display:block;color:var(--muted)}.legacy-panels img{width:100%;max-height:540px;object-fit:contain}.legacy-panels h2{margin-top:15px}.settings-group summary{font-size:15px;font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center}.settings-group[open] summary{margin-bottom:18px}.settings-group code{overflow-wrap:anywhere;font-size:12px;display:block;padding:13px;background:#11191d;border-radius:8px;margin-bottom:12px}.notice{padding:14px;border:1px solid var(--line);border-radius:9px;font-size:13px;color:var(--muted);margin:14px 0}.error-banner{padding:16px;background:#401e1d;color:#ffddd6;font-size:13px;border-bottom:1px solid #b27a71}.search{margin-bottom:20px}.no-scroll{overflow:hidden}dialog{color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:16px;padding:24px;max-width:min(550px,calc(100vw - 28px));max-height:calc(100dvh - 32px);width:100%;overflow:auto}dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:17px}.dialog-heading h2{margin:0}.dialog-heading button{min-width:45px;padding:6px}.dialog-actions{margin-top:22px}.wallpaper-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.wallpaper-grid a,.wallpaper-grid span{display:block;border:1px solid var(--line);border-radius:8px;padding:10px;color:var(--text);text-decoration:none;font-size:12px}.wallpaper-grid img{width:100%;border-radius:5px}.wallpaper-grid .locked{opacity:.45}#toast{position:fixed;z-index:100;left:50%;bottom:95px;transform:translateX(-50%);max-width:calc(100vw - 30px);padding:12px 20px;border:1px solid var(--gold);background:#24302f;color:var(--text);border-radius:10px;font-size:13px;box-shadow:0 5px 25px #0009}.skip-link{position:fixed;left:10px;top:-100px;background:var(--gold);color:#111;padding:12px;z-index:200}.skip-link:focus{top:10px}.loading{padding:35px 0}.credit{font-size:11px;text-align:center;color:var(--muted);margin:24px 0 0}.legacy-note{font-size:12px}.busy-dot{width:8px;height:8px;background:var(--gold);display:inline-block;margin-right:8px;border-radius:50%}.reader-manage{margin:20px 0}.download-grid{display:grid;gap:8px}.form-error{color:var(--red);font-size:13px}.page-count{font-size:11px;color:var(--gold)}[hidden]{display:none!important}@media(max-width:650px){.app-shell{padding:0 17px 104px}.topbar{min-height:73px}.brand{font-size:26px}.edition{font-size:8px;letter-spacing:.09em}.header-right{gap:10px}.icon-button{width:44px;min-height:44px}.bottom-nav{padding:9px 13px max(9px,env(safe-area-inset-bottom))}.bottom-nav button{min-height:49px;padding:8px;font-size:10px}main{padding-top:22px}.hero{grid-template-columns:1fr;position:relative}.hero-image{min-height:185px;grid-row:1}.hero-image img{object-position:center 38%}.hero-image:after{background:linear-gradient(0deg,#182025,transparent 65%)}.image-caption{bottom:14px;left:20px}.hero-copy{padding:15px 22px 24px}.hero h1{font-size:39px;max-width:8em;margin-bottom:13px}.hero-copy .eyebrow{margin-bottom:10px}.hero p{font-size:14px;line-height:1.65}.hero .primary{width:100%}.home-note{padding-bottom:18px;gap:12px}.home-note span{font-size:11px}.home-note strong{font-size:12px}.card{padding:19px}.draft-card{align-items:start;flex-direction:column}.draft-card .actions{width:100%}.story-grid{grid-template-columns:1fr}.story-thumb{height:155px}.story-card-copy{padding:16px}.class-grid{gap:6px}.class-tile{flex-direction:column;gap:4px;padding:7px 3px;font-size:11px;min-height:84px}.class-tile img{width:47px;height:47px}.chips button{font-size:12px;padding:10px}.chips.lengths button{min-width:90px}.form-grid{gap:10px}.form-grid select{font-size:13px;padding:12px 8px}.question-help{margin-bottom:19px}.question-title{font-size:28px}.question-footer{margin-top:19px}.answer{padding:13px 15px;min-height:54px;font-size:14px}.progress{margin:12px 0 23px}.context-summary{gap:5px}.context-summary span{font-size:10px}.reader-label{display:none}.reader-toolbar .primary{margin-left:auto}.reader-toolbar button{padding:10px}.review-row{gap:10px}.review-row dd{font-size:13px}.wallpaper-grid{grid-template-columns:repeat(2,1fr)}.settings-group .actions{flex-direction:column}}@media(max-height:600px) and (orientation:landscape){.topbar{min-height:60px}.app-shell{max-width:980px}.hero{grid-template-columns:1fr 1fr}.hero-image{grid-column:2;grid-row:1}.hero-copy{grid-column:1;grid-row:1}.question-shell{max-width:760px}.answers{grid-template-columns:1fr 1fr}.question-title{font-size:25px}.progress{margin:8px 0 14px}.bottom-nav{padding:4px 20px}.bottom-nav button{min-height:44px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Heading focus moves the reading cursor, without an interactive-control outline. */
#main h1[tabindex="-1"]:focus{outline:none}
/* R51 memory interview: large editable choices, no timers or live counters. */
.interviewer{border-left:3px solid var(--accent,#f4c15f);padding-left:18px;margin:12px 0 20px}.interviewer p{font-size:1.1rem}.memory-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0}.memory-list{display:grid;gap:14px;margin:18px 0}.memory-card{display:flex;gap:14px;padding:18px;background:#17232b;border:1px solid #40525f;border-radius:14px}.memory-card.featured-memory{border-color:#efbc66}.memory-number{flex-shrink:0;width:30px;height:30px;display:grid;place-items:center;background:#33444f;border-radius:50%;font-weight:700}.memory-copy{min-width:0;flex:1}.memory-copy>small{display:block;color:#c1cbd0;line-height:1.6;margin:7px 0}.memory-note{overflow-wrap:anywhere}.memory-copy .actions{flex-wrap:wrap;gap:8px}.memory-tabs{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:20px 0}.memory-tabs button{min-height:56px}.memory-chips button{min-height:48px;white-space:normal;line-height:1.4}.memory-details h3{margin:24px 0 10px}.memory-details textarea{width:100%;padding:14px;background:#101a22;color:#f1f1eb;border:1px solid #6d8390;border-radius:8px;font:inherit;box-sizing:border-box}.memory-details summary,.memory-setting summary{padding:10px 0;cursor:pointer;font-weight:650}.bug-choice.swarm{border-left:4px solid #70c0ac}.bug-choice.medium{border-left:4px solid #89b4e2}.bug-choice.heavy{border-left:4px solid #e8a858}.bug-choice.royal{border-left:4px solid #bc99e2}.memory-details,.memory-setting{margin-top:22px}#toast button{margin-left:12px;padding:8px 14px}#correctRecollection{margin:20px 0 32px}.memory-copy strong{overflow-wrap:anywhere}@media(max-width:380px){.memory-card{padding:13px;gap:9px}.memory-tools{align-items:flex-start;flex-direction:column}.memory-tabs button{font-size:.9rem}.memory-copy .actions button{padding:10px}}
