/* 3ALAHWA unified visual system — 2026-11-22. UI chrome only; game boards are untouched. */
:root{--ah-bg:#10291f;--ah-surface:#1b3b2d;--ah-surface-raised:#254a38;--ah-gold:#efd09a;--ah-gold-bright:#ffe4b1;--ah-text:#fff4dc;--ah-muted:#cdd6c7;--ah-stroke:#bba27466;--ah-radius:16px;--ah-control-height:46px;color-scheme:dark}
html{scroll-behavior:smooth}body{min-height:100dvh;-webkit-text-size-adjust:100%;background-color:var(--ah-bg);color:var(--ah-text);font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif}
body :is(button,input,select,textarea){font-family:inherit}
body :is(button,input,select,textarea,a,summary):focus-visible{outline:3px solid var(--ah-gold-bright);outline-offset:3px}
body :is(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%;min-width:0;accent-color:var(--ah-gold);font-size:16px}
body :is(input:not([type=checkbox]):not([type=radio]),select,textarea):not(.piece):not(.tile){border-radius:12px}
body button:not(.piece):not(.tile){transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
@media(hover:hover){body button:not(:disabled):hover{filter:brightness(1.06)}body .coffeeNav a:hover{background:#365b46}}
body .coffeeNav{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:10px max(12px,env(safe-area-inset-right));background:linear-gradient(120deg,#112c22,#244535);border-bottom:1px solid var(--ah-stroke);box-shadow:0 4px 18px #071b1430}
body .coffeeNav :is(a,button){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;min-width:0;max-width:100%;border:1px solid #bdac8155;border-radius:11px;padding:8px 12px;font-size:clamp(12px,2.8vw,15px);line-height:1.3;white-space:normal;text-align:center;text-decoration:none}
body :is(.category,.gamecard,.installBanner,.favoritesBar){border-radius:var(--ah-radius);border-color:var(--ah-stroke)}
body.home .category,body.home .gamecard{box-shadow:0 7px 20px #061b1430;min-width:0}
body.home .category{min-height:120px}
body.home .gamecard{overflow-wrap:anywhere}
body.home .panelhead{gap:10px;align-items:center}
body.home .installBanner{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px;background:linear-gradient(110deg,#244937,#173529);border:1px solid var(--ah-stroke);box-shadow:0 6px 22px #071b1430;margin-bottom:12px}
body.home .installBanner img{flex:none;border-radius:12px}
body.home .installBanner>div{flex:1 1 155px;min-width:0}
body.home .installBanner strong{display:block;color:var(--ah-gold-bright);font-size:clamp(15px,3.5vw,18px)}
body.home .installBanner small{display:block;color:var(--ah-muted);line-height:1.5}
body.home .installBanner button{min-height:44px;margin:0}
body.home input.search{width:100%;min-height:48px;margin-block:10px 14px}
body :is(dialog){max-width:min(92vw,620px);max-height:90dvh;overflow:auto;border:1px solid var(--ah-stroke);border-radius:18px;box-shadow:0 24px 70px #0008}
body dialog::backdrop{background:#05150fc9;backdrop-filter:blur(4px)}
body :is(.toolbar,.controls,.gameControls,.quick-actions,.matchActions,.roundButtons,.actions){gap:8px}
body :is(.toolbar,.controls,.gameControls,.quick-actions,.matchActions,.roundButtons,.actions)>button{min-height:44px}
body :is(header,footer){overflow-wrap:anywhere}
body footer{font-size:clamp(12px,2.7vw,14px);line-height:1.6}
[hidden]{display:none!important}
@media(max-width:560px){body .coffeeNav{gap:5px;padding:7px 8px}body .coffeeNav :is(a,button){padding:7px 9px;min-height:38px}body.home main{padding-inline:12px}body.home .installBanner{padding:11px}body.home .installBanner button{flex:1 1 130px}body.home .category{min-height:106px}body.home .panelhead{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}body button{transition:none}}