.worldPage { padding:32px 40px 48px; }
.worldPage button,.worldPage input,.worldPage select,.worldPage textarea { font:inherit; }
.worldPage button { cursor:pointer; min-height:44px; }
.worldPage button:disabled { cursor:default; opacity:.5; }
.worldPage :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.worldPage .uiIcon { width:20px; height:20px; flex-shrink:0; }
.worldPage input,.worldPage textarea,.worldPage select { display:block; width:100%; box-sizing:border-box; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--input-bg); color:var(--text); min-height:44px; }
.worldPage textarea { resize:vertical; line-height:1.8; }
.worldPage label { display:block; margin:20px 0 8px; font-size:14px; color:var(--dim); }
.worldPage .btnPrimary,.worldPage .btnGhost { display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:10px 16px; }
.worldListHead { display:flex; gap:24px; justify-content:space-between; align-items:center; margin-bottom:32px; flex-wrap:wrap; }
.worldTabs { display:flex; gap:24px; border-bottom:1px solid var(--line); max-width:100%; overflow-x:auto; }
.worldTabs button { background:none; border:0; border-bottom:2px solid transparent; color:var(--dim); padding:12px 0; white-space:nowrap; }
.worldTabs button.active { color:var(--accent); border-color:var(--accent); }
.worldSearch { display:flex; align-items:center; max-width:280px; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.worldSearch input { border:0; min-width:0; background:transparent; }
.worldGrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.worldCard { border:1px solid var(--line); border-radius:18px; overflow:hidden; background:var(--panel); min-width:0; }
.worldCardArt { display:flex; justify-content:space-between; align-items:end; height:96px; padding:24px; background:var(--accent-soft); color:var(--accent); }
.worldCardArt>span { font:italic 48px/1 Georgia,serif; opacity:.55; }
.worldCardArt>.uiIcon { width:40px; height:40px; opacity:.65; }
.worldCard.fog .worldCardArt { background:var(--panel2); color:var(--dim); }
.worldCard.star .worldCardArt { background:var(--bg2); color:var(--accent); }
.worldCardBody { padding:24px; }
.worldGenre { font-size:12px; color:var(--accent); line-height:1.7; }
.worldCard h2 { font:700 25px/1.5 var(--reading-font); margin:10px 0 12px; overflow-wrap:anywhere; }
.worldCard p { font-size:14px; color:var(--dim); line-height:1.9; min-height:54px; overflow-wrap:anywhere; }
.worldCardFoot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:24px; }
.worldCardFoot>span { font-size:12px; color:var(--dim); }
.worldCardFoot .btnGhost { padding:8px 10px; white-space:nowrap; font-size:13px; }
.worldMore { display:flex!important; margin:24px auto; }
.worldEmpty,.worldLoading { padding:64px 20px; text-align:center; color:var(--dim); }
.worldEmpty>.uiIcon { width:44px; height:44px; color:var(--accent); }
.worldError { color:var(--danger); font-size:14px; line-height:1.8; overflow-wrap:anywhere; margin:12px 0; }
.worldError .btnGhost { font-size:12px; margin-left:8px; }
.worldFine { font-size:12px; line-height:1.9; color:var(--dim); }
.worldPre { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.9; }
.worldEntryLayout { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.85fr); gap:64px; max-width:1060px; margin:auto; }
.worldDetailArt { height:120px; display:flex; align-items:center; justify-content:center; background:var(--accent-soft); border-radius:16px; margin-bottom:24px; }
.worldDetailArt>.uiIcon { width:56px; height:56px; color:var(--accent); }
.worldSynopsis { font:22px/1.9 var(--reading-font); margin:16px 0 28px; }
.worldIntroduction dl,.rpgLocation { margin:24px 0; }
.worldIntroduction dt,.rpgLocation dt { font-size:12px; color:var(--dim); margin:16px 0 6px; }
.worldIntroduction dd,.rpgLocation dd { margin:0; line-height:1.7; overflow-wrap:anywhere; }
.worldAttributeTags { display:flex; gap:8px; flex-wrap:wrap; margin:24px 0; }
.worldAttributeTags span { border:1px solid var(--line); padding:7px 10px; border-radius:8px; font-size:12px; color:var(--dim); }
.worldPage details { border-top:1px solid var(--line); margin-top:24px; }
.worldPage summary { cursor:pointer; padding:16px 0; color:var(--dim); font-size:14px; min-height:44px; box-sizing:border-box; }
.worldIdentity { padding:28px; background:var(--panel); border:1px solid var(--line); border-radius:18px; align-self:start; }
.worldIdentity h2 { font:700 25px/1.5 var(--reading-font); margin:0 0 24px; }
.worldIdentity>.btnPrimary { width:100%; margin-top:24px; }
.worldIdentity>.btnGhost { width:100%; }
.worldEditorLayout { display:grid; grid-template-columns:minmax(0,1fr) 300px; align-items:start; gap:40px; max-width:1100px; margin:auto; }
.worldEditorFields { min-width:0; }
.worldEditorFields fieldset { border:0; margin:0 0 32px; padding:0; min-width:0; }
.worldEditorFields legend { font:700 22px/1.6 var(--reading-font); padding:0 0 8px; }
.worldFieldPair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.worldStatEditor,.worldStatLabels { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 44px; gap:8px; margin-bottom:10px; align-items:center; }
.worldStatLabels { color:var(--dim); font-size:12px; }
.worldStatEditor input { padding:10px 8px; min-width:0; }
.worldEditorActions { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 0; border-top:1px solid var(--line); }
.worldEditorActions>span { color:var(--dim); font-size:12px; }
.worldEditorPreview { position:sticky; top:0; padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); overflow-wrap:anywhere; }
.worldEditorPreview h2 { font:700 26px/1.5 var(--reading-font); margin:12px 0; }
.worldEditorPreview p { line-height:1.9; }
.worldEditorPreview .worldPre { max-height:360px; overflow:auto; font:15px/2 var(--reading-font); }
.worldGamePage.content { padding:0; overflow:hidden; min-height:0; }
.rpgLayout { display:grid; grid-template-columns:224px minmax(0,1fr) 76px; height:100%; min-height:0; }
.rpgPlayerRail { padding:28px 20px; border-right:1px solid var(--line); overflow:auto; background:var(--panel); }
.rpgIdentity { border-bottom:1px solid var(--line); padding-bottom:20px; }
.rpgMonogram { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font:24px var(--reading-font); }
.rpgIdentity h2 { font:700 23px/1.5 var(--reading-font); margin:16px 0 6px; overflow-wrap:anywhere; }
.rpgIdentity p { color:var(--dim); font-size:13px; line-height:1.8; margin:0; overflow-wrap:anywhere; }
.rpgStats>div { margin:20px 0; }
.rpgStats>div>div { display:flex; align-items:baseline; justify-content:space-between; gap:10px; font-size:13px; }
.rpgStats b { font-size:12px; font-weight:400; color:var(--accent); white-space:nowrap; }
.rpgStats small { color:var(--dim); }
.rpgStats progress { appearance:none; width:100%; height:4px; border:0; border-radius:4px; overflow:hidden; background:var(--line); accent-color:var(--accent); margin-top:10px; }
.rpgStats progress::-webkit-progress-bar { background:var(--line); }
.rpgStats progress::-webkit-progress-value { background:var(--accent); }
.rpgStats progress::-moz-progress-bar { background:var(--accent); }
.rpgStory { display:flex; flex-direction:column; min-height:0; min-width:0; }
.rpgSceneLine { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 32px; font-size:12px; color:var(--dim); border-bottom:1px solid var(--line); }
.rpgSceneLine>span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rpgSceneLine>span:last-child { flex-shrink:0; }
.rpgLog { overflow-y:auto; flex:1; min-height:0; padding:32px clamp(24px,5vw,80px); scroll-behavior:auto; }
.rpgTurn { max-width:760px; margin:0 auto 36px; }
.rpgNarrative { white-space:pre-wrap; overflow-wrap:anywhere; font:17px/2.2 var(--reading-font); }
.rpgAction { display:flex; gap:10px; padding:14px 0; margin:0 0 24px; color:var(--accent); font-size:14px; line-height:1.8; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.rpgAction .uiIcon { margin-top:3px; }
.rpgChoices { max-width:760px; margin:0 auto; display:grid; gap:8px; }
.rpgChoices button { display:flex; align-items:center; gap:14px; width:100%; padding:12px 16px; color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:10px; text-align:left; font-size:14px; line-height:1.7; }
.rpgChoices button:hover { border-color:var(--accent); background:var(--accent-soft); }
.rpgChoices button>span { color:var(--dim); font:italic 15px Georgia,serif; }
.rpgChoices .uiIcon { margin-left:auto; width:16px; color:var(--accent); }
.rpgGenerating { color:var(--dim); font-size:14px; text-align:center; padding:20px; }
.rpgComposer { border-top:1px solid var(--line); padding:16px 24px 12px; background:var(--panel); }
.rpgInputRow { display:flex; align-items:flex-end; gap:12px; }
.rpgInputRow textarea { flex:1; min-width:0; max-height:160px; }
.rpgInputRow .btnPrimary { flex-shrink:0; }
.rpgComposerFoot { display:flex; justify-content:space-between; align-items:center; gap:12px; color:var(--dim); font-size:11px; margin-top:8px; flex-wrap:wrap; }
.rpgComposerFoot button { border:0; background:none; color:var(--dim); padding:0; min-height:28px; font-size:12px; }
.rpgToolRail { border-left:1px solid var(--line); padding:16px 8px; display:flex; flex-direction:column; gap:8px; }
.rpgToolRail button { display:flex; flex-direction:column; align-items:center; gap:8px; padding:12px 0; font-size:12px; border:0; border-radius:10px; color:var(--dim); background:none; }
.rpgToolRail button:hover { background:var(--accent-soft); color:var(--accent); }
.rpgDialog { box-sizing:border-box; border:1px solid var(--line); border-radius:20px; padding:0; width:min(560px,calc(100vw - 32px)); max-height:min(780px,85dvh); color:var(--text); background:var(--panel); box-shadow:var(--shadow); }
.rpgDialog::backdrop { background:#100c1866; }
.rpgDialogContent { padding:24px; }
.rpgDialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.rpgDialog h2 { font:700 24px/1.5 var(--reading-font); margin:0; }
.rpgPanelTabs { display:flex; margin:20px 0; padding:4px; border-radius:10px; background:var(--panel2); gap:2px; }
.rpgPanelTabs button { flex:1; min-width:0; padding:8px 4px; border:0; border-radius:8px; color:var(--dim); background:none; font-size:13px; }
.rpgPanelTabs button[aria-pressed=true] { background:var(--panel); color:var(--accent); }
.rpgPanelRow { padding:16px 0; border-bottom:1px solid var(--line); line-height:1.9; font-size:14px; overflow-wrap:anywhere; }
.rpgPanelRow p { color:var(--dim); margin:8px 0 0; }
.rpgSaveForm { display:flex; gap:8px; margin:20px 0; }
.rpgSaveForm input { min-width:0; flex:1; }
.rpgSaveForm button { flex-shrink:0; font-size:13px!important; }
.rpgSaveRow { display:flex; gap:8px; align-items:center; padding:20px 0; border-bottom:1px solid var(--line); font-size:14px; }
.rpgSaveRow>div { flex:1; min-width:0; overflow-wrap:anywhere; }
.rpgSaveRow p { font-size:12px; color:var(--dim); margin:8px 0; }
.rpgSaveRow>button { flex-shrink:0; }
.rpgConfirm { padding:16px; background:var(--accent-soft); border-radius:12px; font-size:14px; line-height:1.9; }
.rpgConfirm button { margin:4px 8px 4px 0; }
@media(max-width:1200px) { .worldGrid { grid-template-columns:repeat(2,minmax(0,1fr)); } .rpgLayout { grid-template-columns:190px minmax(0,1fr) 64px; } .worldEntryLayout { gap:32px; } }
@media(max-width:1000px) { .worldEditorLayout { grid-template-columns:minmax(0,1fr) 240px; gap:24px; } .worldPage { padding:24px; } }
@media(max-width:920px) { .rpgLayout { grid-template-columns:minmax(0,1fr); } .rpgPlayerRail,.rpgToolRail { display:none; } .rpgLog { padding:24px; } .rpgNarrative { font-size:16px; } }
@media(max-width:700px) { .worldGrid { grid-template-columns:minmax(0,1fr); } .worldPage { padding:24px 16px; } .worldListHead { gap:16px; } .worldSearch { max-width:none; width:100%; } .worldTabs { gap:24px; width:100%; } .worldEntryLayout { grid-template-columns:minmax(0,1fr); gap:28px; } .worldSynopsis { font-size:21px; } .worldIdentity { padding:24px 20px; } .worldEditorLayout { display:block; } .worldEditorPreview { display:none; } .rpgSceneLine { padding:12px 20px; } .rpgLog { padding:24px 20px; } .rpgComposer { padding:12px 12px 8px; } .rpgInputRow { gap:8px; } .rpgInputRow .btnPrimary { padding:10px 12px; font-size:14px; } .rpgDialogContent { padding:20px 16px; } .worldEditorActions { flex-wrap:wrap; } .worldEditorActions>span { flex:1 0 100%; } }
@media(prefers-reduced-motion:reduce) { .worldPage * { scroll-behavior:auto!important; } }
