.story-header{border-bottom:1px solid var(--border);background:color-mix(in srgb, var(--canvas) 90%, transparent);backdrop-filter:blur(14px);z-index:12;flex-wrap:wrap;flex:none;align-items:center;gap:12px;min-width:0;min-height:64px;padding:10px 20px;display:flex;position:relative}.story-path-notice{border:1px solid color-mix(in srgb, var(--warning) 30%, var(--border));border-radius:var(--radius-md);background:var(--warning-soft);color:var(--text-secondary);flex-basis:100%;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;font-size:12px;line-height:1.6;display:flex}.story-path-notice>button{flex-shrink:0}.story-back,.reader-tool{border-radius:var(--radius-pill);min-height:36px;color:var(--text-secondary);font-size:var(--font-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:7px;padding:6px 12px;font-weight:600;line-height:1.4;text-decoration:none;transition:color .14s,background .14s;display:inline-flex}.story-back{border-color:var(--border);flex:none;width:40px;min-height:40px;padding:0}.story-back:hover,.reader-tool:hover{color:var(--text);background:var(--surface-hover)}.reader-tool.is-error{color:var(--danger)}.story-back svg,.reader-tool svg{flex-shrink:0;width:17px;height:17px}.reader-tool small{background:var(--accent);min-width:20px;height:20px;color:var(--accent-contrast);border-radius:20px;justify-content:center;align-items:center;padding:0 6px;font-size:12px;font-weight:720;display:inline-flex}.story-heading{flex:1;min-width:0}.story-heading h1{color:var(--text);letter-spacing:var(--tracking-title);text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:16px;font-weight:760;line-height:1.45;overflow:hidden}.story-subtitle{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;margin:1px 0 0;font-size:12px;line-height:1.4;overflow:hidden}.reader-chat-page .story-header{border-bottom-color:#0000}.reader-chat-page .story-header-tools{background:0 0;border:0;gap:2px;padding:0}.reader-chat-page .story-header-tools .reader-tool>span{display:none}.reader-chat-page .story-header-tools .reader-tool{border-radius:10px;min-width:38px;min-height:38px;padding:0 10px}.story-preview-label{border-radius:var(--radius-pill);min-height:20px;color:var(--accent);background:var(--accent-soft);font-size:var(--font-caption);align-items:center;margin-bottom:3px;padding:0 8px;font-weight:720;display:inline-flex}.story-header-tools{border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--surface);flex:none;align-items:center;gap:2px;padding:3px;display:flex}.story-header-tools .reader-tool{font-weight:600}.reader-tool[aria-expanded=true],.story-menu[open]>summary{color:var(--accent);background:var(--accent-soft)}.story-header-tools .reader-tool[aria-expanded=true]{font-weight:720}.story-menu{position:relative}.story-menu>summary{list-style:none}.story-menu>summary::-webkit-details-marker{display:none}.story-menu>nav{background:var(--surface-raised);border:1px solid var(--border-strong);border-radius:var(--radius-md);width:min(280px,100vw - 32px);box-shadow:var(--elevation-float);max-height:calc(100dvh - 160px);padding:6px;position:absolute;top:calc(100% + 10px);right:-4px;overflow:auto}.story-menu nav a,.story-menu nav button{border-radius:var(--radius-sm);text-align:left;width:100%;min-height:42px;color:var(--text-secondary);cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:10px 12px;font-size:13px;text-decoration:none;display:flex}.story-menu nav a:hover,.story-menu nav button:hover:not(:disabled){background:var(--surface-hover);color:var(--text)}.story-menu nav svg{width:16px;height:16px;color:var(--text-muted);flex-shrink:0}.story-menu hr{border:0;border-top:1px solid var(--border);margin:6px 8px}.story-menu-group+.story-menu-group{border-top:1px solid var(--border);margin-top:4px;padding-top:4px}.story-menu-label{color:var(--text-muted);font-size:var(--font-caption);padding:8px 12px 4px;font-weight:650;line-height:1.4;display:block}.story-heading .chat-lore-update-badge{font-size:var(--font-caption);min-height:26px;margin-top:5px}@media (width>=701px) and (width<=1250px){.story-header-tools .reader-tool>span{display:none}.story-header-tools .reader-tool{min-width:36px;padding:0 9px}}@media (width<=700px){.story-header{gap:8px;min-height:58px;padding:8px 12px}.story-heading h1{white-space:normal;-webkit-line-clamp:2;line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;font-size:15px;line-height:1.35;display:-webkit-box}.story-header-tools .reader-tool>span{display:none}.story-header-tools{gap:0}.reader-tool{padding:8px}.story-back{display:none}.reader-chat-page .story-header{gap:4px;min-height:52px;padding:6px 8px 6px 6px}.reader-chat-page .story-header-tools{background:0 0;border:0;padding:0}.reader-chat-page .story-header-tools>.reader-tool{min-width:40px;min-height:40px}}.story-menu-button{flex:none;width:40px;min-height:40px;padding:0}@media (width<=700px){.reader-chat-page>.story-header{transition:margin-top .18s var(--ease-out), opacity .18s var(--ease-out)}.reader-chat-page.is-header-hidden>.story-header:not(:focus-within){opacity:0;pointer-events:none;margin-top:-52px}}@media (prefers-reduced-motion:reduce){.reader-chat-page>.story-header{transition:none}}.story-export-notice{border:1px solid color-mix(in srgb, var(--success,var(--accent)) 30%, var(--border));border-radius:var(--radius-md);background:var(--surface);color:var(--text-secondary);flex-basis:100%;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;font-size:12px;line-height:1.6;display:flex}.story-export-notice.is-error{border-color:color-mix(in srgb, var(--danger) 35%, var(--border))}.story-export-notice>button{flex-shrink:0}.reader-tool-alert{background:var(--accent);border-radius:50%;flex-shrink:0;width:7px;height:7px;display:inline-block}.story-paths-dialog{background:var(--surface-raised);border:1px solid var(--border-strong);border-radius:var(--radius-xl);width:min(900px,100vw - 32px);max-height:calc(100dvh - 48px);box-shadow:var(--elevation-overlay);padding:28px;overflow:auto}.story-paths-dialog>header{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.story-paths-dialog>header .icon-button{flex-shrink:0}.story-paths-dialog h2{margin:0;font-size:20px}.story-paths-dialog p{color:var(--text-secondary);font-size:13px;line-height:1.7}.story-paths-dialog>header p{margin-top:8px}.story-paths-dialog ol{margin:12px 0 0;padding:0;list-style:none}.story-paths-dialog li{border-top:1px solid var(--border);padding:18px 0}.story-path-heading{align-items:center;gap:8px;font-size:14px;display:flex}.story-path-heading svg,.story-path-current svg{flex-shrink:0;width:16px;height:16px}.story-path-heading time{color:var(--text-muted);white-space:nowrap;margin-left:auto;font-size:12px}.story-paths-dialog li>p{-webkit-line-clamp:4;overflow-wrap:anywhere;white-space:pre-line;-webkit-box-orient:vertical;margin:10px 0;display:-webkit-box;overflow:hidden}.story-path-current{color:var(--accent);align-items:center;gap:7px;font-size:12px;display:flex}.story-path-heading strong{overflow-wrap:anywhere}.story-path-actions{flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;display:flex}.story-path-actions svg{width:15px;height:15px}.story-path-name{border:1px solid var(--border);border-radius:10px;margin:12px 0;padding:14px}.story-path-name label{gap:6px;font-size:13px;display:grid}.story-path-name input{width:100%}.story-path-name>div{gap:8px;display:flex}.story-path-comparison{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.story-path-comparison>section{border:1px solid var(--border);border-radius:10px;min-width:0;max-height:500px;padding:16px;overflow:auto}.story-path-comparison h4{margin:0 0 8px}.story-path-comparison article{border-top:1px solid var(--border);padding-top:10px}.story-path-comparison article span{color:var(--accent);font-size:12px}.story-path-comparison p{white-space:pre-wrap;overflow-wrap:anywhere}@media (width<=640px){.story-path-comparison{grid-template-columns:1fr}.story-paths-dialog{padding:18px}.story-path-heading{flex-wrap:wrap}}.chat-lore-update-dialog{background:var(--surface-raised);width:min(980px,100%);max-height:calc(100dvh - 64px);color:var(--text);border:1px solid var(--border-strong);border-radius:var(--radius-xl);box-shadow:var(--elevation-overlay);flex-direction:column;display:flex;overflow:hidden}.chat-lore-update-dialog>header,.chat-lore-update-dialog>footer{flex-shrink:0;justify-content:space-between;align-items:center;gap:20px;padding:22px 26px;display:flex}.chat-lore-update-dialog h2{margin:0 0 8px;font-size:20px}.chat-lore-update-dialog p{color:var(--text-secondary);margin:6px 0;line-height:1.65}.chat-lore-update-scroll{overscroll-behavior:contain;min-height:0;padding:0 26px 20px;overflow:auto}.chat-lore-update-dialog>footer{border-top:1px solid var(--border)}.chat-lore-update-dialog>footer p{font-size:12px}.chat-update-selection{flex-wrap:wrap;align-items:center;gap:12px;margin:20px 0;font-size:12px;display:flex}.chat-update-selection>span{margin-right:auto}.chat-update-group{margin-top:18px}.chat-update-group h4{font-size:var(--font-caption);color:var(--text-secondary);align-items:baseline;gap:6px;margin:0 0 6px;font-weight:600;display:flex}.chat-update-group h4 span{color:var(--text-muted);font-weight:400}.chat-update-group>p.chat-update-group-note{font-size:var(--font-caption);color:var(--text-muted);margin:0 0 6px}.chat-update-group ul{border:1px solid var(--border);border-radius:var(--radius-lg);margin:0;padding:0;list-style:none}.chat-update-change{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 16px;padding:10px 14px;display:flex}.chat-update-change+.chat-update-change{border-top:1px solid var(--border)}.chat-update-change>.square-checkbox{flex:220px;min-width:0}.chat-update-state{min-width:0;max-width:100%;font-size:var(--font-caption);color:var(--text-muted);text-align:right;flex-direction:column;align-items:flex-end;gap:2px;display:flex}.chat-update-change .chat-update-conflict{font-size:var(--font-caption);color:var(--text-secondary);text-align:left;align-items:flex-start;gap:6px;margin:0;line-height:1.5;display:flex}.chat-update-conflict svg{width:14px;height:14px;color:var(--warning);flex-shrink:0;margin-top:2px}.chat-update-change.has-conflict .chat-update-state{text-align:left;flex-basis:100%;align-items:flex-start;padding-left:28px}.chat-lore-update-empty{padding:36px 0}.chat-update-remote,.chat-update-impact,.chat-update-history{border:1px solid var(--border);border-radius:12px;margin:16px 0;padding:16px}.chat-update-impact{background:var(--canvas-subtle)}.chat-update-history article+article{border-top:1px solid var(--border);padding-top:12px}.chat-update-history summary{cursor:pointer}.chat-lore-update-badge{align-items:center;gap:6px;display:inline-flex}.chat-lore-update-badge svg{width:16px;height:16px}@media (width<=640px){.modal-layer.chat-lore-update-layer{padding:0;overflow:hidden}.chat-lore-update-dialog{border:0;border-radius:0;height:100dvh;max-height:100dvh}.chat-lore-update-dialog>header,.chat-lore-update-dialog>footer{padding:18px}.chat-lore-update-scroll{padding:0 18px 18px}.chat-lore-update-dialog>footer{flex-direction:column;align-items:stretch;gap:10px}.chat-update-state{text-align:left;flex-basis:100%;align-items:flex-start;padding-left:28px}}
