.worlds-page { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 100vh; background: #0e201b; }
.worlds-page [hidden] { display: none !important; }
.worlds-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 30px; padding: 26px 14px; border-right: 1px solid #ffffff18; background: #102720; }
.worlds-sidebar .brand { position: relative; flex-wrap: wrap; gap: 8px; padding: 0 6px; font-size: 17px; }
.worlds-sidebar .brand-mark { width: 18px; height: 18px; }
.worlds-sidebar .brand-note { width: 100%; padding-left: 26px; font-size: 9px; }
.worlds-sidebar .eyebrow { margin: 0 10px 10px; font-size: 10px; }
.worlds-sidebar .game-category-tabs { display: grid; gap: 5px; padding: 0; border: 0; }
.worlds-sidebar .game-category-tab { width: 100%; min-height: 38px; gap: 8px; padding: 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-size: 12px; }
.worlds-sidebar .game-category-tab[aria-pressed="true"] { border-color: #dfc58e55; background: #dfc58e12; color: #ead4a6; box-shadow: none; }
.worlds-sidebar .game-category-tab-count { margin-left: auto; font-size: 10px; }
.worlds-sidebar-links { display: grid; gap: 16px; margin-top: auto; padding: 12px 9px 0; font-size: 11px; color: #a7baac; }
.worlds-main { min-width: 0; padding: 28px clamp(16px, 3vw, 44px); }
.worlds-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.worlds-heading .eyebrow { margin: 0 0 5px; font-size: 9px; }
.worlds-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.world-view-switch { display: flex; flex-shrink: 0; gap: 3px; padding: 3px; border: 1px solid #ffffff25; border-radius: 7px; background: #0b1c17; }
.world-view-switch button, .worlds-toolbar button, .worlds-map-selection header button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: #c3d0c4; font-size: 11px; cursor: pointer; }
.world-view-switch button[aria-pressed="true"] { background: #294335; color: #f0dfb8; }
.worlds-heading-actions { display: flex; align-items: center; gap: 8px; }
.world-templates-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid #ffffff25; border-radius: 7px; background: #0b1c17; color: #dfc58e; cursor: pointer; }
.world-templates-button:hover { background: #294335; border-color: #dfc58e; }
.world-templates-button .game-type-icon { width: 20px; height: 20px; }
.world-templates-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; overflow-y: auto; border: 1px solid #dfc58e55; border-radius: 12px; background: #132a21; color: #e9eee2; box-shadow: 0 24px 80px #0008; }
.world-templates-dialog::backdrop { background: #030d0bce; }
.world-templates-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.world-templates-header h2 { margin: 0; font-size: 24px; }
.world-templates-dialog button { min-height: 36px; padding: 8px 12px; border: 1px solid #ffffff29; border-radius: 5px; background: #294335; color: #f0dfb8; font: inherit; cursor: pointer; }
.world-templates-header button { font-size: 20px; line-height: 1; }
.world-templates-dialog p { color: #b6c8b7; font-size: 13px; line-height: 1.7; }
.world-templates-dialog label { display: grid; min-width: 0; gap: 7px; font-size: 12px; color: #c3d0c4; }
.world-templates-dialog input, .world-templates-dialog select { width: 100%; min-width: 0; min-height: 40px; padding: 9px; border: 1px solid #ffffff29; border-radius: 5px; background: #0d2019; color: #e9eee2; font: inherit; }
.world-templates-dialog select:focus-visible { outline: 2px solid #dfc58e; outline-offset: 2px; }
.world-template-preview { position: relative; margin-top: 20px; }
.world-template-preview fieldset { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 16px; border: 1px dashed #ffffff35; border-radius: 8px; opacity: .4; }
.world-template-preview legend { padding: 0 6px; font-size: 12px; }
.world-template-preview :disabled { cursor: not-allowed; }
.world-template-watermark { position: absolute; top: 50%; left: 50%; width: max-content; max-width: 100%; color: #f0dfb8; font-size: clamp(24px, 6vw, 42px); font-weight: 800; text-align: center; text-transform: uppercase; transform: translate(-50%, -50%) rotate(-12deg); text-shadow: 0 2px 12px #000; pointer-events: none; }
.world-templates-dialog .world-templates-availability { margin-bottom: 0; color: #dfc58e; }
.worlds-toolbar { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, 190px) minmax(110px, 150px) minmax(120px, 170px) auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid #ffffff1b; border-radius: 8px; background: #132a21; }
.worlds-toolbar label { min-width: 0; display: grid; gap: 6px; color: #b6c8b7; font-size: 10px; }
.worlds-toolbar input, .worlds-toolbar select { width: 100%; min-width: 0; height: 38px; padding: 8px 10px; border: 1px solid #ffffff29; border-radius: 5px; background: #0d2019; color: #e9eee2; font: inherit; font-size: 12px; }
.worlds-toolbar input::placeholder { color: #829b89; }
.worlds-toolbar input:focus-visible, .worlds-toolbar select:focus-visible { outline: 2px solid #dfc58e; outline-offset: 2px; }
.worlds-toolbar button { height: 38px; border: 1px solid #ffffff29; white-space: nowrap; }
.worlds-results { margin: 16px 0; color: #afc0ad; font-size: 12px; }
.worlds-main .world-catalog { padding-bottom: 12px; }
.worlds-main .world-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.worlds-main .world-card { overflow: hidden; border-radius: 8px; background: #152d23; }
.worlds-main .world-card-preview { margin: 0; aspect-ratio: 2 / 1; }
.worlds-main .world-card-content { padding: 16px; }
.worlds-main .world-card-content h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.worlds-main .world-card-description { min-height: 0; margin: 10px 0; font-size: 12px; line-height: 1.65; }
.worlds-main .world-card-facts { gap: 6px; margin: 5px 0 14px; }
.worlds-main .world-card-facts dt, .worlds-main .world-card-facts dd { font-size: 11px; }
.worlds-main .game-type-badges { margin-top: 10px; }
.world-card-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.world-card-badges .game-type-badges { margin: 0; }
.world-card-badges .game-type-badge { min-height: 28px; border-radius: 6px; background: #ffffff08; }
.world-card-badges .game-type-badge[data-type="single-player-timebound"] { justify-content: center; width: 28px; height: 28px; padding: 0; }
.world-mode-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 6px; background: #ffffff08; color: var(--mode-color); }
.worlds-main .world-play-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.world-play-button .game-type-icon { width: 18px; height: 18px; }
.world-card-preview .world-play-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; box-shadow: 0 3px 14px #0008; }
.worlds-empty { padding: 30px 18px; border: 1px dashed #ffffff35; border-radius: 8px; color: #c2cec1; font-size: 13px; line-height: 1.7; }
.worlds-map-view { display: grid; grid-template-columns: minmax(0, 1fr) 300px; overflow: hidden; border: 1px solid #ffffff29; border-radius: 8px; background: #10271e; }
.worlds-map-frame { position: relative; min-width: 0; height: clamp(540px, calc(100vh - 230px), 850px); background: #162f36; }
#worlds-overview-map, .world-map-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-map-markers { pointer-events: none; }
.world-region-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; stroke: #f1d59a; stroke-width: 1.5px; fill: #f1d59a; }
.world-region-marker { position: absolute; display: flex; align-items: center; gap: 5px; transform: translate(-50%, -50%); padding: 5px 7px; border: 1px solid #f1d59a; border-radius: 5px; background: #10251ff2; color: #fff0cc; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 9px #0007; }
.world-region-marker strong { display: grid; place-items: center; min-width: 18px; min-height: 18px; padding: 1px 4px; border-radius: 3px; background: #dfc58e; color: #14281e; font-size: 10px; }
.world-region-marker[aria-pressed="true"] { background: #dfc58e; color: #14281e; outline: 2px solid #0b1c17; }
.world-region-marker:hover { border-color: white; }
.world-region-wide { left: 12px; top: 12px; transform: none; }
.worlds-map-caption, .worlds-map-status { position: absolute; left: 12px; right: 12px; bottom: 10px; width: fit-content; max-width: calc(100% - 24px); margin: 0; padding: 7px 9px; border-radius: 4px; background: #0b1c17e8; color: #d3decf; font-size: 10px; line-height: 1.5; pointer-events: none; }
.worlds-map-status { top: 10px; bottom: auto; color: #f5d296; }
.worlds-map-status:empty { display: none; }
.worlds-map-selection { min-width: 0; max-height: 850px; height: clamp(540px, calc(100vh - 230px), 850px); overflow-y: auto; padding: 16px; border-left: 1px solid #ffffff25; }
.worlds-map-selection header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 7px; }
.worlds-map-selection h2 { margin: 0; font-size: 16px; }
.worlds-map-selection header button { min-height: 28px; padding: 4px 0; color: #dfc58e; }
.worlds-map-note { color: #a5b9a7; font-size: 11px; line-height: 1.6; }
.world-map-game { padding: 14px 0; border-top: 1px solid #ffffff20; }
.world-map-game h3 { margin: 0; font-size: 14px; }
.world-map-game p { margin: 8px 0 12px; color: #b3c4b6; font-size: 11px; line-height: 1.65; }
.worlds-catalog-note { margin-top: 22px; color: #91aa96; font-size: 11px; line-height: 1.7; }
.worlds-catalog-note summary { width: fit-content; cursor: pointer; }
@media (max-width: 1100px) {
  .worlds-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .worlds-toolbar .worlds-search { grid-column: 1 / -1; }
  .worlds-map-view { grid-template-columns: minmax(0, 1fr); }
  .worlds-map-selection { height: auto; max-height: 420px; border-left: 0; border-top: 1px solid #ffffff25; }
}
@media (max-width: 680px) {
  .worlds-page { display: block; }
  .worlds-sidebar { position: static; height: auto; gap: 14px; padding: 16px; border-right: 0; border-bottom: 1px solid #ffffff18; }
  .worlds-sidebar .brand-note, .worlds-sidebar-content > .eyebrow { display: none; }
  .worlds-sidebar .brand { padding: 0; }
  .worlds-sidebar .game-category-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .worlds-sidebar .game-category-tab { justify-content: center; gap: 5px; padding: 7px 4px; font-size: 10px; }
  .worlds-sidebar .game-category-tab-count { margin-left: 0; padding: 1px 3px; }
  .worlds-sidebar-links { display: none; }
  .worlds-main { padding: 20px 12px; }
  .worlds-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .worlds-heading h1 { font-size: 24px; }
  .world-view-switch button { padding: 6px; font-size: 10px; }
  .worlds-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 10px; }
  .worlds-toolbar > button { height: 38px; padding: 5px; }
  .worlds-map-frame { height: 540px; }
  .world-region-marker { gap: 3px; padding: 4px; font-size: 10px; }
  .worlds-map-selection { padding: 14px; }
}
