
:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#3c5149;background:#e4f0e4}*{box-sizing:border-box}body{margin:0}button{cursor:pointer;border:1px solid #c7d6c9;background:#fffdf5;border-radius:11px;padding:10px 14px;color:#426052;font-weight:700}button:hover{background:#edf4e9}button:focus-visible{outline:3px solid #c58561}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 24px;background:#fcf9ed;border-bottom:1px solid #d9dcc9}.brand{display:flex;align-items:center;gap:10px}.brand strong{font-family:Georgia,serif;font-size:25px;color:#507560}.brand small{display:block;font-size:11px;color:#9b9180}.cookie{display:grid;place-items:center;background:#e6b28c;color:white;width:44px;height:44px;border-radius:50%;font-size:28px}.tools{display:flex;gap:8px}.clock{padding:13px 24px;background:#f6f4e9;border-bottom:1px solid #e1dccd}.clock-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.clock-head>div:first-child{display:flex;gap:13px;align-items:center}.clock-head b{font-size:13px}.clock-head span{font-size:12px;color:#817f70}.clock-actions{display:flex;gap:6px}.clock-actions button{padding:6px 10px}.progress{height:9px;background:#d7e0d5;border-radius:20px;margin:10px 0 5px;overflow:hidden}.progress div{height:100%;width:0;background:linear-gradient(90deg,#9ab99e,#e4b58e);transition:width .25s}.days{display:flex;justify-content:space-between;font-size:10px;color:#8c9183}main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(340px,.85fr);gap:14px;padding:16px 22px;height:calc(100vh - 163px);min-height:580px}.city,.diary{min-height:0;background:#fffaf0;border:1px solid #dfd8c5;border-radius:19px;overflow:hidden;box-shadow:0 8px 28px #55766013}.city{display:flex;flex-direction:column}.section-head,.diary-header{padding:18px 20px 12px;display:flex;justify-content:space-between;align-items:center;gap:10px}.eyebrow{font-size:10px;font-weight:900;letter-spacing:.14em;color:#ae9176}.section-head h1,.diary-header h2{font-family:Georgia,serif;font-weight:500;margin:4px 0 0;color:#4c6b58}.section-head h1{font-size:26px}.diary-header h2{font-size:25px}.section-head>span,.new-first{font-size:11px;color:#8c9486}.map{position:relative;flex:1;min-height:330px;overflow:hidden;background:#d2efda}.map svg{width:100%;height:100%;display:block;object-fit:fill}.map-caption{position:absolute;bottom:15px;left:18px;padding:9px 13px;background:#fff8e8ec;border:1px solid #eadbc5;border-radius:10px;font-size:12px;max-width:75%}.map-bottom{padding:11px 18px;display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#8d8d79}.diary{display:flex;flex-direction:column}.diary-header{border-bottom:1px solid #e9dfcd}.feed{overflow-y:auto;flex:1;min-height:0;padding:12px 16px;scrollbar-color:#c8b69c transparent}.entry{position:relative;background:#fffdf8;border:1px solid #e8e0d1;border-left:4px solid var(--entry,#95b29d);border-radius:12px;margin-bottom:10px;padding:12px 13px;animation:appear .55s ease}.entry.player{background:#fff1e6}.entry.bridge{background:#f6eef8}.entry .meta{display:flex;justify-content:space-between;gap:8px;color:#a0927d;font-size:10px;font-weight:700}.entry h3{font-family:Georgia,serif;font-size:17px;margin:8px 0 5px;color:#526959;font-weight:500}.entry p{font-size:12px;line-height:1.6;color:#6e6b61;margin:0}.entry .choice{font-size:11px;margin:8px 0;color:#a26e54;font-weight:700}.entry details{margin-top:8px;font-size:11px;color:#7c766a}.entry summary{cursor:pointer}.diary-footer{padding:10px 16px;border-top:1px solid #e7ddcb;display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#9a927f}@keyframes appear{from{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}.choice-backdrop,.end-overlay,.tree-overlay{position:fixed;inset:0;background:#243c30a6;display:grid;place-items:center;padding:18px;z-index:30}.choice-card,.end-card,.tree-card{background:#fff9ed;border:2px solid #e3cba9;border-radius:23px;padding:30px;width:min(560px,100%);box-shadow:0 24px 70px #1a2f2650}.choice-card h2,.end-card h2,.tree-card h2{font-family:Georgia,serif;color:#4b705b;font-size:31px;font-weight:500;margin:10px 0}.choice-card p,.end-card p,.tree-card p{line-height:1.65;color:#776c60;font-size:14px}.choice-card small{display:block;margin-top:16px;color:#968777;font-size:11px}.choice-option{display:block;width:100%;text-align:left;margin:9px 0;padding:14px;background:#f9f1e1;font-size:13px}.choice-option:hover{background:#e8f2e6}.panel{position:fixed;right:24px;top:75px;z-index:40;width:min(330px,calc(100vw - 30px));padding:20px;background:#fffaf0;border:1px solid #d6c5a7;box-shadow:0 12px 40px #334c3240;border-radius:17px}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.panel-title h3{margin:0}.panel label{display:block;margin-top:14px;font-size:13px}.panel input[type=range]{width:100%;accent-color:#8ea991}.panel p{font-size:11px;color:#9b8f81}.tree-card{width:min(950px,100%);max-height:90vh;display:flex;flex-direction:column}.tree-content{overflow:auto;padding:10px}.tree-week{padding:10px 0;border-top:1px solid #ded5c4}.tree-week h3{font-family:Georgia,serif;color:#567762}.tree-nodes{display:flex;gap:12px;flex-wrap:wrap}.tree-node{width:210px;padding:11px;border:1px solid #c8d7c8;border-radius:10px;background:#eef5e9;font-size:12px}.tree-node small{display:block;color:#9c8b7d;margin:5px 0}.tree-node .missed{display:block;border-top:1px dashed #c9b7a1;color:#aaa297;margin-top:9px;padding-top:8px}.tree-node p{font-size:11px;margin:4px 0}.end-actions{display:flex;flex-wrap:wrap;gap:8px}.end-actions button:first-child{background:#e5efdf}.end-card{width:min(650px,100%)}.thread-line{stroke-dasharray:8 6;stroke-width:5;fill:none;stroke-linecap:round;animation:dash 8s linear infinite}.thread-point{animation:pulse 1.8s ease-in-out infinite;transform-box:fill-box;transform-origin:center}@keyframes dash{to{stroke-dashoffset:-120}}@keyframes pulse{50%{opacity:.45;transform:scale(1.4)}}@media(max-width:850px){main{grid-template-columns:1fr;height:auto;min-height:0;padding:12px}.city{height:53vh;min-height:390px}.diary{height:60vh}.clock{padding:10px 13px}.section-head h1{font-size:20px}header{padding:10px 12px}.brand strong{font-size:19px}.tools button{font-size:11px;padding:8px}.section-head{padding:12px}.diary-header{padding:12px}}@media(max-width:480px){.brand small{font-size:9px}.cookie{width:34px;height:34px}.tools{gap:3px}.tools button{padding:7px;font-size:10px}.clock-head{flex-wrap:wrap}.clock-head>div:first-child{gap:6px}.city{height:410px}.map svg{height:100%;width:auto;max-width:none;position:absolute;left:50%;transform:translateX(-50%)}.map-caption{font-size:10px;max-width:95%;left:6px;bottom:7px}.map-bottom{font-size:10px}.choice-card{padding:18px}.choice-card h2{font-size:25px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}


/* v0.66 logo integration */
header.app-header .brand{gap:10px!important}
header.app-header .brand .brand-mark{display:block;line-height:0;min-width:0;flex-shrink:1}
header.app-header .brand .brand-logo{display:block;height:46px;width:auto;max-width:min(52vw,350px);object-fit:contain}
header.app-header .brand .brand-meta{display:none!important}
header.app-header .cookie{display:none!important}
.welcome-symbol{display:none!important}
.welcome-logo{display:block;width:min(100%,430px);height:auto;margin:0 0 14px;align-self:flex-start}
@media(max-width:900px){
  header.app-header .brand .brand-logo{height:40px;max-width:min(50vw,280px)}
  .welcome-logo{width:min(100%,360px)}
}
@media(max-width:550px){
  header.app-header .brand .brand-logo{height:34px;max-width:56vw}
  .welcome-logo{width:min(100%,285px);margin-bottom:10px}
}




