/* Emotion, ideas, analysis and tablet layouts. Order is significant; see index.html. */
/* v46v: 感情曲線・山場設計（2〜7話単位） */
.emotion-curve-modal{align-items:center;padding:calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left))}
.emotion-curve-box{width:min(1180px,100%);max-height:min(96vh,1040px);display:flex;flex-direction:column;overflow:hidden}
.emotion-curve-head{flex:0 0 auto;padding:9px 12px}
.emotion-curve-head>div{min-width:0;display:grid;gap:1px}
.emotion-curve-head small{color:var(--sub);font-size:10px}
.emotion-curve-head>span{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.emotion-analysis-status{flex:0 0 auto;padding:7px 12px;border-bottom:1px solid var(--line);background:var(--soft);color:var(--sub);font-size:11px}
.emotion-curve-body{min-height:0;overflow:auto;padding:10px;background:color-mix(in srgb,var(--soft) 35%,var(--panel));-webkit-overflow-scrolling:touch}
.emotion-intro,.emotion-empty{max-width:720px;margin:18px auto;padding:22px;border:1px solid var(--line);border-radius:15px;background:var(--panel);text-align:center}
.emotion-empty.compact{margin:8px;padding:14px}
.emotion-intro-stars{margin-bottom:12px;color:var(--accent);font-size:19px;font-weight:900;letter-spacing:.04em}
.emotion-intro b,.emotion-empty b{display:block;margin-bottom:6px;font-size:16px}
.emotion-intro p,.emotion-empty p{margin:0 0 15px;color:var(--sub);font-size:12px;line-height:1.7}
.emotion-outdated{margin-bottom:8px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--accent) 8%,var(--panel));font-size:11px;line-height:1.5}
.emotion-tabs{position:sticky;top:-10px;z-index:8;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:-10px -10px 10px;padding:8px 10px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel) 94%,transparent);backdrop-filter:blur(8px)}
.emotion-tabs button{min-height:36px;padding:5px 7px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--sub);font-size:11px;font-weight:800;cursor:pointer}
.emotion-tabs button.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,var(--panel));color:var(--accent)}
.emotion-overview,.emotion-blocks-view,.emotion-five-view,.emotion-prescription-view,.emotion-guide-view{display:grid;gap:9px}
.emotion-panel{min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);overflow:hidden}
.emotion-panel>header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:8px 10px;border-bottom:1px solid var(--line)}
.emotion-panel>header b{font-size:12px}
.emotion-panel>header small{color:var(--sub);font-size:9.5px;text-align:right}
.emotion-summary-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.emotion-summary-cards span{display:grid;grid-template-columns:auto auto;align-content:center;justify-content:center;gap:3px;min-height:48px;padding:5px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--sub);font-size:9px}
.emotion-summary-cards b{color:var(--ink);font-size:17px;line-height:1}
.emotion-summary-cards small{align-self:end}
.emotion-curve-scroll{overflow-x:auto;overflow-y:hidden;background:linear-gradient(180deg,color-mix(in srgb,var(--soft) 65%,var(--panel)),var(--panel));-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.emotion-curve-svg{display:block;min-width:100%}
.emotion-band{opacity:.045}
.emotion-band-5{fill:#c96f61}.emotion-band-4{fill:#d19a4a}.emotion-band-3{fill:#6b8ecb}.emotion-band-2,.emotion-band-1{fill:#7f9a86}
.emotion-grid-line{stroke:var(--line);stroke-width:1;stroke-dasharray:3 4}
.emotion-grid-label{fill:var(--sub);font-size:11px;font-weight:800}
.emotion-curve-line{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.emotion-point-box{stroke:var(--panel);stroke-width:3;cursor:pointer}
.emotion-star-box-1,.emotion-star-box-2{fill:#7f9a86}.emotion-star-box-3{fill:#6b8ecb}.emotion-star-box-4{fill:#d19a4a}.emotion-star-box-5{fill:#c96f61}
.emotion-point-star{fill:#fff;font-size:12px;font-weight:900;pointer-events:none}
.emotion-point-label{fill:var(--ink);font-size:10px;font-weight:800}
.emotion-axis-label,.emotion-role-label{fill:var(--sub);font-size:9px;font-weight:750}
.emotion-chart-point:focus .emotion-point-box,.emotion-chart-point:hover .emotion-point-box{stroke:var(--ink)}
.emotion-overview-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:9px}
.emotion-warnings{display:grid;gap:5px;padding:8px}
.emotion-warning{display:grid;gap:2px;padding:8px 9px;border:1px solid var(--line);border-radius:9px;background:var(--panel);font-size:10.5px;line-height:1.45}
.emotion-warning b{font-size:10px}.emotion-warning span{color:var(--sub)}
.emotion-warning.warn{border-color:color-mix(in srgb,var(--danger) 38%,var(--line));background:color-mix(in srgb,var(--danger) 6%,var(--panel))}
.emotion-warning.notice{border-color:color-mix(in srgb,var(--accent) 36%,var(--line));background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.emotion-warning.good{border-color:color-mix(in srgb,#64a27c 40%,var(--line));background:color-mix(in srgb,#64a27c 7%,var(--panel))}
.emotion-trait-list{display:grid;gap:0;padding:3px 10px 8px}
.emotion-trait-list p{display:grid;grid-template-columns:82px minmax(0,1fr);gap:8px;margin:0;padding:8px 0;border-bottom:1px dashed var(--line);font-size:10.5px;line-height:1.5}
.emotion-trait-list p:last-child{border:0}.emotion-trait-list b{color:var(--sub);font-size:9.5px}
.emotion-filter{display:flex;gap:5px;overflow-x:auto;padding-bottom:1px}
.emotion-filter button{flex:0 0 auto;min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:var(--panel);color:var(--sub);font-size:10px;font-weight:800}
.emotion-filter button.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent)}
.emotion-block-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(480px,100%),1fr));gap:8px;align-items:start}
.emotion-block-card{min-width:0;border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:11px;background:var(--panel);overflow:hidden;box-shadow:0 2px 9px rgba(0,0,0,.025)}
.emotion-star-card-1,.emotion-star-card-2{border-left-color:#7f9a86}.emotion-star-card-3{border-left-color:#6b8ecb}.emotion-star-card-4{border-left-color:#d19a4a}.emotion-star-card-5{border-left-color:#c96f61}
.emotion-block-summary{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:65px;padding:7px 9px;cursor:pointer;list-style:none}
.emotion-block-summary::-webkit-details-marker{display:none}
.emotion-big-star{display:grid;place-items:center;align-self:stretch;border-radius:9px;background:var(--soft);font-size:15px;font-weight:900}
.emotion-star-card-4 .emotion-big-star{background:color-mix(in srgb,#d19a4a 16%,var(--panel));color:#a66d1f}
.emotion-star-card-5 .emotion-big-star{background:color-mix(in srgb,#c96f61 16%,var(--panel));color:#a9483c}
.emotion-block-title{min-width:0;display:grid;gap:2px}
.emotion-block-title small{color:var(--sub);font-size:9px;font-weight:750}.emotion-block-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.emotion-block-title em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--sub);font-size:9px;font-style:normal}
.emotion-auto-badge{flex:0 0 auto;padding:3px 6px;border-radius:999px;background:var(--soft);color:var(--sub);font-size:8.5px;font-weight:800}.emotion-auto-badge.manual{background:color-mix(in srgb,var(--accent) 13%,var(--panel));color:var(--accent)}
.emotion-block-detail{display:grid;gap:8px;padding:9px;border-top:1px solid var(--line)}
.emotion-block-section{display:grid;gap:7px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.emotion-block-section>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.emotion-block-section>header b{font-size:10.5px}.emotion-block-section>header span{color:var(--sub);font-size:8.5px}
.emotion-block-manual{background:color-mix(in srgb,var(--accent) 4%,var(--panel2))}.emotion-block-peak .emotion-analysis-facts{margin:0}
.emotion-guide-combined>div+div{margin-top:4px;padding-top:10px;border-top:1px solid var(--line)}
.emotion-star-control,.emotion-axis-control,.emotion-note{display:grid;gap:4px}.emotion-star-control>span,.emotion-axis-control>span,.emotion-note>span{color:var(--sub);font-size:9.5px;font-weight:800}
.emotion-star-control>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.emotion-star-choice{display:grid;place-items:center;gap:1px;min-height:42px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--sub);cursor:pointer}.emotion-star-choice b{font-size:11px}.emotion-star-choice small{font-size:8px}.emotion-star-choice.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent)}
.emotion-axis-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.emotion-axis-chip{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px;min-width:0;min-height:42px;padding:4px 6px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--sub);text-align:left;cursor:pointer}.emotion-axis-chip b{font-size:13px}.emotion-axis-chip small{overflow:hidden;color:inherit;font-size:8px;line-height:1.2}.emotion-axis-chip.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent)}
.emotion-reason{margin:0;padding:8px;border-radius:8px;background:var(--soft);font-size:10.5px;line-height:1.55}.emotion-reason b{color:var(--accent);letter-spacing:.03em}
.emotion-tag-row,.emotion-evidence{display:flex;gap:4px;flex-wrap:wrap;align-items:center}.emotion-tag-row span,.emotion-evidence span{padding:3px 6px;border-radius:999px;background:var(--soft);color:var(--sub);font-size:8.5px}.emotion-evidence b{margin-right:2px;font-size:9px}.emotion-evidence small{margin-left:auto;color:var(--sub);font-size:8.5px}
.emotion-note .ta{width:100%;min-height:54px;margin:0;padding:6px 7px;font-size:10.5px}.emotion-card-actions{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.emotion-five-rule{display:grid;gap:8px;padding:12px;border:1px solid color-mix(in srgb,#c96f61 35%,var(--line));border-radius:12px;background:color-mix(in srgb,#c96f61 6%,var(--panel))}.emotion-five-rule>b{font-size:15px}.emotion-five-rule>p{margin:0;font-size:11px;line-height:1.65}.emotion-five-rule>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.emotion-five-rule span{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;padding:6px;border-radius:8px;background:var(--panel);font-size:9px}.emotion-five-rule span b{font-size:14px}
.emotion-five-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.emotion-five-item{display:grid;gap:5px;margin:8px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.emotion-five-item>div:first-child{display:flex;justify-content:space-between;gap:8px}.emotion-five-item>div span{color:var(--sub);font-size:9px}.emotion-five-item>p{margin:0;color:var(--sub);font-size:9.5px;line-height:1.45}.emotion-axis-mini{display:grid;gap:4px}.emotion-axis-mini span{padding:5px 6px;border-radius:7px;background:var(--soft);font-size:9px;line-height:1.4}.emotion-axis-mini span b{margin-right:5px}.emotion-five-item .btn-mini{justify-self:start}
.emotion-star-guide,.emotion-axis-guide,.emotion-catalog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px;padding:8px}.emotion-star-guide article,.emotion-axis-guide article,.emotion-catalog-grid article{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 7px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.emotion-star-guide article>b,.emotion-axis-guide article>b{grid-row:1/3;display:grid;place-items:center;min-width:34px;border-radius:7px;background:var(--soft);font-size:15px}.emotion-star-guide article>span,.emotion-axis-guide article>span,.emotion-catalog-grid article>b{font-size:10.5px;font-weight:850}.emotion-star-guide p,.emotion-axis-guide p,.emotion-catalog-grid p{margin:0;color:var(--sub);font-size:9px;line-height:1.45}.emotion-catalog-grid article{grid-template-columns:1fr}.emotion-catalog-grid p span{display:inline-block;min-width:28px;margin-right:4px;color:var(--accent);font-weight:900}
.emotion-principles,.emotion-example-list{display:grid;gap:5px;padding:0 8px 8px}.emotion-principles p,.emotion-example-list p{margin:0;padding:8px;border-radius:8px;background:var(--soft);font-size:9.5px;line-height:1.55}.emotion-principles b,.emotion-example-list b{margin-right:5px}
@media(max-width:760px){
 .emotion-curve-modal{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);align-items:stretch}.emotion-curve-box{width:100%;max-height:100dvh;min-height:100dvh;border-radius:0;border-inline:0}.emotion-curve-head{padding:7px 8px}.emotion-curve-head>span{gap:3px}.emotion-curve-head .btn-mini{min-height:31px;padding:4px 7px;font-size:9px}.emotion-curve-body{padding:7px}.emotion-tabs{top:-7px;margin:-7px -7px 8px;padding:6px 7px}.emotion-tabs button{min-height:34px;padding:4px 3px;font-size:9.5px}.emotion-summary-cards{grid-template-columns:repeat(5,minmax(62px,1fr));overflow-x:auto}.emotion-summary-cards span{min-height:42px}.emotion-overview-grid,.emotion-five-columns{grid-template-columns:1fr}.emotion-block-list{grid-template-columns:1fr}.emotion-block-summary{grid-template-columns:43px minmax(0,1fr) auto;min-height:61px;padding:6px 7px}.emotion-big-star{font-size:13px}.emotion-block-detail{padding:7px}.emotion-axis-chip{grid-template-columns:1fr;text-align:center}.emotion-axis-chip small{display:none}.emotion-five-rule>div{grid-template-columns:repeat(2,minmax(0,1fr))}.emotion-star-guide,.emotion-axis-guide,.emotion-catalog-grid{grid-template-columns:1fr}.emotion-intro,.emotion-empty{margin:10px auto;padding:16px 12px}
}
@media(min-width:761px) and (max-width:1100px){.emotion-curve-box{width:min(1020px,100%)}.emotion-block-list{grid-template-columns:repeat(2,minmax(0,1fr))}.emotion-overview-grid{grid-template-columns:1fr 1fr}.emotion-axis-chip small{font-size:7.5px}}
.emotion-curve-svg{max-width:none!important;height:282px!important}

/* v46w: separated overall tools, idea cards, plot-axis × emotion advice */
.overall-head-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.overall-home{max-width:720px;margin:0 auto;padding:10px}
.overall-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.overall-switcher button{appearance:none;min-width:0;min-height:44px;display:grid;place-content:center;gap:2px;padding:6px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink);text-align:center;cursor:pointer}
.overall-switcher button:hover,.overall-switcher button:focus-visible{border-color:var(--line);background:var(--panel)}
.overall-switcher button.active{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:var(--panel);box-shadow:0 2px 8px rgba(0,0,0,.05)}
.overall-switcher b{font-size:11.5px;line-height:1.25;white-space:nowrap}
.overall-switcher small{color:var(--sub);font-size:8.5px;line-height:1.2;white-space:nowrap}
.overall-content>.overall-switcher{position:sticky;top:0;z-index:5}
.overall-idea-section{padding:12px}
.idea-board{display:grid;gap:10px}
.idea-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px}
.idea-toolbar>div{display:grid;gap:2px}.idea-toolbar b{font-size:18px}.idea-toolbar small{color:var(--sub);font-size:10px}
.idea-add{margin:0;white-space:nowrap}
.idea-filter-row{display:flex;justify-content:flex-end}
.idea-filter-row .input{width:min(180px,100%);margin:0;min-width:0}
.idea-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:9px;align-items:start}
.idea-card{min-width:0;display:grid;gap:7px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);box-shadow:0 3px 10px rgba(0,0,0,.035)}
.idea-card.is-pinned{border-color:color-mix(in srgb,#c99a42 55%,var(--line));box-shadow:inset 0 3px 0 color-mix(in srgb,#c99a42 55%,transparent)}
.idea-card-head{display:grid;grid-template-columns:28px minmax(90px,1fr) minmax(74px,100px) 32px auto;align-items:center;gap:5px}
.idea-kind-mark{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--soft);font-size:12px;font-weight:900}
.idea-card-head .input{min-width:0;min-height:30px;margin:0;padding:3px 6px;font-size:10px}
.idea-pin{width:32px;height:30px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--sub);font-size:14px;cursor:pointer}
.idea-pin.active{border-color:#c99a42;background:color-mix(in srgb,#c99a42 15%,var(--panel));color:#a36f11}
.idea-delete{min-height:30px;margin:0;padding:3px 7px;font-size:9.5px}
.idea-title{min-height:36px;margin:0;font-weight:800}
.idea-content{width:100%;min-height:105px;margin:0;resize:vertical;line-height:1.55}
.idea-card-foot{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
.idea-card-foot label{min-width:0;display:grid;gap:2px}.idea-card-foot label>span{color:var(--sub);font-size:9px;font-weight:800}
.idea-card-foot .input{min-width:0;width:100%;margin:0;min-height:31px;padding:4px 6px;font-size:10px}
.idea-linked-work{color:var(--sub);font-size:9px;text-align:right}
.idea-empty{grid-column:1/-1;display:grid;place-items:center;gap:5px;min-height:220px;padding:24px;border:1px dashed var(--line);border-radius:12px;text-align:center;color:var(--sub)}
.idea-empty>b{color:var(--ink);font-size:14px}.idea-empty>p{max-width:420px;margin:0;font-size:11px;line-height:1.6}
.axis-advice-modal{background:rgba(0,0,0,.48)}
.axis-advice-box{width:min(1120px,calc(100vw - 24px));max-height:min(92dvh,940px);overflow:hidden}
.axis-advice-box .overall-popup-head>div{display:grid;gap:2px}.axis-advice-box .overall-popup-head small{color:var(--sub);font-size:10px}
.axis-advice-box .overall-popup-head>span{display:flex;gap:6px}
.axis-advice-body{display:grid;gap:10px;background:var(--panel2)}
.emotion-axis-advice-view{display:grid;gap:10px}
.axis-advice-notice{padding:9px 11px;border:1px solid color-mix(in srgb,#c99a42 45%,var(--line));border-radius:9px;background:color-mix(in srgb,#c99a42 8%,var(--panel));font-size:10px;line-height:1.55}
.axis-advice-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.axis-advice-summary article{display:grid;grid-template-columns:1fr auto auto;align-items:end;gap:3px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.axis-advice-summary span{grid-column:1/-1;color:var(--sub);font-size:9px}.axis-advice-summary b{font-size:23px}.axis-advice-summary small{padding-bottom:3px;color:var(--sub);font-size:9px}
.axis-advice-panel{display:grid;gap:7px;border:1px solid var(--line);border-radius:12px;background:var(--panel);overflow:hidden}
.axis-advice-panel>header{display:flex;justify-content:space-between;gap:8px;padding:10px 11px;border-bottom:1px solid var(--line);background:var(--soft)}
.axis-advice-panel>header>div{display:grid;gap:2px}.axis-advice-panel>header b{font-size:14px}.axis-advice-panel>header small{color:var(--sub);font-size:9px}
.axis-advice-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}
.axis-advice-pair{min-width:0;border:1px solid var(--line);border-radius:9px;background:var(--panel2);overflow:hidden}
.axis-advice-pair>summary{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:6px;padding:8px;cursor:pointer;list-style:none}
.axis-advice-pair>summary::-webkit-details-marker{display:none}.axis-advice-pair>summary b{min-width:0;font-size:10.5px;line-height:1.4}.axis-advice-pair>summary em{padding:3px 6px;border-radius:999px;background:var(--soft);font-size:9px;font-style:normal;font-weight:900;white-space:nowrap}
.axis-advice-rank{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--accent);color:#fff;font-size:10px;font-weight:900}
.axis-advice-pair>div{display:grid;gap:5px;padding:0 8px 8px}.axis-advice-pair p{display:grid;grid-template-columns:42px minmax(0,1fr);gap:5px;margin:0;padding:6px;border-radius:7px;background:var(--panel);font-size:9.5px;line-height:1.5}.axis-advice-pair strong{color:var(--accent)}
.axis-advice-axis-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}
.axis-advice-axis{min-width:0;display:grid;gap:6px;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.axis-advice-axis>header{display:flex;align-items:center;gap:6px;min-width:0}.axis-advice-axis>header span{flex:0 0 auto;padding:3px 6px;border-radius:999px;background:var(--soft);font-size:9px;font-weight:900}.axis-advice-axis>header b{min-width:0;font-size:11px;overflow-wrap:anywhere}
.axis-advice-axis-tags{display:flex;flex-wrap:wrap;gap:4px}.axis-advice-axis-tags span{padding:3px 6px;border-radius:999px;background:var(--panel);font-size:8.5px}.axis-advice-axis-tags b{margin-right:4px;color:var(--accent)}
.axis-advice-axis dl{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0}.axis-advice-axis dl>div{display:grid;gap:2px;padding:6px;border-radius:7px;background:var(--panel)}.axis-advice-axis dt{color:var(--sub);font-size:8px}.axis-advice-axis dd{margin:0;font-size:9px;font-weight:800}
.axis-advice-axis>p{margin:0;font-size:9.5px;line-height:1.55}.axis-advice-axis>small{color:var(--sub);font-size:8.5px}
.axis-advice-empty{display:grid;place-items:center;gap:5px;min-height:180px;padding:24px;text-align:center}.axis-advice-empty.compact{min-height:90px}.axis-advice-empty p{margin:0;color:var(--sub);font-size:10px}
@media(max-width:760px){
  .overall-home{padding:7px}.overall-switcher{gap:4px;padding:4px}.overall-switcher button{min-height:42px;padding-inline:4px}.overall-switcher b{font-size:10.5px}
  .overall-idea-section{padding:8px!important}.idea-toolbar b{font-size:15px}.idea-toolbar small{font-size:9px}.idea-filter-row .input{width:108px}.idea-grid{grid-template-columns:1fr;gap:7px}.idea-card{padding:8px}.idea-card-head{grid-template-columns:26px minmax(0,1fr) 74px 30px}.idea-kind-mark{width:26px;height:28px}.idea-delete{grid-column:2/5;width:100%;min-height:28px}.idea-card-foot{grid-template-columns:1fr}.idea-content{min-height:92px}
  .axis-advice-modal{padding:0;align-items:stretch}.axis-advice-box{width:100%;max-height:100dvh;min-height:100dvh;border-radius:0;border-inline:0}.axis-advice-body{padding:8px}.axis-advice-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.axis-advice-pairs,.axis-advice-axis-list{grid-template-columns:1fr}.axis-advice-pair>summary{grid-template-columns:24px minmax(0,1fr) auto}.axis-advice-pair p{grid-template-columns:38px minmax(0,1fr)}
}
@media(min-width:761px) and (max-width:980px){.idea-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.axis-advice-pairs,.axis-advice-axis-list{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v46x: 感情曲線の総合処方箋・軸助言の確実な縦スクロール */
.axis-advice-box{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
.axis-advice-box>.overall-popup-head{flex:0 0 auto}
.axis-advice-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
.emotion-boundary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;padding:7px 8px;border:1px dashed var(--line);border-radius:8px;background:var(--panel2);font-size:9.5px;line-height:1.5}.emotion-boundary b{color:var(--accent)}
.emotion-readiness{display:grid;gap:6px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.emotion-readiness>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.emotion-readiness>header b{font-size:10.5px}.emotion-readiness>header span{color:var(--sub);font-size:9px}
.emotion-readiness-bar{height:7px;overflow:hidden;border-radius:999px;background:var(--soft)}.emotion-readiness-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7f9a86,#d19a4a,#c96f61)}
.emotion-genre-mini{display:grid;gap:4px;margin-top:2px}.emotion-genre-mini p{margin:0;padding:6px 7px;border-radius:7px;background:var(--panel);font-size:9px;line-height:1.5}.emotion-genre-mini b{display:block;margin-bottom:2px;color:var(--accent)}
.emotion-boundary-upgrade small{color:var(--sub);font-size:8.8px;line-height:1.45}
.emotion-prescription-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:7px;padding:8px}
.emotion-prescription-card{min-width:0;display:grid;gap:6px;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.emotion-prescription-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.emotion-prescription-card>header>div{min-width:0;display:grid;gap:2px}.emotion-prescription-card>header b{font-size:11px}.emotion-prescription-card>header span{color:var(--sub);font-size:9px}.emotion-prescription-card>header em{flex:0 0 auto;display:grid;place-items:center;min-width:46px;min-height:32px;border-radius:9px;background:var(--soft);color:var(--accent);font-size:12px;font-style:normal;font-weight:900}
.emotion-prescription-card>p{margin:0;color:var(--sub);font-size:9.5px;line-height:1.5}.emotion-prescription-card>.btn-mini{justify-self:start}
.emotion-missing-list{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.emotion-missing-list>b{font-size:9px;color:var(--danger)}.emotion-missing-list>span{padding:3px 6px;border-radius:999px;background:var(--soft);font-size:8.5px}.emotion-missing-list.complete>b{color:#3e8059}
.emotion-one-step{padding:7px!important;border-radius:8px;background:color-mix(in srgb,var(--accent) 7%,var(--panel))}.emotion-one-step b{margin-right:5px;color:var(--accent)}
.emotion-spread-list,.emotion-boundary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:7px;padding:8px}
.emotion-spread-list>article,.emotion-boundary-grid>article{min-width:0;display:grid;gap:6px;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.emotion-spread-list article>header,.emotion-boundary-grid article>header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.emotion-spread-list header b,.emotion-boundary-grid header b{font-size:10.5px}.emotion-spread-list header em,.emotion-boundary-grid header span{flex:0 0 auto;padding:3px 6px;border-radius:999px;background:var(--soft);color:var(--accent);font-size:8.5px;font-style:normal;font-weight:900}
.emotion-spread-list p,.emotion-boundary-grid p{margin:0;color:var(--sub);font-size:9.5px;line-height:1.55}.emotion-spread-list article>div{display:flex;gap:5px;flex-wrap:wrap}.emotion-boundary-grid small{color:var(--sub);font-size:8.7px;line-height:1.45}.emotion-boundary-grid .btn-mini{justify-self:start}
.emotion-genre-list{display:grid;gap:6px;padding:8px}.emotion-genre-list details{border:1px solid var(--line);border-radius:9px;background:var(--panel2);overflow:hidden}.emotion-genre-list summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;cursor:pointer;list-style:none}.emotion-genre-list summary::-webkit-details-marker{display:none}.emotion-genre-list summary b{font-size:10.5px}.emotion-genre-list summary span{color:var(--sub);font-size:9px}.emotion-genre-list details>div{display:grid;gap:5px;padding:0 8px 8px}.emotion-genre-list p{margin:0;padding:7px;border-radius:7px;background:var(--panel);font-size:9.5px;line-height:1.55}.emotion-genre-list p b{display:block;margin-bottom:2px;color:var(--accent)}
.emotion-opening-diagnosis{display:grid;gap:7px;padding:10px}.emotion-opening-diagnosis>b{font-size:13px}.emotion-opening-diagnosis>p{margin:0;color:var(--sub);font-size:10px;line-height:1.65}.emotion-opening-diagnosis>.btn-mini{justify-self:start}
@media(max-width:760px){
  .axis-advice-box{height:100dvh!important;max-height:100dvh!important;min-height:100dvh!important}.axis-advice-body{padding:8px 8px calc(92px + env(safe-area-inset-bottom))!important}
  .emotion-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}.emotion-tabs button{font-size:8.6px;padding-inline:2px}
  .emotion-prescription-grid,.emotion-spread-list,.emotion-boundary-grid{grid-template-columns:1fr;padding:6px}.emotion-boundary{grid-template-columns:1fr}.emotion-check-grid{grid-template-columns:1fr}
}

.emotion-wave-strip{display:flex;gap:5px;overflow-x:auto;padding:7px 8px 9px;border-top:1px solid var(--line);background:var(--panel);-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.emotion-wave-item{flex:0 0 86px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 4px;min-height:58px;padding:6px;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--ink);text-align:left;cursor:pointer}.emotion-wave-item>span{grid-row:1/3;display:grid;place-items:center;min-width:29px;border-radius:7px;background:var(--soft);font-size:11px;font-weight:900}.emotion-wave-item>b{font-size:9.5px;white-space:nowrap}.emotion-wave-item>small{color:var(--sub);font-size:8px;white-space:nowrap}.emotion-wave-item>em{grid-column:1/-1;color:var(--accent);font-size:8px;font-style:normal;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.emotion-wave-4{border-color:color-mix(in srgb,#d19a4a 45%,var(--line))}.emotion-wave-5{border-color:color-mix(in srgb,#c96f61 55%,var(--line))}


/* v46y: 軸助言モーダルのセーフエリア・末尾スクロール修正 */
.axis-advice-box{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  min-height:0!important;
  overflow:hidden!important;
}
.axis-advice-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-content:normal!important;
  gap:10px!important;
  min-width:0;
}
.axis-advice-head-title{min-width:0;display:grid;gap:2px}
.axis-advice-head-title>b,.axis-advice-head-title>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.axis-advice-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:0 0 auto}
.axis-advice-head-actions .btn-mini{min-width:52px;min-height:34px;padding:5px 10px;line-height:1.2}
.axis-advice-body{
  width:100%;
  height:100%;
  min-height:0!important;
  max-height:none!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  scrollbar-gutter:stable;
  scroll-padding-block:12px 120px;
  box-sizing:border-box;
}
.axis-advice-scroll-end{width:100%;height:32px;min-height:32px;pointer-events:none}
@media(max-width:760px){
  .axis-advice-modal{
    padding:0!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }
  .axis-advice-box{
    width:100%!important;
    height:var(--app-vh,100dvh)!important;
    max-height:var(--app-vh,100dvh)!important;
    min-height:0!important;
    border:0!important;
    border-radius:0!important;
  }
  .axis-advice-head{
    padding:
      calc(11px + env(safe-area-inset-top))
      calc(10px + env(safe-area-inset-right))
      10px
      calc(10px + env(safe-area-inset-left))!important;
    min-height:calc(55px + env(safe-area-inset-top));
    box-sizing:border-box;
  }
  .axis-advice-head-title>b{font-size:15px!important}
  .axis-advice-head-title>small{font-size:9px!important}
  .axis-advice-head-actions{gap:5px}
  .axis-advice-head-actions .btn-mini{
    min-width:50px!important;
    min-height:36px!important;
    padding:5px 8px!important;
    font-size:10px!important;
  }
  .axis-advice-body{
    padding:
      8px
      calc(8px + env(safe-area-inset-right))
      calc(118px + env(safe-area-inset-bottom))
      calc(8px + env(safe-area-inset-left))!important;
    scroll-padding-bottom:calc(132px + env(safe-area-inset-bottom));
  }
  .axis-advice-scroll-end{
    height:calc(44px + env(safe-area-inset-bottom));
    min-height:calc(44px + env(safe-area-inset-bottom));
  }
}
@media(max-width:360px){
  .axis-advice-head{gap:6px!important}
  .axis-advice-head-title>b{font-size:13.5px!important}
  .axis-advice-head-actions .btn-mini{min-width:46px!important;padding-inline:6px!important;font-size:9.5px!important}
}


/* v46y: 感情設計・山場設計の操作ボタン重なり修正 */
.analysis-popup-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  justify-content:stretch!important;
  gap:8px 12px!important;
  min-width:0;
  padding:10px 12px!important;
  box-sizing:border-box;
}
.analysis-popup-title{
  min-width:0;
  display:grid;
  gap:2px;
  overflow:hidden;
}
.analysis-popup-title>b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px!important;
  line-height:1.25;
}
.analysis-popup-title>small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--sub);
  font-size:9.5px;
  line-height:1.3;
}
.analysis-popup-actions{
  display:grid!important;
  grid-auto-flow:column;
  grid-auto-columns:max-content;
  align-items:center;
  justify-content:end!important;
  gap:5px!important;
  min-width:0;
}
.analysis-popup-actions .btn-mini{
  min-width:58px;
  min-height:32px;
  margin:0;
  padding:5px 9px;
  white-space:nowrap;
  line-height:1.2;
}
.emotion-analysis-status{position:relative;z-index:2}
@media(max-width:760px){
  .analysis-popup-head{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-items:stretch!important;
    gap:6px!important;
    padding:calc(7px + env(safe-area-inset-top)) 8px 7px!important;
  }
  .analysis-popup-title{width:100%;padding-inline:2px}
  .analysis-popup-title>b{
    font-size:14px!important;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  .analysis-popup-title>small{font-size:9px}
  .analysis-popup-actions{
    grid-auto-flow:initial!important;
    grid-auto-columns:initial!important;
    width:100%;
    justify-content:stretch!important;
    gap:5px!important;
  }
  .emotion-head-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .axis-advice-head-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .analysis-popup-actions .btn-mini{
    width:100%;
    min-width:0!important;
    min-height:34px!important;
    padding:5px 4px!important;
    font-size:10px!important;
  }
  .emotion-curve-head,.axis-advice-head{flex:0 0 auto!important;min-height:0!important}
  .emotion-curve-body,.axis-advice-body{scroll-padding-top:8px}
}
@media(max-width:360px){
  .analysis-popup-head{padding-inline:6px!important}
  .analysis-popup-actions{gap:4px!important}
  .analysis-popup-actions .btn-mini{font-size:9.5px!important;padding-inline:2px!important}
}

/* v46y hotfix: グリッド行の縮小で軸別カードが切れるのを防ぐ */
.axis-advice-body{display:block!important}
.axis-advice-body>.axis-advice-notice,
.axis-advice-body>.axis-advice-summary,
.axis-advice-body>.axis-advice-panel,
.axis-advice-body>.axis-advice-scroll-end{margin-block:0 10px}
.axis-advice-body>.axis-advice-scroll-end{margin-bottom:0}

/* v46z: 「感情曲線・山場設計」見出しの上切れ・隠れを完全防止 */
.emotion-curve-box{
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr)!important;
  min-height:0!important;
  overflow:hidden!important;
}
.emotion-curve-head{
  position:relative!important;
  z-index:30!important;
  flex:none!important;
  min-height:58px!important;
  overflow:visible!important;
  background:var(--panel)!important;
  color:var(--ink)!important;
  isolation:isolate;
}
.emotion-curve-head .analysis-popup-title{
  min-height:0!important;
  overflow:visible!important;
  align-content:center;
}
.emotion-curve-head .analysis-popup-title>b,
#emotionCurveTitle{
  display:block!important;
  position:relative!important;
  z-index:2!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:1.35em!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  clip:auto!important;
  visibility:visible!important;
  opacity:1!important;
  color:var(--ink)!important;
  line-height:1.35!important;
  white-space:normal!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
}
.emotion-curve-head .analysis-popup-title>small{
  display:block!important;
  min-height:1.2em;
  overflow:visible!important;
  white-space:normal!important;
  text-overflow:clip!important;
}
.emotion-head-actions{
  position:relative!important;
  z-index:3!important;
}
.emotion-curve-body{
  min-height:0!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
@media(max-width:900px){
  .emotion-curve-head{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-items:stretch!important;
    gap:7px!important;
  }
  .emotion-head-actions{
    width:100%!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-flow:initial!important;
    grid-auto-columns:initial!important;
    justify-content:stretch!important;
  }
}
@media(max-width:760px){
  .emotion-curve-modal{
    align-items:stretch!important;
    justify-content:stretch!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .emotion-curve-box{
    width:100%!important;
    height:var(--app-vh,100dvh)!important;
    min-height:0!important;
    max-height:var(--app-vh,100dvh)!important;
    border:0!important;
    border-radius:0!important;
  }
  .emotion-curve-head{
    min-height:calc(112px + env(safe-area-inset-top))!important;
    padding:
      calc(13px + env(safe-area-inset-top))
      calc(10px + env(safe-area-inset-right))
      9px
      calc(10px + env(safe-area-inset-left))!important;
    box-sizing:border-box!important;
  }
  #emotionCurveTitle{
    font-size:16px!important;
    line-height:1.4!important;
  }
  .emotion-curve-head .analysis-popup-title>small{
    font-size:9.5px!important;
    line-height:1.35!important;
  }
  .emotion-head-actions .btn-mini{
    min-height:38px!important;
  }
  .emotion-curve-body{
    padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:calc(108px + env(safe-area-inset-bottom));
  }
}
@media(max-width:360px){
  .emotion-curve-head{
    min-height:calc(108px + env(safe-area-inset-top))!important;
    padding-inline:calc(7px + env(safe-area-inset-left)) calc(7px + env(safe-area-inset-right))!important;
  }
  #emotionCurveTitle{font-size:15px!important}
}

/* v47a: ネタ帳を本文中心のシンプルカードへ整理 */
.idea-card-head{
  grid-template-columns:28px minmax(0,1fr) auto!important;
}
.idea-content{
  min-height:150px!important;
}
.idea-card-foot,.idea-title,.idea-pin,.idea-linked-work{display:none!important}
@media(max-width:760px){
  .idea-card-head{grid-template-columns:26px minmax(0,1fr) auto!important}
  .idea-delete{grid-column:auto!important;width:auto!important;min-height:30px!important}
  .idea-content{min-height:135px!important}
}

/* v47b: stable iPad/PWA first render and viewport sizing */
:root { --app-vw: 100vw; }
html, body, #appMount {
  width: 100%;
  height: var(--app-vh,100dvh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
body.app-booting { width:100%; height:var(--app-vh,100dvh); }
.lock-screen {
  padding:
    calc(20px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
}
.app {
  width:100%;
  max-width:100%;
  min-width:0;
  height:var(--app-vh,100dvh);
  max-height:var(--app-vh,100dvh);
}
.main,.write-wrap,.editor-col,.navigator-dock,.navigator-panel { min-width:0; min-height:0; }

/* iPad full-screen/PWA: reserve the status-bar safe area even in the desktop/tablet layout. */
@media (min-width:761px) {
  html.ios-device .app { --topbar-h:calc(48px + env(safe-area-inset-top)); }
  html.ios-device .topbar {
    min-height:var(--topbar-h);
    padding-top:env(safe-area-inset-top);
  }
}

/* Stable tablet layout: never expose the 430px desktop navigator at a 768px iPad width. */
@media (min-width:761px) and (max-width:1100px) {
  .app { grid-template-columns:minmax(320px,44vw) minmax(0,1fr); }
  .navigator-dock {
    width:auto;
    min-width:0;
    max-width:none;
    resize:none;
  }
  .topbar {
    grid-template-columns:auto minmax(130px,220px) minmax(0,1fr) auto;
    gap:5px;
    padding-inline:calc(8px + env(safe-area-inset-left)) calc(8px + env(safe-area-inset-right));
  }
  .topbar select { min-width:0; max-width:220px; }
  .top-primary-actions,.top-secondary-actions,.top-tools { gap:3px; }
  .top-primary-actions .icon-btn,
  .top-secondary-actions .icon-btn,
  .top-secondary-actions .top-more>summary {
    min-width:34px;
    padding:5px 7px;
    font-size:11px;
  }
  .main { width:100%; max-width:100%; overflow:hidden; }
}

@media (max-width:760px) {
  .app { height:var(--app-vh,100dvh)!important; max-height:var(--app-vh,100dvh)!important; }
  .navigator-dock { max-height:calc(var(--app-vh,100dvh) - var(--topbar-h) - 72px)!important; }
  .bkp-box,.doc-modal-box,.overall-popup-box { max-height:calc(var(--app-vh,100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important; }
}

/* v47c Drive実原稿校正済み感情分析 */
.emotion-analysis-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}.emotion-analysis-facts>div{min-width:0;border:1px solid var(--line,#d7dce4);border-radius:10px;padding:8px;background:var(--panel-soft,#f8fafc)}.emotion-analysis-facts b{display:block;font-size:11px;color:var(--muted,#667085);margin-bottom:3px}.emotion-analysis-facts span{display:block;font-size:12px;line-height:1.45;overflow-wrap:anywhere}.emotion-axis-evidence{margin:10px 0;padding:10px;border:1px solid var(--line,#d7dce4);border-radius:12px}.emotion-axis-evidence>b{display:block;margin-bottom:7px}.emotion-axis-evidence p{display:grid;grid-template-columns:30px 1fr;gap:7px;margin:5px 0;font-size:12px;line-height:1.5}.emotion-axis-evidence p span{font-weight:800;text-align:center;border-radius:7px;background:var(--accent-soft,#eef2ff);padding:2px 4px}@media(max-width:760px){.emotion-analysis-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.axis-advice-immediate{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.axis-advice-immediate article{border:1px solid var(--line,#d7dce4);border-radius:12px;padding:11px;background:var(--panel-soft,#f8fafc);min-width:0}.axis-advice-immediate article>header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.axis-advice-immediate article>header div{min-width:0}.axis-advice-immediate article>header b,.axis-advice-immediate article>header small{display:block;overflow-wrap:anywhere}.axis-advice-immediate article>header small{margin-top:3px;color:var(--muted,#667085)}.axis-advice-immediate article>header em{font-style:normal;white-space:nowrap;font-size:11px;font-weight:800;padding:4px 7px;border-radius:999px;background:var(--accent-soft,#eef2ff)}.axis-advice-immediate p{font-size:12px;line-height:1.6;margin:8px 0}.axis-advice-target{display:block;margin-bottom:8px;padding:6px 8px;border-radius:8px;background:var(--panel-soft,#f8fafc);overflow-wrap:anywhere}.axis-advice-axis dl{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:760px){.axis-advice-immediate{grid-template-columns:1fr}.axis-advice-axis dl{grid-template-columns:1fr}}

/* v47d: independent ★4 classification filters and overview. */
.emotion-kind-filter{display:flex;gap:6px;overflow-x:auto;padding:7px 8px;border:1px solid var(--line);border-radius:10px;background:var(--panel);-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.emotion-kind-filter button{flex:0 0 auto;min-height:32px;padding:5px 9px;border:1px solid var(--line);border-radius:999px;background:var(--panel2);color:var(--sub);font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer}
.emotion-kind-filter button.active{border-color:var(--accent);background:var(--accent);color:#fff}
.emotion-showcase-breakdown>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:8px}
.emotion-showcase-breakdown button{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 7px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);text-align:left;cursor:pointer}
.emotion-showcase-breakdown button>b{grid-row:1/3;display:grid;place-items:center;min-width:31px;height:31px;border-radius:8px;background:var(--soft);color:var(--accent);font-size:13px}
.emotion-showcase-breakdown button>span{font-size:10px;font-weight:850;line-height:1.35;overflow-wrap:anywhere}
.emotion-showcase-breakdown button>small{color:var(--sub);font-size:8.5px;line-height:1.4;overflow-wrap:anywhere}
.emotion-showcase-breakdown button.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
@media(max-width:760px){.emotion-showcase-breakdown>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px}.emotion-showcase-breakdown button{padding:7px}.emotion-showcase-breakdown button>small{display:none}}

/* v47d: Android tablet-only workspace UI. iPad keeps the existing v47c layout. */
html.android-tablet-device body{font-size:15px}
html.android-tablet-device button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
html.android-tablet-device :is(input,textarea,select){font-size:16px!important}
html.android-tablet-device .ref-body,
html.android-tablet-device .side,
html.android-tablet-device .overall-popup-body,
html.android-tablet-device .axis-advice-body{
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:auto;
}
html.android-tablet-device .emotion-curve-body{
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-gutter:auto;
}
html.android-tablet-device .emotion-curve-scroll{touch-action:pan-x;overscroll-behavior-inline:contain}
html.android-tablet-device .icon-btn,
html.android-tablet-device .btn,
html.android-tablet-device .lock-btn,
html.android-tablet-device .add-btn,
html.android-tablet-device .ref-add,
html.android-tablet-device .ref-del{min-height:40px}
html.android-tablet-device .btn-mini,
html.android-tablet-device .ref-tool-btn{min-height:36px}
html.android-tablet-device .ref-tab{min-height:40px!important;font-size:12px!important}
html.android-tablet-device .ref-nav-tools .ref-tool-btn{min-height:40px!important;font-size:11.5px!important}
html.android-tablet-device .ref-tabs{padding:5px 6px!important;gap:6px!important}
html.android-tablet-device .ref-body{padding:10px 12px calc(18px + env(safe-area-inset-bottom))!important;font-size:14.5px!important;line-height:1.7!important}
html.android-tablet-device .character-detail-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
html.android-tablet-device .character-detail-card{padding:8px!important;border-radius:10px!important;border-left-width:4px!important}
html.android-tablet-device .character-detail-head .char-name-block{padding-right:36px!important}
html.android-tablet-device .char-name-search{grid-template-columns:minmax(0,1fr) 36px!important;gap:5px!important}
html.android-tablet-device .char-name-search .ref-in{min-height:38px!important;padding:6px 8px!important;font-size:14px!important;line-height:1.35!important}
html.android-tablet-device .char-find-btn{min-width:36px!important;min-height:38px!important;border-radius:8px!important}
html.android-tablet-device .character-quick-fields{grid-template-columns:minmax(0,1fr)!important;gap:4px!important;margin-top:6px!important}
html.android-tablet-device .character-quick-fields .ref-in{min-height:36px!important;padding:5px 7px!important;font-size:13px!important;line-height:1.35!important}
html.android-tablet-device .character-detail-toggle>summary{top:7px!important;right:7px!important;width:30px!important;min-height:30px!important;border-radius:8px!important}
html.android-tablet-device .character-detail-fields{gap:7px 9px!important;margin-top:8px!important;padding-top:8px!important}
html.android-tablet-device .character-detail-fields .ref-in{min-height:38px!important;padding:6px 8px!important;font-size:14px!important}
html.android-tablet-device .summary-item{padding:9px 10px!important;border-radius:11px!important}
html.android-tablet-device .summary-title-input{min-height:38px!important;padding:6px 8px!important;font-size:14px!important}
html.android-tablet-device .summary-textarea{min-height:76px!important;padding:7px 8px!important;font-size:14px!important;line-height:1.6!important}
html.android-tablet-device .todo-list{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))!important;gap:10px!important}
html.android-tablet-device .todo-item{padding:10px!important;border-radius:12px!important}
html.android-tablet-device .idea-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html.android-tablet-device .idea-card{padding:10px!important;border-radius:12px!important}
html.android-tablet-device .idea-content{min-height:150px!important;font-size:15px!important;line-height:1.65!important}
html.android-tablet-device .plot-axis-card{padding:0 11px 11px!important;border-radius:12px!important}
html.android-tablet-device .plot-axis-head{margin:0 -11px 9px!important;padding:9px 11px!important}
html.android-tablet-device .plot-axis-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
html.android-tablet-device .plot-axis-fields .char-edit-field,
html.android-tablet-device .plot-axis-fields .char-edit-field.wide{grid-column:auto!important}
html.android-tablet-device .plot-axis-fields :is(.input,.ta){font-size:14px!important;line-height:1.55!important}
html.android-tablet-device .emotion-block-summary{min-height:72px;padding:9px 10px}
html.android-tablet-device .emotion-block-title b{font-size:13px}
html.android-tablet-device .emotion-block-title small,
html.android-tablet-device .emotion-block-title em{font-size:10px}
html.android-tablet-device .emotion-block-detail{padding:11px;gap:10px}
html.android-tablet-device .emotion-reason{font-size:11.5px;line-height:1.65}
html.android-tablet-device .emotion-analysis-facts{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Portrait and compact Android tablet: editor above, navigator below. */
@media (min-width:600px) and (max-width:1366px) and (orientation:portrait){
  html.android-tablet-device .app{
    --topbar-h:56px;
    width:100%!important;max-width:100%!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:var(--topbar-h) minmax(0,1fr) var(--ref-px,42vh)!important;
  }
  html.android-tablet-device .app.topbar-hidden{grid-template-rows:0 minmax(0,1fr) var(--ref-px,42vh)!important}
  html.android-tablet-device .app.navigator-hidden{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:var(--topbar-h) minmax(0,1fr)!important}
  html.android-tablet-device .app.topbar-hidden.navigator-hidden{grid-template-rows:0 minmax(0,1fr)!important}
  html.android-tablet-device .topbar{
    grid-column:1;grid-row:1;grid-template-columns:auto minmax(0,1fr) auto!important;
    gap:8px!important;min-height:var(--topbar-h)!important;
    padding:5px calc(10px + env(safe-area-inset-right)) 5px calc(10px + env(safe-area-inset-left))!important;
  }
  html.android-tablet-device .topbar-spacer{display:none!important}
  html.android-tablet-device .topbar select{width:100%!important;min-width:0!important;max-width:none!important;min-height:42px!important;padding:7px 9px!important;font-size:14px!important}
  html.android-tablet-device .top-primary-actions,
  html.android-tablet-device .top-secondary-actions,
  html.android-tablet-device .top-tools{gap:5px!important}
  html.android-tablet-device .top-primary-actions .icon-btn,
  html.android-tablet-device .top-primary-actions .top-tools .icon-btn,
  html.android-tablet-device .top-secondary-actions .icon-btn,
  html.android-tablet-device .top-secondary-actions .top-more>summary{
    min-width:42px!important;min-height:42px!important;padding:6px 8px!important;font-size:11.5px!important;
  }
  html.android-tablet-device .top-save-btn{width:52px!important;min-width:52px!important}
  html.android-tablet-device .topbar-more>summary{width:42px!important}
  html.android-tablet-device .topbar-more .top-menu{top:calc(var(--topbar-h) + 5px)!important;right:calc(8px + env(safe-area-inset-right))!important;width:min(270px,calc(100vw - 20px))!important;padding:10px!important}
  html.android-tablet-device .main{grid-column:1!important;grid-row:2!important;width:100%!important;min-width:0!important;min-height:0!important}
  html.android-tablet-device .navigator-dock{
    grid-column:1!important;grid-row:3!important;display:flex!important;flex-direction:column!important;
    width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;
    min-height:220px!important;max-height:calc(var(--app-vh,100dvh) - var(--topbar-h) - 190px)!important;
    resize:none!important;border-top:1px solid var(--line);background:var(--panel);
  }
  html.android-tablet-device .navigator-panel{border-left:0!important;border-top:0!important;width:100%!important;min-height:0!important}
  html.android-tablet-device .ref-resizer{display:block!important;flex:0 0 9px!important;width:100%!important;height:9px!important;cursor:ns-resize!important;background:var(--panel2)}
  html.android-tablet-device .ref-resizer::after{width:72px!important;height:2px!important;border-radius:999px;background:var(--accent2)!important}
  html.android-tablet-device .ref-tabs{grid-template-columns:minmax(0,1fr) 82px!important;padding:5px 8px!important}
  html.android-tablet-device .ref-nav-tools{grid-template-columns:82px!important}
  html.android-tablet-device .ref-tab,
  html.android-tablet-device .ref-nav-tools .ref-tool-btn{font-size:12px!important;min-height:40px!important}
  html.android-tablet-device .ed-head{min-height:52px!important;padding:6px 10px!important;gap:6px!important}
  html.android-tablet-device .ed-head .ep-label{display:none!important}
  html.android-tablet-device .ed-title-input{min-width:0!important;min-height:40px!important;padding:6px 8px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel2)!important;font-size:16px!important}
  html.android-tablet-device .ep-nav-btn{width:40px!important;height:40px!important;min-height:40px!important;font-size:24px!important}
  html.android-tablet-device .ed-actions .icon-btn{width:40px!important;height:40px!important;min-height:40px!important}
  html.android-tablet-device .ed-stats{font-size:11.5px!important}
  html.android-tablet-device .manuscript{padding:24px 6% 120px!important;font-size:17px!important;line-height:2!important}
  html.android-tablet-device .navigator-float-controls{right:calc(10px + env(safe-area-inset-right))!important;bottom:calc(var(--ref-px,42vh) + 10px + env(safe-area-inset-bottom))!important}
  html.android-tablet-device .app.navigator-hidden .navigator-float-controls{bottom:calc(10px + env(safe-area-inset-bottom))!important}
  html.android-tablet-device .float-main-actions{gap:5px!important;padding:4px!important}
  html.android-tablet-device .navigator-float-controls .float-main-actions .icon-btn{min-width:42px!important;min-height:42px!important;padding:6px 8px!important}
  html.android-tablet-device .overall-modal,
  html.android-tablet-device .emotion-curve-modal,
  html.android-tablet-device .axis-advice-modal,
  html.android-tablet-device .bkp-modal,
  html.android-tablet-device .doc-modal{align-items:stretch!important;justify-content:stretch!important;padding:8px!important}
  html.android-tablet-device .overall-popup-box,
  html.android-tablet-device .emotion-curve-box,
  html.android-tablet-device .axis-advice-box,
  html.android-tablet-device .bkp-box,
  html.android-tablet-device .doc-modal-box{
    width:100%!important;height:calc(var(--app-vh,100dvh) - 16px)!important;max-height:calc(var(--app-vh,100dvh) - 16px)!important;
    border-radius:14px!important;overflow:hidden!important;
  }
  html.android-tablet-device .overall-popup-head,
  html.android-tablet-device .emotion-curve-head,
  html.android-tablet-device .axis-advice-head{padding:12px 14px!important}
  html.android-tablet-device .overall-popup-body,
  html.android-tablet-device .emotion-curve-body,
  html.android-tablet-device .axis-advice-body{padding:14px 16px calc(92px + env(safe-area-inset-bottom))!important}
  html.android-tablet-device .emotion-block-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.android-tablet-device .emotion-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.android-tablet-device .axis-advice-pairs,
  html.android-tablet-device .axis-advice-axis-list,
  html.android-tablet-device .axis-advice-immediate{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.android-tablet-device .axis-advice-summary{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* Landscape tablet: balanced side navigator and wide manuscript. */
@media (min-width:600px) and (max-width:1366px) and (orientation:landscape){
  html.android-tablet-device .app{grid-template-columns:clamp(320px,34vw,430px) minmax(0,1fr)!important}
  html.android-tablet-device .navigator-dock{width:100%!important;min-width:0!important;max-width:none!important;resize:none!important}
  html.android-tablet-device .main{width:100%!important;min-width:0!important}
  html.android-tablet-device .topbar{grid-template-columns:auto minmax(180px,300px) minmax(0,1fr) auto!important;gap:7px!important;padding-inline:calc(10px + env(safe-area-inset-left)) calc(10px + env(safe-area-inset-right))!important}
  html.android-tablet-device .topbar select{max-width:300px!important;min-height:40px!important;font-size:14px!important}
  html.android-tablet-device .top-primary-actions .icon-btn,
  html.android-tablet-device .top-secondary-actions .icon-btn,
  html.android-tablet-device .top-secondary-actions .top-more>summary{min-height:40px!important;padding:6px 8px!important;font-size:11.5px!important}
  html.android-tablet-device .ed-head{min-height:50px!important;padding:6px 11px!important}
  html.android-tablet-device .ed-title-input{min-height:38px!important;padding:6px 8px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel2)!important;font-size:16px!important}
  html.android-tablet-device .ep-nav-btn,
  html.android-tablet-device .ed-actions .icon-btn{width:38px!important;height:38px!important;min-height:38px!important}
  html.android-tablet-device .manuscript{padding:28px 7% 120px!important;font-size:17px!important;line-height:2!important}
  html.android-tablet-device .emotion-curve-box,
  html.android-tablet-device .axis-advice-box,
  html.android-tablet-device .overall-popup-box{width:min(1180px,calc(100vw - 28px))!important;max-height:calc(var(--app-vh,100dvh) - 28px)!important}
  html.android-tablet-device .emotion-block-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Android Chrome-specific stability: no native resize handles or accidental horizontal page pan. */
html.android-tablet-device,
html.android-tablet-device body{overscroll-behavior:none;touch-action:pan-x pan-y pinch-zoom}
html.android-tablet-device .navigator-dock,
html.android-tablet-device textarea{resize:none!important}
html.android-tablet-device .app,
html.android-tablet-device .main,
html.android-tablet-device .navigator-panel,
html.android-tablet-device .ref-body,
html.android-tablet-device .overall-popup-body{max-width:100%;overflow-x:hidden}

/* v47d: Android tablet emotion modal and two-column detail behavior. */
@media (min-width:600px) and (max-width:1366px){
  html.android-tablet-device .emotion-curve-modal{overflow:hidden!important}
  html.android-tablet-device .emotion-curve-body{min-width:0!important;max-width:100%!important;overflow-x:hidden!important;scroll-padding-bottom:110px}
  html.android-tablet-device .emotion-block-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start}
  html.android-tablet-device .emotion-block-card{min-width:0;max-width:100%}
  html.android-tablet-device .emotion-block-card[open]{grid-column:1/-1}
  html.android-tablet-device .emotion-kind-filter{position:sticky;top:0;z-index:2;max-width:100%}
  html.android-tablet-device .emotion-showcase-breakdown>div{grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}
  html.android-tablet-device .emotion-showcase-evidence{max-width:100%;overflow:hidden}
  html.android-tablet-device .emotion-showcase-evidence>span{max-width:100%;overflow-wrap:anywhere}
}


/* v47e: practical emotion guide and axis prescriptions. */
.emotion-definition{display:grid;gap:9px;padding:13px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 10%,var(--panel)),var(--panel))}
.emotion-definition>b{font-size:17px}.emotion-definition>p{margin:0;color:var(--sub);font-size:11px;line-height:1.65}.emotion-definition>div{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap}.emotion-definition>div span{padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--panel);font-size:9px;font-weight:850}.emotion-definition>div i{color:var(--sub);font-style:normal}
.emotion-star-guide-rich article{grid-template-columns:42px minmax(0,1fr);padding:10px}.emotion-star-guide-rich article>b{grid-row:auto;min-height:42px}.emotion-star-guide-rich article>div{display:grid;gap:4px;min-width:0}.emotion-star-guide-rich article span{font-size:11px;font-weight:900}.emotion-star-guide-rich article p{font-size:9.5px;line-height:1.55}.emotion-star-guide-rich article small{display:grid;grid-template-columns:38px minmax(0,1fr);gap:5px;color:var(--sub);font-size:8.5px;line-height:1.45}.emotion-star-guide-rich article small strong{color:var(--ink)}.emotion-star-guide-rich article em{padding-top:3px;border-top:1px dashed var(--line);color:var(--accent);font-size:8.5px;font-style:normal;font-weight:750}
.emotion-rule-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:9px}.emotion-rule-flow article{display:grid;grid-template-columns:31px minmax(0,1fr);gap:4px 8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.emotion-rule-flow article>b{grid-row:1/3;display:grid;place-items:center;width:31px;height:31px;border-radius:9px;background:var(--accent);color:#fff;font-size:14px}.emotion-rule-flow span{font-size:10.5px;font-weight:900}.emotion-rule-flow p{margin:0;color:var(--sub);font-size:9px;line-height:1.55}
.emotion-playbook-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px}.emotion-playbook{min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--panel2);overflow:hidden}.emotion-playbook>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;padding:9px;cursor:pointer;list-style:none}.emotion-playbook>summary::-webkit-details-marker{display:none}.emotion-playbook>summary b{font-size:10.5px;overflow-wrap:anywhere}.emotion-playbook>summary span{padding:3px 6px;border-radius:999px;background:var(--soft);color:var(--accent);font-size:8.5px;font-weight:850}.emotion-playbook>div{display:grid;gap:5px;padding:0 9px 9px}.emotion-playbook p{display:grid;grid-template-columns:48px minmax(0,1fr);gap:6px;margin:0;padding:7px;border-radius:8px;background:var(--panel);font-size:9px;line-height:1.55}.emotion-playbook strong{color:var(--accent)}
.emotion-axis-guide-rich article{grid-template-columns:39px minmax(0,1fr);padding:10px}.emotion-axis-guide-rich article>b{grid-row:auto;min-height:39px}.emotion-axis-guide-rich article>div{display:grid;gap:3px}.emotion-axis-guide-rich article span{font-size:10.5px;font-weight:900}.emotion-axis-guide-rich article small{color:var(--accent);font-size:8.5px;font-weight:800}
.emotion-five-formula{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;padding:11px;border-top:1px solid var(--line);background:var(--soft)}.emotion-five-formula b{padding:6px 9px;border-radius:8px;background:var(--panel);font-size:10px}.emotion-five-formula span{color:var(--sub);font-weight:900}.emotion-five-formula em{padding:7px 11px;border-radius:9px;background:var(--accent);color:#fff;font-size:11px;font-style:normal;font-weight:900}
.emotion-cadence{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);align-items:stretch;gap:6px;padding:9px}.emotion-cadence>article{display:grid;grid-template-columns:auto 1fr;gap:3px 6px;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}.emotion-cadence>article>span{grid-row:1/3;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--soft);font-size:10px;font-weight:900}.emotion-cadence>article>b{font-size:11px}.emotion-cadence>article>p{margin:0;color:var(--sub);font-size:8.5px;line-height:1.45}.emotion-cadence>article.peak{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--panel))}.emotion-cadence>i{align-self:center;color:var(--sub);font-style:normal}
.emotion-author-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:9px}.emotion-author-tools article{padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.emotion-author-tools b{font-size:10.5px}.emotion-author-tools p{margin:4px 0 0;color:var(--sub);font-size:9px;line-height:1.55}
.emotion-current-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:9px}.emotion-current-summary article{display:grid;gap:3px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.emotion-current-summary span,.emotion-current-summary small{color:var(--sub);font-size:8.5px}.emotion-current-summary b{min-width:0;font-size:11px;overflow-wrap:anywhere}.emotion-current-kinds{display:flex;gap:5px;overflow-x:auto;padding:0 9px 9px}.emotion-current-kinds span{flex:0 0 auto;padding:4px 7px;border-radius:999px;background:var(--soft);font-size:8.5px}.emotion-current-kinds b{margin-right:5px}
.axis-advice-rule{display:grid;gap:7px;padding:11px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:11px;background:color-mix(in srgb,var(--accent) 7%,var(--panel))}.axis-advice-rule>b{font-size:13px}.axis-advice-rule>p{margin:0;font-size:10px;line-height:1.6}.axis-advice-rule>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.axis-advice-rule span{padding:6px;border-radius:8px;background:var(--panel);font-size:8.5px;text-align:center}.axis-advice-rule span b{margin-right:4px;color:var(--accent);font-size:11px}
.axis-advice-blueprint{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:8px}.axis-advice-blueprint span{display:grid;gap:2px;padding:6px;border-radius:8px;background:var(--panel);font-size:9px}.axis-advice-blueprint span b{color:var(--sub);font-size:8px}.axis-advice-immediate article>p{display:grid;grid-template-columns:72px minmax(0,1fr);gap:6px;margin:6px 0;padding:7px;border-radius:8px;background:var(--panel);font-size:9.5px;line-height:1.55}.axis-advice-immediate article>p strong{color:var(--accent)}.axis-advice-combo{display:block;margin:4px 0 8px;color:var(--accent);font-size:9px;font-weight:800}
.axis-advice-spread{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}.axis-advice-spread article{display:grid;gap:6px;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}.axis-advice-spread header{display:flex;justify-content:space-between;gap:7px}.axis-advice-spread header b{font-size:10px}.axis-advice-spread header em{padding:3px 6px;border-radius:999px;background:var(--soft);font-size:8.5px;font-style:normal;font-weight:900}.axis-advice-spread p{margin:0;font-size:9px;line-height:1.5}.axis-advice-spread p strong{margin-right:5px;color:var(--accent)}
.axis-advice-axis>p{display:grid;grid-template-columns:55px minmax(0,1fr);gap:5px;padding:6px;border-radius:7px;background:var(--panel);font-size:9px!important}.axis-advice-axis>p strong{color:var(--accent)}
@media(max-width:760px){.emotion-rule-flow,.emotion-playbook-grid,.emotion-author-tools{grid-template-columns:1fr}.emotion-cadence{grid-template-columns:1fr}.emotion-cadence>i{transform:rotate(90deg);justify-self:center}.emotion-current-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.axis-advice-rule>div{grid-template-columns:repeat(2,minmax(0,1fr))}.axis-advice-blueprint,.axis-advice-spread{grid-template-columns:1fr}.axis-advice-immediate article>p{grid-template-columns:62px minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1100px){html.android-tablet-device .emotion-playbook-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html.android-tablet-device .emotion-rule-flow{grid-template-columns:repeat(3,minmax(0,1fr))}html.android-tablet-device .emotion-cadence{grid-template-columns:repeat(2,minmax(0,1fr))}html.android-tablet-device .emotion-cadence>i{display:none}}


/* v47f: 完全版の感情基準・★3→4・軸処方 */
.emotion-concept-split,.emotion-condition-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:9px}
.emotion-concept-split article,.emotion-condition-split article{display:grid;gap:5px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.emotion-concept-split b,.emotion-condition-split b{font-size:11px;color:var(--accent)}
.emotion-concept-split p,.emotion-condition-split p{margin:0;font-size:9.5px;line-height:1.65}
.emotion-rule-flow-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.emotion-boundary-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}
.emotion-boundary-examples article{display:grid;gap:4px;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.emotion-boundary-examples article>b{font-size:10.5px}.emotion-boundary-examples p{display:grid;grid-template-columns:34px minmax(0,1fr);gap:5px;margin:0;font-size:9.2px;line-height:1.5}.emotion-boundary-examples p span{color:var(--accent);font-weight:900}
.emotion-genre-guide-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}
.emotion-genre-guide{min-width:0;border:1px solid var(--line);border-radius:9px;background:var(--panel2);overflow:hidden}
.emotion-genre-guide>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;padding:9px;cursor:pointer;list-style:none}.emotion-genre-guide>summary::-webkit-details-marker{display:none}
.emotion-genre-guide>summary>div{display:grid;gap:2px;min-width:0}.emotion-genre-guide>summary b{font-size:10.5px}.emotion-genre-guide>summary small{color:var(--sub);font-size:8.5px}.emotion-genre-guide>summary>span{padding:3px 6px;border-radius:999px;background:var(--panel);color:var(--accent);font-size:8.5px;font-weight:900;white-space:nowrap}
.emotion-genre-guide>div{display:grid;gap:5px;padding:0 8px 8px}.emotion-genre-guide p{margin:0;padding:7px;border-radius:7px;background:var(--panel);font-size:9.3px;line-height:1.55}.emotion-genre-guide p strong{display:inline-block;min-width:34px;color:var(--accent)}
.emotion-guide-avoid,.axis-advice-avoid{border-left:3px solid color-mix(in srgb,var(--danger) 55%,var(--line))!important;background:color-mix(in srgb,var(--danger) 5%,var(--panel))!important}
.axis-advice-rule-note{margin-top:6px!important;padding-top:6px;border-top:1px dashed var(--line);color:var(--sub)}
.axis-advice-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.axis-advice-steps article{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:6px;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.axis-advice-steps b{display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:var(--accent);color:#fff;font-size:10px}.axis-advice-steps span{font-size:9px;font-weight:800;line-height:1.35}
.axis-advice-star3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:8px}.axis-advice-star3>article{min-width:0;display:grid;gap:6px;padding:9px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}.axis-advice-star3>article>header{display:flex;justify-content:space-between;gap:8px}.axis-advice-star3 header>div{display:grid;gap:2px}.axis-advice-star3 header b{font-size:10.5px}.axis-advice-star3 header small{color:var(--sub);font-size:8.5px}.axis-advice-star3 header em{padding:3px 6px;border-radius:999px;background:var(--soft);color:var(--accent);font-size:8.5px;font-style:normal;font-weight:900;white-space:nowrap}.axis-advice-star3 p{margin:0;font-size:9.4px;line-height:1.55}.axis-advice-star3 strong{color:var(--accent);margin-right:5px}
.axis-advice-blueprint{grid-template-columns:repeat(2,minmax(0,1fr))!important}.axis-advice-axis dl{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.emotion-concept-split,.emotion-condition-split,.emotion-boundary-examples,.emotion-genre-guide-list,.axis-advice-star3{grid-template-columns:1fr}.emotion-rule-flow-four,.axis-advice-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.emotion-check-split{grid-template-columns:1fr!important}}
@media(min-width:761px) and (max-width:1100px){.emotion-rule-flow-four{grid-template-columns:repeat(2,minmax(0,1fr))}.emotion-genre-guide-list{grid-template-columns:repeat(2,minmax(0,1fr))}.axis-advice-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}

