/* KAÇGEZ ortak arayüz standardı · 2026-10-10 */
:root{
  --kg-ui-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --kg-ui-bg:#070a08;
  --kg-ui-surface:#101512;
  --kg-ui-surface-2:#151c17;
  --kg-ui-border:#2d3830;
  --kg-ui-text:#f3f6f3;
  --kg-ui-muted:#9aa69c;
  --kg-ui-green:#53fc18;
  --kg-ui-danger:#ff626c;
  --kg-ui-warning:#ffc857;
  --kg-ui-radius:14px;
  --kg-ui-gap:16px;
  --kg-ui-shadow:0 16px 42px rgba(0,0,0,.28);
}

html{font-family:var(--kg-ui-font);font-size:16px;-webkit-text-size-adjust:100%}
body,button,input,textarea,select,dialog{font-family:var(--kg-ui-font)!important}
body{color:var(--kg-ui-text);font-weight:600;line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* Başlık hiyerarşisi */
:where(main,body>section) h1{font-size:clamp(1.9rem,4vw,3.35rem);font-weight:900;line-height:1.02;letter-spacing:-.045em}
:where(main,body>section) h2{font-size:clamp(1.2rem,2.2vw,1.65rem);font-weight:850;line-height:1.15;letter-spacing:-.025em}
:where(main,body>section) h3{font-size:clamp(1rem,1.7vw,1.2rem);font-weight:800;line-height:1.25;letter-spacing:-.015em}
:where(main,body>section) p{line-height:1.6}
:where(main,body>section) :is(.kicker,.eyebrow,.section-label){font-size:.69rem;font-weight:900;line-height:1.2;letter-spacing:.11em;text-transform:uppercase}
:where(main,body>section) :is(.muted,.hint,.help,small){color:var(--kg-ui-muted);line-height:1.45}

/* Düğmeler ve işlem bağlantıları */
:where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]){min-height:42px;border-radius:10px;font-weight:850;line-height:1.15;letter-spacing:.01em;touch-action:manipulation;transition:transform .16s ease,filter .16s ease,border-color .16s ease,background-color .16s ease,opacity .16s ease}
:where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]):not(:disabled){cursor:pointer}
:where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]):not(:disabled):hover{filter:brightness(1.08);transform:translateY(-1px)}
:where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]):active{transform:translateY(0)}
:where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]):disabled{cursor:not-allowed;opacity:.52;filter:saturate(.55)}
:where(a,button,input,textarea,select,summary):focus-visible{outline:2px solid var(--kg-ui-green)!important;outline-offset:3px}

