:where(html,body){max-width:100%;overflow-x:clip}
:where(img,svg,canvas,video){max-width:100%;height:auto}
:where(button,a,.btn){touch-action:manipulation}
:where(button,.btn){min-height:44px!important}
:where(.site-header .nav a,.site-header .icon-btn){min-height:44px;display:inline-flex;align-items:center;justify-content:center}
:where(.site-header .icon-btn){min-width:44px}
:where(.site-header .search-box){height:44px;min-height:44px}
:where(.chip,.feed-action,.interaction,.comment-action,.thread-action,.new-items){min-height:44px!important}
:where(button,.btn)[disabled]{opacity:.58;cursor:not-allowed}
:where(button,.btn)[aria-busy="true"]{cursor:wait}
:where(input,textarea,select){min-width:0;max-width:100%}
:where(input:not([type="checkbox"]):not([type="radio"]),select){min-height:44px!important}
:where(html){scroll-padding-top:calc(var(--header,64px) + 16px)}
:where(.dashboard,.dash-main,.dash-hero,.dash-right,.content-3,.lower-grid,.hub-wrap,.prose){min-width:0}
:where(.dash-main>*,.dash-right>*){min-width:0}
:where(.dash-hero>div:first-child){min-width:0}
:where(.prose,.hub-hero,.section-card,.card){overflow-wrap:anywhere}
:where(.site-header .header-row,.site-header .brand){min-width:0}
:where(.site-header .brand){min-height:44px}
:where(.site-header .brand>span:last-child){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:1101px){
  .site-header .header-row{gap:10px}
  .site-header .brand{flex:0 0 auto}
  .site-header .nav{flex:0 0 auto;gap:0;margin-left:auto}
  .site-header .nav a{flex:0 0 auto;white-space:nowrap;padding-inline:clamp(6px,.65vw,11px)}
  .site-header .search-box{flex:1 1 180px;width:auto;min-width:145px;margin-left:0}
  .site-header .header-saved-link{flex:0 0 44px;width:44px;padding-inline:8px;font-size:0}
  .site-header .header-saved-link::before{content:"☆";font-size:1.15rem}
  .site-header .header-row>a.btn:last-child{flex:0 0 auto;white-space:nowrap}
}
:where(table){max-width:100%}
:where(.table-wrap,.table-scroll,.responsive-table){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
:where(.table-wrap table,.table-scroll table,.responsive-table table){min-width:620px}
:where(.dash-hero .actions,.actions){display:flex;flex-wrap:wrap;align-items:center;gap:8px}
:where(.section-link){min-width:44px;min-height:44px;display:inline-flex;align-items:center}
:where(.site-footer a){min-height:44px;display:inline-flex;align-items:center}
:where(.ad-slot){min-height:96px;contain:layout paint}
:where(.mobile-nav){padding-bottom:calc(7px + env(safe-area-inset-bottom));background:var(--bg2);background:color-mix(in srgb,var(--bg2) 94%,transparent)}
.mobile-nav{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
:where(.mobile-nav a){min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center}
@media(max-width:900px){
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  :where(.dash-hero .actions .btn){flex:1 1 145px}
  :where(.dash-hero h1){max-width:100%;overflow-wrap:anywhere}
  .site-header .brand{flex:1 1 auto;min-width:0}
  .site-header .brand-mark{flex:0 0 auto}
  .site-header .header-row>a.btn[href="/hesabim/kaydedilen-kolonlar/"],.site-header .header-row>a.btn[href="/hesabim/kolonlar"]{display:none}
  .site-notice,#pwa-install-toast,.runtime-toast-stack,.cookie-banner,.consent-root{bottom:calc(84px + env(safe-area-inset-bottom))}
  #pwa-install-toast{bottom:calc(84px + env(safe-area-inset-bottom))!important}
}
@media(max-width:1350px) and (min-width:1101px){
  .site-header .header-row{gap:8px}
  .site-header .brand{flex:0 0 auto}
  .site-header .nav{gap:0}
  .site-header .nav a{padding-inline:8px;font-size:.82rem;white-space:nowrap}
  :where(.site-header .search-box){flex:1 1 170px;width:auto;min-width:150px;margin-left:0}
  .site-header .search-shortcut{display:none}
  .site-header .header-row>a.btn[href="/hesabim"]{flex:0 0 auto;white-space:nowrap}
}
@media(max-width:1100px) and (min-width:901px){
  .site-header .nav{display:none}
  .site-header .header-row{gap:10px}
  .site-header .brand{flex:0 0 auto}
  :where(.site-header .search-box){flex:1 1 190px;width:auto;min-width:170px;margin-left:0}
  :where(.site-header .header-row>a.btn[href="/hesabim/kaydedilen-kolonlar/"],.site-header .header-row>a.btn[href="/hesabim/kolonlar"]){display:none}
  .dashboard{grid-template-columns:1fr}
  .dashboard .dash-left{display:none}
  body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .mobile-nav{position:fixed;z-index:70;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px));padding:7px;border:1px solid var(--line);border-radius:17px;background:color-mix(in srgb,var(--panel) 94%,transparent);box-shadow:var(--shadow);backdrop-filter:blur(16px)}
  .mobile-nav a{min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:7px 2px;color:var(--muted);font-size:.67rem;text-align:center}
  .mobile-nav a{gap:5px;border-radius:12px;font-weight:600}
  .mobile-nav .mobile-nav-icon{display:block;width:24px;height:24px;flex:none}
  .mobile-nav a[aria-current="page"] .mobile-nav-icon{color:var(--purple2);stroke-width:2.2}
  .site-notice,#pwa-install-toast,.runtime-toast-stack,.cookie-banner,.consent-root{bottom:calc(84px + env(safe-area-inset-bottom))}
  #pwa-install-toast{bottom:calc(84px + env(safe-area-inset-bottom))!important}
}
:where(.site-header .nav a[aria-current="page"],.mobile-nav a[aria-current="page"]){background:color-mix(in srgb,var(--purple) 18%,transparent);border-color:color-mix(in srgb,var(--purple) 46%,var(--line));color:var(--text)}
.site-notice{position:fixed;z-index:120;right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:min(420px,calc(100% - 32px));padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);box-shadow:0 18px 45px rgba(1,8,20,.28);font-size:.8rem;font-weight:750;line-height:1.45}
.site-notice.is-error{border-color:color-mix(in srgb,var(--red) 62%,var(--line));background:color-mix(in srgb,var(--red) 10%,var(--panel))}
.site-notice.is-success{border-color:color-mix(in srgb,var(--green) 62%,var(--line));background:color-mix(in srgb,var(--green) 10%,var(--panel))}
.site-prompt{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:16px;background:rgba(1,6,15,.76);backdrop-filter:blur(8px)}
.site-prompt-card{width:min(520px,100%);padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);box-shadow:0 28px 80px rgba(0,0,0,.5)}
.site-prompt-card h2{margin:0 0 14px;font-size:1.15rem;line-height:1.25}
.site-prompt-label{display:block;margin-bottom:6px;color:var(--muted);font-size:.78rem;font-weight:800}
.site-prompt-input{width:100%;min-height:112px;padding:11px;border:1px solid var(--line);border-radius:11px;background:var(--panel2);color:var(--text);resize:vertical;outline:0}
.site-prompt-input:focus{border-color:var(--purple);box-shadow:0 0 0 3px color-mix(in srgb,var(--purple) 22%,transparent)}
.site-prompt-help{margin:6px 0 0;color:var(--muted);font-size:.7rem;line-height:1.45}
.site-prompt-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px}
.site-prompt-actions .btn{min-width:96px}
.site-confirm{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:16px;background:rgba(1,6,15,.76);backdrop-filter:blur(8px)}
.site-confirm-card{width:min(520px,100%);padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);box-shadow:0 28px 80px rgba(0,0,0,.5)}
.site-confirm-card h2{margin:0;font-size:1.15rem;line-height:1.25}
.site-confirm-body{margin:10px 0 0;color:var(--muted);font-size:.8rem;line-height:1.5}
.site-confirm-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:16px}
.site-confirm-actions .btn{min-width:96px}
@media(max-width:600px){
  :where(.container,.dashboard,.hub-wrap){width:min(calc(100% - 18px),var(--max,1600px))}
  :where(.section-head){align-items:flex-start;flex-wrap:wrap}
  :where(.section-link){white-space:nowrap}
  .site-header .header-row{gap:6px}
  .site-header .header-row>a.btn[href="/hesabim/kaydedilen-kolonlar/"],.site-header .header-row>a.btn[href="/hesabim/kolonlar"]{display:none}
  .site-header .header-row>a.btn[href="/hesabim"]{padding-inline:10px;white-space:nowrap}
  .site-header .header-row>.icon-btn{padding-inline:6px}
}
@media(max-width:380px){
  :where(.dash-hero h1){font-size:1.85rem}
  :where(.dash-hero p){font-size:.8rem}
}
@media(prefers-reduced-motion:reduce){
  :where(*,::before,::after){scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* Cross-theme interaction polish. A few legacy portal selectors carry dark
   palette literals; keep the light theme readable without changing the brand. */
html[data-theme="light"] :where(.side-menu a:hover,.side-menu a.active){color:var(--text)}
html[data-theme="light"] :where(.community-body,.portal-league-foot,.right-meta){color:var(--muted)}
html[data-theme="light"] :where(.side-label){color:color-mix(in srgb,var(--muted) 86%,var(--text))}

/* Make dense, clickable portal rows feel intentional on pointer devices while
   preserving the no-motion preference and keeping touch targets unchanged. */
@media (hover:hover){
  :where(.game-tile,.tool-link,.leader,.article,.community-item,.result-item,.portal-league){transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
  :where(.game-tile,.tool-link,.leader,.article,.community-item,.result-item,.portal-league):hover{border-color:color-mix(in srgb,var(--purple) 48%,var(--line));box-shadow:0 10px 24px rgba(38,45,100,.12)}
  :where(.game-tile,.tool-link,.portal-league):hover{transform:translateY(-1px)}
}

@media (max-width:600px){
  :where(.site-header .brand){overflow:hidden}
  :where(.site-header .brand>span:last-child){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  :where(.site-header .icon-btn){flex:0 0 44px}
  :where(.site-header .header-row>a.btn[href="/hesabim"]){flex:0 0 auto;max-width:96px;overflow:hidden;text-overflow:ellipsis}
}

/* The transparency page is long on phones; keep its four trust and process
   cards scannable without shrinking the game/source detail list. */
@media(max-width:480px){
  .wrap:has(.trust) .trust,
  .wrap:has(.trust) .flow,
  .wrap:has(.trust) .health-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .wrap:has(.trust) .trust .card,
  .wrap:has(.trust) .flow .step,
  .wrap:has(.trust) .health-summary .card{padding:12px!important}
  .wrap:has(.trust) .trust p,
  .wrap:has(.trust) .flow .step p{font-size:.7rem;line-height:1.45}
}
@media(max-width:359px){
  .wrap:has(.trust) .trust,
  .wrap:has(.trust) .flow,
  .wrap:has(.trust) .health-summary{grid-template-columns:1fr!important}
}

/* Tool hubs use the product's page-title scale instead of oversized landing-page type. */
.tools-shell .tools-hero h1{font-size:clamp(1.75rem,2.5vw,2.25rem);line-height:1.08;margin:6px 0 9px}
.pred-shell .pred-hero h1{font-size:clamp(1.75rem,2.5vw,2.25rem);line-height:1.08;letter-spacing:-.045em;margin:6px 0 9px}
@media(max-width:620px){
  .tools-shell .tools-hero{padding:16px;gap:12px;align-items:start}
  .tools-shell .tools-hero h1{font-size:clamp(1.5rem,7vw,1.75rem);line-height:1.08;margin:6px 0 8px}
  .tools-shell .mode-tabs{gap:6px;margin:10px 0 0}
  .tools-shell .mode-tabs a{min-height:44px;display:inline-flex;align-items:center;padding:8px 10px;font-size:.72rem}
  .pred-shell .pred-hero h1{font-size:clamp(1.5rem,7vw,1.75rem);line-height:1.08;letter-spacing:-.04em;margin:6px 0 8px}
}
