:root{--navy:#07101f;--blue:#123d68;--ice:#b9dcff;--gold:#d9bb72;--ink:#f7f4ea;--muted:#bac5d4;--panel:rgba(8,17,31,.91)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--navy);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;line-height:1.9}button{font:inherit}
.hero{min-height:88svh;position:relative;display:flex;align-items:flex-end;background:url('assets/safe-44764755845559c0.webp') center/cover no-repeat;padding:42px 22px}.hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(3,10,20,.1),rgba(3,8,17,.94))}.hero-copy{position:relative;width:min(720px,100%);margin:0 auto;border-left:2px solid var(--gold);padding:8px 0 8px 20px}.eyebrow,.section-label{font-size:.72rem;letter-spacing:.18em;color:var(--gold);margin:0}.hero h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(2rem,10vw,4.2rem);line-height:1.25;letter-spacing:.08em;margin:.25em 0}.tagline{font-family:serif;color:#e4ecfa;font-size:1.05rem}.notice{margin-top:24px;padding:12px 14px;background:rgba(7,24,45,.75);border:1px solid rgba(185,220,255,.35);border-radius:10px;font-size:.88rem}
main{background:radial-gradient(circle at 50% 0,#152d4c 0,#07101f 46%)}.selector,.reader{width:min(760px,100%);margin:auto;padding:56px 18px 72px}.selector h2{font-family:serif;font-size:1.7rem;margin:.1em 0 1.2em}.character-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.character-card{display:flex;align-items:center;gap:12px;text-align:left;color:var(--ink);background:linear-gradient(145deg,rgba(26,48,78,.92),rgba(8,17,31,.92));border:1px solid rgba(185,220,255,.24);border-radius:15px;padding:12px;cursor:pointer}.character-card:hover{border-color:var(--gold);transform:translateY(-1px)}.character-card img{width:68px;height:68px;object-fit:cover;border-radius:50%;border:2px solid var(--gold)}.character-card b,.character-card small{display:block}.character-card small{font-size:.75rem;color:var(--muted)}
.character-header{display:flex;gap:18px;align-items:center;margin-bottom:22px}.portrait{width:92px;height:92px;object-fit:cover;border:2px solid var(--gold);border-radius:50%;box-shadow:0 0 30px rgba(91,163,232,.25)}.character-header h2{font-family:serif;font-size:1.8rem;margin:0}.character-header p{margin:0;color:var(--muted)}.chapter-tabs{position:sticky;top:0;z-index:4;display:flex;gap:7px;overflow-x:auto;padding:10px 0;background:rgba(7,16,31,.96)}.chapter-tabs button{white-space:nowrap;background:#0e213a;color:#dfeaff;border:1px solid #34567c;border-radius:99px;padding:7px 13px;cursor:pointer}.chapter-tabs button.active{background:var(--gold);color:#101722;border-color:var(--gold);font-weight:700}.chapter-panel{background:var(--panel);border:1px solid rgba(217,187,114,.35);border-radius:18px;padding:clamp(18px,5vw,38px);min-height:420px}.chapter-heading{text-align:center;border-bottom:1px solid rgba(217,187,114,.35);padding-bottom:16px}.chapter-heading p{color:var(--gold);font-size:.75rem;letter-spacing:.2em;margin:0}.chapter-heading h3{font-family:serif;font-size:1.6rem;margin:.25em 0}.text-panel{white-space:pre-wrap;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:1rem;line-height:2.05;padding-top:22px}.lock-panel{text-align:center;padding:60px 10px}.lock-icon{font-size:3rem;color:var(--gold)}.lock-panel button,.change-character{border:1px solid var(--gold);background:#18385d;color:white;border-radius:99px;padding:10px 18px;cursor:pointer}.change-character{display:block;margin:28px auto 0;background:transparent}.hidden{display:none!important}footer{text-align:center;color:#7f91a8;font-size:.75rem;padding:35px 10px;background:#040a13}
/* 添付キャラクター画像用 */
.hero{overflow:hidden}.hero-character{position:absolute;right:max(2vw,12px);bottom:-10px;width:min(48vw,480px);filter:drop-shadow(0 18px 35px rgba(0,0,0,.62));opacity:1}.hero-copy{z-index:1}.memory-portraits{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;padding:22px 0 4px}.memory-portraits figure{margin:0;text-align:center;color:var(--muted);font-size:.75rem}.memory-portraits img{width:96px;height:96px;object-fit:cover;border-radius:50%;border:2px solid rgba(217,187,114,.75);background:#fff}
/* 本文・読み合わせ */
.story-prose{white-space:pre-line;margin:0 0 1.25em}.story-prose.prose-start{margin-top:1.2em}.dialogue-row{display:flex;align-items:flex-end;gap:10px;margin:18px 0}.dialogue-row.mine{flex-direction:row-reverse}.dialogue-avatar{width:58px;height:58px;flex:0 0 58px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#375d86,#111d30);border:2px solid #87b9e8;color:#fff;font-weight:800}.dialogue-avatar img{width:100%;height:100%;object-fit:cover;background:white}.dialogue-bubble{max-width:calc(100% - 70px);background:#f8f5ed;color:#172033;border-radius:17px 17px 17px 5px;padding:11px 14px;box-shadow:0 8px 20px rgba(0,0,0,.25)}.mine .dialogue-bubble{border-radius:17px 17px 5px 17px;background:#dcecff}.dialogue-name{display:block;color:#42698e;font-size:.72rem;font-weight:800;line-height:1.3;margin-bottom:4px}.dialogue-bubble p{white-space:pre-line;margin:0;line-height:1.65;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif}.story-marker{margin:30px 0 17px;padding:12px 15px;border-left:4px solid #6c9bc6;background:linear-gradient(90deg,rgba(39,82,124,.42),rgba(12,29,50,.12));border-radius:0 12px 12px 0}.story-marker h4{margin:0;color:#d9eaff;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:1.15rem}.story-marker p{margin:3px 0 0;color:var(--muted)}.story-marker.important{margin-top:46px;border:1px solid rgba(217,187,114,.42);border-left:5px solid var(--gold);background:linear-gradient(135deg,rgba(76,61,25,.52),rgba(15,33,55,.82));text-align:center;border-radius:14px;padding:17px}.story-marker.reading h4:before{content:"◆ ";color:var(--gold)}.story-marker.choice{box-shadow:0 0 28px rgba(217,187,114,.13)}.story-marker.secret{border-color:#bd7180;background:linear-gradient(135deg,rgba(91,31,48,.62),rgba(31,18,28,.82))}.story-marker.secret h4{color:#ffd7df}
/* 迷わないキャラクター選択 */
.how-to-read{display:flex;align-items:center;justify-content:center;gap:10px;margin:-8px 0 30px;padding:13px;border:1px solid rgba(185,220,255,.2);border-radius:14px;background:rgba(8,19,35,.68)}.how-to-read div{display:flex;align-items:center;gap:7px}.how-to-read b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:var(--gold);color:#172033}.how-to-read span{font-size:.78rem;color:#dbe7f6}.how-to-read i{color:#7188a3;font-size:1.35rem}.character-grid{gap:18px}.character-card{position:relative;display:block;height:330px;overflow:hidden;padding:0;border-radius:18px;border-color:var(--character-color);background:radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--character-color) 46%,transparent),rgba(7,15,28,.97) 68%)}.character-card:hover{border-color:var(--character-color);transform:translateY(-4px);box-shadow:0 18px 36px rgba(0,0,0,.34)}.character-card .card-standee{position:absolute;inset:5px 0 auto auto;width:100%;height:275px;object-fit:contain;object-position:75% top;border:0;border-radius:0;filter:drop-shadow(0 15px 20px rgba(0,0,0,.35))}.pair-badge{position:absolute;z-index:2;top:13px;left:13px;padding:4px 10px;border:1px solid rgba(255,255,255,.5);border-radius:99px;background:rgba(7,15,28,.72);color:#fff;font-size:.72rem;font-weight:700;backdrop-filter:blur(7px)}.card-copy{position:absolute;z-index:2;inset:auto 0 0;padding:52px 16px 15px;background:linear-gradient(180deg,transparent,rgba(5,11,22,.97) 42%);text-align:left}.card-copy b{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:1.12rem}.card-copy small{min-height:1.5em;margin-top:1px}.card-copy em{display:block;margin-top:8px;color:#f3d994;font-size:.75rem;font-style:normal;font-weight:700}.character-header{position:relative;min-height:280px;overflow:hidden;padding:32px;border:1px solid var(--character-color);border-radius:20px;background:radial-gradient(circle at 80% 10%,color-mix(in srgb,var(--character-color) 42%,transparent),rgba(8,18,33,.96) 70%)}.character-header>div{position:relative;z-index:2;align-self:flex-end}.character-standee{position:absolute;z-index:1;right:-4%;bottom:-34%;width:min(62%,360px);height:410px;object-fit:contain;filter:drop-shadow(0 18px 28px rgba(0,0,0,.45))}.character-header .portrait{position:relative;z-index:2;align-self:flex-end}.chapter-tabs{gap:9px}.chapter-tabs button{display:grid;grid-template-columns:auto auto;gap:0 6px;align-items:center;text-align:left;padding:8px 13px;line-height:1.15}.chapter-tabs button span{grid-row:1/3;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#263a53;color:#8ea3bb;font-size:.65rem}.chapter-tabs button small{display:block;margin-top:3px;color:#8294aa;font-size:.62rem}.chapter-tabs button.available span{background:#47759e;color:white}.chapter-tabs button.available small{color:#abc9e6}.chapter-tabs button.active small{color:#394553}.chapter-tabs button.active span{background:#172033;color:white}
@media(max-width:560px){.hero-character{width:68vw;right:-18vw;opacity:.62}.hero-copy{padding-right:18vw}.how-to-read{display:grid;grid-template-columns:1fr;padding:12px 16px}.how-to-read i{display:none}.character-grid{grid-template-columns:1fr}.character-card{height:300px}.character-card .card-standee{height:252px}.character-header{min-height:245px;padding:22px}.character-standee{right:-18%;width:78%;height:340px}.character-header .portrait{width:72px;height:72px}.selector,.reader{padding-left:14px;padding-right:14px}.chapter-panel{border-radius:12px}.text-panel{font-size:1rem}}
.hero-character{opacity:1!important}.story-marker.person-marker{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:12px;text-align:left;background:linear-gradient(90deg,rgba(35,67,103,.86),rgba(19,35,59,.72));border-left-color:#8bc4f1}.story-marker.person-marker .marker-avatar{grid-row:1/3;width:52px;height:52px;object-fit:cover;border-radius:50%;border:2px solid #a8d5f5;background:#fff}.story-marker.person-marker h4{align-self:end}.story-marker.person-marker p{align-self:start}footer a{display:inline-block;margin-top:9px;color:#a9bdd3;font-size:.7rem;text-decoration:none;border-bottom:1px dotted #7188a3}

/* 最初の入口・共通読み合わせ */
.start-menu,.common-reader{width:min(760px,100%);margin:auto;padding:56px 18px 72px}.start-menu h2,.common-reader h2{font-family:serif;font-size:1.7rem;margin:.1em 0 1.2em}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mode-card{min-height:210px;display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px;text-align:left;color:var(--ink);border:1px solid rgba(185,220,255,.34);border-radius:20px;background:linear-gradient(145deg,rgba(25,51,82,.94),rgba(8,17,31,.96));cursor:pointer;box-shadow:0 14px 35px rgba(0,0,0,.22)}.mode-card:hover{transform:translateY(-3px);border-color:var(--gold)}.mode-card.reading-mode{background:radial-gradient(circle at 85% 0,rgba(94,75,156,.6),rgba(9,21,39,.97) 62%)}.mode-icon{display:grid;place-items:center;min-width:58px;height:58px;padding:0 10px;border-radius:16px;background:rgba(217,187,114,.16);border:1px solid var(--gold);color:#f4dc9e;font-family:serif;font-weight:800}.mode-card b,.mode-card small{display:block}.mode-card b{font-family:serif;font-size:1.25rem}.mode-card small{margin-top:4px;color:var(--muted)}.mode-card em{margin-top:auto;color:#f3d994;font-size:.82rem;font-style:normal;font-weight:700}.reading-guide{padding:12px 15px;border-left:4px solid var(--gold);background:rgba(25,47,75,.72);border-radius:0 10px 10px 0;color:#dce8f7;font-size:.9rem}.reading-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:24px 0 12px}.reading-tabs button{display:grid;grid-template-columns:34px 1fr;align-items:center;padding:12px;text-align:left;color:#dce9f8;background:#0e213a;border:1px solid #34567c;border-radius:13px;cursor:pointer}.reading-tabs button>span{grid-row:1/3;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#294c70;color:white}.reading-tabs button small{color:#8fa5bc;font-size:.68rem}.reading-tabs button.active{border-color:var(--gold);background:linear-gradient(135deg,#5f512c,#172c46)}.reading-panel{border-color:rgba(217,187,114,.55)}.sub-back{margin-top:10px;border-color:#61758d;color:#9eb0c5}
@media(max-width:560px){.mode-grid,.reading-tabs{grid-template-columns:1fr}.mode-card{min-height:170px}.start-menu,.common-reader{padding-left:14px;padding-right:14px}}

/* 読み合わせ一覧：物語順の折りたたみグループ */
.reading-tabs{display:block;margin:24px 0 14px}
.reading-group{margin:10px 0;border:1px solid rgba(185,220,255,.25);border-radius:15px;background:rgba(8,19,35,.78);overflow:hidden}
.reading-group[open]{border-color:rgba(217,187,114,.48)}
.reading-group summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;color:#eaf3ff;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-weight:800;list-style:none}
.reading-group summary::-webkit-details-marker{display:none}
.reading-group summary:after{content:"＋";color:var(--gold);font-family:sans-serif;font-size:1.2rem}
.reading-group[open] summary:after{content:"−"}
.reading-group-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 11px 12px}
.reading-group-list button{width:100%;min-height:66px}
.reading-group-list button{position:relative;isolation:isolate;overflow:hidden;grid-template-columns:36px 1fr;padding:14px;text-shadow:0 1px 7px #020811}
.reading-group-list button:before{content:"";position:absolute;z-index:-2;inset:0;background:linear-gradient(90deg,rgba(8,24,43,.97),rgba(8,24,43,.8)),var(--scene-bg) center/cover no-repeat;transition:transform .25s ease,filter .25s ease}
.reading-group-list button:after{content:"";position:absolute;z-index:-1;inset:0;border-left:3px solid transparent}
.reading-group-list button:hover:before,.reading-group-list button.active:before{transform:scale(1.035);filter:brightness(1.18)}
.reading-group-list button.active:after{border-left-color:var(--gold)}
.reading-group-list button b{display:block;font-size:.95rem;line-height:1.45}
.reading-group-list button small{display:block;margin-top:3px;line-height:1.35}
.reading-confirm{min-height:330px;display:grid;place-content:center;text-align:center;padding:34px 20px;border-radius:13px;background:linear-gradient(rgba(5,14,27,.7),rgba(5,14,27,.93)),var(--reading-bg) center/cover no-repeat}
.reading-confirm h3{margin:.35em 0;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(1.3rem,5vw,2rem)}
.reading-confirm p:not(.section-label){max-width:460px;margin:5px auto 22px;color:#dbe7f5}
.reading-confirm button{justify-self:center;border:1px solid var(--gold);border-radius:99px;padding:12px 21px;background:linear-gradient(135deg,#d9bb72,#aa8740);color:#101722;font-weight:800;cursor:pointer;box-shadow:0 10px 28px rgba(0,0,0,.3)}
.reading-scene-visual{height:clamp(180px,38vw,310px);margin:calc(-1 * clamp(18px,5vw,38px)) calc(-1 * clamp(18px,5vw,38px)) 28px;background-position:center;background-size:cover;border-radius:17px 17px 0 0;border-bottom:1px solid rgba(217,187,114,.45)}
.reading-content .chapter-heading{position:relative}
.dialogue-row.common-dialogue.alternate-right{flex-direction:row-reverse}
.dialogue-row.common-dialogue.alternate-right .dialogue-bubble{border-radius:17px 17px 5px 17px;background:#e5effb}
.dialogue-row.common-dialogue:not(.alternate-right) .dialogue-bubble{border-radius:17px 17px 17px 5px}
@media(max-width:560px){.reading-group-list{grid-template-columns:1fr}.reading-group summary{padding:13px 14px}}

/* v10: GMレス進行・背景演出・読み合わせ */
body{padding-bottom:68px;background-attachment:fixed;transition:background-color .8s ease}
body[data-phase="incident"]{--navy:#05070c;--panel:rgba(8,10,16,.94)}
body[data-phase="rebellion"]{--navy:#100708;--panel:rgba(22,8,10,.94)}
.hero{background-image:linear-gradient(180deg,rgba(2,10,22,.05),rgba(3,8,17,.92)),url('assets/safe-18cc37b87581ab2e.webp')}
.quick-nav{position:fixed;z-index:30;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:5px;width:min(560px,calc(100% - 20px));padding:6px;border:1px solid rgba(189,218,247,.32);border-radius:16px;background:rgba(4,10,20,.91);box-shadow:0 12px 35px rgba(0,0,0,.45);backdrop-filter:blur(14px)}
.quick-nav button{flex:1;min-height:44px;border:0;border-radius:11px;background:transparent;color:#d9e7f7;font-size:.8rem;font-weight:800;cursor:pointer}.quick-nav button.active,.quick-nav button:hover{background:#24486f;color:#fff}
.support-menu{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.support-menu button{padding:16px;text-align:left;color:#eef6ff;border:1px solid #385979;border-radius:14px;background:rgba(10,28,49,.8);cursor:pointer}.support-menu b,.support-menu small{display:block}.support-menu small{margin-top:3px;color:#9db1c7}
.modal,.onboarding{position:fixed;z-index:60;inset:0;display:grid;place-items:center;padding:18px;background:rgba(2,7,14,.82);backdrop-filter:blur(8px)}
.modal-card,.onboarding-card{position:relative;width:min(560px,100%);max-height:88svh;overflow:auto;padding:28px;border:1px solid rgba(217,187,114,.5);border-radius:20px;background:linear-gradient(145deg,#132943,#07101f);box-shadow:0 30px 80px rgba(0,0,0,.55)}.modal-card h2,.onboarding-card h2{font-family:"Yu Mincho",serif}.modal-close{position:absolute;right:12px;top:12px;width:40px;height:40px;border:1px solid #56718c;border-radius:50%;background:#0b1a2c;color:white;font-size:1.4rem;cursor:pointer}.primary,.onboarding-actions button,.read-complete button{border:1px solid var(--gold);border-radius:99px;padding:11px 18px;background:linear-gradient(135deg,#d9bb72,#aa8740);color:#101722;font-weight:800;cursor:pointer}
.character-confirm-card{text-align:center}.character-confirm-card>img{width:100%;height:300px;object-fit:contain;object-position:center top;filter:drop-shadow(0 16px 23px #000)}.character-confirm-card p:not(.section-label){color:#c7d5e4}.onboarding-step{min-height:130px;margin:20px 0;padding:22px;border-radius:14px;background:#0b1d33}.onboarding-step b{font-size:1.1rem}.onboarding-actions{display:flex;justify-content:space-between;gap:10px}.onboarding-actions #skipOnboarding{background:transparent;color:#b9c9da;border-color:#52677d}
.danger{color:#ff94a4!important}.guide-image{display:block;width:100%;max-height:58svh;object-fit:contain;border-radius:14px}.guide-card li{margin:.7em 0}.help-grid{display:grid;grid-template-columns:9em 1fr;gap:10px 14px}.help-grid p{margin:0;color:#c0cede}.timeline{padding-left:1.25em}.timeline b{display:block;color:#f1d891}
.unlock-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}.unlock-actions button{padding:11px 18px;border:1px solid #60758d;border-radius:99px;background:#0d2138;color:#eaf3ff;font-weight:800;cursor:pointer}.unlock-actions .primary{border-color:var(--gold);background:linear-gradient(135deg,#d9bb72,#aa8740);color:#101722}.phase-notice{display:grid;gap:5px;margin:0 0 24px;padding:15px 18px;border:1px solid rgba(217,187,114,.65);border-left:5px solid var(--gold);border-radius:12px;background:rgba(217,187,114,.1);white-space:normal}.phase-notice b{color:#f5d98d;font-family:system-ui,sans-serif}.phase-notice span{color:#dce7f3;font-family:system-ui,sans-serif;font-size:.9rem;line-height:1.65}
.chapter-progress{margin:8px 2px 14px;color:#aebed0;font-size:.76rem}.chapter-progress i{display:block;height:5px;margin-top:6px;overflow:hidden;border-radius:99px;background:#172a40}.chapter-progress b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#729ed0,var(--gold));transition:width .35s ease}
.action-summary{margin-top:30px;padding:18px 20px;border:1px solid rgba(217,187,114,.4);border-radius:15px;background:linear-gradient(135deg,rgba(65,54,24,.48),rgba(11,29,50,.88))}.action-summary h3{margin:0 0 8px;font-family:"Yu Mincho",serif;color:#f1d891}.action-summary ul{margin:0;padding-left:1.25em}
.now-speaking{position:sticky;z-index:6;top:10px;display:flex;align-items:center;justify-content:center;gap:9px;width:max-content;max-width:100%;margin:16px auto;padding:7px 13px;border:1px solid rgba(217,187,114,.65);border-radius:99px;background:rgba(5,14,27,.9);box-shadow:0 8px 20px rgba(0,0,0,.3);backdrop-filter:blur(10px)}.now-speaking:empty{display:none}.now-speaking img{width:34px;height:34px;object-fit:cover;border-radius:50%;background:white}.now-speaking b{color:#f4d88e}
.dialogue-row.common-dialogue{opacity:0;transform:translateX(-48px);transition:opacity .48s ease,transform .58s cubic-bezier(.2,.8,.2,1)}.dialogue-row.common-dialogue.alternate-right{transform:translateX(48px)}.dialogue-row.common-dialogue.visible{opacity:1;transform:translateX(0)}
.dialogue-avatar{border-color:var(--speaker-color)!important}.dialogue-bubble{border-left:5px solid var(--speaker-color);background:color-mix(in srgb,#fff 91%,var(--speaker-color))}.alternate-right .dialogue-bubble{border-left:0;border-right:5px solid var(--speaker-color);background:color-mix(in srgb,#fff 91%,var(--speaker-color))!important}.dialogue-name{color:color-mix(in srgb,var(--speaker-color) 78%,#162033)}
.read-complete{text-align:center;margin-top:32px}.read-complete p{color:#b7c7d8}
.next-dialogue{position:sticky;z-index:7;bottom:78px;display:block;margin:20px auto;padding:11px 22px;border:1px solid var(--gold);border-radius:99px;background:rgba(199,168,95,.95);color:#101722;font-weight:800;box-shadow:0 10px 25px rgba(0,0,0,.38);cursor:pointer}
#readingText:has(+.next-dialogue) .dialogue-row:not(.step-shown){display:none}
.evidence-inline{margin:24px 0}.evidence-inline button{display:grid;grid-template-columns:112px 1fr;align-items:center;width:100%;padding:9px;text-align:left;color:#edf5ff;border:1px solid #415e7c;border-radius:14px;background:#0c1d31;cursor:pointer}.evidence-inline img{width:100px;height:82px;object-fit:cover;border-radius:9px}.evidence-inline span{padding:12px;font-weight:800}
.scene-flash{pointer-events:none;position:fixed;z-index:100;inset:0;opacity:0}.scene-flash.play{animation:sceneFlash .85s ease}.scene-flash.incident{background:radial-gradient(circle,#f7f2dc 0,#10141e 34%,#020305 72%)}.scene-flash.rebellion{background:radial-gradient(circle,#ffbd66 0,#8c1c11 28%,#070203 72%)}@keyframes sceneFlash{0%{opacity:0}12%{opacity:1}32%{opacity:.18}48%{opacity:.8}100%{opacity:0}}
body[data-phase="incident"] main{background:radial-gradient(circle at 50% 0,#202a38,#05070c 50%)}body[data-phase="rebellion"] main{background:radial-gradient(circle at 50% 0,#501814,#100708 52%)}
body[data-phase="rebellion"] main:before{content:"";position:fixed;pointer-events:none;inset:0;z-index:0;background-image:radial-gradient(circle,#ffae55 0 2px,transparent 3px);background-size:110px 130px;opacity:.22;animation:embers 6s linear infinite}@keyframes embers{to{background-position:35px -130px}}
.selector,.reader,.common-reader,.start-menu{position:relative;z-index:1}
.portrait{cursor:pointer}
.scene-people{position:absolute;right:13px;bottom:13px;display:flex;flex-direction:row-reverse}.scene-people img{width:48px;height:48px;margin-left:-9px;object-fit:cover;border:2px solid white;border-radius:50%;background:white;box-shadow:0 5px 15px rgba(0,0,0,.5)}.scene-marker.people-ready{padding-right:72px}
@media(max-width:560px){body{padding-bottom:72px}.quick-nav{bottom:max(7px,env(safe-area-inset-bottom))}.quick-nav button{font-size:.72rem;padding:5px}.support-menu{grid-template-columns:1fr}.help-grid{grid-template-columns:1fr}.help-grid b{margin-top:8px}.modal-card,.onboarding-card{padding:22px 18px}.dialogue-row.common-dialogue{transform:translateX(-24px)}.dialogue-row.common-dialogue.alternate-right{transform:translateX(24px)}.evidence-inline button{grid-template-columns:86px 1fr}.evidence-inline img{width:76px;height:68px}.story-prose{white-space:normal}.text-panel{line-height:1.92}.now-speaking{top:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.dialogue-row.common-dialogue{opacity:1;transform:none!important;transition:none}.scene-flash.play{animation:none}}

/* HO内の「時刻＋場所」を、シーン背景つきの章扉として表示 */
.story-marker.scene-marker{position:relative;display:flex;min-height:176px;margin:34px 0 22px;padding:22px;flex-direction:column;justify-content:flex-end;overflow:hidden;border:1px solid rgba(185,220,255,.42);border-left:5px solid var(--gold);border-radius:16px;background:linear-gradient(180deg,rgba(4,12,24,.08) 0%,rgba(4,12,24,.38) 45%,rgba(4,12,24,.95) 100%),var(--marker-bg) center/cover no-repeat;box-shadow:0 14px 32px rgba(0,0,0,.32);text-align:left}
.story-marker.scene-marker:after{content:"SCENE";position:absolute;top:13px;right:15px;padding:3px 8px;border:1px solid rgba(255,255,255,.42);border-radius:99px;background:rgba(5,14,27,.58);color:#fff;font-size:.68rem;letter-spacing:.14em;backdrop-filter:blur(5px)}
.story-marker.scene-marker h4{position:relative;color:#fff;font-size:clamp(1.18rem,4vw,1.55rem);text-shadow:0 2px 10px #000}
.story-marker.scene-marker p{position:relative;margin-top:4px;color:#edf5ff;font-size:1rem;font-weight:700;text-shadow:0 2px 9px #000}
.story-marker.scene-marker.person-marker{display:grid;grid-template-columns:58px 1fr;align-content:end}
@media(max-width:560px){.story-marker.scene-marker{min-height:152px;margin-left:-5px;margin-right:-5px;padding:18px}.story-marker.scene-marker:after{top:10px;right:11px}}

/* v11: 個別端末向け・物語に沿う背景・スクロール会話 */
.page-backdrop{position:fixed;z-index:-2;inset:0;background:linear-gradient(180deg,rgba(3,9,18,.38),rgba(3,8,16,.92)),url('assets/safe-18cc37b87581ab2e.webp') center/cover no-repeat;transition:background-image .7s ease,filter .7s ease;transform:scale(1.02)}
.page-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,10,20,.18),rgba(4,10,20,.8))}
body[data-phase="incident"] .page-backdrop{filter:saturate(.58) brightness(.68)}
body[data-phase="rebellion"] .page-backdrop{filter:saturate(1.18) brightness(.7)}
main{background:linear-gradient(180deg,rgba(7,16,31,.42),rgba(7,16,31,.82))}
.start-menu,.common-reader,.selector,.reader{background:rgba(5,13,25,.44);backdrop-filter:blur(3px)}
.reading-close{position:sticky;z-index:10;top:10px;display:block;margin:0 0 10px auto;border:1px solid rgba(255,255,255,.5);border-radius:99px;padding:7px 13px;background:rgba(4,12,23,.84);color:#fff;font-weight:800;cursor:pointer;backdrop-filter:blur(8px)}

/* 会話はHOでも読み合わせでも左右から現れる */
.dialogue-row.animated-dialogue{opacity:0;transform:translateX(-46px);transition:opacity .45s ease,transform .58s cubic-bezier(.2,.8,.2,1)}
.dialogue-row.animated-dialogue.mine,.dialogue-row.animated-dialogue.alternate-right{flex-direction:row-reverse;transform:translateX(46px)}
.dialogue-row.animated-dialogue.visible{opacity:1;transform:translateX(0)}
.dialogue-row.mine .dialogue-bubble,.dialogue-row.alternate-right .dialogue-bubble{border-left:0;border-right:5px solid var(--speaker-color);border-radius:17px 17px 5px 17px;background:color-mix(in srgb,#fff 91%,var(--speaker-color))}
.dialogue-row.mine .dialogue-name,.dialogue-row.alternate-right .dialogue-name{text-align:right}
.story-prose{max-width:38em;margin:0 auto 1.25em;line-height:2.02;overflow-wrap:anywhere}
.text-panel{white-space:normal}

/* 人物紹介は人物色の枠 */
.story-marker.person-marker:not(.scene-marker){border:1px solid color-mix(in srgb,var(--person-color) 70%,#fff);border-left:6px solid var(--person-color);background:linear-gradient(120deg,color-mix(in srgb,var(--person-color) 40%,rgba(8,18,33,.92)),rgba(8,18,33,.92));box-shadow:0 12px 28px rgba(0,0,0,.25)}
.story-marker.person-marker:not(.scene-marker) .marker-avatar{border-color:color-mix(in srgb,var(--person-color) 70%,#fff)}

/* アイテムは背景を持たせず、タップで説明 */
.evidence-inline button{grid-template-columns:126px 1fr;background:linear-gradient(135deg,rgba(15,35,58,.92),rgba(7,17,31,.96));overflow:hidden}
.evidence-inline img{width:116px;height:104px;object-fit:contain;border-radius:0;background:transparent;filter:drop-shadow(0 10px 12px rgba(0,0,0,.35))}
.evidence-inline span b,.evidence-inline span small{display:block}.evidence-inline span small{margin-top:4px;color:#9fb2c6;font-size:.72rem;font-weight:500}
.guide-image.item-transparent{background:transparent;object-fit:contain;filter:drop-shadow(0 16px 18px rgba(0,0,0,.4))}

/* 投票結果：顔を一人選ぶ */
.vote-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:0 12px 14px}
.vote-face{display:grid;place-items:center;gap:6px;min-height:132px;padding:12px;border:1px solid #456482;border-radius:15px;background:rgba(10,28,49,.9);color:#fff;cursor:pointer}
.vote-face img{width:76px;height:76px;object-fit:cover;border:3px solid var(--gold);border-radius:50%;background:#fff}.vote-face.selected{grid-column:1/-1;justify-self:center;width:min(230px,100%);border-color:var(--gold);background:linear-gradient(145deg,#493d21,#10233a)}

/* 最後の二つの薬 */
.choice-items{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 28px;padding:18px;border:1px solid rgba(217,187,114,.5);border-radius:18px;background:rgba(6,15,27,.82)}
.choice-items .choice-lead{grid-column:1/-1;margin:0;text-align:center;color:#f1d891;font-weight:800}.choice-items .evidence-inline{margin:0}.choice-items .evidence-inline button{display:flex;min-height:190px;flex-direction:column;justify-content:center;text-align:center}.choice-items .evidence-inline img{width:120px;height:120px}.choice-items .poison-item img{filter:hue-rotate(125deg) saturate(2.2) brightness(.65) drop-shadow(0 10px 12px rgba(130,0,0,.5))}.choice-items .memory-item{border-color:#538fd0}

/* 晩餐会内の以心伝心ゲーム */
.mind-game{margin:24px 0;padding:20px;border:1px solid rgba(217,187,114,.55);border-radius:18px;background:linear-gradient(145deg,rgba(41,64,91,.96),rgba(8,19,34,.97));box-shadow:0 14px 32px rgba(0,0,0,.3)}
.mind-game-title{display:flex;align-items:center;gap:12px}.mind-game-title img{width:64px;height:64px;object-fit:cover;border:2px solid var(--gold);border-radius:50%;background:#fff}.mind-game-title small{color:var(--gold)}.mind-game-title h3{margin:0;font-family:"Yu Mincho",serif}.mind-game>p{margin:12px 0}.mind-game ol{padding-left:1.4em}.game-order{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}.game-order span{display:flex;align-items:center;gap:5px;padding:6px;border-radius:99px;background:rgba(255,255,255,.08);font-size:.7rem}.game-order img{width:28px;height:28px;object-fit:cover;border-radius:50%;background:#fff}

/* 共通情報 */
.common-hero{height:190px;margin:14px -4px 22px;overflow:hidden;border-radius:14px}.common-hero img{width:100%;height:100%;object-fit:cover}.map-board{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;padding:14px;border:1px solid #476886;border-radius:16px;background:linear-gradient(145deg,rgba(27,54,82,.85),rgba(8,20,36,.96))}.map-board span{padding:10px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.06);text-align:center;font-weight:800}.map-note{color:#9fb1c4;font-size:.78rem}
.face-strip{position:static!important;grid-column:1/-1;display:flex!important;justify-content:flex-end;margin-top:12px}.face-strip img{width:42px!important;height:42px!important}

@media(max-width:560px){.dialogue-row.animated-dialogue{transform:translateX(-24px)}.dialogue-row.animated-dialogue.mine,.dialogue-row.animated-dialogue.alternate-right{transform:translateX(24px)}.dialogue-row.animated-dialogue.visible{transform:translateX(0)}.vote-picker{grid-template-columns:repeat(2,1fr)}.choice-items{grid-template-columns:1fr}.choice-items .choice-lead{grid-column:1}.game-order{grid-template-columns:repeat(2,1fr)}.evidence-inline button{grid-template-columns:96px 1fr}.evidence-inline img{width:88px;height:84px}.face-strip{justify-content:center;flex-wrap:wrap}.face-strip img{margin-left:-6px!important}.story-prose{line-height:1.95}}
@media(prefers-reduced-motion:reduce){.dialogue-row.animated-dialogue{opacity:1;transform:none!important;transition:none}}

/* v14: visual balance, readable controls, paired character direction */
.hero-shade{background:linear-gradient(90deg,rgba(2,7,16,.88) 0%,rgba(2,7,16,.58) 48%,rgba(2,7,16,.34) 100%),linear-gradient(180deg,rgba(2,7,16,.2),rgba(2,7,16,.9))}
.hero-copy{width:min(820px,calc(100% - 36px));margin-bottom:20px;padding:22px 26px;border-left:3px solid var(--gold);border-radius:0 18px 18px 0;background:linear-gradient(90deg,rgba(3,9,19,.92),rgba(3,9,19,.68) 72%,rgba(3,9,19,.2));box-shadow:0 18px 40px rgba(0,0,0,.24)}
.hero h1,.tagline,.eyebrow{text-shadow:0 3px 14px #000,0 1px 2px #000}.eyebrow{font-weight:800}.notice{background:rgba(5,17,33,.9)}
.hero-cast{inset:4% -5% 0;gap:0}
.hero-person,.hero-person-1,.hero-person-2,.hero-person-4,.hero-person-6,.hero-person-7{width:17%;height:82%;margin:0 -3.35%}
.hero-person img,.card-standee,.pair-portraits img,.vote-face img,.afterword-profile img{image-rendering:auto;clip-path:inset(.5px);filter:drop-shadow(0 14px 18px rgba(0,0,0,.62))}

.character-card .card-standee{inset:4px 0 auto;width:100%;height:282px;object-position:center top}
.character-rei .card-standee,.character-finn .card-standee,.character-noah .card-standee,.character-lance .card-standee{transform:scaleX(-1)}

.reading-confirm button{display:inline-flex!important;align-items:center;justify-content:center;width:max-content!important;min-width:176px;max-width:100%;white-space:nowrap;line-height:1.2}
.reading-close{display:grid!important;place-items:center;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px;padding:0!important;border-radius:50%!important;line-height:1!important}
.reading-close-bottom{position:static;margin:34px auto 8px}

.reading-group-list button{grid-template-columns:1fr}.reading-group-list button>span,.pair-route-choices button>span{display:none}
.ending-group{border:0;background:transparent;overflow:visible}.ending-group[open]{border:0}.ending-group summary{padding-left:4px;padding-right:4px;border-bottom:1px solid rgba(217,187,114,.35)}

.vote-picker{gap:14px}.vote-face{min-height:360px;padding:8px 10px 14px;border:1px solid rgba(185,220,255,.24);border-bottom:4px solid var(--character-color);border-radius:16px;background:radial-gradient(circle at 50% 30%,color-mix(in srgb,var(--character-color) 32%,transparent),rgba(7,16,30,.98) 72%)}
.vote-face img{height:305px;object-position:center top}.vote-face b{font-size:1.05rem}

.pair-portraits{height:310px;padding:8px 8px 0}.pair-portraits>div{overflow:hidden}.pair-portraits img{height:112%;object-position:center top}.pair-兄弟 .pair-portraits>div:first-child img,.pair-兄弟 .pair-portraits>div:last-child img,.pair-主従 .pair-portraits>div:last-child img,.pair-友人 .pair-portraits>div:first-child img{transform:scaleX(-1)}
.pair-route-choices button{display:grid;align-content:center;min-height:86px;padding:14px 16px;text-align:center}.pair-route-choices b{font-size:1rem;line-height:1.35}.pair-route-choices small{margin-top:5px}

.afterword-content{padding-bottom:10px}.story-marker.afterword-profile{display:grid;grid-template-columns:minmax(190px,38%) 1fr;align-items:center;min-height:360px;margin:54px 0 24px;padding:0 34px 0 10px;overflow:hidden;text-align:left;border:1px solid color-mix(in srgb,var(--person-color) 65%,#fff);border-left:6px solid var(--person-color);border-radius:22px;background:radial-gradient(circle at 22% 28%,color-mix(in srgb,var(--person-color) 34%,transparent),rgba(7,17,31,.97) 66%)}
.story-marker.afterword-profile .marker-avatar{grid-row:1;width:100%;height:350px;object-fit:contain;object-position:center bottom;border:0;border-radius:0;background:transparent}.story-marker.afterword-profile h4{font-size:clamp(1.7rem,4vw,2.4rem);text-align:left}.afterword-content>.dialogue-row{margin-top:18px;margin-bottom:34px}

.reader,.common-reader{padding-bottom:128px}.chapter-panel{scroll-margin-top:18px}.text-panel{overflow-wrap:break-word}.story-prose{max-width:42em;line-height:2;letter-spacing:.015em}

@media(max-width:700px){.hero-cast{inset:14% -18% 0}.hero-person,.hero-person-1,.hero-person-2,.hero-person-4,.hero-person-6,.hero-person-7{width:21%;height:78%;margin:0 -4.7%}.hero-copy{margin-bottom:42px}.pair-portraits{height:260px}.vote-face{min-height:280px}.vote-face img{height:225px}}
@media(max-width:560px){body{padding-bottom:96px}.hero-cast{inset:17% -27% 3%}.hero-person,.hero-person-1,.hero-person-2,.hero-person-4,.hero-person-6,.hero-person-7{width:25%;height:76%;margin:0 -6.7%}.hero-copy{width:calc(100% - 24px);margin-bottom:54px;padding:18px 16px}.hero h1{font-size:clamp(2rem,10.5vw,3rem);letter-spacing:.04em}.eyebrow{font-size:.62rem;letter-spacing:.12em}.notice{padding:11px 12px}.character-card{height:340px}.character-card .card-standee{height:292px}.vote-face{min-height:245px}.vote-face img{height:195px}.pair-portraits{height:220px}.story-marker.afterword-profile{grid-template-columns:44% 1fr;min-height:270px;padding:0 16px 0 0}.story-marker.afterword-profile .marker-avatar{height:265px}.story-marker.afterword-profile h4{font-size:1.45rem}.quick-nav{width:calc(100% - 24px)}.reader,.common-reader{padding-bottom:138px}}

/* v12: ７人集合・分岐直下の読み合わせ・読みやすい改行 */
.hero{min-height:92svh;padding-bottom:34px}
.hero-copy{z-index:3;margin-left:auto;margin-right:auto}
.hero-cast{position:absolute;z-index:2;inset:7% 0 0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;pointer-events:none}
.hero-person{position:relative;width:13.5%;height:74%;margin:0 -1.8%;padding:0;border:0;background:transparent;filter:drop-shadow(0 18px 24px rgba(0,0,0,.75));cursor:pointer;pointer-events:auto;transition:transform .25s ease,filter .25s ease}
.hero-person img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
.hero-person span{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);padding:3px 10px;border-bottom:2px solid var(--cast-color);background:rgba(3,10,20,.76);color:#fff;font-size:.7rem;font-weight:800;white-space:nowrap;opacity:.82}
.hero-person:hover,.hero-person:focus-visible{z-index:4;transform:translateY(-10px) scale(1.04);filter:drop-shadow(0 0 18px var(--cast-color)) drop-shadow(0 20px 24px rgba(0,0,0,.8))}
.hero-person-4{z-index:3;width:16%;height:83%}.hero-person-1,.hero-person-7{height:66%}.hero-person-2,.hero-person-6{height:70%}
.cast-guide{text-align:center}.cast-guide>img{width:100%;height:300px;object-fit:contain;filter:drop-shadow(0 16px 22px rgba(0,0,0,.55))}.cast-guide h2{margin:.2em 0}.cast-role{color:var(--cast-color);font-weight:800}.cast-guide blockquote{margin:20px 0 0;padding:16px;border:1px solid color-mix(in srgb,var(--cast-color) 60%,#fff);border-left:5px solid var(--cast-color);border-radius:12px;background:rgba(255,255,255,.06);text-align:left}

.reading-panel{grid-column:1/-1;margin:12px 0 20px}
.reading-close{width:42px;height:42px;padding:0;font-size:1.35rem;line-height:1}
.story-prose{margin-bottom:.34em;line-height:1.95;overflow-wrap:normal;word-break:normal}
.story-prose.prose-start{margin-top:1.35em}.story-prose.prose-line{margin-top:0}
.dialogue-row.animated-dialogue.alternate-left{transform:translateX(-46px)}
.dialogue-row.animated-dialogue.alternate-right{flex-direction:row-reverse;transform:translateX(46px)}
.dialogue-row.animated-dialogue.visible{transform:translateX(0)}

.vote-picker{grid-template-columns:repeat(3,1fr);align-items:end}
.vote-face{min-height:230px;padding:6px 8px 12px;overflow:hidden;border:0;border-bottom:3px solid var(--character-color);border-radius:4px;background:linear-gradient(180deg,transparent,rgba(8,20,36,.96));box-shadow:none}
.vote-face img{width:100%;height:185px;object-fit:contain;object-position:center bottom;border:0;border-radius:0;background:transparent;filter:drop-shadow(0 12px 13px rgba(0,0,0,.6))}
.vote-face b{font-size:1rem}.vote-face.selected{width:min(300px,100%);border-color:var(--character-color);background:linear-gradient(180deg,transparent,color-mix(in srgb,var(--character-color) 28%,#07101f));box-shadow:0 16px 35px rgba(0,0,0,.35)}

.pair-route-list{display:grid;gap:20px;padding:0 12px 16px}
.pair-route{overflow:hidden;border:1px solid rgba(185,220,255,.27);border-radius:18px;background:linear-gradient(150deg,rgba(18,42,68,.96),rgba(6,15,28,.98))}
.pair-route>h4{margin:-30px 0 10px;position:relative;text-align:center;color:#f3dda2;font-family:"Yu Mincho",serif;font-size:1.15rem}
.pair-portraits{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;height:250px;padding:10px 18px 0;background:radial-gradient(circle at 50% 70%,rgba(217,187,114,.16),transparent 55%)}
.pair-portraits>div{position:relative;height:100%;text-align:center}.pair-portraits img{width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 14px 17px rgba(0,0,0,.65))}.pair-portraits b{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);padding:3px 11px;border-bottom:2px solid var(--gold);background:rgba(4,12,23,.78);white-space:nowrap}.pair-portraits>span{align-self:center;color:var(--gold);font-family:serif;font-size:1.5rem}
.pair-route-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;padding:12px}.pair-route-choices button{display:block;position:relative;overflow:hidden;min-height:72px;padding:12px;color:#eef6ff;border:1px solid #456482;border-radius:12px;background:linear-gradient(90deg,rgba(8,24,43,.97),rgba(8,24,43,.75)),var(--scene-bg) center/cover no-repeat;text-align:left;cursor:pointer}.pair-route-choices button>span{float:left;margin-right:9px;color:var(--gold);font-weight:800}.pair-route-choices b,.pair-route-choices small{display:block}.pair-route-choices small{color:#9fb2c6;font-size:.7rem}.pair-route-choices button.active{border-color:var(--gold);box-shadow:inset 4px 0 var(--gold)}

.choice-items{margin:26px 0}.choice-items .poison-item img{filter:drop-shadow(0 12px 15px rgba(150,0,0,.5))}.choice-items .memory-item img{filter:drop-shadow(0 12px 15px rgba(42,136,230,.45))}
.mind-game{margin:32px 0}.mind-game-title img,.game-order img,.game-question>img{border-radius:0;background:transparent;object-fit:contain}.mind-game-rules{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:16px 0}.mind-game-rules span{padding:9px;border-left:3px solid var(--gold);background:rgba(255,255,255,.06);font-size:.78rem}.game-order{grid-template-columns:repeat(4,1fr)}.game-order button{display:flex;align-items:center;gap:6px;padding:7px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.06);color:#fff;cursor:pointer}.game-order button.active{border-color:var(--gold);background:rgba(217,187,114,.16)}.game-order img{width:38px;height:46px}.game-order b{font-size:.68rem}.game-question{display:flex;align-items:center;gap:14px;min-height:105px;margin-top:14px;padding:14px;border:1px solid rgba(217,187,114,.45);border-radius:14px;background:rgba(3,11,22,.6)}.game-question>img{width:74px;height:88px}.game-question h4{margin:0;font-family:"Yu Mincho",serif;font-size:1.1rem}.game-question small{color:var(--gold)}.game-question p{display:flex;align-items:center;gap:8px;margin:8px 0 0}.game-question p b{padding:6px 9px;border-radius:8px;background:#173754}.game-question p span{font-size:.7rem;color:#91a7bd}

.common-hero{height:auto;background:#e6ddc8}.common-hero img,.common-map img{display:block;width:100%;height:auto;object-fit:contain}.common-map{margin:18px 0 30px;padding:10px;border:1px solid #476886;border-radius:14px;background:#e6ddc8}.common-map figcaption{padding:8px 4px 0;color:#1b2a37;font-size:.75rem;text-align:center}.rules-list{padding:0;list-style:none;counter-reset:rules}.rules-list li{counter-increment:rules;display:grid;grid-template-columns:2.2em 8em 1fr;gap:8px;margin:8px 0;padding:11px;border-left:4px solid var(--gold);background:rgba(255,255,255,.06)}.rules-list li:before{content:counter(rules,decimal-leading-zero);color:var(--gold);font-weight:900}.rules-list b{color:#f3dda2}.rules-list span{color:#d5e1ee}
.facility-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0 30px}.facility-list>div{padding:12px 13px;border:1px solid rgba(185,220,255,.24);border-left:4px solid #6e9ec5;border-radius:10px;background:rgba(255,255,255,.055)}.facility-list dt{color:#f3dda2;font-weight:800}.facility-list dd{margin:5px 0 0;color:#d5e1ee;font-size:.82rem;line-height:1.7}
.scene-people img{border-radius:10px}.face-strip img{border-radius:9px!important}

@media(max-width:700px){.hero-cast{inset:18% -16% 0}.hero-person{width:18%;margin:0 -3%}.hero-person-4{width:21%}.hero-copy{margin-bottom:0}.pair-portraits{height:220px}}
@media(max-width:560px){.hero{min-height:88svh}.hero-cast{inset:22% -30% 5%}.hero-person{width:21%;margin:0 -4.2%}.hero-person-4{width:25%}.hero-person span{font-size:.58rem;padding:2px 6px}.hero-copy{padding-left:14px}.hero h1{font-size:clamp(2rem,11vw,3.2rem)}.notice{font-size:.78rem}.dialogue-row.animated-dialogue.alternate-left{transform:translateX(-24px)}.dialogue-row.animated-dialogue.alternate-right{transform:translateX(24px)}.dialogue-row.animated-dialogue.visible{transform:translateX(0)}.vote-picker{grid-template-columns:repeat(2,1fr)}.vote-face{min-height:190px}.vote-face img{height:145px}.pair-portraits{height:190px;padding-left:4px;padding-right:4px}.pair-route-choices{grid-template-columns:1fr}.game-order{grid-template-columns:repeat(2,1fr)}.mind-game-rules{grid-template-columns:1fr}.game-question{align-items:flex-start}.game-question p{align-items:stretch;flex-direction:column}.facility-list{grid-template-columns:1fr}.rules-list li{grid-template-columns:2em 1fr}.rules-list span{grid-column:2}.story-prose{line-height:1.88}}

/* v15: 投票連動・読みやすさ・人物バランス */
.hero-copy{width:min(760px,calc(100% - 32px));padding:20px 24px}.hero-cast{inset:5% -7% 0;gap:0}.hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:16.8%;height:80%;margin:0 -3.15%}.hero-person img{transform:scale(var(--hero-scale,1));transform-origin:center bottom}.hero-person-1 img{--hero-scale:.96}.hero-person-2 img{--hero-scale:1.03}.hero-person-3 img{--hero-scale:1.12}.hero-person-4 img{--hero-scale:.97}.hero-person-5 img{--hero-scale:1.12}.hero-person-6 img{--hero-scale:1.08}.hero-person-7 img{--hero-scale:1.14}.hero-person span{bottom:2%}

.reading-scene-visual{position:relative;display:flex;align-items:flex-end;min-height:300px;overflow:hidden}.reading-scene-visual .chapter-heading{width:100%;margin:0;padding:80px 26px 24px;background:linear-gradient(180deg,transparent,rgba(3,10,20,.95));text-align:center}.reading-scene-visual .chapter-heading p{color:var(--gold)}.reading-scene-visual .chapter-heading h3{margin:.25rem 0 0}.reading-content>.chapter-heading{display:none}
.reading-close{font-size:0!important}.reading-close::before{content:"×";display:block;font-size:1.45rem;line-height:1}.reading-close,.modal-close{aspect-ratio:1;border-radius:50%}.reading-close-bottom{width:48px!important;height:48px!important;margin:34px auto 6px!important}

.chapter-tabs button{min-width:max-content;white-space:nowrap}.chapter-tabs button>b{display:block;font-size:.86rem;white-space:nowrap}.chapter-tabs button small{white-space:nowrap}.chapter-tabs .branch-hidden{display:none}.chapter-progress{margin-top:10px}
.story-prose{max-width:36em;margin-bottom:.8rem;font-size:1rem;line-height:1.95;letter-spacing:.01em;word-break:auto-phrase;overflow-wrap:normal}.story-prose.prose-start{margin-top:1.6rem}.text-panel{font-size:1rem}.story-marker.scene-marker{grid-template-columns:1fr auto;align-items:end;min-height:190px;padding:24px}.story-marker.scene-marker h4{align-self:end;font-size:clamp(1.35rem,4vw,2rem)}.story-marker.scene-marker .face-strip{grid-column:1/-1;justify-content:flex-start;margin-top:16px}.story-marker.scene-marker .face-strip img{width:46px!important;height:46px!important}.story-marker.scene-marker::after{content:"SCENE";grid-column:2;grid-row:1;align-self:start;padding:5px 9px;border:1px solid rgba(255,255,255,.55);border-radius:99px;font-size:.65rem;letter-spacing:.12em}

.vote-flow{padding:0 14px 20px}.vote-intro{margin:4px 0 16px;color:#d9e5f1}.vote-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0}.vote-face{position:relative;display:block;min-height:220px;padding:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--character-color) 70%,#fff);border-radius:16px;background:radial-gradient(circle at 50% 30%,color-mix(in srgb,var(--character-color) 35%,transparent),#09182a 75%)}.vote-face img{position:absolute;inset:-18% -30% auto;width:160%;height:132%;object-fit:contain;object-position:center top;transform:scale(1.35);transform-origin:center 16%;border:0;border-radius:0;background:transparent}.vote-face b{position:absolute;right:0;bottom:0;left:0;padding:34px 10px 12px;background:linear-gradient(transparent,rgba(3,10,20,.95));font-size:1rem}.vote-face.selected{grid-column:auto;width:auto;outline:3px solid var(--gold);outline-offset:2px}.vote-finn img,.vote-noah img,.vote-lance img{transform:scale(1.5)}
.vote-form{margin-top:22px}.vote-form-heading{display:flex;align-items:center;gap:12px;padding:12px 16px;border-left:5px solid var(--gold);background:rgba(255,255,255,.06)}.vote-form-heading img{width:58px;height:58px;object-fit:cover;object-position:top;border-radius:50%}.vote-form-heading small{color:var(--gold)}.vote-form-heading h4{margin:2px 0 0;font-size:1.3rem}.vote-form fieldset{margin:14px 0;padding:16px;border:1px solid rgba(185,220,255,.25);border-radius:14px}.vote-form legend{padding:0 6px;color:#fff;font-weight:800}.vote-form fieldset>p{margin:4px 0 12px;color:#f1d891;font-size:.85rem}.vote-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.vote-options label{cursor:pointer}.vote-options input{position:absolute;opacity:0}.vote-options span{display:block;padding:10px 8px;border:1px solid #456482;border-radius:9px;background:#0b2036;text-align:center;font-weight:700}.vote-options input:checked+span{border-color:var(--gold);background:#4a4028;color:#fff;box-shadow:inset 0 0 0 1px var(--gold)}.vote-submit,.vote-result-cta{display:flex;width:100%;align-items:center;justify-content:center;margin-top:14px}.vote-result-cta{flex-direction:column;gap:4px;padding:16px;border:1px solid var(--gold);border-radius:14px;background:linear-gradient(135deg,#5a4925,#122944);color:#fff}.vote-result-cta span{font-size:.85rem;color:#f5dda0}

.pair-route{overflow:visible}.pair-portraits{height:330px;overflow:visible;padding:0 4px}.pair-portraits>div{overflow:visible}.pair-portraits img{height:122%;max-width:none;transform-origin:center bottom}.pair-兄弟 .pair-portraits>div:first-child img,.pair-兄弟 .pair-portraits>div:last-child img,.pair-主従 .pair-portraits>div:last-child img,.pair-友人 .pair-portraits>div:first-child img{transform:scaleX(-1)}.pair-route>h4{z-index:4;margin:-40px 0 0}.pair-route-choices{position:relative;z-index:3;margin-top:-8px;background:linear-gradient(180deg,transparent,rgba(5,14,26,.97) 18%)}.pair-route-choices .route-hidden{display:none}.pair-route.awaiting-choice .pair-route-choices::after{content:"上の『最後の決断』を選ぶと、対応する結末が表示されます。";display:block;grid-column:1/-1;padding:14px;color:#bdcad8;text-align:center}.pair-route.awaiting-choice .pair-portraits{opacity:.52}

.common-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 30px}.common-card-grid article{padding:14px;border:1px solid rgba(185,220,255,.24);border-left:4px solid #6e9ec5;border-radius:11px;background:rgba(255,255,255,.055)}.common-card-grid h3{margin:0;color:#f3dda2;font-size:1rem}.common-card-grid p{margin:7px 0 0;color:#d5e1ee;font-size:.9rem;line-height:1.8}

.story-marker.afterword-profile{grid-template-columns:minmax(180px,34%) 1fr;align-items:stretch;padding:0;overflow:hidden}.story-marker.afterword-profile>.marker-avatar{align-self:end;height:100%;min-height:390px;padding:12px 0 0}.story-marker.afterword-profile>h4{align-self:center;padding:24px 26px 0}.afterword-profile-copy{grid-column:2;padding:0 26px 24px}.afterword-profile-copy .story-prose{margin-left:0;margin-right:0}.afterword-profile-copy .dialogue-row{margin:18px 0 0}

@media(max-width:700px){.hero-cast{inset:15% -22% 2%}.hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:21%;height:76%;margin:0 -4.6%}.reading-scene-visual{min-height:250px}.pair-portraits{height:270px}.vote-face{min-height:190px}.story-marker.afterword-profile{grid-template-columns:38% 1fr}.story-marker.afterword-profile>.marker-avatar{min-height:330px}}
@media(max-width:560px){.hero{min-height:80svh}.hero-cast{inset:17% -36% 4%}.hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:24%;height:72%;margin:0 -6%}.hero-copy{margin-bottom:34px}.reading-scene-visual{min-height:220px}.reading-scene-visual .chapter-heading{padding:70px 16px 18px}.vote-picker{grid-template-columns:repeat(2,1fr)}.vote-face{min-height:180px}.vote-options{grid-template-columns:repeat(2,1fr)}.pair-portraits{height:235px}.common-card-grid{grid-template-columns:1fr}.story-marker.afterword-profile{display:grid;grid-template-columns:42% 1fr;min-height:340px}.story-marker.afterword-profile>.marker-avatar{min-height:300px}.story-marker.afterword-profile>h4{padding:20px 14px 0;font-size:1.35rem}.afterword-profile-copy{grid-column:1/-1;padding:0 18px 22px}.story-marker.scene-marker{min-height:175px;padding:18px}.story-prose{line-height:1.9}.chapter-tabs button>b{font-size:.78rem}}
.vote-picker .vote-face img,.vote-picker .vote-finn img,.vote-picker .vote-noah img,.vote-picker .vote-lance img{inset:0;width:100%;height:100%;object-fit:cover;object-position:center 18%;transform:scale(1.08);transform-origin:center 18%;background:transparent}
.vote-options input:disabled+span{opacity:.38;cursor:not-allowed;filter:saturate(.45)}
.common-card-grid .meta-note{grid-column:1/-1;border-color:#8d78db;border-left:5px solid #8d78db;background:linear-gradient(135deg,rgba(90,64,145,.34),rgba(14,31,53,.94))}.common-card-grid .meta-note small{display:block;margin-bottom:5px;color:#cdbfff;font-weight:800;letter-spacing:.08em}.common-card-grid .meta-note strong{display:block;margin-top:12px;padding:10px 12px;border-radius:8px;background:rgba(5,13,26,.64);color:#f4d98d;line-height:1.65}
.reading-close{font-size:1.45rem!important;color:#fff!important;text-shadow:none!important}.reading-close::before{content:none!important}.reading-confirm button{color:#07101f!important;text-shadow:none!important;font-size:1rem!important}
.vote-face.selected{grid-column:auto!important;justify-self:stretch!important;width:100%!important;min-width:0!important}.vote-face b{white-space:nowrap}.vote-options span.has-face{display:flex;align-items:center;gap:9px;padding:7px 10px;text-align:left;white-space:nowrap}.vote-options span.has-face img{width:42px;height:42px;flex:0 0 42px;object-fit:cover;object-position:center 18%;border:1px solid rgba(255,255,255,.42);border-radius:50%;background:#e7edf4}.vote-options span.has-face b{overflow:hidden;text-overflow:ellipsis}.vote-submit{display:flex!important;width:100%!important;min-width:0!important;align-items:center!important;justify-content:center!important;padding:14px 18px!important;white-space:nowrap!important;writing-mode:horizontal-tb!important;line-height:1.2!important;font-size:1rem!important}
.pair-route{overflow:hidden!important}.pair-portraits{height:310px!important;overflow:hidden!important;padding:12px 18px 0!important}.pair-portraits>div{height:100%!important;overflow:hidden!important}.pair-portraits img{width:100%!important;height:100%!important;max-width:100%!important;object-fit:contain!important;object-position:center bottom!important}
.ending-group{border:1px solid rgba(217,187,114,.55)!important;border-radius:16px!important;background:linear-gradient(135deg,rgba(30,43,68,.95),rgba(8,18,34,.98))!important}.ending-group summary{padding:18px 20px!important}.ending-group summary small{margin-left:auto;margin-right:14px;color:#f1d891;font-family:system-ui,sans-serif;font-size:.75rem}.ending-group.overall-ready{border:2px solid var(--gold)!important;box-shadow:0 0 0 4px rgba(217,187,114,.12),0 14px 40px rgba(0,0,0,.3)}.ending-group.overall-ready summary{background:linear-gradient(90deg,rgba(126,96,36,.52),rgba(16,35,57,.92));animation:overallPulse 1.8s ease-in-out infinite alternate}@keyframes overallPulse{to{filter:brightness(1.2)}}
.hero-person img{transform:scaleX(var(--hero-flip,1)) scale(var(--hero-scale,1))!important}.hero-person-1 img{--hero-scale:.96}.hero-person-2 img{--hero-scale:1.03;--hero-flip:-1}.hero-person-3 img{--hero-scale:1.1}.hero-person-4 img{--hero-scale:1.02}.hero-person-5 img{--hero-scale:1.08;--hero-flip:-1}.hero-person-6 img{--hero-scale:1.06}.hero-person-7 img{--hero-scale:1.1;--hero-flip:-1}
.story-marker.afterword-profile{grid-template-columns:minmax(220px,32%) 1fr!important;align-items:center;min-height:420px!important;padding:20px!important;column-gap:28px}.story-marker.afterword-profile>.marker-avatar{width:100%!important;height:380px!important;min-height:0!important;object-fit:contain!important;object-position:center bottom!important}.story-marker.afterword-profile>h4{align-self:end;padding:0!important}.afterword-profile-copy{align-self:start;padding:0 10px 12px!important}
@media(max-width:560px){.pair-portraits{height:230px!important;padding:8px 4px 0!important}.vote-options span.has-face{gap:6px;padding:6px}.vote-options span.has-face img{width:34px;height:34px;flex-basis:34px}.ending-group summary{align-items:flex-start!important}.ending-group summary small{max-width:48%;text-align:right}.story-marker.afterword-profile{grid-template-columns:1fr!important;min-height:0!important;padding:16px!important}.story-marker.afterword-profile>.marker-avatar{height:260px!important}.story-marker.afterword-profile>h4{padding-top:4px!important}.afterword-profile-copy{grid-column:1!important;padding:0!important}}

/* v17: first-screen role selection and concise flow */
.common-start{width:100%;min-height:112px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;margin-bottom:28px}.common-start em{margin:0}.start-choice-title{margin:0 0 12px;font-family:"Yu Mincho","Hiragino Mincho ProN",serif}.start-character-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.start-character-card{position:relative;min-width:0;min-height:168px;padding:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--character-color) 70%,#fff);border-radius:14px;background:#0b1f36;color:#fff;cursor:pointer}.start-character-card img{width:100%;height:122px;object-fit:cover;object-position:center 18%;background:#e8edf3}.start-character-card span{display:block;padding:9px 8px;text-align:left}.start-character-card b,.start-character-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.start-character-card small{margin-top:2px;color:#aebed0;font-size:.68rem}.start-character-card:hover,.start-character-card:focus-visible{border-color:var(--gold);transform:translateY(-2px)}.start-character-card.gm-card{border-color:#c7a85f;background:linear-gradient(145deg,#493d21,#10233a)}.role-required{padding:18px;border:1px solid rgba(217,187,114,.5);border-radius:12px;background:#0b1d33}.handout-jump{display:flex;width:min(320px,100%);justify-content:center;margin:18px auto 0;white-space:nowrap}.story-prose{margin:.35em 0 1em}.vote-form-heading img{flex:0 0 58px}.vote-form-heading>div{min-width:0}.vote-submit,.vote-result-cta,.reading-confirm button{overflow-wrap:normal;word-break:keep-all}
@media(max-width:700px){.start-character-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:480px){.common-start{grid-template-columns:auto 1fr;padding:18px}.common-start em{grid-column:2}.start-character-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.start-character-card{min-height:148px}.start-character-card img{height:105px}}

/* v18: PC-first clarity and editorial polish */
@media(min-width:901px){
  body{font-size:18px}
  main{width:min(1180px,calc(100% - 72px))}
  .hero{min-height:920px;display:grid;grid-template-rows:auto 1fr;padding:0 46px 36px}
  .hero-copy{position:relative;z-index:5;order:-1;width:min(880px,100%);margin:54px auto 0;padding:22px 30px;text-align:center;border:1px solid rgba(217,187,114,.54);border-left:4px solid var(--gold);border-radius:16px;background:rgba(3,10,20,.9);backdrop-filter:blur(14px)}
  .hero-copy h1{margin:.08em 0;font-size:clamp(3.4rem,5vw,5.8rem)}
  .hero-cast{inset:210px 1.5% 26px;align-items:flex-end;overflow:visible}
  .hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:15%;height:96%;margin:0 -.38%}
  .hero-person-1 img{--hero-scale:1.14}
  .hero-person span{bottom:0;padding:7px 13px;font-size:.76rem}
  .start-menu,.common-reader,.reader{padding:54px 58px}
  .chapter-panel{padding:38px}
  .text-panel{font-size:1.08rem}
  .story-prose{max-width:58em;font-size:1.08rem;line-height:2}
  .dialogue-row{max-width:830px}
  .reading-panel{max-width:1040px;margin-left:auto;margin-right:auto}
  .reading-scene-visual{min-height:360px}
  .character-header{min-height:360px;padding:44px}
  .character-standee{right:3%;bottom:-12%;width:44%;height:470px}
  .character-header>div{max-width:50%}
  .character-header h2{font-size:2.6rem}
  .story-marker.afterword-profile{grid-template-columns:360px minmax(0,1fr)!important;min-height:500px!important;padding:28px!important;column-gap:44px}
  .story-marker.afterword-profile>.marker-avatar{height:440px!important}
  .afterword-profile-copy{max-width:660px}
}
.hero-copy{pointer-events:none}
.reading-close,.modal-close{display:grid!important;place-items:center!important;width:46px!important;min-width:46px!important;height:46px!important;min-height:46px!important;padding:0!important;border-radius:11px!important;background:#0c2037!important;border:1px solid #6686a4!important;box-shadow:0 8px 24px rgba(0,0,0,.28)}
.reading-close:hover,.modal-close:hover{border-color:var(--gold)!important;background:#17314d!important}
.meta-note{margin:34px 0 8px;padding:26px 28px;border:1px solid #9d88ee;border-left:6px solid #9d88ee;border-radius:16px;background:linear-gradient(135deg,rgba(93,68,158,.42),rgba(11,27,48,.97));box-shadow:0 18px 45px rgba(0,0,0,.2)}
.meta-note small{display:block;margin-bottom:8px;color:#d5caff;font-weight:800;letter-spacing:.1em}.meta-note h3{margin:.15em 0;color:#f5dda0}.meta-note p{color:#e2e9f2;line-height:1.9}.meta-note strong{display:block;margin-top:18px;padding:16px 18px;border-radius:10px;background:#071426;color:#f6d986;font-size:1.05rem;line-height:1.7}
.next-step,.load-error{display:grid;gap:10px;margin:38px 0 12px;padding:24px 26px;border:1px solid rgba(217,187,114,.62);border-left:6px solid var(--gold);border-radius:14px;background:linear-gradient(135deg,rgba(78,62,31,.46),rgba(10,28,49,.95))}.next-step small{color:var(--gold);font-weight:800;letter-spacing:.08em}.next-step b{font-size:1.08rem}.next-step button{justify-self:start;margin-top:5px;padding:11px 17px;border:1px solid var(--gold);border-radius:9px;background:#d7b96f;color:#07111f;font-weight:900;cursor:pointer}.load-error span{color:#cad7e4}
.choice-items{gap:18px;padding:24px}.choice-items .evidence-inline button{min-height:260px;border-width:2px}.choice-items .evidence-inline img{width:160px;height:160px}.choice-items .choice-lead{font-size:1rem}
.cast-guide{display:grid;grid-template-columns:minmax(260px,38%) 1fr;grid-template-rows:auto auto auto 1fr auto;gap:4px 34px;text-align:left}.cast-guide>img{grid-row:1/6;width:100%;height:500px;align-self:end}.cast-guide .section-label{align-self:end}.cast-guide h2{font-size:2.4rem}.cast-guide blockquote{align-self:start}
.reading-confirm{min-height:390px}.reading-confirm h3{font-size:2.2rem}.reading-confirm p:not(.section-label){font-size:1.05rem}.reading-confirm button{border-radius:10px!important;padding:14px 22px}

/* v19: PC-first spatial system, character focus and GM cockpit */
body{overflow-x:hidden}
main{width:100%;max-width:none}
.hero{isolation:isolate}
.hero-copy h1{white-space:nowrap;word-break:keep-all;overflow-wrap:normal;text-wrap:nowrap}
.hero-copy{pointer-events:none}
.reader-intro{display:flex;align-items:end;justify-content:space-between;gap:32px;margin-bottom:28px}
.reader-intro h2{margin:.15em 0 0;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(2rem,3vw,3rem)}
.reader-intro .reading-guide{max-width:34rem;margin:0;text-align:right}

.character-confirm-card{display:grid;grid-template-columns:minmax(320px,44%) minmax(360px,1fr);grid-template-rows:1fr auto;width:min(1180px,94vw);height:min(760px,90vh);max-height:90vh;padding:0;overflow:hidden;text-align:left;border-radius:24px;background:linear-gradient(120deg,#f3f6f8 0 44%,#0a1b30 44% 100%)}
.character-confirm-card .modal-close{z-index:5}
.character-detail-art{position:relative;grid-row:1/3;display:flex;align-items:flex-end;justify-content:center;min-width:0;overflow:hidden;background:radial-gradient(circle at 50% 38%,rgba(130,177,216,.38),transparent 58%)}
.character-detail-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 22px 30px rgba(0,0,0,.35))}
.character-detail-copy{align-self:center;padding:72px clamp(38px,5vw,78px) 30px}
.character-detail-copy h2{margin:.15em 0 .3em;font-size:clamp(2.4rem,4vw,4.4rem);line-height:1.18}
.character-detail-copy>p:not(.section-label){color:#c7d5e4}
.character-detail-intro{max-width:34rem;padding-top:22px;border-top:1px solid rgba(217,187,114,.32);font-size:1rem;line-height:1.9}
.character-detail-copy .primary{margin-top:22px;border-radius:10px}
.character-detail-rail{grid-column:2;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:0 clamp(30px,4vw,60px) 26px}
.character-detail-rail button{min-width:0;padding:5px;overflow:hidden;border:1px solid rgba(185,220,255,.22);border-radius:10px;background:#10253e;color:#dce9f6;cursor:pointer}
.character-detail-rail button.active{border-color:var(--gold);box-shadow:inset 0 -3px var(--gold)}
.character-detail-rail img{display:block;width:100%;height:68px;object-fit:cover;object-position:center 18%;border-radius:7px;background:#e7edf4}
.character-detail-rail span{display:block;padding:4px 2px 1px;overflow:hidden;text-overflow:ellipsis;font-size:.68rem;font-weight:800;white-space:nowrap}

.gm-console{margin:0 0 28px;overflow:hidden;border:1px solid rgba(217,187,114,.58);border-radius:20px;background:linear-gradient(135deg,rgba(71,58,29,.78),rgba(8,24,43,.97) 44%);box-shadow:0 24px 60px rgba(0,0,0,.28)}
.gm-console-head{display:grid;grid-template-columns:190px 1fr;align-items:center;min-height:230px;padding:0 38px 0 16px;background:linear-gradient(90deg,rgba(5,15,28,.15),rgba(5,15,28,.88)),url('assets/safe-5975149b5b6bb351.webp') center/cover}
.gm-console-head img{align-self:end;width:100%;height:230px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 18px 18px rgba(0,0,0,.6))}
.gm-console-head h2{margin:.12em 0;font-family:"Yu Mincho",serif;font-size:2rem}.gm-console-head p:last-child{margin:4px 0;color:#d6e1ed}
.gm-now{display:grid;grid-template-columns:150px 1fr;gap:18px;padding:18px 28px;border-top:1px solid rgba(217,187,114,.5);border-bottom:1px solid rgba(217,187,114,.26);background:rgba(5,14,27,.82)}
.gm-now span{color:var(--gold);font-weight:800}.gm-now strong{font-weight:700}
.gm-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px}
.gm-guide-grid details{overflow:hidden;border:1px solid rgba(185,220,255,.2);border-radius:12px;background:rgba(8,23,41,.75)}
.gm-guide-grid summary{padding:14px 16px;color:#f3dda2;font-weight:800;cursor:pointer}.gm-guide-grid ol,.gm-guide-grid ul{margin:0;padding:0 22px 17px 42px;color:#d5e1ed}.gm-guide-grid li{margin:.35em 0}

.story-marker.scene-marker{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto auto!important;align-content:end!important;padding:24px!important}
.story-marker.scene-marker::after{position:static!important;grid-column:2!important;grid-row:1!important;align-self:start!important;justify-self:end!important;margin-bottom:34px!important}
.story-marker.scene-marker h4{grid-column:1/-1!important;grid-row:2!important;margin:0!important;padding-right:0!important;line-height:1.35!important}
.story-marker.scene-marker>p{grid-column:1/-1!important;grid-row:3!important}
.story-marker.scene-marker .face-strip{grid-column:1/-1!important;grid-row:4!important;justify-content:flex-start!important;gap:7px;margin-top:16px!important}
.story-marker.scene-marker .face-strip img{margin:0!important}

@media(min-width:901px){
  .hero{height:clamp(720px,100svh,980px);min-height:720px;padding:0 clamp(24px,3vw,54px) 22px;grid-template-rows:auto minmax(0,1fr)}
  .hero-copy{width:min(960px,70vw);margin:clamp(28px,5vh,58px) auto 0;padding:18px 32px}
  .hero-copy h1{font-size:clamp(3rem,5.3vw,5.7rem);letter-spacing:.055em}
  .hero-cast{inset:clamp(180px,27vh,260px) 1.2% 20px;height:auto}
  .hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:14.65%;height:100%;margin:0 -.05%}
  .hero-person-1 img{--hero-scale:1.22}
  .start-menu,.common-reader,.reader{width:min(1480px,calc(100% - 64px));margin:32px auto;padding:clamp(40px,4vw,68px)}
  .start-menu{display:grid;grid-template-columns:minmax(320px,.72fr) minmax(640px,1.55fr);gap:20px 52px;align-items:start}
  .start-menu>.section-label,.start-menu>h2{grid-column:1/-1}
  .start-menu .common-start{grid-column:1;grid-row:3/5;min-height:100%;margin:0}
  .start-menu .start-choice-title{grid-column:2;grid-row:3;margin:0 0 4px}
  .start-menu .start-character-grid{grid-column:2;grid-row:4;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  .start-character-card{min-height:208px;border-radius:16px}.start-character-card img{height:156px}.start-character-card span{padding:10px 11px}
  .common-reader{min-height:80vh}
  .reading-tabs{display:grid;grid-template-columns:minmax(330px,.72fr) minmax(620px,1.45fr);align-items:start;gap:14px 22px}
  .reading-group{margin:0}.reading-group:nth-child(n+2){grid-column:1}.reading-group:first-child{grid-column:1}.reading-panel{grid-column:2;grid-row:1/span 8;width:100%;max-width:none;margin:0;position:sticky;top:22px}
  .reading-group-list{grid-template-columns:1fr}
  .reading-scene-visual{min-height:clamp(280px,34vh,430px)}
  .chapter-panel{max-width:1240px;margin-left:auto;margin-right:auto}
  .text-panel{max-width:1040px;margin:auto}
}

@media(min-width:901px) and (max-height:780px){
  .hero{height:760px;min-height:760px}.hero-copy{margin-top:24px}.hero-cast{inset:175px 1% 12px}.hero-copy h1{font-size:clamp(2.8rem,4.8vw,4.6rem)}
}

@media(max-width:900px){
  .hero-copy h1{font-size:clamp(2rem,8vw,4.2rem)}
  .character-confirm-card{grid-template-columns:40% 1fr;width:min(820px,96vw)}
  .character-detail-copy{padding:60px 28px 24px}.character-detail-rail{padding:0 24px 20px}.character-detail-rail img{height:52px}
  .gm-guide-grid{grid-template-columns:1fr}
}

/* v20: cinematic cast scale and resilient reading workspace */
.deduction-chain{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 16px 14px}.deduction-chain span,.deduction-chain strong{padding:7px 10px;border:1px solid rgba(185,220,255,.25);border-radius:8px;background:#0b2037}.deduction-chain i{color:var(--gold);font-style:normal}.deduction-chain strong{border-color:var(--gold);color:#f6d986}.deduction-chain.secondary strong{border-color:#9d88ee;color:#d8ceff}
.gm-guide-grid .gm-deduction,.gm-guide-grid .gm-safety{grid-column:1/-1}.gm-guide-grid b{color:#f3dda2}
@media(min-width:901px){
  .hero{height:100svh;min-height:720px;max-height:none}
  .hero-copy{width:min(1120px,74vw);margin-top:clamp(26px,4.5vh,58px)}
  .hero-copy h1{font-size:clamp(3.6rem,5.9vw,7rem)}
  .hero-cast{inset:clamp(170px,24vh,250px) 0 0;align-items:flex-end}
  .hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:15.2%;height:104%;margin:0 -.25%}
  .hero-person-1 img{--hero-scale:1.28}.hero-person-2 img{--hero-scale:1.14}.hero-person-3 img{--hero-scale:1.18}.hero-person-4 img{--hero-scale:1.1}.hero-person-5 img{--hero-scale:1.18}.hero-person-6 img{--hero-scale:1.14}.hero-person-7 img{--hero-scale:1.18}
  .common-reader{display:grid;grid-template-columns:minmax(300px,34%) minmax(0,1fr);gap:22px 28px;align-items:start}
  .common-reader.hidden{display:none!important}.common-reader>.reader-intro,.common-reader>.gm-console,.common-reader>.change-character{grid-column:1/-1}
  .common-reader>.reading-tabs{grid-column:1;display:block;min-width:0;margin:0}
  .common-reader>.reading-panel{grid-column:2;grid-row:3;width:100%;min-width:0;max-width:none;margin:0;position:sticky;top:18px}
  .gm-mode .common-reader>.reading-panel{grid-row:4}
  .reading-tabs .reading-group,.reading-group-list,.reading-group-list button{min-width:0}
  .reading-group summary b,.reading-group-list b,.reading-group-list small{white-space:normal;word-break:keep-all;overflow-wrap:break-word}
}
@media(min-width:901px) and (max-width:1180px){
  .common-reader{display:block}.common-reader>.reading-panel{position:static;margin:22px 0}.reading-tabs{display:block}.reading-group-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v21: full-scale PC hero and fixed reading workspace */
@media(min-width:901px){
  .hero{height:100svh;min-height:760px;padding:0 20px 14px}
  .hero-copy{width:min(1040px,68vw);margin-top:clamp(18px,3vh,34px);padding:12px 28px 14px;border-radius:14px}
  .hero-copy h1{font-size:clamp(3.5rem,5.45vw,6.6rem);line-height:1.1}
  .hero-copy .eyebrow{font-size:.68rem}.hero-copy .tagline{margin:.25em 0;font-size:1rem}
  .hero-cast{inset:clamp(126px,17vh,176px) -1.8% 0;overflow:visible}
  .hero-person,.hero-person-1,.hero-person-2,.hero-person-3,.hero-person-4,.hero-person-5,.hero-person-6,.hero-person-7{width:16.1%;height:110%;margin:0 -.55%;filter:brightness(1.08) drop-shadow(0 20px 28px rgba(0,0,0,.72))}
  .hero-person-1 img{--hero-scale:1.35}.hero-person-2 img{--hero-scale:1.22}.hero-person-3 img{--hero-scale:1.25}.hero-person-4 img{--hero-scale:1.18}.hero-person-5 img{--hero-scale:1.25}.hero-person-6 img{--hero-scale:1.22}.hero-person-7 img{--hero-scale:1.26}
  .hero-person span{bottom:1.5%;padding:6px 14px;font-size:.78rem}

  .common-reader{width:min(1760px,calc(100% - 56px));grid-template-columns:minmax(340px,27%) minmax(0,1fr);gap:18px 34px;padding:38px clamp(28px,3vw,54px) 110px}
  .common-reader>.reader-intro{margin-bottom:8px}
  .common-reader>.reading-tabs{position:sticky;top:18px;max-height:calc(100vh - 104px);overflow-y:auto;overscroll-behavior:contain;padding:0 8px 18px 0;scrollbar-width:thin;scrollbar-color:#637b96 transparent}
  .common-reader>.reading-panel{top:18px;min-height:calc(100vh - 104px);max-height:none}
  .reading-confirm{min-height:calc(100vh - 184px)}
  .reading-panel .text-panel{max-width:900px}
  .reading-group-list button{min-height:76px}
}
@media(min-width:901px) and (max-width:1180px){
  .common-reader{display:grid;grid-template-columns:minmax(290px,32%) minmax(0,1fr);gap:18px 24px;width:calc(100% - 36px);padding-left:24px;padding-right:24px}
  .common-reader>.reader-intro,.common-reader>.gm-console,.common-reader>.change-character{grid-column:1/-1}
  .common-reader>.reading-tabs{grid-column:1;position:sticky;top:14px;max-height:calc(100vh - 90px);overflow-y:auto;margin:0}
  .common-reader>.reading-panel,.gm-mode .common-reader>.reading-panel{grid-column:2;grid-row:3;position:sticky;top:14px;margin:0;min-height:calc(100vh - 90px)}
  .gm-mode .common-reader>.reading-panel{grid-row:4}
  .reading-group-list{grid-template-columns:1fr}
}
@media(min-width:901px) and (max-height:780px){
  .hero{height:100svh;min-height:680px}.hero-copy{margin-top:14px;padding-top:9px;padding-bottom:10px}.hero-copy h1{font-size:clamp(3rem,5vw,5.3rem)}.hero-cast{inset:118px -2% 0}
}

/* 解禁項目は線と文字で区別し、対象・条件を読み落とさないようにする。 */
.secret-released s{text-decoration-thickness:2px;}
.secret-release-status{display:block;margin-top:.25em;color:#9cddce;font-size:.9em;text-decoration:none;}

/* GM reference handouts share the Handout navigation without player unlocks. */
#gmHandouts{display:none}
.gm-mode #reader > :not(#gmHandouts){display:none!important}
.gm-mode #gmHandouts{display:block}
.gm-handout-layout{display:grid;grid-template-columns:minmax(200px,260px) minmax(0,1fr);gap:28px;margin-top:24px;align-items:start}
.gm-handout-layout nav{position:sticky;top:90px;max-height:calc(100dvh - 110px);overflow:auto}
.gm-handout-layout details{border:1px solid #405369;border-radius:8px;padding:12px;margin-bottom:10px}
.gm-handout-layout summary{cursor:pointer;color:#eed18c;font-weight:bold;padding:6px}
.gm-handout-layout nav button{display:block;width:100%;text-align:left;padding:12px;margin-top:6px;background:#13283b;border:1px solid #405369;border-radius:5px;color:#edf3fa;font:inherit;cursor:pointer}
.gm-handout-layout button[aria-current=page]{border-color:#eed18c;background:#304354}
.gm-handout-layout h3{padding:24px;margin:0}.gm-handout-layout .chapter-panel{min-width:0}
.gm-handout-layout button:focus-visible{outline:3px solid #9acbff}
@media(max-width:760px){.gm-handout-layout{grid-template-columns:1fr}.gm-handout-layout nav{position:static;max-height:none}}

.rule-help{margin:20px 0 28px;padding:20px;border:1px solid #668091;border-radius:16px;background:#102434;color:#edf3f8}
.rule-help>p{font-size:.9rem;line-height:1.7}
.rule-help-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:12px}
.rule-tip{position:relative;min-width:0}
.rule-tip>button{width:100%;padding:12px;border:1px solid #8ca0af;border-radius:10px;background:#1e384b;color:#f6e2a4;font:inherit;text-align:left;cursor:help}
.rule-tip>button:focus-visible{outline:3px solid #f6d47d;outline-offset:3px}
.rule-tip-text{display:none;position:absolute;top:100%;left:0;z-index:30;box-sizing:border-box;width:100%;padding:16px;border:1px solid #d2b769;border-radius:10px;background:#132839;color:#fff;box-shadow:0 8px 24px #0008;font-size:.95rem;line-height:1.8;white-space:normal}
.rule-tip:hover .rule-tip-text,.rule-tip:focus-within .rule-tip-text,.rule-tip.open .rule-tip-text{display:block}
.rule-tip.dismissed .rule-tip-text{display:none}

.rule-tip-text{white-space:pre-line;line-height:1.8}

.public-profile{max-width:960px;margin:24px auto;padding:clamp(16px,4vw,40px);border:1px solid #7b8c9b;border-radius:12px;background:#0c1726;color:#f4f0e5}.public-profile .cast-guide{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:24px}.public-profile .cast-guide>img{width:100%;max-height:60vh;object-fit:contain}.public-profile>p{line-height:1.8}.public-profile button{min-height:44px;white-space:normal}.public-profile .primary{margin:16px 0}@media(max-width:600px){.public-profile .cast-guide{grid-template-columns:1fr}.public-profile .cast-guide>img{max-height:36vh}}

.public-profile .secondary{margin:8px 0 8px 10px;padding:12px 18px;border:1px solid #7b8c9b;border-radius:8px;background:#152b3c;color:#f4f0e5;font:inherit;cursor:pointer}@media(max-width:600px){.public-profile .cast-guide>img{grid-row:auto;height:36vh}.public-profile .secondary{margin-left:0}}

body[data-view="profile"]>.hero{display:none}
