/* Eclipse Shards · the in-game menus (fixes 2026-10-27 batch 3, Ariel's items 1 and 3: "put controls inside a controls menu and
   graphics inside a graphics menu", "the waystone menu is also really bad").
   One layout system for the pause menu and the waystone menu (ui/menus.js switches their pages):
   - a menu page: a 520 px panel, eyebrow + title, one column of rows that are all the same size (46 px; the label on the left, a
     key or a short note on the right), the gold primary on top and the "leave" row last under a hairline;
   - a screen page (Settings, Travel): a 920 px panel with the same eyebrow + title, a body of one fixed height (switching a tab
     never resizes the panel) and a Back row at the bottom.
   Settings: Controls / Graphics / Sound tabs; every setting is one row (label, control, value), switches on the right.
   Loaded after style.css / rpg.css / items.css / brand.css; the #id selectors win over their older pause-menu rules. */

:is(#pause-screen,#shrine-screen) .menu-panel{width:min(520px,100%);padding:30px 38px 26px}
:is(#pause-screen,#shrine-screen) .menu-panel.wide{width:min(920px,100%)}
:is(#pause-screen,#shrine-screen) .menu-panel h2{font-size:32px;line-height:1.15;margin:12px 0 4px}
:is(#pause-screen,#shrine-screen) .menu-panel .sub{font:18px/1.5 var(--serif);color:#aab3ad;margin:2px 0 0}
#shrine-screen .menu-panel .shrine-embers{margin:12px 0 0}

/* ---- the rows ---- */
:is(#pause-screen,#shrine-screen) .menu-list{display:flex;flex-direction:column;gap:6px;margin:22px 0 0;flex-wrap:nowrap}
:is(#pause-screen,#shrine-screen) .menu-list>.primary{display:block;width:100%;min-width:0;min-height:52px;margin:0 0 8px;flex:none}
:is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary),:is(#pause-screen,#shrine-screen) .menu-back{position:relative;display:flex;align-items:center;gap:14px;width:100%;height:46px;min-height:0;margin:0;padding:0 18px;flex:none;background:rgba(12,17,21,.55);border:1px solid var(--line-2);border-radius:0;color:#d8ccad;font:400 13px/1 var(--display);letter-spacing:.18em;text-transform:uppercase;text-align:left;transition:border-color .15s,background .15s,color .15s}
:is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):hover:not(:disabled),:is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):focus-visible,:is(#pause-screen,#shrine-screen) .menu-back:hover,:is(#pause-screen,#shrine-screen) .menu-back:focus-visible{border-color:var(--gold);background:rgba(201,173,116,.08);color:var(--pale)}
:is(#pause-screen,#shrine-screen) .menu-list>button:focus-visible,:is(#pause-screen,#shrine-screen) .menu-back:focus-visible{outline:1px solid var(--gold-3);outline-offset:2px}
:is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):disabled{opacity:.42;filter:none}
/* the label wrapper (rpg / items rows: <span>Label <small>note</small></span><strong>…</strong>) and the right-hand note or key */
:is(#pause-screen,#shrine-screen) .menu-list>button>span{display:flex;align-items:center;gap:14px;flex:1;min-width:0;font:inherit;color:inherit;letter-spacing:inherit}
:is(#pause-screen,#shrine-screen) .menu-list>button small,:is(#pause-screen,#shrine-screen) .menu-list>button>strong{display:block;margin:0 0 0 auto;min-width:0;max-width:62%;font:400 17px/1 var(--serif);letter-spacing:0;text-transform:none;color:var(--muted);text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#pause-screen,#shrine-screen) .menu-list>button kbd{margin:0 0 0 auto;font-size:9px;padding:3px 6px 2px;min-width:20px}
#shrine-screen .menu-list .rpg-shrine-btn>strong,#shrine-screen .menu-list #shrine-gear-sub{display:none}
#shrine-screen .menu-list #shrine-gear{font-style:normal;color:var(--muted)}
/* the leave row: last, under a hairline, a quieter label */
:is(#pause-screen,#shrine-screen) .menu-sep{display:block;height:0;margin:8px 0 6px;border:0;border-top:1px solid var(--line-2)}
:is(#pause-screen,#shrine-screen) .menu-list>:is(#return-title,#leave-shrine){color:#a9a593;background:transparent}
/* NEW (unspent points, new gear): one calm gold lozenge on the row's corner, no glow */
:is(#pause-screen,#shrine-screen) .menu-list>button.has-new{border-color:var(--line)}
:is(#pause-screen,#shrine-screen) .menu-list>button.has-new::after{content:'';position:absolute;top:50%;right:auto;left:-4px;width:7px;height:7px;margin-top:-4px;background:var(--gold-3);transform:rotate(45deg);box-shadow:0 0 0 2px #0d1216;animation:none}
#shrine-screen .menu-list .shrine-equip.has-new strong::before{content:none}

/* ---- pages ---- */
:is(#pause-screen,#shrine-screen) .menu-page[hidden]{display:none!important}
:is(#pause-screen,#shrine-screen) .menu-back{justify-content:center;width:auto;min-width:220px;margin:18px auto 0;padding:0 28px;background:transparent;text-align:center}
:is(#pause-screen,#shrine-screen) .menu-back::before{content:'‹';margin-right:6px;font:400 17px/1 var(--serif);color:var(--gold)}
#shrine-screen .travel-page #travel{margin:20px 0 0}

/* ---- Settings ---- */
#pause-screen .set-tabs{display:flex;justify-content:center;gap:4px;margin:16px 0 0;border-bottom:1px solid var(--line-2)}
#pause-screen .set-tabs button{position:relative;min-width:150px;height:42px;padding:0 22px;background:transparent;border:0;color:#8e938b;font:400 13px/1 var(--display);letter-spacing:.22em;text-transform:uppercase;transition:color .15s}
#pause-screen .set-tabs button:hover{color:var(--pale)}
#pause-screen .set-tabs button[aria-selected=true]{color:var(--gold-3)}
#pause-screen .set-tabs button[aria-selected=true]::after{content:'';position:absolute;left:18px;right:18px;bottom:-1px;height:2px;background:var(--gold)}
#pause-screen .set-tabs button:focus-visible{outline:none;color:var(--pale);background:rgba(201,173,116,.07)}
#pause-screen .set-body{height:clamp(300px,calc(100vh - 310px),468px);margin-top:10px;overflow-y:auto;overflow-x:hidden;text-align:left}
#pause-screen .set-pane{padding:4px 2px 0}
#pause-screen .set-rows{display:flex;flex-direction:column;max-width:660px;margin:0 auto}
#pause-screen .set-row{display:grid;grid-template-columns:210px minmax(0,1fr) 56px;align-items:center;gap:20px;min-height:50px;margin:0;padding:0 8px;border-bottom:1px solid var(--line-2);font:400 12px/1.2 var(--display);letter-spacing:.18em;text-transform:uppercase;color:#b4b2a4;cursor:default}
#pause-screen .set-row>span:first-child{white-space:nowrap}
#pause-screen .set-row input[type=range]{width:100%;margin:0}
#pause-screen .set-row output{font:600 12px var(--ui);letter-spacing:.02em;color:var(--gold);text-align:right}
#pause-screen .set-row.gfx-quality{grid-template-columns:210px minmax(0,1fr)}
#pause-screen .set-row .seg{height:32px}
#pause-screen .set-row .seg button{font-size:10px;padding:0 10px}
/* switches: the button is a small pill (its label is the row's); the whole row toggles it (a <label>) */
#pause-screen .set-switch{cursor:pointer}
#pause-screen .set-switch:hover{color:var(--pale)}
#pause-screen .set-toggle{grid-column:3;justify-self:end;position:relative;display:block;width:44px;height:22px;margin:0;padding:0;border:1px solid var(--line);border-radius:11px;background:#0a0e11;font-size:0;color:transparent;letter-spacing:0;transition:background .15s,border-color .15s}
#pause-screen .set-toggle::before{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;margin:0;border-radius:50%;background:#6f756f;transition:left .15s,background .15s}
#pause-screen .set-toggle::after{content:none}
#pause-screen .set-toggle[aria-pressed=true]{background:rgba(201,173,116,.2);border-color:var(--gold-2)}
#pause-screen .set-toggle[aria-pressed=true]::before{content:'';left:25px;background:var(--gold-3)}
#pause-screen .set-toggle:hover:not(:disabled){border-color:var(--gold);background:rgba(201,173,116,.12)}
#pause-screen .set-toggle[aria-pressed=true]:hover:not(:disabled){background:rgba(201,173,116,.26)}
#pause-screen .set-toggle:focus-visible{outline:1px solid var(--gold-3);outline-offset:3px}
#pause-screen .set-switch:has(.set-toggle:disabled){opacity:.45;cursor:default}
#pause-screen .set-toggle:disabled{opacity:1;filter:none}
#pause-screen .set-switch small{grid-column:2;font:16px var(--serif);letter-spacing:0;text-transform:none;color:var(--dim)}
/* Controls: the sensitivity row, the keys in three columns (action left, key right), the note */
#pause-screen .keylist{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 30px;margin:16px 0 0}
#pause-screen .keylist h5{margin:0 0 4px;padding-bottom:6px;border-bottom:1px solid var(--line);font:400 11px var(--display);letter-spacing:.3em;text-transform:uppercase;color:var(--gold)}
#pause-screen .keylist p{display:flex;align-items:center;justify-content:space-between;gap:10px;height:27px;margin:0;border-bottom:1px solid rgba(201,173,116,.07);font:17px/1 var(--serif);color:#c3c5bb}
#pause-screen .keylist p span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#pause-screen .keylist kbd{flex:0 0 auto;margin:0;font-size:9px;letter-spacing:.05em;padding:3px 5px 2px;white-space:nowrap}
#pause-screen .set-note{max-width:820px;margin:16px auto 0;font:16px/1.5 var(--serif);color:#8f9a93;text-align:center}

@media(max-height:800px) and (min-width:700px){
  :is(#pause-screen,#shrine-screen) .menu-panel{padding:26px 34px 22px}
  :is(#pause-screen,#shrine-screen) .menu-panel h2{font-size:28px;margin:8px 0 2px}
  :is(#pause-screen,#shrine-screen) .menu-list{margin-top:16px;gap:5px}
  :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary){height:42px}
  :is(#pause-screen,#shrine-screen) .menu-list>.primary{min-height:48px;margin-bottom:6px}
  :is(#pause-screen,#shrine-screen) .menu-back{height:42px;margin-top:14px}
  #pause-screen .set-tabs{margin-top:10px}
  #pause-screen .set-row{min-height:46px}
  #pause-screen .keylist p{height:25px}
  #pause-screen .set-note{margin-top:12px}
}
@media(max-width:760px){
  :is(#pause-screen,#shrine-screen) .menu-panel,:is(#pause-screen,#shrine-screen) .menu-panel.wide{padding:24px 18px 20px}
  #pause-screen .set-tabs button{min-width:0;flex:1;padding:0 6px;letter-spacing:.12em}
  #pause-screen .set-row{grid-template-columns:110px minmax(0,1fr) 46px;gap:10px}
  #pause-screen .set-row.gfx-quality{grid-template-columns:110px minmax(0,1fr)}
  #pause-screen .keylist{grid-template-columns:1fr}
  #pause-screen .set-body{height:auto;max-height:calc(100vh - 240px)}
}
