/* The same artwork and state adapt to the viewport; no device rotation gate. */
html{scroll-padding-top:80px}html body[data-page] #rotate-device{display:none!important}html body[data-page] #app,html body[data-page] #modal-root,html body[data-page] #toast{visibility:visible!important;pointer-events:auto!important}html body[data-page]{min-width:0!important}#app,.main,#view{min-width:0}img{max-width:100%}button,input,textarea,select{touch-action:manipulation}button:focus-visible{outline:2px solid #94b7d4;outline-offset:3px}
#experience-controls{position:fixed;z-index:90;right:max(10px,env(safe-area-inset-right));top:max(9px,env(safe-area-inset-top));display:flex;gap:8px}#experience-controls[hidden]{display:none}#experience-controls button{color:#eef2f6;background:#1d2c4055;border:1px solid #d7e1ee55;border-radius:5px;padding:8px 11px;min-height:36px;font:13px inherit;backdrop-filter:blur(5px);box-shadow:none}
html body[data-page].experience-fullscreen .sidebar,html body[data-page].experience-fullscreen .topline,html body[data-page].experience-fullscreen .page-foot{display:none!important}html body[data-page].experience-fullscreen .game-shell{display:block!important;padding:0!important}html body[data-page].experience-fullscreen .main{margin:0!important;padding:0!important;width:100%!important}html body[data-page].experience-fullscreen #view{padding:45px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom))!important}html body[data-page].experience-fullscreen .messenger{height:calc(100dvh - 96px);min-height:260px}html body[data-page].experience-fullscreen .phone-tabs{margin:0 0 8px}html body[data-page].experience-fullscreen.immersive #view{padding:0!important}
.phone-tabs{display:flex;gap:6px;margin:0 0 15px}.phone-tabs button{border:1px solid #aebfce66;background:transparent;color:inherit;padding:8px 20px;min-height:36px}.phone-tabs button[aria-current]{background:#dce4ec18}
.affinity-panel{width:min(100%,440px);margin:20px 0 25px;padding:17px 20px;border:1px solid #9eb1c073;background:linear-gradient(120deg,#d5e1ee14,#e7dfcb07);color:#e8ebed}.affinity-panel>div{display:flex;justify-content:space-between;gap:15px}.affinity-panel strong{font-size:16px;font-weight:500}.affinity-panel progress{display:block;width:100%;height:7px;margin:14px 0;accent-color:#adc6d8;border:0;border-radius:20px;background:#101a29}.affinity-panel progress::-webkit-progress-bar{background:#101a29;border-radius:20px}.affinity-panel progress::-webkit-progress-value{background:linear-gradient(90deg,#688ba5,#d2dfeb);border-radius:20px}.affinity-panel small{font-size:12px;line-height:1.7;opacity:.8}
.chapter-route{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(210px,auto);gap:55px 30px;max-width:1100px;padding:15px 0 40px}.route-line{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route-line path{fill:none;stroke:#a5bbc7;stroke-width:1;stroke-dasharray:5 5;opacity:.55}.route-node,.route-future{position:relative;grid-column:var(--route-col);grid-row:var(--route-row);text-align:center;align-self:center;min-width:0}.route-node{padding:24px 18px;background:radial-gradient(ellipse,#263b50 35%,#1f2d3e 70%);border:1px solid #9eafbd65;border-radius:42% 42% 15% 15%;min-height:200px;box-shadow:inset 0 0 0 5px #dbe4ec06}.route-seal{display:block;color:#cfccba;font:30px Georgia;margin-bottom:12px}.route-node small{color:#b0c3d1;font-size:12px}.route-node h2{font-size:clamp(17px,2vw,24px);font-weight:500;line-height:1.6;color:#f0ede2;margin:12px 0;overflow-wrap:anywhere}.route-node.locked{opacity:.7}.route-node.complete .route-seal{color:#f1e3bb}.route-open{background:transparent;border:1px solid #c7d5dd66;color:#e2e8eb;padding:8px 16px;min-height:36px}.route-open:disabled{opacity:.5}.route-future{color:#9fafbc;font-size:12px}.route-future span{display:block;font:32px Georgia;color:#b6bfb8}.route-future p{line-height:1.8}.chapter-lobby>.companion-ornament{margin:20px auto}
.moments-page{max-width:850px;margin:auto;color:#e2e8ed;padding:10px 0 40px}.moments-header{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid #aebccc55;margin-bottom:20px;padding-bottom:20px}.moments-header h1{font-size:30px;margin:8px 0}.moments-header p,.moments-header small{color:#aabfcf}.moments-settings{padding:15px 18px;background:#e5ecf211;border:1px solid #adbec766;margin-bottom:20px}.moments-settings summary{cursor:pointer;padding:5px}.moments-settings label{margin:15px 0;display:block}.moments-settings .check-row{display:flex;gap:10px;align-items:center}.moments-settings select{width:100%;max-width:100%;background:#e5e9e3;color:#293c51}.moments-settings .hint{font-size:12px;line-height:1.8;color:#bccbd7}.moment-compose{border:1px solid #b0bfcc55;padding:18px;margin:20px 0}.moment-compose textarea{display:block;min-height:90px;margin:12px 0;width:100%;box-sizing:border-box}.moment-character-actions{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.moment-character-actions>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px;border:1px solid #9cafbf44;min-width:0}.moment-character-actions button,.moment-tools button{background:transparent;border:0;color:#c9dce9;min-height:34px;padding:6px;box-shadow:none}.moment-character-actions small{display:block;width:100%;font-size:12px;color:#e1c2b4;overflow-wrap:anywhere}.moment-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:14px;padding:24px 0;border-bottom:1px solid #a7bbca44}.moment-card header{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.moment-card header b{color:#bdcedd;font-weight:500}.moment-card time{font-size:11px;color:#9eafbd}.moment-card p{font-size:16px;font-weight:400;line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere}.moment-tools{display:flex;justify-content:flex-end;gap:12px}.moment-card .moment-comment{background:#dce6ef12;padding:8px 12px;margin:5px 0;font-size:14px}.moments-empty{text-align:center;padding:45px 15px;color:#aabcc9}.moments-empty>span{font-size:28px}
@media(max-width:1000px){html body[data-page] .game-shell{grid-template-columns:74px minmax(0,1fr)!important}html body[data-page] .sidebar{width:74px!important;min-width:0!important}html body[data-page] .sidebar .brand{font-size:15px;padding:12px 2px}html body[data-page] .sidebar .brand small,html body[data-page] .sidebar .brand-symbol,html body[data-page] .sidebar-foot,html body[data-page] .sidebar .side-rule,html body[data-page] .nav-item small{display:none!important}html body[data-page] .sidebar .nav-item{width:100%!important;min-width:0!important;display:flex;flex-direction:column;gap:5px;justify-content:center;padding:10px 3px!important}html body[data-page] .nav-item svg{width:20px;height:20px;margin:0!important}html body[data-page] .nav-item b{font-size:12px;white-space:nowrap}html body[data-page] .main{margin-left:0!important;padding:18px!important;width:auto!important}html body[data-page] #view{padding:12px 0 30px!important}html body[data-page] .topline{padding:8px 0 15px}.topline .era-tag{font-size:11px}.ref-archive{min-width:0!important}.title h1,.page-title h1{font-size:34px}}
@media(max-width:600px) and (orientation:portrait){
 html body[data-page]{overflow:auto!important}html body[data-page] .game-shell{display:block!important;width:100%!important;min-width:0!important}html body[data-page] .sidebar{position:sticky!important;inset:0 auto auto!important;width:100%!important;height:auto!important;max-height:none!important;z-index:35;background:#1c293b!important;padding:5px 0!important;border:0!important}html body[data-page] .sidebar .brand{display:none!important}html body[data-page] .sidebar nav{display:flex!important;overflow-x:auto;gap:4px;padding:3px 8px!important;scrollbar-width:none}html body[data-page] .sidebar .nav-item{flex:0 0 52px!important;width:52px!important;min-height:53px!important;padding:6px 3px!important;clip-path:none!important;border-radius:4px}html body[data-page] .sidebar .nav-item svg{height:17px!important;width:17px!important}html body[data-page] .sidebar .nav-item i{display:none}html body[data-page] .main{padding:12px!important;width:100%!important;box-sizing:border-box}html body[data-page] .topline{min-height:38px;gap:7px}.topline .coins{font-size:12px}.topline .player-chip{font-size:12px;max-width:100px;overflow:hidden}html body[data-page] .settings-layout,html body[data-page] .api-forms,html body[data-page] .form-columns,html body[data-page] .save-grid{grid-template-columns:minmax(0,1fr)!important}.panel{padding:18px!important}.chapter-route{grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 10px;grid-auto-rows:minmax(180px,auto)}.route-node{padding:17px 6px;min-height:172px}.route-node h2{font-size:14px;line-height:1.6;margin:9px 0}.route-node small{font-size:10px}.route-seal{font-size:23px}.route-open{font-size:12px;padding:6px;min-height:34px}.route-future p{font-size:10px}.affinity-panel{box-sizing:border-box;margin:14px 0}.chapter-edition{font-size:12px;padding:10px}.chapter-lobby .page-title h1{font-size:32px}.moments-header h1{font-size:26px}.moment-card{grid-template-columns:32px minmax(0,1fr);gap:10px}.moments-page{padding-top:28px}html body[data-page] .messenger{grid-template-columns:minmax(0,1fr)!important;height:auto;min-height:70dvh;max-width:100%!important}html body[data-page] .messenger .chat-contacts{display:flex!important;overflow-x:auto!important;flex-direction:row!important;min-height:65px;max-height:95px;min-width:0}html body[data-page] .messenger .chat-main{min-width:0;min-height:65dvh}html body[data-page] .messenger .chat-contact{flex:0 0 105px}html body[data-page] .messenger .chat-thread{min-height:160px;max-height:50dvh}html body[data-page] .messenger .chat-header{padding:12px!important}html body[data-page] .messenger .chat-composer{padding-bottom:max(10px,env(safe-area-inset-bottom))}html body[data-page] .messenger .chat-bubble{font-size:16px!important;line-height:1.8!important;max-width:100%;overflow-wrap:anywhere}html body[data-page] .messenger .prompt-picker{flex-wrap:wrap}html body[data-page] .messenger .chat-tools{flex-wrap:wrap}html body[data-page] .messenger .chat-message{max-width:95%}.v2-home h1{font-size:clamp(45px,17vw,90px)}.v2-home-center{width:100%;padding:20px}.v2-home-credit{bottom:20px}.v2-characters,.ref-characters{min-width:0!important;width:100%!important}.ref-archive-layout{grid-template-columns:1fr!important}.ref-character-list{max-width:100%!important}.wardrobe-layout{grid-template-columns:1fr!important}
 html body[data-page].immersive .v2-story{width:100vw!important;height:100dvh!important;min-height:0!important;inset:0!important}html body[data-page].immersive .v2-story-head{padding:8px 70px 8px 8px!important}html body[data-page].immersive .v2-story-tools{flex-wrap:wrap!important;gap:4px!important}html body[data-page].immersive .v2-tool{padding:6px!important;min-height:32px!important}html body[data-page].immersive .story-cast{inset:15% 0 34%!important;gap:0!important}html body[data-page].immersive .story-portrait{max-width:55%!important}html body[data-page].immersive .cast-1 .story-portrait{width:85%!important;max-width:95%!important}html body[data-page].immersive .v2-dialogue{left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;height:auto!important;min-height:160px!important;max-height:39dvh!important;overflow:auto!important;padding:18px 16px 12px!important;display:flex!important;flex-direction:column!important;gap:10px!important}html body[data-page].immersive .v2-dialogue-body{padding:0!important;min-height:70px!important}html body[data-page].immersive .v2-prose{font-size:clamp(16px,4.2vw,20px)!important;line-height:1.8!important}html body[data-page].immersive .v2-nameplate{position:static!important;transform:none!important;max-width:100%;margin:0!important}html body[data-page].immersive .v2-nameplate b{font-size:16px!important}html body[data-page].immersive .vn-social .v2-dialogue{bottom:190px!important;max-height:30dvh!important;min-height:100px!important}html body[data-page].immersive .interlude-compose{left:8px!important;right:8px!important;bottom:8px!important;padding:8px!important;height:auto!important;max-height:175px!important}html body[data-page].immersive .interlude-compose textarea{height:50px!important;min-height:45px!important}.interlude-location{flex-wrap:wrap!important;gap:5px!important}.interlude-location label{font-size:11px}.interlude-location select{max-width:120px}.interlude-compose-foot small{font-size:10px!important;line-height:1.5}html body[data-page].immersive .vn-social>.prompt-picker{top:90px!important;left:8px!important;max-width:calc(100vw - 16px)!important}html body[data-page] .modal{padding:24px 16px!important;max-width:calc(100vw - 24px)!important;box-sizing:border-box}.moment-compose textarea{font-size:16px}
}
@media(max-height:500px) and (orientation:landscape){html body[data-page] .sidebar{position:fixed!important;inset:0 auto 0 0!important;overflow-y:auto!important;height:100dvh!important}html body[data-page] .game-shell{padding-left:74px}html body[data-page] .main{padding:10px 14px!important}.topline{min-height:26px!important}.topline .era-tag{font-size:10px}.page-foot{display:none}html body[data-page] .messenger{min-height:270px;height:calc(100dvh - 95px)}html body[data-page].immersive .v2-dialogue{height:auto!important;min-height:90px!important;max-height:38dvh!important;overflow:auto!important}html body[data-page].immersive .v2-prose{font-size:16px!important;line-height:1.6!important}.moment-card{padding:16px 0}}
@media(prefers-reduced-motion:reduce){.chapter-route *{animation:none!important;transition:none!important}}
body:is([data-mode="letters"],[data-mode="interlude"]) .topline{padding-right:90px!important}
@media(max-width:600px) and (orientation:portrait){#experience-controls{top:78px}body.immersive #experience-controls,body.experience-fullscreen #experience-controls{top:max(8px,env(safe-area-inset-top))}html body[data-page] .sidebar .nav-item span{display:block!important}html body[data-page] .sidebar .nav-item b{display:block!important;font-size:10px!important}html body[data-page] .sidebar::before,html body[data-page] .sidebar::after{display:none!important}html body[data-page] .sidebar nav{min-height:54px}}
@media(max-width:600px) and (orientation:portrait){html body[data-page] .sidebar{min-height:0!important;max-height:70px!important;overflow:hidden!important;flex-direction:row!important}html body[data-page] .sidebar nav{width:100%;min-width:0}html body[data-page] #view :is(button,summary,input,select,textarea){scroll-margin-top:90px}}
@media(max-height:500px) and (orientation:landscape){html body[data-page] .game-shell{display:block!important;padding-left:74px!important;box-sizing:border-box}html body[data-page] .main{width:auto!important;min-width:0!important}html body[data-page].experience-fullscreen .game-shell{padding-left:0!important}}