/* Form alanları */
:where(main,body>section) :is(input,textarea,select){min-height:42px;border-radius:10px;font-size:.94rem}
:where(main,body>section) textarea{min-height:112px;resize:vertical}
:where(main,body>section) :is(input,textarea,select)::placeholder{color:#77827a;opacity:1}

/* Ortak kart ölçüsü; sayfaların renk kimliği korunur */
:where(main) :is(.card,.panel,.home-panel,.game-card,.hub-card,.stat-card,.feature-card,.tool-card){border-radius:var(--kg-ui-radius)}

/* Boş, yükleniyor, hata ve başarı durumları */
:where(main,body>section) :is(.empty-state,.empty,.no-results,.board-empty,.map-empty,.day-empty,.progress-boost-empty,[data-state="empty"]){display:grid;place-items:center;gap:6px;min-height:112px;padding:22px;border:1px dashed var(--kg-ui-border);border-radius:var(--kg-ui-radius);background:rgba(255,255,255,.018);color:var(--kg-ui-muted);font-size:.86rem;font-weight:650;line-height:1.5;text-align:center}
:where(main,body>section) :is(.empty-state,.empty,.no-results,.board-empty,.map-empty,.day-empty,.progress-boost-empty,[data-state="empty"]) :is(b,strong){color:var(--kg-ui-text);font-size:.96rem}
:where(main,body>section) :is(.empty-state,.empty,.no-results,.board-empty,.map-empty,.day-empty,.progress-boost-empty,[data-state="empty"]) p{max-width:46ch;margin:0;font-size:.84rem}
:where(main,body>section) :is(.loading,.loading-state,.stream-loading,.chat-loading,.clip-loading,.profile-clip-loading,[data-state="loading"]){display:flex;align-items:center;justify-content:center;gap:9px;min-height:72px;padding:16px;color:var(--kg-ui-muted);font-size:.86rem;font-weight:700;line-height:1.5;text-align:center}
:where(main,body>section) :is(.loading,.loading-state,.stream-loading,.chat-loading,.clip-loading,.profile-clip-loading,[data-state="loading"])::before{content:"";flex:0 0 auto;width:14px;height:14px;border:2px solid rgba(83,252,24,.2);border-top-color:var(--kg-ui-green);border-radius:50%;animation:kg-ui-spin .75s linear infinite}
:where(main,body>section) :is(.error,.error-box,.error-state,.alert-error,.form-error,.ranking-error,.play-error,.redeem-error,[data-state="error"]){padding:12px 14px;border:1px solid rgba(255,98,108,.38);border-radius:11px;background:rgba(255,98,108,.08);color:#ffc4c8;font-size:.86rem;font-weight:700;line-height:1.5}
:where(main,body>section,dialog) :is(.error,.error-box,.error-state,.alert-error,.form-error,.ranking-error,.play-error,.redeem-error,[data-state="error"]):empty{display:none}
:where(main,body>section) :is(.success,.success-state,.alert-success,[data-state="success"]){padding:12px 14px;border:1px solid rgba(83,252,24,.3);border-radius:11px;background:rgba(83,252,24,.07);color:#caffb8;font-size:.86rem;line-height:1.5}

@keyframes kg-ui-spin{to{transform:rotate(360deg)}}

/* Hareket azaltma tercihi */
@media(prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Mobil yoğunluk ve okunabilirlik */
@media(max-width:640px){
  :root{--kg-ui-radius:12px;--kg-ui-gap:10px}
  :where(main) :is(.card,.panel,.home-panel,.game-card,.hub-card,.stat-card,.feature-card,.tool-card){border-radius:12px}
  :where(main,body>section) h1{font-size:clamp(1.7rem,9vw,2.35rem);line-height:1.06}
  :where(main,body>section) h2{font-size:1.12rem;line-height:1.18}
  :where(main,body>section) h3{font-size:1rem}
  :where(main,body>section,dialog) :is(button,.button,.btn,.smallbtn,.action-btn,.secondary-btn,.kick-cta,[class*="-button"]){min-height:44px}
  :where(main,body>section) :is(.empty-state,.empty,.no-results,.board-empty,.map-empty,.day-empty,.progress-boost-empty,[data-state="empty"]){min-height:96px;padding:18px 14px}
}
:where(main,body>section) .kg-load-fallback{display:grid;place-items:center;gap:7px;min-height:112px;padding:22px;border:1px solid rgba(255,200,87,.35);border-radius:var(--kg-ui-radius);background:rgba(255,200,87,.06);color:var(--kg-ui-muted);text-align:center}
:where(main,body>section) .kg-load-fallback b{color:var(--kg-ui-text);font-size:.96rem}
:where(main,body>section) .kg-load-fallback span{font-size:.84rem}
:where(main,body>section) .kg-load-fallback button{min-height:38px;padding:0 15px;border:1px solid rgba(83,252,24,.35);background:rgba(83,252,24,.08);color:var(--kg-ui-green)}
.kg-noscript{display:block;max-width:1180px;margin:14px auto;padding:14px 16px;border:1px solid rgba(255,200,87,.4);border-radius:12px;background:#211b0c;color:#fff;font:700 14px/1.5 Inter,system-ui,sans-serif;text-align:center}
.kg-noscript a{display:inline-block;margin-left:8px;color:#7dff50;text-decoration:underline}
.responsible-note{padding:10px 12px;border-left:3px solid var(--kg-ui-warning);border-radius:8px;background:rgba(255,200,87,.06);color:var(--kg-ui-muted);font-size:.82rem;line-height:1.55}.responsible-note a{color:var(--kg-ui-green);font-weight:850;text-decoration:none}.responsible-note b{color:var(--kg-ui-text)}
:where(main,body>section) :is(.loading,.loading-state,[data-state="loading"]){color:var(--kg-ui-muted);font-size:.86rem;font-weight:700}:where(main,body>section) :is(.kg-profile-link,.activity-user,.leader-user a){overflow-wrap:anywhere}@media(max-width:640px){:where(main,body>section) :is(.status,.notice,[role="status"]){max-width:100%;overflow-wrap:anywhere}:where(main) :is(.tabs,.profile-tabs,.hub-tabs){scrollbar-width:none}}