/* Version 0.5 - serialized human stories, not gamified scores. */
:root{--ink:#425c4d;--paper:#fffaf0;--muted:#877e70;--mint:#cee8d6}
body{background:#e7efe5}
.brand strong{letter-spacing:-.025em}
.brand small{letter-spacing:.01em}
.clock{position:relative;z-index:2}
.progress{height:11px;background:repeating-linear-gradient(90deg,#d4e1d3 0,#d4e1d3 calc(12.5% - 2px),#f6f4e9 calc(12.5% - 2px),#f6f4e9 12.5%)}
.progress>div{background:linear-gradient(90deg,#80b4a0 0%,#bed4a2 49%,#dcaa8d 100%);min-width:0;transition:width .17s linear}
.diary-header{padding-bottom:11px}
.diary-header h2{letter-spacing:-.03em}
.feed-filters{position:relative;display:flex;align-items:center;gap:9px;padding:9px 16px;border-bottom:1px solid #eee2cf;background:#faf5e9;flex-wrap:wrap}
.feed-filters label{font-size:11px;color:#857b6e;font-weight:700}
.feed-filters select{border-radius:9px;border:1px solid #d8cdb8;background:#fffdf7;color:#466854;padding:7px 10px;min-width:115px;flex:1;font-size:12px}.feed-filters select:focus,.feed-filters select:focus-visible{outline:none;box-shadow:none;border-color:#d8cdb8}
#newEvents{border-radius:999px;padding:5px 9px;font-size:10px;background:#547e65;color:#fff;white-space:nowrap}
.feed{scroll-behavior:auto;padding:12px 14px 24px;overscroll-behavior:contain}
.entry.episode{border-left-width:5px;border-radius:11px;padding:12px 14px;box-shadow:0 2px 8px #5969530b}
.entry.episode-observation{background:#f9f7ef}
.entry.episode-reaction{background:#fffcf6}
.entry.episode-independent,.entry.episode-side{background:#edf6ef}
.entry.episode-crossing{background:#f4edf6}
.entry.episode-reflection,.entry.episode-week{background:#f2f1df}
.entry.episode-epilogue{background:#f8e9e0}
.entry.episode-finale{background:#eadbd0}
.entry .episode-person{font-size:10px;font-weight:800;letter-spacing:.06em;color:#8b7767;margin-top:9px;text-transform:uppercase}
.entry .meta{font-size:9px;flex-wrap:wrap;line-height:1.5}
.entry .meta span:last-child{white-space:nowrap}
.entry h3{font-size:17px;line-height:1.23;margin:7px 0}
.entry p{font-size:12px;line-height:1.66;color:#665e55}
.entry details{font-size:12px;color:#736a60;margin-top:10px;padding-top:7px;border-top:1px dashed #e0d4c3}
.entry details p{padding-top:7px}
.entry .choice{color:#946747;font-size:11px;line-height:1.5}
.city{position:relative}
.map{background:#cee8d3;isolation:isolate}
.map svg{position:relative;z-index:1}
.map.rainy:after{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(130deg,#8daeb92b,#b1a3ad1b);pointer-events:none}
.map.autumn{background:#c7dcc4}
.rain-drop{animation:rain-fall 3.8s linear infinite;transform:translate(0,-25px)}
.rain-drop:nth-child(3n){animation-delay:-1.8s}
.rain-drop:nth-child(5n){animation-duration:2.8s}
@keyframes rain-fall{to{transform:translate(-21px,70px);opacity:0}}
.hero-pin{cursor:pointer;filter:drop-shadow(0 3px 4px #45655045);transform-box:fill-box;transform-origin:center;outline:none}
.hero-pin.active{filter:drop-shadow(0 2px 10px #fff4cf)}
.hero-pin.active circle:first-child{stroke-width:6}
.hero-pin:focus circle:first-child{stroke:#244e38;stroke-width:6}
.story-halo{animation:halo 2.3s ease-out infinite;transform-origin:center;transform-box:fill-box;pointer-events:none}
@keyframes halo{0%{opacity:.85;transform:scale(.45)}100%{opacity:0;transform:scale(1.8)}}
.scene-ribbon{position:absolute;z-index:5;right:12px;top:12px;width:min(340px,48%);max-height:194px;overflow:hidden;pointer-events:none;background:rgba(255,251,240,.96);border:1px solid #e4d3b8;border-left:5px solid #bba08c;border-radius:13px;padding:12px 14px;box-shadow:0 5px 18px #304c3425}
.scene-ribbon .scene-ribbon-top{display:flex;gap:8px;justify-content:space-between;align-items:start;line-height:1.35;color:#a3836f;font-weight:800;font-size:9px;letter-spacing:.07em}
.scene-ribbon h3{font-family:Georgia,serif;color:#536f5b;font-size:20px;line-height:1.14;font-weight:500;margin:6px 0}
.scene-ribbon p{font-size:11px;line-height:1.42;color:#766c60;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ribbon-animate{animation:ribbon-enter .7s ease both}
@keyframes ribbon-enter{from{opacity:.3;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.map-caption{z-index:5;box-shadow:0 4px 20px #32513d21}
.map-bottom{font-size:11px}
.choice-backdrop{background:#253d3154;display:flex;align-items:center;justify-content:flex-start;padding:18px 5vw;overflow:auto}
.choice-card{margin-left:min(4vw,70px);width:min(540px,95vw);max-height:min(90vh,900px);overflow-y:auto;border:1px solid #e4cfb3;box-shadow:0 20px 80px #1d382a5b;padding:26px 30px}
.choice-card p{font-size:14px;line-height:1.77;color:#635d52}
.choice-history{padding:11px 13px;background:#edf2e9;color:#6f7e6b!important;border-radius:8px;font-size:12px!important;line-height:1.5!important}
.choice-option{font-size:13px;line-height:1.45;padding:14px 16px;border:1px solid #e8d9c1;box-shadow:0 1px 5px #cbb9a81f}
.choice-option:hover,.choice-option:focus-visible{border-color:#87b096;background:#eaf3e9}
.choice-card small{line-height:1.5}
.fates-overlay{position:fixed;inset:0;z-index:35;background:#233b31ad;display:grid;place-items:center;padding:18px}
.fates-card{width:min(980px,100%);max-height:90vh;overflow-y:auto;padding:24px;background:#fff9ed;border:1px solid #e3cba9;border-radius:22px;box-shadow:0 24px 75px #1b332a54}
.fates-card h2{font-family:Georgia,serif;color:#50745d;font-weight:500;font-size:31px;margin:4px 0}
.fates-card>p{font-size:13px;line-height:1.6;color:#766c60}
.fates-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.fate-card{border:1px solid #e5dccf;border-left:5px solid var(--fate);border-radius:12px;background:#fffdf7;padding:15px;display:flex;flex-direction:column}
.fate-card small{color:#928576;font-weight:700}
.fate-card h3{font-family:Georgia,serif;color:#536c5a;font-size:20px;margin:9px 0}
.fate-card p{font-size:12px;line-height:1.55;color:#726961;flex:1}
.fate-card button{align-self:flex-start;font-size:12px}
.tree-content{padding:10px 5px;overflow-y:auto}
.tree-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 11px}
.tree-tabs button{font-size:11px;padding:7px 10px}
.tree-tabs button.selected{background:#557862;color:#fff;border-color:#557862}
.tree-arc{border-top:1px solid #e8dbca;padding:14px 0 18px}
.tree-arc h3{font-family:Georgia,serif;color:#52735a;font-size:22px;font-weight:500;margin:0 0 13px}
.tree-rail{display:grid;grid-template-columns:repeat(auto-fit,minmax(158px,1fr));gap:13px}
.tree-beat{position:relative;min-height:143px;background:#fffef8;border:1px solid #e3d8c7;border-top:5px solid var(--fate);border-radius:10px;padding:13px 10px;box-shadow:0 3px 11px #556a5422}
.tree-beat:not(:last-child):after{content:"";position:absolute;width:13px;height:2px;right:-13px;top:35px;background:var(--fate)}
.tree-beat small{font-size:9px;font-weight:900;color:#968477;display:block}
.tree-beat strong{font-family:Georgia,serif;font-size:16px;font-weight:500;color:#496955;display:block;margin:6px 0 9px}
.tree-alternatives{font-size:11px;line-height:1.4}
.tree-alternatives div{border-top:1px dotted #e4dbcb;padding:6px 2px}
.branch-selected{color:#4d795a;font-weight:700}
.branch-unselected{color:#b4aaa0;filter:grayscale(1)}
.not-seen{font-size:10px;color:#aa8a69;display:block;margin:6px 0}
.tree-outcome{border-left:4px solid var(--fate);background:#f6f0e6;padding:12px;margin-top:13px;font-size:12px;line-height:1.65;color:#68605b}
.tree-cross{border-top:1px solid #e7d8e5;padding:13px 0}
.tree-cross h3{font-family:Georgia,serif;font-size:21px;color:#8e779e}
.tree-cross p{font-size:12px;line-height:1.5}
.end-card{width:min(720px,100%);max-height:90vh;overflow-y:auto}
.end-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0 18px}
.end-person{border:1px solid #e8ddce;border-left:4px solid #98aa9c;background:#fffcf6;border-radius:8px;padding:12px}
.end-person small{display:block;color:#9b8676;font-size:10px}
.end-person strong{display:block;color:#4f6c58;font-family:Georgia,serif;font-size:17px;font-weight:500;margin-top:5px}
.end-person p{font-size:11px;line-height:1.5;margin:7px 0 0}
#videoStatus{font-size:12px;color:#867966}
@media(max-width:920px){.scene-ribbon{width:45%;max-height:140px;padding:9px}.scene-ribbon h3{font-size:16px}.scene-ribbon p{-webkit-line-clamp:2}.choice-card{margin:0}}
@media(max-width:850px){.choice-backdrop{background:#223b3070;justify-content:center}.map-caption{max-width:85%}.map svg{min-height:100%}}
@media(max-width:480px){header .brand small{display:none}.tools button{font-size:10px;padding:7px 8px}.brand strong{font-size:18px}.brand .cookie{width:33px;height:33px}.city{height:440px;min-height:390px}.diary{height:64vh;min-height:420px}.scene-ribbon{max-width:79%;width:74%;top:9px;right:7px;max-height:128px;padding:8px 9px}.scene-ribbon h3{font-size:15px}.scene-ribbon p{font-size:10px}.scene-ribbon-top{font-size:8px!important}.map-caption{font-size:10px;max-width:94%;line-height:1.4}.feed{padding:10px}.feed-filters{padding:8px}.choice-card{padding:17px;border-radius:17px}.choice-card h2{font-size:25px}.choice-card p{font-size:12px}.choice-option{font-size:12px;padding:12px}.fates-list,.end-people{grid-template-columns:1fr}.fates-card{padding:17px}.tree-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.tree-beat:not(:last-child):after{display:none}.tree-beat{padding:10px}.tree-beat strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.rain-drop,.story-halo,.ribbon-animate{animation:none!important}.hero-pin{transition:none!important}}




/* Version 0.5 - serialized human stories, not gamified scores. */
:root{--ink:#425c4d;--paper:#fffaf0;--muted:#877e70;--mint:#cee8d6}
body{background:#e7efe5}
.brand strong{letter-spacing:-.025em}
.brand small{letter-spacing:.01em}
.clock{position:relative;z-index:2}
.progress{height:11px;background:repeating-linear-gradient(90deg,#d4e1d3 0,#d4e1d3 calc(12.5% - 2px),#f6f4e9 calc(12.5% - 2px),#f6f4e9 12.5%)}
.progress>div{background:linear-gradient(90deg,#80b4a0 0%,#bed4a2 49%,#dcaa8d 100%);min-width:0;transition:width .17s linear}
.diary-header{padding-bottom:11px}
.diary-header h2{letter-spacing:-.03em}
.feed-filters{position:relative;display:flex;align-items:center;gap:9px;padding:9px 16px;border-bottom:1px solid #eee2cf;background:#faf5e9;flex-wrap:wrap}
.feed-filters label{font-size:11px;color:#857b6e;font-weight:700}
.feed-filters select{border-radius:9px;border:1px solid #d8cdb8;background:#fffdf7;color:#466854;padding:7px 10px;min-width:115px;flex:1;font-size:12px}
#newEvents{border-radius:999px;padding:5px 9px;font-size:10px;background:#547e65;color:#fff;white-space:nowrap}
.feed{scroll-behavior:auto;padding:12px 14px 24px;overscroll-behavior:contain}
.entry.episode{border-left-width:5px;border-radius:11px;padding:12px 14px;box-shadow:0 2px 8px #5969530b}
.entry.episode-observation{background:#f9f7ef}
.entry.episode-reaction{background:#fffcf6}
.entry.episode-independent,.entry.episode-side{background:#edf6ef}
.entry.episode-crossing{background:#f4edf6}
.entry.episode-reflection,.entry.episode-week{background:#f2f1df}
.entry.episode-epilogue{background:#f8e9e0}
.entry.episode-finale{background:#eadbd0}
.entry .episode-person{font-size:10px;font-weight:800;letter-spacing:.06em;color:#8b7767;margin-top:9px;text-transform:uppercase}
.entry .meta{font-size:9px;flex-wrap:wrap;line-height:1.5}
.entry .meta span:last-child{white-space:nowrap}
.entry h3{font-size:17px;line-height:1.23;margin:7px 0}
.entry p{font-size:12px;line-height:1.66;color:#665e55}
.entry details{font-size:12px;color:#736a60;margin-top:10px;padding-top:7px;border-top:1px dashed #e0d4c3}
.entry details p{padding-top:7px}
.entry .choice{color:#946747;font-size:11px;line-height:1.5}
.city{position:relative}
.map{background:#cee8d3;isolation:isolate}
.map svg{position:relative;z-index:1}
.map.rainy:after{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(130deg,#8daeb92b,#b1a3ad1b);pointer-events:none}
.map.autumn{background:#c7dcc4}
.rain-drop{animation:rain-fall 3.8s linear infinite;transform:translate(0,-25px)}
.rain-drop:nth-child(3n){animation-delay:-1.8s}
.rain-drop:nth-child(5n){animation-duration:2.8s}
@keyframes rain-fall{to{transform:translate(-21px,70px);opacity:0}}
.hero-pin{cursor:pointer;filter:drop-shadow(0 3px 4px #45655045);transform-box:fill-box;transform-origin:center;outline:none}
.hero-pin.active{filter:drop-shadow(0 2px 10px #fff4cf)}
.hero-pin.active circle:first-child{stroke-width:6}
.hero-pin:focus circle:first-child{stroke:#244e38;stroke-width:6}
.story-halo{animation:halo 2.3s ease-out infinite;transform-origin:center;transform-box:fill-box;pointer-events:none}
@keyframes halo{0%{opacity:.85;transform:scale(.45)}100%{opacity:0;transform:scale(1.8)}}
.scene-ribbon{position:absolute;z-index:5;right:12px;top:12px;width:min(340px,48%);max-height:194px;overflow:hidden;pointer-events:none;background:rgba(255,251,240,.96);border:1px solid #e4d3b8;border-left:5px solid #bba08c;border-radius:13px;padding:12px 14px;box-shadow:0 5px 18px #304c3425}
.scene-ribbon .scene-ribbon-top{display:flex;gap:8px;justify-content:space-between;align-items:start;line-height:1.35;color:#a3836f;font-weight:800;font-size:9px;letter-spacing:.07em}
.scene-ribbon h3{font-family:Georgia,serif;color:#536f5b;font-size:20px;line-height:1.14;font-weight:500;margin:6px 0}
.scene-ribbon p{font-size:11px;line-height:1.42;color:#766c60;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ribbon-animate{animation:ribbon-enter .7s ease both}
@keyframes ribbon-enter{from{opacity:.3;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.map-caption{z-index:5;box-shadow:0 4px 20px #32513d21}
.map-bottom{font-size:11px}
.choice-backdrop{background:#253d3154;display:flex;align-items:center;justify-content:flex-start;padding:18px 5vw;overflow:auto}
.choice-card{margin-left:min(4vw,70px);width:min(540px,95vw);max-height:min(90vh,900px);overflow-y:auto;border:1px solid #e4cfb3;box-shadow:0 20px 80px #1d382a5b;padding:26px 30px}
.choice-card p{font-size:14px;line-height:1.77;color:#635d52}
.choice-history{padding:11px 13px;background:#edf2e9;color:#6f7e6b!important;border-radius:8px;font-size:12px!important;line-height:1.5!important}
.choice-option{font-size:13px;line-height:1.45;padding:14px 16px;border:1px solid #e8d9c1;box-shadow:0 1px 5px #cbb9a81f}
.choice-option:hover,.choice-option:focus-visible{border-color:#87b096;background:#eaf3e9}
.choice-card small{line-height:1.5}
.fates-overlay{position:fixed;inset:0;z-index:35;background:#233b31ad;display:grid;place-items:center;padding:18px}
.fates-card{width:min(980px,100%);max-height:90vh;overflow-y:auto;padding:24px;background:#fff9ed;border:1px solid #e3cba9;border-radius:22px;box-shadow:0 24px 75px #1b332a54}
.fates-card h2{font-family:Georgia,serif;color:#50745d;font-weight:500;font-size:31px;margin:4px 0}
.fates-card>p{font-size:13px;line-height:1.6;color:#766c60}
.fates-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.fate-card{border:1px solid #e5dccf;border-left:5px solid var(--fate);border-radius:12px;background:#fffdf7;padding:15px;display:flex;flex-direction:column}
.fate-card small{color:#928576;font-weight:700}
.fate-card h3{font-family:Georgia,serif;color:#536c5a;font-size:20px;margin:9px 0}
.fate-card p{font-size:12px;line-height:1.55;color:#726961;flex:1}
.fate-card button{align-self:flex-start;font-size:12px}
.tree-content{padding:10px 5px;overflow-y:auto}
.tree-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 11px}
.tree-tabs button{font-size:11px;padding:7px 10px}
.tree-tabs button.selected{background:#557862;color:#fff;border-color:#557862}
.tree-arc{border-top:1px solid #e8dbca;padding:14px 0 18px}
.tree-arc h3{font-family:Georgia,serif;color:#52735a;font-size:22px;font-weight:500;margin:0 0 13px}
.tree-rail{display:grid;grid-template-columns:repeat(auto-fit,minmax(158px,1fr));gap:13px}
.tree-beat{position:relative;min-height:143px;background:#fffef8;border:1px solid #e3d8c7;border-top:5px solid var(--fate);border-radius:10px;padding:13px 10px;box-shadow:0 3px 11px #556a5422}
.tree-beat:not(:last-child):after{content:"";position:absolute;width:13px;height:2px;right:-13px;top:35px;background:var(--fate)}
.tree-beat small{font-size:9px;font-weight:900;color:#968477;display:block}
.tree-beat strong{font-family:Georgia,serif;font-size:16px;font-weight:500;color:#496955;display:block;margin:6px 0 9px}
.tree-alternatives{font-size:11px;line-height:1.4}
.tree-alternatives div{border-top:1px dotted #e4dbcb;padding:6px 2px}
.branch-selected{color:#4d795a;font-weight:700}
.branch-unselected{color:#b4aaa0;filter:grayscale(1)}
.not-seen{font-size:10px;color:#aa8a69;display:block;margin:6px 0}
.tree-outcome{border-left:4px solid var(--fate);background:#f6f0e6;padding:12px;margin-top:13px;font-size:12px;line-height:1.65;color:#68605b}
.tree-cross{border-top:1px solid #e7d8e5;padding:13px 0}
.tree-cross h3{font-family:Georgia,serif;font-size:21px;color:#8e779e}
.tree-cross p{font-size:12px;line-height:1.5}
.end-card{width:min(720px,100%);max-height:90vh;overflow-y:auto}
.end-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0 18px}
.end-person{border:1px solid #e8ddce;border-left:4px solid #98aa9c;background:#fffcf6;border-radius:8px;padding:12px}
.end-person small{display:block;color:#9b8676;font-size:10px}
.end-person strong{display:block;color:#4f6c58;font-family:Georgia,serif;font-size:17px;font-weight:500;margin-top:5px}
.end-person p{font-size:11px;line-height:1.5;margin:7px 0 0}
#videoStatus{font-size:12px;color:#867966}
@media(max-width:920px){.scene-ribbon{width:45%;max-height:140px;padding:9px}.scene-ribbon h3{font-size:16px}.scene-ribbon p{-webkit-line-clamp:2}.choice-card{margin:0}}
@media(max-width:850px){.choice-backdrop{background:#223b3070;justify-content:center}.map-caption{max-width:85%}.map svg{min-height:100%}}
@media(max-width:480px){header .brand small{display:none}.tools button{font-size:10px;padding:7px 8px}.brand strong{font-size:18px}.brand .cookie{width:33px;height:33px}.city{height:440px;min-height:390px}.diary{height:64vh;min-height:420px}.scene-ribbon{max-width:79%;width:74%;top:9px;right:7px;max-height:128px;padding:8px 9px}.scene-ribbon h3{font-size:15px}.scene-ribbon p{font-size:10px}.scene-ribbon-top{font-size:8px!important}.map-caption{font-size:10px;max-width:94%;line-height:1.4}.feed{padding:10px}.feed-filters{padding:8px}.choice-card{padding:17px;border-radius:17px}.choice-card h2{font-size:25px}.choice-card p{font-size:12px}.choice-option{font-size:12px;padding:12px}.fates-list,.end-people{grid-template-columns:1fr}.fates-card{padding:17px}.tree-rail{grid-template-columns:repeat(2,minmax(0,1fr))}.tree-beat:not(:last-child):after{display:none}.tree-beat{padding:10px}.tree-beat strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.rain-drop,.story-halo,.ribbon-animate{animation:none!important}.hero-pin{transition:none!important}}
/* v0.6: welcoming prologue, monotonic play timer and choices every Sunday. */
.clock-head{gap:12px}
.clock-head>div:first-child{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.elapsed-clock{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;line-height:1.1;background:#fdf7e9;border:1px solid #dedac3;padding:5px 12px;border-radius:10px;min-width:106px}
.elapsed-clock small{font-size:9px;letter-spacing:.035em;font-weight:750;color:#97866b}
.elapsed-clock strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:20px;font-variant-numeric:tabular-nums;letter-spacing:.03em;color:#49705a}
.welcome-overlay{position:fixed;inset:0;z-index:62;background:linear-gradient(125deg,#203b33b8,#5a7b64a1);display:grid;place-items:center;padding:20px;overflow-y:auto}
.welcome-card{width:min(650px,100%);background:#fffbef;border:1px solid #e9dbbf;border-radius:25px;box-shadow:0 30px 110px #1934266b;padding:clamp(22px,5vw,49px);display:flex;flex-direction:column;gap:13px;text-align:left;position:relative;overflow:hidden}
.welcome-card:after{content:'';position:absolute;width:250px;height:250px;right:-125px;top:-130px;border-radius:50%;background:#f0d0b14d;pointer-events:none}
.welcome-symbol{width:47px;height:47px;display:grid;place-items:center;border-radius:50%;font-size:31px;color:#fff4e5;background:#87ac99;box-shadow:0 4px 0 #6a937d}
.welcome-card .eyebrow{font-size:11px;color:#a28772;letter-spacing:.12em;font-weight:750}
.welcome-card h2{font-family:Georgia,serif;font-size:clamp(27px,3.5vw,41px);font-weight:500;letter-spacing:-.032em;line-height:1.12;color:#496955;margin:0}
.welcome-card p{color:#6e655b;font-size:14px;line-height:1.74;margin:0}
.welcome-quote{font-family:Georgia,serif;font-size:18px;line-height:1.5;color:#7c866a;background:#eff2e6;border-left:4px solid #98af93;padding:12px 16px;border-radius:0 12px 12px 0}
.welcome-facts{display:flex;gap:8px;flex-wrap:wrap}
.welcome-facts span{flex:1;min-width:140px;border:1px solid #e6dfcc;border-radius:10px;background:#fffef9;padding:11px 12px;color:#756b60;font-size:12px}
.welcome-facts b{display:block;color:#527c62;font-size:15px;margin-bottom:4px}
.welcome-card p.welcome-hint{font-size:12px;line-height:1.55;color:#827769}
.welcome-start{align-self:flex-start;background:#557d64;color:#fffdf4;border:none;font-family:inherit;font-size:15px;padding:15px 24px;box-shadow:0 6px 0 #3f6a50}
.welcome-start:hover,.welcome-start:focus-visible{background:#456c55;color:#fff}
.welcome-card>small{font-size:11px;line-height:1.5;color:#958574}
.choice-card{max-height:min(94vh,940px)}
.choice-option{min-height:48px}
@media(max-width:650px){.clock-head>div:first-child{gap:8px}.elapsed-clock{padding:5px 8px}.elapsed-clock strong{font-size:17px}.welcome-overlay{padding:10px}.welcome-card{gap:10px;padding:23px}.welcome-card p{font-size:12px}.welcome-quote{font-size:15px}.welcome-facts span{min-width:110px}.welcome-card>small{font-size:10px}}




/* v0.7: horizontal panorama first, narrative in the center, restrained protagonist colors. */
:root{--journal-width:1000px}
body{background:#e8eee6}
header{min-height:66px;padding:10px clamp(12px,3vw,32px);box-shadow:0 2px 10px #314d3610;position:relative;z-index:4}
.story-layout{display:flex!important;flex-direction:column;gap:0;padding:0!important;margin:0!important;width:100%;height:calc(100dvh - 66px)!important;min-height:510px!important;grid-template-columns:none!important}
.story-layout .city{order:0;flex:0 0 190px!important;height:190px!important;min-height:190px!important;width:100%;border:0;border-radius:0;box-shadow:0 2px 15px #36574615;overflow:hidden;position:relative;background:#cce7d4}
.city .section-head{z-index:5;position:absolute;left:clamp(10px,3vw,30px);top:8px;padding:6px 11px;display:flex;align-items:center;background:#fff8e9df;border:1px solid #dfd1b6;border-radius:9px;max-width:max-content;pointer-events:none;box-shadow:0 2px 10px #36574612}
.city .section-head h1{font-size:14px;margin:0;line-height:1.3;color:#4d705c}
.city .section-head .eyebrow,.city .section-head>span{display:none}
.story-layout .city .map{position:absolute;inset:0;height:100%!important;min-height:0!important;flex:0 0 auto;width:100%;overflow:hidden}
.story-layout .city .map svg{position:absolute;inset:0;width:100%!important;height:100%!important;min-height:0!important;max-width:none;left:0!important;transform:none!important;object-fit:fill}
.story-layout .city .scene-ribbon{display:none!important}
.story-layout .city .map-caption,.story-layout .city .map-bottom{display:none!important}
.story-layout .clock{order:1;flex:0 0 auto;background:#faf7ed;padding:8px clamp(12px,4vw,65px) 8px;border-bottom:1px solid #e9ddc9;box-shadow:0 2px 7px #314d360a}
.clock-head{justify-content:space-between;gap:10px}
.clock-head>div:first-child{flex-wrap:nowrap;gap:18px}
.clock-head b{font-size:12px;white-space:nowrap}
.clock-head #status{font-size:11px;color:#718174;text-align:right;max-width:265px}
.clock .progress{margin:7px 0 4px;height:7px}
.clock .days{max-width:none}
.elapsed-clock{padding:3px 11px;min-width:99px;border-radius:8px}
.elapsed-clock strong{font-size:17px}
.story-layout .diary{order:2;min-height:240px!important;flex:1;height:auto!important;max-height:none!important;width:min(var(--journal-width),calc(100% - 28px));margin:10px auto 12px;background:#fffaf2;border-radius:16px;border:1px solid #e4dac9;box-shadow:0 6px 23px #55766018;display:flex;flex-direction:column}
.diary-header{padding:11px 18px 9px!important}
.diary-header h2{font-size:24px}
.diary-header .eyebrow{font-size:9px}
.feed-filters{padding:7px 18px;gap:10px;background:#fbf7ed}
.feed-filters select{max-width:300px}
.feed{padding:10px clamp(10px,2vw,23px) 26px;scroll-behavior:auto;overflow-y:auto;overscroll-behavior:contain}
.entry.episode{border:1px solid #e1dacb;border-left:6px solid var(--entry);border-radius:12px;box-shadow:0 2px 8px #3b47300a;padding:13px 17px 12px;margin-bottom:9px;background:#f9f7f0}
.entry.episode[data-arc=sasha]{background:#fff0e7;border-color:#efd9cd;border-left-color:#cb936e}
.entry.episode[data-arc=vera]{background:#f5edf6;border-color:#e9dce9;border-left-color:#a38bae}
.entry.episode[data-arc=lina]{background:#eaf5ea;border-color:#d4e4d5;border-left-color:#7ca587}
.entry.episode[data-arc=nina]{background:#ebf1f7;border-color:#d5e0eb;border-left-color:#7c9ebd}
.entry.episode[data-arc=kir]{background:#fff4dc;border-color:#ecdfbd;border-left-color:#c1a25b}
.entry.episode.episode-choice{box-shadow:0 1px 12px #b0816524;outline:1px solid #e3c7a3}
.entry.episode.episode-crossing{background:#f2e8f5;border-left-color:#9e84b8}
.entry.episode.episode-week,.entry.episode.episode-reflection{background:#f3eee4;border-left-color:#a29b86}
.entry .meta{font-size:10px;color:#927e73;gap:12px}
.entry .meta span:last-child{color:#5f7464;letter-spacing:.045em}
.entry h3{font-size:21px;line-height:1.2;margin:7px 0 4px;color:#435e50}
.entry p{font-size:13px;line-height:1.65;color:#59594e}
.entry .episode-person{font-size:11px;color:#715e56;letter-spacing:.05em;margin-top:5px}
.entry details{display:none!important}
.diary-footer{padding:8px 18px}
/* Choice is always centered, desktop and mobile. */
.choice-backdrop{inset:0;position:fixed;display:grid!important;place-items:center!important;justify-content:center!important;align-items:center!important;padding:14px!important;background:#1d302bc2!important;z-index:51!important;overflow-y:auto}
.choice-card{margin:0 auto!important;width:min(610px,calc(100vw - 24px))!important;max-height:min(90dvh,820px);overflow-y:auto;overscroll-behavior:contain;transform:none!important;border-radius:20px;padding:clamp(17px,3vw,28px)}
.choice-card h2{margin:8px 0 6px}
.choice-option{min-height:46px;padding:11px 15px}
#treeBtn[hidden]{display:none!important}
#treeBtn{display:none!important}body.game-completed #treeBtn{display:inline-flex!important}
.welcome-audio{display:flex;gap:10px;align-items:center;font-weight:700;font-size:13px;color:#4f775c;padding:10px 12px;border:1px solid #dae5d7;background:#f2f6eb;border-radius:12px}
.welcome-audio input{accent-color:#547b60;width:17px;height:17px}
.audio-preview{display:block;width:100%;margin-top:13px;background:#eef3e7;border:1px solid #c4d5c1;font-size:12px}
.audio-preview:focus-visible{outline:2px solid #537963}
#audioHint{line-height:1.5}
@media(max-width:900px){.story-layout{height:calc(100dvh - 70px)!important}.story-layout .city{height:184px!important;min-height:184px!important;flex-basis:184px!important}.story-layout .diary{width:calc(100% - 20px)}.clock-head #status{display:none}.entry h3{font-size:19px}}
@media(max-width:550px){
 header{min-height:72px;flex-wrap:wrap;align-content:center;gap:5px}
 .brand strong{font-size:18px}.tools{gap:3px}.tools button{padding:6px 8px;font-size:10px}
 .story-layout{height:calc(100dvh - 72px)!important;min-height:500px!important}
 .story-layout .city{height:168px!important;min-height:168px!important;flex-basis:168px!important}
 .city .section-head{top:6px;left:6px;padding:4px 8px}.city .section-head h1{font-size:12px}
 .story-layout .clock{padding:8px 10px 6px}
 .clock-head{flex-wrap:wrap;justify-content:space-between}
 .clock-head>div:first-child{gap:7px;flex-wrap:wrap}
 .clock-head b{font-size:11px}.clock-actions button{padding:5px 8px;font-size:11px}
 .elapsed-clock small{font-size:8px}.elapsed-clock strong{font-size:15px}
 .clock .progress{margin:7px 0 3px}
 .story-layout .diary{min-height:250px!important;margin:6px auto 8px;width:calc(100% - 12px);border-radius:12px}
 .diary-header{padding:9px 11px!important}.diary-header h2{font-size:21px}.new-first{font-size:10px}
 .feed-filters{padding:6px 10px}.feed-filters label{font-size:10px}.feed-filters select{padding:6px 8px}
 .feed{padding:8px 9px 18px}.entry.episode{padding:10px 12px;margin-bottom:8px}
 .entry h3{font-size:18px}.entry p{font-size:12px}.entry .meta{font-size:9px}
 .welcome-audio{font-size:11px}
 .choice-card{padding:16px!important;max-height:89dvh}
 .choice-card h2{font-size:24px}.choice-card p{line-height:1.5}
 .choice-option{padding:10px 12px;font-size:12px}
}
@media(max-height:650px){.story-layout .city{height:145px!important;min-height:145px!important;flex-basis:145px!important}.story-layout .diary{min-height:215px!important}.story-layout .clock{padding:5px 12px}.clock .days{display:none}}

.choice-backdrop[hidden]{display:none!important}

/* 0.9: embedded Tytopia soundtrack; no upload controls. */
.audio-panel .audio-note{font-size:13px;line-height:1.6;color:#657a6c;margin:8px 0 12px}
.track-status{font-size:12px;line-height:1.5;padding:10px 12px;background:#f4f5ec;border-radius:8px;color:#516d5c;overflow-wrap:anywhere;margin:8px 0}
.track-controls{display:flex;gap:8px;align-items:stretch;margin:12px 0}
.track-controls button{flex:1;min-width:0;font-size:13px;padding:11px 10px}
.volume-label{display:flex;justify-content:space-between;gap:8px}
.welcome-card .track-status{margin:7px 0 12px;padding:7px 9px}




/* v0.10: reading-first layout and proportional city art. */
:root{--header-h:52px;--city-h:158px;--journal-width:1180px}
html,body{height:100%;overflow:hidden}
body{margin:0}
header{height:var(--header-h)!important;min-height:var(--header-h)!important;max-height:var(--header-h)!important;padding:6px clamp(10px,2vw,24px)!important;gap:9px;flex-wrap:nowrap!important}
.brand{gap:8px}.brand strong{font-size:20px;line-height:1.1}.brand small{display:none}.cookie{width:34px;height:34px;font-size:22px}
.tools{gap:6px;align-items:center}.tools button{padding:7px 10px;font-size:11px;white-space:nowrap}
.story-layout{height:calc(100dvh - var(--header-h))!important;min-height:0!important;overflow:hidden!important}
.story-layout .city{height:var(--city-h)!important;min-height:var(--city-h)!important;flex:0 0 var(--city-h)!important;background:#cfe6d0!important}
.story-layout .city .map{height:100%!important;overflow:hidden!important}
.story-layout .city .map svg.panorama-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.story-layout .city .map svg#citySVG{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:fill!important;z-index:1;mask-image:none!important;-webkit-mask-image:none!important}
.city .section-head{z-index:4!important;left:12px;top:8px;padding:4px 9px!important}.city .section-head h1{font-size:13px!important}
.story-layout .clock{padding:5px clamp(11px,2vw,26px) 3px!important;flex:0 0 auto;box-shadow:none}
.clock-head{min-height:30px;gap:10px}.clock-head b{font-size:12px}.clock-head>div:first-child{gap:10px}
.clock-head #status{display:none!important}.clock-actions{gap:5px}.clock-actions button{padding:5px 8px;font-size:11px;border-radius:7px}
.elapsed-clock{min-width:unset;padding:4px 9px;border-radius:7px;display:flex;align-items:center;gap:5px}
.elapsed-clock small{display:inline;font-size:9px;line-height:1.2}.elapsed-clock strong{font-size:14px;line-height:1.1}
.clock .progress{height:5px;margin:4px 0 2px}.clock .days{font-size:9px;line-height:12px}
.story-layout .diary{flex:1;min-height:0!important;margin:4px auto 5px!important;width:min(var(--journal-width),calc(100% - 14px))!important;max-width:none;border-radius:11px;overflow:hidden;height:auto!important}
.diary-header{padding:6px 12px!important;min-height:46px!important;display:flex;align-items:center;gap:10px;justify-content:space-between}
.diary-header h2{font-size:21px!important;margin:0;line-height:1.1}.diary-header .eyebrow{display:none}.diary-header .new-first{display:none}
.diary-header .feed-filters{display:flex;align-items:center;gap:6px;margin-left:auto;padding:0!important;background:transparent;border:0!important;min-width:0;flex:0 1 auto}
.diary-header .feed-filters label{font-size:11px;white-space:nowrap;color:#857b70}
.diary-header .feed-filters select{width:175px;max-width:100%;padding:6px 10px!important;font-size:12px;min-height:31px}
.diary-header .feed-filters #newEvents{font-size:11px;padding:6px 8px}
.feed{padding:7px clamp(8px,2vw,18px) 18px!important;overflow-y:auto;flex:1;min-height:0!important;scrollbar-gutter:stable}
.entry.episode{margin-bottom:6px!important;padding:9px 12px 9px!important;border-radius:9px}
.entry .meta{font-size:10px}.entry h3{font-size:18px;line-height:1.2;margin:4px 0!important}.entry p{font-size:13.5px;line-height:1.43!important}.entry .episode-person{margin:3px 0 1px;font-size:10px}.entry .choice{margin:4px 0;font-size:11px}
.diary-footer{padding:4px 12px!important;min-height:36px;font-size:11px}.diary-footer button{padding:5px 10px;font-size:11px;border-radius:8px}
@media(max-width:900px){:root{--city-h:148px}.story-layout .city{height:var(--city-h)!important;min-height:var(--city-h)!important;flex:0 0 var(--city-h)!important}.clock-head .elapsed-clock small{display:none}.diary-header .feed-filters label{display:none}}
@media(max-width:550px){
 :root{--header-h:53px;--city-h:132px}
 header{flex-wrap:nowrap!important;align-items:center!important;padding:5px 9px!important;gap:6px}
 .brand{gap:6px;min-width:0}.cookie{width:27px;height:27px;font-size:18px;flex-shrink:0}.brand strong{font-size:16px;white-space:nowrap}.brand small{display:none}
 .tools{flex-shrink:0;gap:3px}.tools button{font-size:0!important;padding:5px 7px!important;min-width:28px;min-height:29px}
 #soundBtn::after{content:'♫';font-size:16px}#fatesBtn::after{content:'♡';font-size:16px}#treeBtn::after{content:'♧';font-size:16px}#helpBtn{font-size:14px!important}
 .story-layout{min-height:0!important;height:calc(100dvh - var(--header-h))!important}
 .story-layout .city{height:var(--city-h)!important;min-height:var(--city-h)!important;flex:0 0 var(--city-h)!important}
 .city .section-head{top:5px;left:6px;padding:3px 6px!important}.city .section-head h1{font-size:11px!important}
 .story-layout .clock{padding:5px 7px 4px!important}
 .clock-head{gap:4px;min-height:25px;flex-wrap:nowrap!important}
 .clock-head>div:first-child{gap:5px;flex-wrap:nowrap!important;min-width:0}
 .clock-head b{font-size:10px;white-space:normal;line-height:1.15}
 .clock-actions{gap:3px;flex-shrink:0}.clock-actions button{padding:4px 5px;font-size:10px}
 .elapsed-clock{padding:3px 5px;min-width:unset}.elapsed-clock strong{font-size:12px}.elapsed-clock small{display:none}
 .clock .progress{margin:5px 0 2px}.clock .days{font-size:9px}
 .story-layout .diary{min-height:0!important;width:calc(100% - 8px)!important;margin:4px auto 4px!important;border-radius:8px}
 .diary-header{min-height:42px!important;padding:5px 9px!important;gap:6px}.diary-header h2{font-size:17px!important;white-space:nowrap}
 .diary-header .feed-filters select{width:130px;max-width:130px;font-size:11px;padding:5px 7px!important;min-height:29px}
 .diary-header .feed-filters #newEvents{position:absolute;top:35px;right:8px;z-index:5;background:#edf2e8}
 .feed{padding:7px 6px 18px!important}
 .entry.episode{padding:9px 10px!important;margin-bottom:6px!important}
 .entry h3{font-size:17px}.entry p{font-size:13px;line-height:1.43!important}.entry .meta{font-size:9px}
 .diary-footer{padding:4px 8px!important;min-height:32px}.diary-footer button{padding:4px 7px;font-size:10px}
}
@media(max-height:640px){:root{--city-h:112px}.story-layout .city{height:var(--city-h)!important;min-height:var(--city-h)!important;flex:0 0 var(--city-h)!important}.clock .days{display:none}.diary-header{min-height:39px!important}}
@media(prefers-reduced-motion:reduce){.entry{animation:none!important}}
/* The SVG occupies only its own true aspect-ratio footprint. The fade follows the image edges, not the viewport edges. */
.story-layout .city .map svg#citySVG{width:100%!important;left:0!important;right:auto!important;transform:none!important;max-width:none!important;-webkit-mask-image:none!important;mask-image:none!important}
.diary-header{position:relative}





/* v0.11: autoplay helpers, test reset button and cleaner town art. */
.clock-actions #resetBtn{background:#f4ede3;border-color:#d7c7b3;color:#6f5d4f}
.clock-actions #resetBtn:hover{background:#efe4d3}
.audio-panel label{display:block;margin:8px 0 4px}
.audio-panel .audio-divider{border:0;border-top:1px solid rgba(120,104,87,.16);margin:10px 0}
.audio-panel .microcopy{font-size:12px;line-height:1.45;color:#7b6f64;margin:6px 0 0}
.audio-panel .track-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.audio-panel .track-controls button{min-width:150px}
.audio-panel .sfx-preview{font-size:12px;padding:6px 10px;border-radius:8px}
#notifyVolumeValue{font-variant-numeric:tabular-nums}
#citySVG .label-chip rect{fill:#fff3d5;stroke:#a88b6d;stroke-width:2}
#citySVG .label-chip text{font-family:Georgia,serif;font-size:16px;font-weight:700;fill:#896c55}
#citySVG .street-name{text-transform:uppercase;letter-spacing:.06em;font:700 13px sans-serif;fill:#7f745d;opacity:.92}
#citySVG .lot-tree{opacity:.98}
#citySVG .stop-glass{fill:#dff2ee;fill-opacity:.75;stroke:#8ea59a;stroke-width:2}
#citySVG .stop-wood{fill:#c89f7c;stroke:#8f705a;stroke-width:2}
#citySVG .road-mark{stroke:#d6c89e;stroke-width:3.2;stroke-dasharray:10 18;stroke-linecap:round;opacity:.8}
#citySVG .pocket-park{fill:#dce9c5;stroke:#a9b28d;stroke-width:2}
#citySVG .bench{fill:#b88867;stroke:#8b6e58;stroke-width:2}
#citySVG .lamp{stroke:#857760;stroke-width:3.1;stroke-linecap:round}
#citySVG .curb{stroke:#9d8e73;stroke-width:2.4;fill:none;opacity:.9}
#citySVG .sidewalk{fill:#ecdfbd;stroke:#b1a17a;stroke-width:2}
#citySVG .road{fill:#9ea08b;stroke:#786f5f;stroke-width:3}
#citySVG .road-edge{fill:#d8c9a8;stroke:#a69672;stroke-width:2}
#citySVG .lot-fill{fill:#d6e6c4;stroke:#b1b98c;stroke-width:2}
#citySVG .roof-a{fill:#e8af8c}
#citySVG .roof-b{fill:#79a190}
#citySVG .roof-c{fill:#8ab49d}
#citySVG .wall-a{fill:#f2ddbf}
#citySVG .wall-b{fill:#d7c8ae}
#citySVG .wall-c{fill:#c6dfca}
@media (max-width:550px){
 .clock-actions #resetBtn{padding:4px 5px;font-size:10px}
 .audio-panel .track-controls button{min-width:unset}
}




/* v0.12: one coherent city scene, no false oversized side houses or diagonal road. */
.story-layout .city{background:#d3eadc!important}
.story-layout .city .map{overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;scrollbar-color:#93a995 transparent;overscroll-behavior-x:contain;touch-action:pan-x}
.story-layout .city .map svg#citySVG{
  display:block!important;position:relative!important;left:0!important;right:auto!important;top:0!important;bottom:auto!important;
  width:max(100%,calc(var(--city-h) * 9.23077))!important;
  min-width:calc(var(--city-h) * 9.23077)!important;
  height:100%!important;
  min-height:0!important;
  max-width:none!important;
  transform:none!important;object-fit:contain!important;
  mask-image:none!important;-webkit-mask-image:none!important;
  background:#cfe8d6;
}
.story-layout .city .map svg.panorama-backdrop{display:none!important}
#citySVG .town-building{filter:drop-shadow(1px 3px 1.7px #78958133)}
#citySVG .town-tree{filter:drop-shadow(1px 2px 1px #8c9a7333)}
#citySVG #threadPaths .thread-line{stroke-width:3!important;opacity:.33!important;stroke-dasharray:4 7!important}
#citySVG .hero-pin {cursor:pointer}
#citySVG .hero-pin circle{filter:drop-shadow(0 1.5px 1px #42635252)}
#citySVG .hero-pin:focus-visible{outline:none}
.city .section-head{pointer-events:none}
.city::after {content:'← Листайте город →';position:absolute;right:10px;bottom:4px;z-index:5;color:#526f60;background:#fff9e3d4;font-size:10px;border-radius:7px;padding:2px 7px;pointer-events:none;display:none}
.reset-overlay{position:fixed;inset:0;background:#263f34a3;z-index:120;display:grid;place-items:center;padding:16px}
.reset-overlay[hidden]{display:none!important}
.reset-card{background:#fff9ed;border:2px solid #e4cda8;box-shadow:0 18px 60px #203b2e50;border-radius:20px;padding:28px;width:min(455px,100%)}
.reset-card h2{font-family:Georgia,serif;font-size:27px;font-weight:500;color:#4c705b;margin:10px 0}
.reset-card p{font-size:13px;line-height:1.55;color:#766f61}
.reset-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px;flex-wrap:wrap}
.reset-actions #resetConfirm{color:#fff;background:#a36d5d;border-color:#a36d5d}
.reset-actions #resetConfirm:hover{background:#8f584d}
@media (max-width:1000px){.city::after{display:block}}
@media (max-width:550px){.reset-card{padding:21px}.reset-actions button{flex:1}}




/* v0.13: unified street scene, minimal player-facing copy. */
:root{--city-h:174px}
.story-layout .city{height:var(--city-h)!important;min-height:var(--city-h)!important;flex:0 0 var(--city-h)!important;background:#d6ebdc!important}
.story-layout .city .map{width:100%;height:100%!important;overflow:hidden!important;background:#d6ebdc;touch-action:pan-x}
.story-layout .city .map svg#citySVG{
  display:block!important;
  position:relative!important;
  top:0!important;left:0!important;right:auto!important;bottom:auto!important;
  width:100%!important;height:100%!important;min-width:0!important;
  max-width:none!important;min-height:0!important;
  transform:none!important;object-fit:fill!important;
  mask-image:none!important;-webkit-mask-image:none!important;
  overflow:visible;
}
.city .section-head,.city::after,.city .map-caption,.city .map-bottom{display:none!important}
#citySVG .town-building{filter:drop-shadow(0 2px 1.6px #768e7640)}
#citySVG .town-greenhouse{filter:drop-shadow(0 2px 1.4px #67897739)}
#citySVG .town-tree{filter:drop-shadow(0 1px 1.1px #66886635)}
#citySVG #threadPaths .thread-line{stroke-width:2.7!important;opacity:.32!important;stroke-dasharray:5 7!important}
#citySVG .hero-pin{cursor:pointer}
#citySVG .hero-pin:focus-visible{outline:none}
/* Slimmer welcome: story first, no extra informational blocks. */
.welcome-card{gap:7px!important;padding:clamp(22px,3vw,34px)!important}
.welcome-card h2{margin:5px 0 8px!important;line-height:1.15}
.welcome-card>p{margin:8px 0!important;line-height:1.6}
.welcome-quote{padding:12px 17px!important;margin:9px 0!important;font-style:italic}
.welcome-hint{font-size:13px!important;color:#6d7a6e!important;margin:5px 0 9px!important}
.welcome-audio{margin-top:7px!important;padding:9px 11px!important}
.welcome-start{margin-top:9px!important}
.audio-panel{padding:18px!important}
.audio-panel h3{font-family:Georgia,serif;font-size:23px;font-weight:500;color:#54745e}
.audio-panel label{margin:10px 0 5px!important}
.audio-panel .track-controls{margin:7px 0!important}
.audio-panel .audio-divider{margin:14px 0 8px}
.audio-panel .microcopy{font-size:12px;line-height:1.45;color:#9b6a5c}
#choiceBackdrop .choice-card{max-width:610px}
@media(max-width:1550px){
 .story-layout .city .map{overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;scrollbar-width:none}
 .story-layout .city .map::-webkit-scrollbar{display:none}
 .story-layout .city .map svg#citySVG{width:max(100%,calc(var(--city-h) * 9.09091))!important;min-width:calc(var(--city-h) * 9.09091)!important}
}
@media(max-width:900px){:root{--city-h:148px}}
@media(max-width:550px){
 :root{--city-h:130px}
 .story-layout .city .map svg#citySVG{width:max(100%,calc(var(--city-h) * 9.09091))!important;min-width:calc(var(--city-h) * 9.09091)!important}
 .welcome-card{padding:21px 18px!important;gap:5px!important}
 .welcome-card h2{font-size:clamp(24px,7vw,31px)!important}
 .welcome-card>p{font-size:13px!important;line-height:1.5!important}
 .welcome-quote{font-size:13px!important;padding:10px 12px!important}
 .welcome-hint{font-size:12px!important}
 .audio-panel{right:8px;top:58px;width:calc(100vw - 16px)}
}
@media(max-height:650px){:root{--city-h:115px}}

/* Playback speed is now part of the visible time controls (v0.42). */


/* v0.34: scene uses the new approved pastel 4-state art at exact 1920×230 ratio. */
:root{--city-h:calc(100vw * 230 / 1920)}
.story-layout .city{
 width:100%!important;height:var(--city-h)!important;min-height:var(--city-h)!important;
 flex:0 0 var(--city-h)!important;position:relative!important;background:#d0e3d8!important
}
.story-layout .city .map{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;overflow:hidden!important;background:#c8dfdc!important}
.story-layout .city .map svg#citySVG{position:absolute!important;inset:0!important;left:0!important;top:0!important;transform:none!important;mask:none!important;-webkit-mask-image:none!important;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;object-fit:contain!important;overflow:hidden!important;display:block!important;}
.city .section-head,.city::after,.city .map-caption,.city .map-bottom{display:none!important}
#citySVG .hero-pin{cursor:pointer;filter:drop-shadow(0 1px 1px #26362e70)}
#citySVG #movingBus27{pointer-events:none}
.clock .progress{background:repeating-linear-gradient(to right,#d8e6d7 0,#d8e6d7 13.9%,#fffaf0 13.9%,#fffaf0 14.2857%)!important}
@media(max-width:900px){
 :root{--city-h:155px}
 .story-layout .city .map{overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x!important;scrollbar-width:none!important}
 .story-layout .city .map svg#citySVG{position:relative!important;inset:auto!important;left:0!important;top:0!important;width:calc(155px * 1920 / 230)!important;min-width:calc(155px * 1920 / 230)!important;max-width:none!important;height:155px!important}
}
@media(max-height:650px) and (min-width:901px){:root{--city-h:calc(100vw * 230 / 1920)}}



/* v0.39: pavement-constrained characters and ground-contact artwork. */
#citySVG #threadPaths,#citySVG #storyHotspots,
#citySVG #townLeaves27,#citySVG #townWater27{display:none!important}
#citySVG .hero-pin{cursor:pointer;transition:none!important;filter:none}
#citySVG .hero-pin .hero-nameplate{fill:#fffbf2;stroke:#cdbfb0;stroke-width:1.15;opacity:.97}
#citySVG .hero-pin .hero-name-text{font-family:Georgia,serif;font-size:14px;font-weight:600;fill:#546a58;stroke:none;user-select:none;pointer-events:none}
#citySVG .hero-pin:hover .hero-nameplate,
#citySVG .hero-pin:focus .hero-nameplate{fill:#fff4df;stroke:#b88c67;stroke-width:2}
#citySVG .hero-pin.active .hero-nameplate{fill:#fff0d9;stroke:var(--accent);stroke-width:2.4}
#citySVG .hero-pin.active .hero-name-text{fill:#365c48;font-weight:700}
#citySVG .hero-pin .hero-tap-area{fill:transparent;pointer-events:all}
#citySVG .hero-pin .hero-portrait{pointer-events:visiblePainted}
#citySVG .hero-pin:focus{outline:none}
@media(prefers-reduced-motion:reduce){#citySVG .hero-pin{transition:none!important}}



/* v0.39: all people grounded on the same pedestrian plane. */
#citySVG .hero-pin{filter:none!important;transform-box:view-box;transform-origin:0 0;}
#citySVG .hero-foot-shadow{fill:rgba(62,65,78,.23);pointer-events:none}
#citySVG .hero-nameplate{fill:#fffaf2;stroke:#c9bbab;stroke-width:1.05;opacity:.97}
#citySVG .hero-name-text{font-family:Georgia,serif;font-size:12.5px;font-weight:600;fill:#516958}
#citySVG .hero-pin.active .hero-nameplate{fill:#fff0d8;stroke:var(--accent);stroke-width:2.2}
#citySVG .hero-pin.active .hero-name-text{fill:#365c48}
@media (prefers-reduced-motion: reduce){#citySVG .hero-pin{transition:none!important}}



/* Эффект печеньки · Дизайн городской хроники (v0.41)
   Бумажный интерфейс, без карточной сетки и декоративных градиентов.
   Стили города, автобус, игровые персонажи и анимация суток не изменяются. */
:root {
  --header-h:62px;
  --journal-width:1088px;
  --ed-ink:#34483d;
  --ed-text:#4f574d;
  --ed-muted:#818478;
  --ed-muted-deep:#697467;
  --ed-green:#537862;
  --ed-green-dark:#365845;
  --ed-copper:#9f7054;
  --ed-sheet:#fffdf8;
  --ed-page:#eaece4;
  --ed-linen:#f8f5ec;
  --ed-clock:#f2efe6;
  --ed-line:#ddd8cc;
  --ed-line-light:#e8e3d9;
  --ed-serif:"Iowan Old Style","Baskerville","Palatino Linotype",Georgia,serif;
  --ed-sans:"Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;
  font-family:var(--ed-sans);
  background:var(--ed-page);
  color:var(--ed-text);
}
html,body{height:100%;overflow:hidden}
body{background:var(--ed-page)!important;color:var(--ed-text);font-family:var(--ed-sans);text-rendering:optimizeLegibility}
*{box-sizing:border-box}
h1,h2,h3,h4,p{font-kerning:normal}
h1,h2,h3,h4{text-wrap:balance}
p{text-wrap:pretty}
button,select,input{font-family:var(--ed-sans)}
button{border:1px solid var(--ed-line);border-radius:4px;background:transparent;color:var(--ed-ink);box-shadow:none;font-size:14px;font-weight:600;transition:background-color .25s cubic-bezier(.32,.72,0,1),color .25s cubic-bezier(.32,.72,0,1),border-color .25s cubic-bezier(.32,.72,0,1)}
button:hover{background:#f2eee4;color:var(--ed-green-dark)}
button:active{transform:translateY(1px)}
button:focus-visible,select:focus-visible,input:focus-visible,[role=button]:focus-visible{outline:2px solid #a87553!important;outline-offset:3px!important;box-shadow:none!important}
select:focus{border-color:#a87553!important}
[hidden]{display:none!important}
.skip-story{position:absolute;left:10px;top:-80px;z-index:201;padding:10px 16px;background:var(--ed-sheet);color:var(--ed-ink);font-size:14px}
.skip-story:focus{top:10px}
/* Навигация: одна сдержанная строка, без набора круглых чипов. */
header.app-header{height:var(--header-h)!important;min-height:var(--header-h)!important;max-height:var(--header-h)!important;padding:8px clamp(16px,3vw,44px)!important;display:flex;justify-content:space-between;align-items:center;gap:16px;background:var(--ed-linen)!important;border-bottom:1px solid #dad5c9!important;box-shadow:none!important;position:relative;z-index:4}
header.app-header .brand{display:flex;align-items:center;gap:12px;min-width:0}
header.app-header .brand strong{font-family:var(--ed-serif)!important;font-size:24px!important;font-weight:600!important;letter-spacing:-.035em;color:var(--ed-ink);line-height:1;white-space:nowrap}
header.app-header .brand small{display:block!important;font-size:11px;line-height:1.25;letter-spacing:.025em;color:#8d8576;margin-top:4px}
header.app-header .cookie{display:block;flex-shrink:0;width:37px;height:37px;background:transparent;color:inherit;border-radius:0;box-shadow:none;line-height:1}
header.app-header .cookie svg{display:block;width:37px;height:37px}
header.app-header .tools{display:flex;gap:2px;align-items:center;flex-shrink:0}
header.app-header .tools button{position:relative;border:0!important;border-radius:3px!important;background:transparent!important;box-shadow:none!important;color:#506356!important;font-size:13px!important;padding:9px 12px!important;min-height:36px;font-weight:600;white-space:nowrap;letter-spacing:0;transition:color .25s cubic-bezier(.32,.72,0,1),background-color .25s cubic-bezier(.32,.72,0,1)}
header.app-header .tools button:hover,header.app-header .tools button:focus-visible{background:#ede8dc!important;color:var(--ed-green-dark)!important}
header.app-header #helpBtn{font-size:14px!important;min-width:32px;padding:7px 10px!important}
header.app-header .tools #soundBtn::after,header.app-header .tools #fatesBtn::after,header.app-header .tools #treeBtn::after{content:none!important}
/* Панорама остаётся главным изображением и не получает фильтров. */
.story-layout{height:calc(100dvh - var(--header-h))!important;min-height:0!important;overflow:hidden!important;background:var(--ed-page)}
.story-layout .city{border-bottom:1px solid #cfd3c8!important;box-shadow:none!important;border-radius:0!important}
.story-layout .city .map{border-radius:0!important}
/* Время: полоса книги, а не отдельная панель аналитики. */
.story-layout .clock{background:var(--ed-clock)!important;box-shadow:none!important;border-top:0!important;border-bottom:1px solid #d8d6c9!important;padding:9px clamp(16px,3vw,44px) 8px!important}
.clock-head{min-height:32px!important;display:flex;align-items:center;gap:16px}
.clock-head>div:first-child{display:flex;align-items:center;gap:16px!important;flex-wrap:nowrap!important}
.clock-head b#date{font-size:14px!important;font-weight:600;letter-spacing:-.01em;white-space:nowrap;color:#435d4d}
.clock-head #status{display:none!important}
.clock-head .elapsed-clock{display:flex;align-items:center;gap:10px!important;min-width:unset!important;padding:0 0 0 16px!important;border-radius:0!important;border:0!important;border-left:1px solid #cbc8bc!important;background:transparent!important;box-shadow:none!important}
.clock-head .elapsed-clock small{display:inline!important;font-size:11px!important;letter-spacing:.01em;color:#8a8476;white-space:nowrap}
.clock-head .elapsed-clock strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace!important;font-size:17px!important;line-height:1.2;color:var(--ed-green-dark);font-weight:600;letter-spacing:.015em;font-variant-numeric:tabular-nums}
.clock-actions{display:flex;gap:6px!important;margin-left:auto;align-items:center}
.clock-actions button,.clock-actions #resetBtn{background:transparent!important;border:0!important;border-radius:3px!important;color:#627363!important;padding:7px 10px!important;box-shadow:none;font-size:12px!important;line-height:1.1;font-weight:600}
.clock-actions button:hover,.clock-actions #resetBtn:hover{background:#e3e4d8!important;color:#365745!important}
.clock .progress,.clock .progress{height:5px!important;margin:8px 0 3px!important;border-radius:0!important;background:#d5d8cc!important;overflow:hidden!important}
.clock .progress>div,.clock .progress>div{height:100%;background:#7e9d85!important;border-radius:0!important;transition:width .18s linear!important}
.clock .days{font-family:var(--ed-sans);font-size:11px!important;line-height:14px!important;letter-spacing:0;color:#888a7e}
.clock .days span{font-size:11px!important}
/* Один книжный лист, а не колода AI карточек. */
.story-layout .diary{background:var(--ed-sheet)!important;border:1px solid #d8d0c1!important;border-radius:4px!important;box-shadow:none!important;width:min(var(--journal-width),calc(100% - 48px))!important;margin:12px auto 14px!important;min-height:0!important;flex:1;overflow:hidden!important}
.diary-header{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:19px 28px 17px!important;min-height:94px!important;background:var(--ed-sheet)!important;border-bottom:1px solid var(--ed-line)!important;position:relative}
.diary-header>div:first-child{min-width:0}
.diary-header .eyebrow{display:block!important;font-family:var(--ed-sans)!important;font-size:10px!important;line-height:1.3;letter-spacing:.15em;text-transform:uppercase;color:var(--ed-copper);font-weight:600;margin-bottom:5px}
.diary-header h2{font-family:var(--ed-serif)!important;font-size:30px!important;font-weight:600!important;line-height:1.1!important;letter-spacing:-.035em!important;color:var(--ed-ink)!important;margin:0!important;white-space:nowrap}
.diary-header .new-first{display:none!important}
.diary-header .feed-filters{display:flex;align-items:center;gap:12px;margin-left:auto;padding:0!important;min-width:0;flex:0 1 auto;border:none!important;background:transparent!important}
.diary-header .feed-filters label{display:block!important;font-size:12px!important;font-weight:500;white-space:nowrap;color:var(--ed-muted-deep)}
.diary-header .feed-filters select{font-size:13px!important;color:var(--ed-ink)!important;background:#fffcf6!important;border:1px solid #d8d2c7!important;border-radius:3px!important;min-width:155px;max-width:210px;width:175px!important;min-height:36px!important;padding:7px 32px 7px 11px!important;box-shadow:none!important;cursor:pointer}
.diary-header #newEvents{background:var(--ed-green)!important;color:#fff!important;border:0!important;border-radius:3px!important;padding:9px 11px!important;font-size:12px!important;white-space:nowrap}
.diary-header #newEvents:hover{background:var(--ed-green-dark)!important}
/* Непрерывная, читаемая хронология: дата в поле, текст на странице. */
.story-layout .diary .feed{flex:1;min-height:0!important;overflow-y:auto;overscroll-behavior:contain;padding:0 28px 26px!important;scrollbar-color:#cec7b8 transparent;scrollbar-width:thin;scroll-behavior:auto}
.feed:empty::before{content:'Здесь пока тихо.';display:block;padding:38px 2px;font-family:var(--ed-serif);font-size:19px;color:#a09d91}
.story-layout .diary .feed .entry.episode{position:relative;display:grid;grid-template-columns:174px minmax(0,1fr);column-gap:24px;align-content:start;background:transparent!important;border:0!important;border-bottom:1px solid var(--ed-line-light)!important;border-radius:0!important;outline:none!important;box-shadow:none!important;margin:0!important;padding:18px 7px 19px!important;color:var(--ed-text);transition:background-color .25s cubic-bezier(.32,.72,0,1);animation:editorialIn .32s cubic-bezier(.32,.72,0,1) both}
.story-layout .diary .feed .entry.episode:first-child{padding-top:19px!important}
.story-layout .diary .feed .entry.episode:last-child{border-bottom:0!important}
.story-layout .diary .feed .entry.episode:hover{background:#fcfaf4!important}
.story-layout .diary .feed .entry.episode.episode-choice{background:#faf7ee!important}
.story-layout .diary .feed .entry.episode.episode-choice:hover{background:#f6f1e5!important}
.story-layout .diary .feed .entry.episode.episode-crossing{background:#f8f6f1!important}
.story-layout .diary .feed .entry.episode .meta{grid-column:1;grid-row:1/span 5;align-self:start;display:flex;flex-direction:column;align-items:flex-start;gap:6px;color:#8a897c!important;font-size:12px!important;font-weight:500!important;letter-spacing:0;line-height:1.45!important;padding:3px 10px 0 0;text-wrap:pretty}
.story-layout .diary .feed .entry.episode .meta span:first-child{white-space:normal!important;color:#888579!important;font-weight:500!important}
.story-layout .diary .feed .entry.episode .meta span:last-child:not(:first-child){white-space:normal!important;color:var(--ed-copper)!important;letter-spacing:.09em;text-transform:uppercase;font-weight:700!important;font-size:10px!important}
.story-layout .diary .feed .entry.episode .episode-person{grid-column:2;display:flex;align-items:center;gap:8px;font-family:var(--ed-sans)!important;font-size:12px!important;letter-spacing:.015em!important;text-transform:none!important;color:#6b7369!important;margin:0 0 4px!important;line-height:1.3;font-weight:600!important}
.entry.episode .episode-person::before{content:'';display:inline-block;flex:none;width:7px;height:7px;border-radius:2px;background:var(--entry,#879a89);opacity:.9}
.story-layout .diary .feed .entry.episode h3{grid-column:2;font-family:var(--ed-serif)!important;font-size:22px!important;line-height:1.24!important;letter-spacing:-.018em!important;font-weight:600!important;color:var(--ed-ink)!important;margin:0 0 6px!important;text-wrap:balance}
.story-layout .diary .feed .entry.episode p{grid-column:2;max-width:75ch;margin:0!important;font-family:var(--ed-sans);color:var(--ed-text)!important;font-size:15px!important;line-height:1.6!important;font-weight:400!important;letter-spacing:0;text-wrap:pretty}
.story-layout .diary .feed .entry.episode .choice{grid-column:2;font-size:13px!important;font-weight:600!important;color:var(--ed-copper)!important;margin:0 0 7px!important;line-height:1.45}
.story-layout .diary .feed .entry.episode .choice::before{content:'↳ ';color:#b78b67}
.story-layout .diary .feed .entry.episode details{display:none!important}
@keyframes editorialIn{from{opacity:.25;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.diary-footer{border-top:1px solid var(--ed-line)!important;background:var(--ed-sheet);padding:9px 27px!important;min-height:42px!important;display:flex;align-items:center;justify-content:space-between;color:#939086;font-size:12px!important}
.diary-footer #exportBtn{padding:2px 0!important;background:transparent!important;border:0!important;border-radius:0!important;color:var(--ed-green)!important;text-decoration:underline;text-decoration-color:#bdcbbb;text-underline-offset:4px;font-size:12px!important;font-weight:600}
.diary-footer #exportBtn:hover{text-decoration-color:var(--ed-green)!important}
/* Драматургический выбор как аккуратная страница книги. */
.choice-backdrop,.welcome-overlay,.fates-overlay,.end-overlay,.tree-overlay,.reset-overlay{background:rgba(36,53,44,.70)!important;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);padding:20px!important}
.choice-backdrop{display:grid!important;place-items:center!important;z-index:51!important}
.choice-card,.welcome-card,.end-card,.tree-card,.fates-card,.reset-card{background:var(--ed-sheet)!important;border:1px solid #d7cbb8!important;border-radius:6px!important;box-shadow:0 22px 56px rgba(32,46,34,.24)!important;transform:none!important}
.choice-card{width:min(660px,calc(100vw - 28px))!important;max-height:92dvh!important;overflow-y:auto!important;padding:32px clamp(22px,3.4vw,42px)!important;overscroll-behavior:contain}
.eyebrow,#choiceEyebrow{font-family:var(--ed-sans);font-size:11px!important;font-weight:650!important;letter-spacing:.13em!important;color:var(--ed-copper)!important;text-transform:uppercase}
.choice-card h2,.end-card h2,.tree-card h2,.fates-card h2,.reset-card h2{font-family:var(--ed-serif)!important;font-size:32px!important;line-height:1.14!important;letter-spacing:-.035em!important;font-weight:600!important;color:var(--ed-ink)!important;margin:12px 0 16px!important}
.choice-card>p,.end-card>p,.tree-card>p,.fates-card>p,.reset-card p{font-size:16px!important;line-height:1.65!important;color:var(--ed-text)!important;margin:0 0 12px}
.choice-card .choice-history{padding:0!important;background:transparent!important;border-radius:0!important;font-size:13px!important;line-height:1.5!important;color:#817d6d!important;margin:16px 0 8px!important}
#choiceButtons{margin-top:16px}
#choiceButtons .choice-option{display:block!important;position:relative;width:100%;min-height:48px;margin:0!important;padding:14px 38px 14px 10px!important;border:0!important;border-top:1px solid var(--ed-line)!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;text-align:left;font-family:var(--ed-sans)!important;font-size:15px!important;line-height:1.45!important;font-weight:500!important;color:var(--ed-ink)!important;transition:background-color .28s cubic-bezier(.32,.72,0,1),padding-left .28s cubic-bezier(.32,.72,0,1)}
#choiceButtons .choice-option:last-child{border-bottom:1px solid var(--ed-line)!important}
#choiceButtons .choice-option::after{content:'›';position:absolute;right:10px;top:50%;transform:translateY(-55%);font-family:var(--ed-serif);font-size:24px;color:#9e9e8c;font-weight:400}
#choiceButtons .choice-option:hover,#choiceButtons .choice-option:focus-visible{background:#f3eee2!important;padding-left:16px!important;color:#294d3a!important}
/* Пролог: никаких декоративных гигантских кругов и «облаков». */
.welcome-overlay{z-index:62!important}
.welcome-card{width:min(620px,100%)!important;gap:0!important;padding:clamp(25px,3.8vw,46px)!important;text-align:left;overflow-y:auto;position:relative;max-height:94dvh!important}
.welcome-card::after{display:none!important}
.welcome-symbol{display:grid;width:40px;height:40px;margin:0 0 20px!important;background:transparent!important;box-shadow:none!important;border:1px solid #d8cbb7;border-radius:50%!important;color:var(--ed-copper)!important;font-size:24px!important;place-items:center}
.welcome-card .eyebrow{font-size:11px!important;color:var(--ed-copper)!important;margin:0 0 12px!important}
.welcome-card h2{font-family:var(--ed-serif)!important;font-size:clamp(30px,4vw,40px)!important;line-height:1.14!important;letter-spacing:-.035em!important;font-weight:600!important;color:var(--ed-ink)!important;margin:0 0 22px!important;max-width:14em}
.welcome-card>p{font-size:16px!important;line-height:1.65!important;color:var(--ed-text)!important;margin:0 0 20px!important;max-width:56ch}
.welcome-card .welcome-quote{font-family:var(--ed-serif)!important;font-size:19px!important;line-height:1.5!important;font-style:normal!important;color:#657765!important;border:0!important;border-top:1px solid var(--ed-line)!important;border-bottom:1px solid var(--ed-line)!important;padding:18px 0!important;margin:0 0 18px!important;background:transparent!important;border-radius:0!important;max-width:100%}
.welcome-card .welcome-audio{display:flex;align-items:center;gap:10px;margin:2px 0 20px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;font-size:14px!important;font-weight:500!important;color:#576758!important}
.welcome-card .welcome-audio input{accent-color:var(--ed-green);width:16px;height:16px}
.welcome-card .welcome-start{align-self:flex-start;min-height:48px!important;background:var(--ed-green)!important;color:#fffaf0!important;border:1px solid var(--ed-green)!important;border-radius:4px!important;padding:12px 23px!important;font-size:15px!important;font-weight:600;box-shadow:none!important;transition:background-color .28s cubic-bezier(.32,.72,0,1),transform .28s cubic-bezier(.32,.72,0,1)}
.welcome-card .welcome-start:hover{background:var(--ed-green-dark)!important}
.welcome-card .welcome-start:active{transform:translateY(1px)}
/* Остальные игровые экраны используют те же бумагу, шрифты и иерархию. */
.panel{position:fixed;z-index:40;right:clamp(12px,3vw,44px);top:70px;width:min(360px,calc(100vw - 24px));padding:22px!important;background:var(--ed-sheet)!important;border:1px solid #d7cbb8!important;border-radius:5px!important;box-shadow:0 16px 42px rgba(32,46,34,.19)!important;color:var(--ed-text)}
.panel-title{align-items:center;gap:16px;border-bottom:1px solid var(--ed-line);padding-bottom:12px;margin-bottom:16px}
.panel-title h3,.panel-title h2{font-family:var(--ed-serif)!important;font-size:25px!important;color:var(--ed-ink)!important;font-weight:600!important;margin:0!important}
.panel-title button{border:0!important;border-radius:2px!important;padding:5px 10px;font-size:20px;font-weight:400!important}
.panel label{font-size:14px!important;color:var(--ed-ink)!important;margin:16px 0 7px!important}
.panel input[type=range]{accent-color:var(--ed-green)}
.panel input[type=checkbox]{accent-color:var(--ed-green)}
.panel .volume-label{font-size:13px!important;color:var(--ed-muted-deep)!important}
.panel .track-controls button{font-size:13px!important;min-height:38px}
.panel .audio-divider{border:0;border-top:1px solid var(--ed-line);margin:19px 0 10px}
.end-card,.tree-card,.fates-card,.reset-card{padding:clamp(23px,4vw,38px)!important;max-height:92dvh!important;overflow-y:auto}
.end-card{width:min(720px,100%)}
.tree-card,.fates-card{width:min(1000px,100%)}
.reset-card{width:min(500px,100%)}
.end-card .end-people,.fates-list{gap:0!important}
.end-person,.fate-card{border:0!important;border-bottom:1px solid var(--ed-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:16px 12px!important}
.fate-card h3,.end-person strong{font-family:var(--ed-serif)!important;font-size:19px!important;color:var(--ed-ink)!important}
.fate-card p,.end-person p{font-size:14px!important;line-height:1.55!important}
.end-actions{margin-top:20px}
.end-actions button,.reset-actions button{font-size:14px!important;border-radius:4px!important}
.end-actions button:first-child,#resetConfirm{background:var(--ed-green)!important;color:white!important;border-color:var(--ed-green)!important}
.end-actions button:first-child:hover,#resetConfirm:hover{background:var(--ed-green-dark)!important}
.tree-tabs{gap:4px}
.tree-tabs button{border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;font-size:13px!important;background:transparent!important}
.tree-tabs button.selected{background:transparent!important;color:var(--ed-green-dark)!important;border-bottom-color:var(--ed-green)!important}
.tree-beat,.tree-node{background:var(--ed-sheet)!important;border:1px solid var(--ed-line)!important;border-radius:3px!important;box-shadow:none!important}
.tree-beat{border-top:2px solid var(--fate)!important}
.tree-beat strong,.tree-node strong{font-family:var(--ed-serif)!important;color:var(--ed-ink)!important}
/* Smaller screens: keep the city panoramic, give reading the remaining height. */
@media(max-width:900px){
  :root{--header-h:58px;--city-h:150px}
  header.app-header{padding:6px 16px!important}
  header.app-header .brand strong{font-size:21px!important}
  header.app-header .brand small{display:none!important}
  .story-layout .diary{width:calc(100% - 24px)!important;margin:8px auto 10px!important}
  .diary-header{padding:15px 20px!important;min-height:75px!important}
  .diary-header h2{font-size:25px!important}
  .story-layout .diary .feed{padding:0 17px 20px!important}
  .story-layout .diary .feed .entry.episode{grid-template-columns:130px minmax(0,1fr);gap:0 14px;padding:15px 3px 16px!important}
  .story-layout .diary .feed .entry.episode h3{font-size:20px!important}
  .story-layout .diary .feed .entry.episode p{font-size:14px!important}
  .diary-header .feed-filters label{display:none!important}
}
@media(max-width:550px){
  :root{--header-h:56px;--city-h:134px}
  header.app-header{padding:6px 11px!important;gap:6px!important}
  header.app-header .brand{gap:7px!important}
  header.app-header .brand strong{font-size:18px!important;letter-spacing:-.04em}
  header.app-header .cookie,header.app-header .cookie svg{width:29px;height:29px}
  header.app-header .tools{gap:0!important}
  header.app-header .tools button{font-size:0!important;padding:6px 8px!important;min-width:32px;min-height:34px}
  header.app-header .tools button#soundBtn::after{content:'♫'!important;font-size:19px!important}
  header.app-header .tools button#fatesBtn::after{content:'♡'!important;font-size:19px!important}
  header.app-header .tools button#treeBtn::after{content:'♧'!important;font-size:18px!important}
  header.app-header .tools button#helpBtn{font-size:16px!important;padding:6px 9px!important}
  .story-layout{height:calc(100dvh - var(--header-h))!important}
  .story-layout .clock{padding:7px 10px 6px!important}
  .clock-head{min-height:30px!important;gap:4px!important}
  .clock-head>div:first-child{gap:8px!important;min-width:0;flex-wrap:nowrap!important}
  .clock-head b#date{font-size:11px!important;white-space:normal;line-height:1.3;max-width:134px}
  .clock-head .elapsed-clock{padding-left:8px!important;border-left:1px solid #cbc8bc!important}
  .clock-head .elapsed-clock small{display:none!important}
  .clock-head .elapsed-clock strong{font-size:13px!important}
  .clock-actions{gap:2px!important}
  .clock-actions button,.clock-actions #resetBtn{font-size:11px!important;padding:6px 5px!important}
  .clock .progress{margin:6px 0 2px!important}
  .clock .days,.clock .days span{font-size:10px!important}
  .story-layout .diary{width:calc(100% - 12px)!important;margin:6px auto 7px!important}
  .diary-header{padding:12px 14px 12px!important;min-height:70px!important;gap:8px}
  .diary-header .eyebrow{font-size:9px!important;margin-bottom:4px}
  .diary-header h2{font-size:22px!important}
  .diary-header .feed-filters{gap:4px!important}
  .diary-header .feed-filters select{min-width:0!important;width:112px!important;max-width:112px!important;font-size:12px!important;padding:7px 20px 7px 8px!important;min-height:34px!important}
  .diary-header .feed-filters #newEvents{position:absolute;right:8px;top:65px;z-index:5}
  .story-layout .diary .feed{padding:0 13px 20px!important}
  .story-layout .diary .feed .entry.episode{display:flex;flex-direction:column;gap:0;padding:13px 2px 16px!important}
  .story-layout .diary .feed .entry.episode .meta{display:flex;flex-direction:row;align-items:center;gap:12px;padding:0 0 6px!important;font-size:11px!important;flex-wrap:wrap}
  .story-layout .diary .feed .entry.episode .episode-person{font-size:11px!important;margin:0 0 4px!important}
  .story-layout .diary .feed .entry.episode h3{font-size:20px!important;margin:1px 0 6px!important}
  .story-layout .diary .feed .entry.episode p{font-size:14px!important;line-height:1.55!important}
  .story-layout .diary .feed .entry.episode .choice{font-size:12px!important}
  .diary-footer{padding:8px 13px!important;min-height:38px!important}
  .choice-card{padding:24px 20px!important}
  .choice-card h2,.end-card h2,.tree-card h2,.fates-card h2,.reset-card h2{font-size:27px!important}
  .choice-card>p,.end-card>p,.tree-card>p,.fates-card>p,.reset-card p{font-size:14px!important}
  .welcome-card{padding:26px 21px!important}
  .welcome-card h2{font-size:32px!important}
  .welcome-card>p{font-size:14px!important}
  .welcome-card .welcome-quote{font-size:16px!important;padding:15px 0!important}
  .panel{top:60px;right:8px;width:calc(100vw - 16px)!important}
  .fates-list,.end-people{grid-template-columns:1fr!important}
}
@media(max-width:360px){
  header.app-header .brand strong{font-size:16px!important}
  header.app-header .tools button{padding:6px 6px!important;min-width:28px}
  .diary-header h2{font-size:20px!important}
  .diary-header .feed-filters select{max-width:94px!important;width:94px!important}
}
@media(max-height:640px){
  .story-layout .city{height:112px!important;min-height:112px!important;flex-basis:112px!important}
  .story-layout .clock{padding:4px 12px!important}
  .clock .days{display:none!important}
  .diary-header{min-height:60px!important;padding-top:10px!important;padding-bottom:10px!important}
}
@media(prefers-reduced-motion:reduce){
  .story-layout .diary .feed .entry.episode{animation:none!important;transition:none!important}
  button,#choiceButtons .choice-option{transition:none!important}
}
/* The final actions remain visible while the five endings are read. */
.end-card{display:flex!important;flex-direction:column!important;overflow:hidden!important}
.end-card .end-people{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;scrollbar-color:#d1c8b8 transparent;scrollbar-width:thin}
.end-card .end-actions{flex:0 0 auto;margin-top:12px!important;padding-top:14px;border-top:1px solid var(--ed-line);background:var(--ed-sheet)}
.end-card #videoStatus{flex:0 0 auto;margin:5px 0 0!important;font-size:12px!important}
.tree-rail{grid-template-columns:repeat(auto-fit,minmax(202px,1fr))!important;gap:12px!important}
.tree-beat{min-height:158px!important;padding:15px 12px!important}
.tree-beat small,.tree-beat .tree-alternatives{font-size:12px!important;line-height:1.4!important}
.tree-beat strong{font-size:17px!important;line-height:1.25}
@media(max-width:550px){
  .diary-header h2{font-size:21px!important}
  .diary-header .feed-filters select{width:121px!important;max-width:121px!important}
  .tree-rail{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .tree-beat{padding:10px!important}
  .end-card .end-actions{gap:7px!important}
  .end-card .end-actions button{flex:1 1 100%!important}
}
@media(max-width:350px){.diary-header h2{font-size:19px!important}}




/* v0.42: compact transport controls + editorial diary focus. */
:root{--header-h:56px;--journal-width:1180px}
header.app-header{height:var(--header-h)!important;min-height:var(--header-h)!important;max-height:var(--header-h)!important;padding-block:5px!important}
.story-layout{height:calc(100dvh - var(--header-h))!important}
/* Timeline is a SINGLE compact row: date / weekly track / controls. */
.story-layout .clock{padding:5px clamp(12px,2.5vw,34px)!important}
.story-layout .clock .clock-head{
 display:grid!important;grid-template-columns:minmax(200px,max-content) minmax(170px,1fr) max-content;
 gap:clamp(14px,2.8vw,42px)!important;align-items:center;min-height:40px!important;
}
.clock-head .clock-primary{display:flex!important;align-items:center;gap:11px!important;white-space:nowrap;min-width:0}
.clock-head .date-label{font-size:12px!important;font-weight:650;white-space:nowrap}
.clock-head #dateShort{display:none}
.clock-head .elapsed-clock{padding:0 0 0 11px!important;gap:6px!important}
.clock-head .elapsed-clock small{font-size:10px!important}
.clock-head .elapsed-clock strong{font-size:15px!important}
.clock-weekline{display:flex;flex-direction:column;justify-content:center;min-width:100px;align-self:stretch;padding-top:4px}
.clock-weekline .progress{width:100%;margin:0 0 5px!important;height:6px!important}
.clock-weekline .days{width:100%;display:flex!important;font-size:10px!important;line-height:12px!important;justify-content:space-between}
.clock-weekline .days span{font-size:10px!important;color:#838a7e}
.clock-weekline .days span.today{color:#38694f!important;font-weight:750!important}
.clock-actions{display:flex!important;align-items:center;justify-self:end;gap:7px!important;margin:0!important;white-space:nowrap}
.clock-actions #pauseBtn,.clock-actions #resetBtn{min-height:31px!important;min-width:unset!important;padding:6px 9px!important;font-size:12px!important}
.clock-actions #pauseBtn[disabled]{opacity:.42}
.clock-actions .speed-control{display:inline-flex;align-items:center;gap:0;padding:2px;border:1px solid #c9cec2;border-radius:4px;background:#e9e9df}
.clock-actions .speed-control button{display:grid;place-items:center;min-width:36px;min-height:27px;padding:3px 5px!important;font-size:12px!important;border:0!important;border-radius:2px!important;background:transparent!important;color:#617365!important;font-variant-numeric:tabular-nums;transition:background-color .15s,color .15s!important}
.clock-actions .speed-control button[aria-pressed=true]{background:#547e64!important;color:#fffdf5!important;font-weight:750!important}
.clock-actions .speed-control button:not([aria-pressed=true]):hover{background:#d4ddd0!important;color:#375744!important}
.clock-actions .speed-control button:focus-visible{outline-offset:0!important}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* The diary gets back the space previously consumed by the timeline and oversized header. */
.story-layout .diary{width:min(var(--journal-width),calc(100% - 24px))!important;margin:7px auto 7px!important}
.diary-header{min-height:65px!important;padding:12px 23px!important;gap:12px!important}
.diary-header h2{font-size:27px!important}
.diary-header .eyebrow{font-size:9px!important;margin-bottom:3px!important}
.diary-header .feed-filters{gap:9px!important}
.diary-header .feed-filters select{min-height:34px!important}
.story-layout .diary .feed{padding:0 23px 14px!important}
.story-layout .diary .feed .entry.episode{padding:14px 4px 15px!important;grid-template-columns:155px minmax(0,1fr);column-gap:20px}
.story-layout .diary .feed .entry.episode:first-child{padding-top:16px!important}
.story-layout .diary .feed .entry.episode h3{font-size:21px!important}
.diary-footer{min-height:33px!important;padding:5px 22px!important}
@media(max-width:1020px){
 .story-layout .clock .clock-head{grid-template-columns:minmax(154px,max-content) minmax(130px,1fr) max-content;gap:12px!important}
 .clock-head .date-label{font-size:11px!important}
 .clock-head .elapsed-clock small{display:none!important}
 .clock-head .elapsed-clock strong{font-size:14px!important}
 .clock-actions{gap:4px!important}
 .clock-actions #pauseBtn,.clock-actions #resetBtn{padding:6px 6px!important}
 .clock-actions .speed-control button{min-width:33px}
 .story-layout .diary{width:calc(100% - 16px)!important}
}
@media(max-width:760px){
 :root{--header-h:54px}
 .story-layout .clock{padding:5px 12px 6px!important}
 .story-layout .clock .clock-head{grid-template-columns:minmax(0,1fr) max-content;gap:3px 10px!important;min-height:0!important}
 .clock-head .clock-primary{grid-row:1;grid-column:1;min-width:0}
 .clock-head .date-label{overflow:hidden;text-overflow:ellipsis}
 .clock-head .elapsed-clock{gap:5px!important;padding-left:9px!important}
 .clock-actions{grid-row:1;grid-column:2}
 .clock-weekline{grid-row:2;grid-column:1/-1;padding-top:1px;min-height:21px}
 .clock-weekline .progress{margin-bottom:3px!important;height:5px!important}
 .clock-weekline .days{line-height:11px!important}
 .diary-header{min-height:61px!important;padding:10px 16px!important}
 .diary-header h2{font-size:23px!important}
 .story-layout .diary .feed{padding:0 16px 14px!important}
 .story-layout .diary .feed .entry.episode{grid-template-columns:130px minmax(0,1fr);gap:0 14px;padding:12px 3px 13px!important}
 .diary-footer{padding:5px 16px!important}
}
@media(max-width:550px){
 :root{--header-h:52px;--city-h:130px}
 .story-layout .clock{padding:4px 9px 5px!important}
 .story-layout .clock .clock-head{grid-template-columns:minmax(0,1fr) max-content;gap:3px 5px!important}
 .clock-head .date-label #date{display:none}
 .clock-head .date-label #dateShort{display:inline}
 .clock-head .date-label{font-size:11px!important;letter-spacing:-.01em}
 .clock-head .clock-primary{gap:7px!important}
 .clock-head .elapsed-clock{padding-left:7px!important;min-width:0!important}
 .clock-head .elapsed-clock strong{font-size:13px!important}
 .clock-actions{gap:3px!important}
 .clock-actions #pauseBtn,.clock-actions #resetBtn{min-width:29px!important;min-height:29px!important;padding:4px 5px!important;font-size:0!important}
 .clock-actions #pauseBtn::after{content:attr(data-icon);font-size:16px!important}
 .clock-actions #resetBtn::after{content:'↺';font-size:17px!important}
 .clock-actions .speed-control{padding:2px}
 .clock-actions .speed-control button{min-width:30px!important;min-height:26px!important;padding:3px!important;font-size:11px!important}
 .clock-weekline{min-height:18px}
 .clock-weekline .days span{font-size:9px!important}
 .story-layout .diary{margin:4px auto 5px!important;width:calc(100% - 10px)!important}
 .diary-header{min-height:55px!important;padding:9px 11px!important;gap:7px!important}
 .diary-header h2{font-size:20px!important}
 .diary-header .eyebrow{font-size:8px!important;margin-bottom:2px!important}
 .diary-header .feed-filters select{width:114px!important;max-width:114px!important;min-height:29px!important;padding:5px 20px 5px 7px!important;font-size:11px!important}
 .story-layout .diary .feed{padding:0 11px 10px!important}
 .story-layout .diary .feed .entry.episode{padding:11px 2px 12px!important}
 .story-layout .diary .feed .entry.episode h3{font-size:19px!important}
 .diary-footer{min-height:31px!important;padding:4px 11px!important}
}
@media(max-width:360px){
 .clock-actions{gap:2px!important}
 .clock-actions .speed-control button{min-width:28px!important}
 .clock-head .date-label{font-size:10px!important}
 .clock-head .clock-primary{gap:4px!important}
 .diary-header h2{font-size:19px!important}
 .diary-header .feed-filters select{width:114px!important;max-width:114px!important}
}
@media(max-height:640px){
 .story-layout .clock{padding-block:3px!important}
 .diary-header{min-height:53px!important}
}




/* v0.43: Weekly calendar uses seven EXACT, equal 1/7 day intervals.
   Labels anchor at each day's START, not distributed over six gaps. */
.clock-weekline .progress{
    position:relative!important;
    background:#dfe5db!important;
    isolation:isolate;
    overflow:hidden;
}
.clock-weekline .progress #progressFill{
    position:absolute;
    inset:0 auto 0 0;
    z-index:1;
    max-width:100%;
    transition:none!important; /* exact alignment on midnight, no lagging rewind */
}
.clock-weekline .progress > .day-ticks{
    position:absolute;
    inset:0;
    width:100%!important;
    height:100%!important;
    background:transparent!important;
    z-index:2;
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    pointer-events:none;
}
.clock-weekline .progress > .day-ticks i{display:block;min-width:0;border-left:1px solid transparent;}
.clock-weekline .progress > .day-ticks i:not(:first-child){border-left-color:rgba(75,104,85,.42);}
.clock-weekline .days{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    justify-content:initial!important;
    gap:0!important;
    min-width:0;
}
.clock-weekline .days span{
    min-width:0;
    text-align:left;
    justify-self:start;
    white-space:nowrap;
}




/* Hero labels: more compact padding, unified font and visual weight. */
#citySVG .hero-nameplate,#citySVG .hero-pin .hero-nameplate{
  fill:#fffaf1!important; stroke:#c3b6a3!important; stroke-width:1.05px!important;
  opacity:.98!important; vector-effect:non-scaling-stroke;
}
#citySVG .hero-name-text,#citySVG .hero-pin .hero-name-text{
  font-family:"Segoe UI", "Trebuchet MS", Arial, system-ui, sans-serif!important;
  font-size:11.5px!important; font-weight:650!important; letter-spacing:0!important;
  fill:#42584a!important; stroke:none!important; pointer-events:none!important;
  text-rendering:optimizeLegibility; font-kerning:normal;
}
#citySVG .hero-pin.active .hero-nameplate{
  fill:#f9eddb!important;stroke:#97a78c!important;stroke-width:1.05px!important;
}
#citySVG .hero-pin:focus-visible .hero-nameplate,#citySVG .hero-pin:hover .hero-nameplate{
  fill:#f8f1e5!important;stroke:#97a78c!important;stroke-width:1.05px!important;
}
#citySVG .hero-pin.active .hero-name-text{fill:#365c49!important;font-weight:650!important}



/* New interactions float above the existing, unmodified panorama. */
#citySVG .opportunity-pin{cursor:pointer;outline:none;--pin:#78988c}
#citySVG .opportunity-hit{fill:transparent;stroke:none;pointer-events:all}
#citySVG .opportunity-marker{fill:#fff9e9;stroke:var(--pin);stroke-width:2;stroke-linejoin:round;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1.4px 1.2px rgba(37,57,48,.18))}
#citySVG .opportunity-shadow{fill:rgba(54,75,62,.25);pointer-events:none}
#citySVG .opportunity-pin .opportunity-glyph{font-size:15px}
#citySVG .opportunity-pin:focus-visible .opportunity-marker{stroke-width:3}
#citySVG .opportunity-core{fill:#fffaf0;stroke:var(--pin);stroke-width:2.5;transition:fill .16s}
#citySVG .opportunity-ring{fill:rgba(255,247,226,.11);stroke:#f2e6cb;stroke-width:2;opacity:.82;transform-box:fill-box;transform-origin:center;animation:pin-breathe47 3.1s ease-in-out infinite;pointer-events:none}
#citySVG .opportunity-glyph{fill:#668575;font:bold 16px system-ui, sans-serif;pointer-events:none;user-select:none}
#citySVG .opportunity-major{--pin:#bc866c}
#citySVG .opportunity-major .opportunity-core{fill:#fff0e3}
#citySVG .opportunity-major .opportunity-ring{stroke:#f4c6a3;animation-duration:2.4s}
#citySVG .opportunity-major .opportunity-glyph{fill:#995e4e;font-size:13px}
#citySVG .opportunity-return{--pin:#839bb3}
#citySVG .opportunity-return .opportunity-glyph{fill:#668097;font-size:12px}
#citySVG .opportunity-pin:focus-visible .opportunity-core,#citySVG .opportunity-pin:hover .opportunity-core{fill:#fff2d7;stroke-width:3.4}
@keyframes pin-breathe47{0%,100%{opacity:.48;transform:scale(.91)}50%{opacity:.94;transform:scale(1.46)}}
#nightAtmosphere{pointer-events:none;isolation:isolate}
.micro-overlay{position:fixed;inset:0;z-index:51;display:grid;place-items:center;padding:14px;background:rgba(29,47,39,.60);backdrop-filter:blur(2px)}
.micro-card{width:min(550px,100%);max-height:min(88dvh,800px);overflow:auto;background:#fcf8ef;border:1px solid #d7c9b6;box-shadow:0 20px 60px rgba(24,42,32,.24);padding:clamp(22px,4vw,34px);border-radius:5px;color:#435a4d}
.micro-card h2{font:normal clamp(26px,3vw,34px)/1.16 Georgia,"Times New Roman",serif;color:#476851;margin:8px 0 14px}
.micro-card p{font:normal 15px/1.65 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#655f55;margin:0 0 15px}
.micro-detail{padding:11px 14px;background:#f1f2e9!important;color:#506659!important;border-left:2px solid #91a58d;margin:12px 0 18px!important;font-size:14px!important}
.micro-actions{display:grid;gap:6px;margin-top:18px}
.micro-option{width:100%;text-align:left;font:500 14px/1.45 system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;border:1px solid #d9d8cc!important;border-radius:4px!important;background:#fffdf8!important;padding:12px 15px!important;color:#3f5c4d!important;transition:background .15s,border-color .15s!important}
.micro-option:hover,.micro-option:focus-visible{border-color:#8ca18e!important;background:#f1f4eb!important}
.micro-actions-footer{display:flex;justify-content:space-between;gap:9px;margin-top:16px;flex-wrap:wrap;border-top:1px solid #e5ded0;padding-top:13px}
.micro-actions-footer button{background:transparent!important;border:0!important;color:#587963!important;font:600 13px system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;padding:7px 3px!important;border-radius:1px!important}
.micro-actions-footer button:hover{text-decoration:underline}
.entry.episode-micro .meta span:last-child,.entry.episode-major .meta span:last-child{color:#a17f67}
#treeContent .extra-tree .tree-beat{margin-top:7px}
@media(prefers-reduced-motion:reduce){#citySVG .opportunity-ring{animation:none!important;transform:none!important;opacity:.85!important}}
@media(max-width:470px){.micro-overlay{padding:9px}.micro-card{padding:20px 18px;max-height:91dvh}.micro-card h2{font-size:25px}.micro-card p{font-size:14px}.micro-option{font-size:13px!important;padding:11px 12px!important}}



.tools #testBtn{display:inline-flex;align-items:center;justify-content:center;gap:5px;border-color:#c7d6c9}
header.app-header .tools #testBtn > span:first-child{font-size:17px!important;line-height:1;display:inline-block}
.test-panel{position:fixed;right:14px;top:60px;z-index:75;width:min(404px,calc(100vw - 20px));max-height:calc(100dvh - 72px);overflow-y:auto;background:#fffcf5;border:1px solid #d8c8b2;box-shadow:0 15px 44px rgba(43,57,45,.25);padding:20px 22px;color:#45594d;border-radius:6px}
.test-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.test-panel h3{font:400 27px/1.15 Georgia,serif;margin:5px 0 0;color:#476957}
.test-panel h4{font:650 12px/1.3 system-ui,sans-serif;letter-spacing:.04em;margin:19px 0 9px;color:#55705e}
.test-panel p{font:13px/1.55 system-ui,sans-serif;color:#777063;margin:7px 0 12px}
.test-panel .test-close{background:transparent;border:0;padding:3px 6px;color:#687c69;font-size:22px;line-height:1}
.test-panel button:not(.test-close),.test-preview button{font:500 13px/1.4 system-ui,sans-serif;border:1px solid #d9d8c9;background:#fffef9;color:#476450;border-radius:4px;padding:9px 11px;min-height:35px}
.test-panel button:hover,.test-preview button:hover{background:#edf2e9;border-color:#97ab97}
.test-panel button[aria-pressed="true"]{background:#dfece0;border-color:#709777;color:#345943}
.test-options-row{display:flex;gap:5px;flex-wrap:wrap}
.test-options-row button{flex:1 1 auto}
.test-panel label{display:block;font:600 12px/1.4 system-ui,sans-serif;color:#667766;margin:10px 0 5px}
.test-panel select{width:100%;min-height:39px;background:#fffef8;border:1px solid #cfd5c7;border-radius:4px;color:#455d50;padding:7px 10px;font:13px/1.4 system-ui,sans-serif;outline-color:#8ba48c}
.test-muted{font-size:12px!important;color:#877f70!important}
.test-panel-footer{margin-top:15px;padding-top:14px;border-top:1px solid #e5ddd0}
.test-panel .test-reset{width:100%;background:#f5f2e9!important}
.test-pin{--pin:#958778;cursor:pointer}
.test-pin .opportunity-ring{stroke:#f0ddac!important}
.test-pin .opportunity-core{fill:#fff1cd!important}
.test-pin .opportunity-glyph{fill:#877251!important;font-size:10px!important}
.test-preview{position:fixed;inset:0;z-index:81;display:grid;place-items:center;background:#253b32a8;padding:16px}
.test-preview-card{width:min(590px,100%);max-height:92dvh;overflow-y:auto;padding:clamp(18px,4vw,30px);background:#fcf8ee;border:1px solid #dacbb8;border-radius:5px;box-shadow:0 18px 55px #172f2539;color:#425847}
.test-preview-head{display:flex;justify-content:space-between;gap:10px;align-items:start}
.test-preview-card h2{font:normal clamp(24px,3vw,30px)/1.2 Georgia,serif;margin:9px 0 12px;color:#476851}
.test-preview-card p{font:14px/1.65 system-ui,sans-serif;color:#665d52;margin:10px 0}
.test-preview-result{border-left:3px solid #9cae91;background:#f1f3e9;padding:11px 14px;margin-top:15px}
.test-preview-result strong{display:block;font-size:14px;margin-bottom:5px}
.test-preview-result[hidden]{display:none!important}
.test-preview-actions{display:grid;gap:6px;margin:14px 0}
.test-preview-actions button{text-align:left;width:100%}
.test-preview-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;border-top:1px solid #e0d8c8;padding-top:12px}
.test-preview[hidden],.test-panel[hidden]{display:none!important}
@media(max-width:680px){.tools #testBtn .test-btn-text{display:none}.tools #testBtn{padding:6px 9px!important;min-width:31px}.test-panel{top:51px;right:8px;width:calc(100vw - 16px);max-height:calc(100dvh - 58px);padding:16px}}
@media(prefers-reduced-motion:reduce){.test-pin .opportunity-ring{animation:none!important}}



/* v0.64 full-width city hotfix: no side transparent bands, no horizontal gutters. */
.story-layout .city,.story-layout .city .map{overflow:hidden!important;background:#d0e3d8!important}
.story-layout .city .map svg#citySVG{position:absolute!important;inset:0!important;left:0!important;top:0!important;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;min-height:0!important;transform:none!important;object-fit:fill!important;mask:none!important;mask-image:none!important;-webkit-mask-image:none!important;display:block!important}
@media(max-width:900px){.story-layout .city .map{overflow:hidden!important;touch-action:auto!important}.story-layout .city .map svg#citySVG{position:absolute!important;inset:0!important;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important}}



/* v0.65: full-width city; depth-layered, fast rain; soft fog and rain splashes. */
#citySVG .rain-streak65 {
  pointer-events:none;
  animation-name:rainFlight65;
  animation-iteration-count:infinite;
  animation-timing-function:linear;
  transform-box:view-box;
}
@keyframes rainFlight65 {
  0% {transform:translate(64px,-262px);opacity:0}
  8% {opacity:.82}
  85% {opacity:1}
  100% {transform:translate(-78px,282px);opacity:0}
}
#citySVG .rain-splash65 {
  pointer-events:none;
  transform-box:fill-box;
  transform-origin:center;
  animation-name:rainSplash65;
  animation-timing-function:ease-out;
  animation-iteration-count:infinite;
}
@keyframes rainSplash65 {
  0% {transform:scale(.15);opacity:0}
  22% {opacity:.65}
  100% {transform:scale(1.7);opacity:0}
}
@media(prefers-reduced-motion:reduce){
 #citySVG .rain-streak65,#citySVG .rain-splash65{animation:none!important}
}
