/* World selection stays in the shared header; the wordmark is unchanged. */
.wide-world-label{display:inline}.small-world-label{display:none}
#world-dialog{width:min(900px,calc(100vw - 24px));max-width:none;padding:0;overflow:hidden;max-height:90vh;max-height:90dvh}
.world-dialog-heading{position:relative;display:flex;align-items:center;gap:16px;padding:19px 60px 16px 24px;border-bottom:1px solid #d9d0be}
.world-dialog-heading img{width:56px;height:56px;object-fit:contain;flex:none}.world-dialog-heading h2{font-size:28px;margin:0 0 4px}.world-dialog-heading p{margin:0;font-size:13px;color:#596459}
#world-grid{padding:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;overflow:auto;overscroll-behavior:contain;max-height:calc(90vh - 100px);max-height:calc(90dvh - 100px)}
.world-card{padding:0;border:1px solid #d3c8b5;background:#fffaf0;border-radius:13px;overflow:hidden;text-align:left;display:flex;flex-direction:column;min-width:0;color:var(--ink)}.world-card:hover{border-color:#8d6289}.world-card[aria-pressed=true]{border:2px solid #8d6289}.world-card img{width:100%;height:140px;object-fit:cover;display:block}.world-card-copy{padding:13px 15px;display:flex;flex-direction:column;gap:6px}.world-card strong{font:23px Georgia,serif}.world-card-copy>span{font-size:13px;line-height:1.4}.world-card small{font-size:11px;color:#725179;font-weight:700}
#pair-panel{position:absolute;left:18px;top:18px;z-index:3;width:min(310px,calc(100% - 86px));background:#fff8eaee;border:1px solid #b9ae97;border-radius:14px;box-shadow:0 4px 20px #17362226;backdrop-filter:blur(7px)}
#pair-details>summary{padding:12px 14px;cursor:pointer;font-size:13px;font-weight:700}#pair-count{display:inline-block;font-size:12px;font-weight:400;margin-left:5px}#pair-hint{font-size:13px;line-height:1.5;margin:0;padding:0 14px 12px}.pair-panel-actions{padding:0 10px 10px;display:flex;gap:5px;flex-wrap:wrap}.pair-panel-actions button{font-size:12px;border:1px solid #b8ac97;background:#fffaf0;padding:7px 9px;border-radius:20px}.pair-panel-actions #pair-restart{font-size:11px}#pair-panel.done{border-color:#64856b}
#pair-book{padding:0;width:min(650px,calc(100vw - 24px));overflow:hidden;max-height:88vh;max-height:88dvh}.pair-book-heading{position:relative;padding:20px 65px 14px 22px;border-bottom:1px solid #d9cfbd}.pair-book-heading h2{margin:0;font-size:28px}#pair-stories{overflow:auto;max-height:calc(88vh - 80px);max-height:calc(88dvh - 80px);overscroll-behavior:contain;padding:8px 22px 22px}#pair-stories article{padding:13px 0;border-bottom:1px solid #e2d8c5}#pair-stories h3{font:22px Georgia,serif;margin:5px 0}#pair-stories p{font-size:14px;margin:8px 0}.pair-story-state{color:#775182;font-weight:700}
#pair-success{text-align:center;width:min(550px,calc(100vw - 24px));padding:30px}#pair-success>img{width:85px;height:85px}#pair-success h2{font-size:34px}#pair-success .certificate{display:inline-block;background:#8c5888;color:white;padding:12px 18px;border-radius:24px;text-decoration:none;margin:8px 0 16px}
@media(max-width:1050px){.world-header h1{font-size:14px}.world-header .logo{width:186px;height:22px}.wide-world-label{display:none}.small-world-label{display:inline}.world-header .world-tools button{padding:6px 9px;font-size:12px}}
@media(max-width:680px){.world-header{display:grid;grid-template-columns:1fr auto;gap:4px 8px;padding:8px 10px}.world-header .logo{grid-column:1;grid-row:1;width:146px;height:18px}.world-header h1{grid-column:1;grid-row:2;font-size:12px;white-space:normal}.world-header .world-tools{grid-column:2;grid-row:1 / 3}.world-header .world-actions{gap:2px}.world-header .world-tools button{font-size:11px;padding:6px;min-height:36px}#world-grid{grid-template-columns:1fr;padding:14px}.world-card{flex-direction:row;align-items:stretch}.world-card img{width:40%;height:126px}.world-card-copy{flex:1;padding:12px}.world-card strong{font-size:22px}.world-dialog-heading{padding:15px 52px 15px 16px;gap:10px}.world-dialog-heading h2{font-size:25px}.world-dialog-heading img{width:44px;height:44px}#pair-panel{left:10px;top:10px}#hint{max-width:calc(100% - 100px);white-space:normal;text-align:center;font-size:11px}footer{font-size:10px;max-height:70px;overflow:auto}}
@media(max-width:389px){.world-header{grid-template-columns:1fr}.world-header .logo{grid-row:1}.world-header h1{grid-row:2}.world-header .world-tools{grid-column:1;grid-row:3;justify-self:stretch}.world-header .world-actions{justify-content:space-between}.world-header .world-actions button{flex:1}.world-header .world-tools button{font-size:12px}}

.world-header #world-switch span{margin-left:0}

@media(min-width:390px) and (max-width:460px){.world-header .logo{width:128px;height:16px}.world-header .world-tools button{font-size:10.5px;padding:6px 5px}}
/* Consistent independent brand mark, without changing the wordmark. */
.branded-heading{display:flex;align-items:center;gap:11px;padding-right:32px}.dialog-mark{width:34px;height:34px;object-fit:contain;flex:none}.branded-heading h2{margin:0;min-width:0}.list-heading .branded-heading{margin-bottom:15px}.list-heading .branded-heading h2{margin:0}.scene-title-row{margin:9px 0 15px;align-items:flex-start}.scene-title-row .dialog-mark{width:28px;height:28px;margin-top:2px}#scene .scene-title-row h2{margin:0;padding-right:5px}.pair-book-heading .branded-heading h2{margin:0}.cat-dialog-mark{display:block;margin:0 auto 10px}#minigame-dialog .game-heading{display:flex;align-items:center;gap:10px}#minigame-dialog .game-heading .dialog-mark{width:29px;height:29px}
#world-switch{display:flex;align-items:center;justify-content:center;gap:9px;border-color:#8e7298;background:#f7eff8}#world-switch[aria-expanded=true]{background:#eaddec}.world-chevron{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:2;transition:transform .15s}#world-switch[aria-expanded=true] .world-chevron{transform:rotate(180deg)}
.fund-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:340px;margin:10px 0}.fund-thumb{margin:0;min-width:0}.fund-photo,.fund-empty{aspect-ratio:1;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #c7b9a6;border-radius:12px;overflow:hidden;background:#e8e5d5}.fund-photo{padding:0;cursor:pointer}.fund-photo svg{width:100%;height:100%;display:block}.fund-photo:hover{border-color:#7846b8}.fund-empty{border-style:dashed;background:#f3ecdf;color:#6d756c;font-size:13px}.fund-thumb figcaption{font-size:11px;line-height:1.35;margin-top:6px}.pair-complete .pair-story-state{color:#2c6d4d}#pair-stories .pair-complete{background:#e9eddf80;padding-left:10px;padding-right:10px;border-radius:10px}#pair-stories h3{font-size:24px}.play-chess{display:block;width:100%;padding:12px;margin:12px 0;border:1px solid #85618d;border-radius:9px;background:#eee3f0;color:#392946;font-weight:700}
@media(max-width:520px){.world-header{grid-template-columns:1fr auto}.world-header .world-tools{grid-column:1/-1;grid-row:3;justify-self:stretch;margin-top:3px}.world-header .world-actions{justify-content:space-between;gap:5px}.world-header .world-actions button{flex:1;font-size:11px;padding:6px}.world-header .logo{width:146px;height:18px}.world-header h1{grid-column:2;grid-row:1;justify-self:end;font-size:12px}.world-header .world-tools{grid-row:2}.wide-world-label{display:none}.small-world-label{display:inline}.world-header #world-switch{gap:5px}.branded-heading{gap:8px}.branded-heading .dialog-mark{width:29px;height:29px}.pair-book-heading .branded-heading h2{font-size:24px}.fund-pair{max-width:290px}}
