/* MultiCraft — out-of-game SHELL ("Altın Saat", round 6). Owner: foundation (shared, read-only after the foundation phase).
   Tokens: tokens.css · base + type roles: base.css · controls: components.css · hub panes: hub.css · lobby: lobby.css ·
   HUD: hud.css · in-game screens: screens.css.
   This file: the menu root, the login stage (boot -> splash -> account: ONE stage, the logo box never moves), the hub
   frame (top band / tab bar / rail / social band / room bar / connection banner) and the loading frame.
   Tiers (SPEC 2.5): base = phone portrait · land = (min-width 600px) and (max-height 500px) · wide = (min-width 840px) and
   (min-height 501px) · lg = (min-width 1200px) and (min-height 501px) · xl = (min-width 1600px) and (min-height 700px). */

/* ================================================================ menu root */
.menu-root { position: fixed; inset: 0; z-index: var(--z-screen); overflow: hidden; background: var(--bg-app); color: var(--text-1);
  transition: opacity var(--dur-4) var(--ease-out); }
.menu-root.fade-out { opacity: 0; pointer-events: none; }
.menu-root.dip { transition-duration: var(--dur-3); }
.menu-views { position: absolute; inset: 0; z-index: 2; display: flex; }
.view { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }
.view.enter { animation: fadeIn var(--dur-3) var(--ease-out); }
/* the hub backdrop: solid carbon + one warm top glow (the blurred key-art backdrop is gone) */
.menu-root[data-view="hub"] { background: radial-gradient(120% 60% at 50% -10%, rgba(255, 178, 63, .06), transparent 60%), var(--bg-app); }

/* ================================================================ lockup (block mark + MULTICRAFT; the stone logo is too fine below 300 px) */
.lockup { display: inline-flex; align-items: center; gap: .625rem; flex: none; text-decoration: none; color: inherit; min-width: 0; }
.lockup > img { width: 1.75rem; height: 1.75rem; border-radius: 3px; flex: none; }
.lockup > span { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; letter-spacing: .04em; color: var(--paper-1); line-height: 1; white-space: nowrap; }
.lockup > span > em { font-style: normal; color: var(--amber-400); }
.lockup:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus); border-radius: var(--r-xs); }
/* logoEl(): the stone wordmark as a block (hero = splash-size, small = card-size) */
.logo-box { display: block; width: min(19rem, 78vw); }
.logo-box.hero { width: min(28rem, 80vw); } .logo-box.small { width: 12rem; }
.logo-box > .logo { display: block; width: 100%; height: auto; aspect-ratio: 600 / 167; -webkit-user-drag: none; user-select: none; }
.logo-box > .logo-text { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--paper-1); }
.logo-box > .logo-text > em { font-style: normal; color: var(--amber-400); }

/* ================================================================ LOGIN STAGE (boot / splash / account)
   SHOT (key art, logo, tagline, server künye) + BAND (status, tabs, form, actions). The boot screen in index.html uses the
   same geometry inline (keep the two in sync: .login .shot / .brand / .logo / .band). */
.login { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--band); color: var(--text-1); }
/* phones: the shot takes what the login band needs (~37rem: tabs, 2 fields + one error line, remember, CTA, guest, util), 10–18.75rem */
.login .shot { position: relative; flex: none; height: clamp(10rem, calc(100vh - 37rem), 18.75rem); height: clamp(10rem, calc(100dvh - 37rem), 18.75rem);
  overflow: hidden; background: var(--band); }
.login .shot > picture { position: absolute; inset: 0; display: block; }
.login .shot .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: 0;
  transition: opacity var(--dur-4) var(--ease-out); }
.login .shot .bg.ready { opacity: 1; }
.login .vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(5, 4, 3, .45) 100%); }
.login .brand-scrim { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(95% 62% at 50% 0%, rgba(10, 8, 6, .62), rgba(10, 8, 6, 0) 72%), linear-gradient(to top, rgba(10, 8, 6, .75) 0%, rgba(10, 8, 6, 0) 26%); }
.login .brand { position: absolute; left: 0; right: 0; top: calc(1.5rem + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 0 1.25rem; }
.login .logo { display: block; width: min(19rem, 78vw); height: auto; aspect-ratio: 600 / 167; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); -webkit-user-drag: none; user-select: none; }
.login .logo-text { display: none; width: min(19rem, 78vw); aspect-ratio: 600 / 167; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800;
  font-size: 2.5rem; letter-spacing: .02em; color: var(--paper-1); line-height: 1; text-shadow: 0 3px 0 #2a1408, 0 6px 18px rgba(0, 0, 0, .5); }
.login .logo-text > em { font-style: normal; color: var(--amber-400); }
.login.no-logo .logo { display: none; } .login.no-logo .logo-text { display: flex; }
.login .tagline { margin: 0; font-size: .9375rem; font-weight: 500; color: var(--paper-0); text-align: center; letter-spacing: .005em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 0 18px rgba(0, 0, 0, .55); }
.login .cap { color: var(--paper-1); text-shadow: 0 1px 2px rgba(0, 0, 0, .85); }
.login .cap .dot { margin-right: .4375rem; vertical-align: .05em; }
.login .cap.bad { color: var(--red-300); }
.login .cap-top { justify-content: center; margin-top: .125rem; padding: .1875rem .5rem; border-radius: var(--r-xs); background: rgba(10, 8, 6, .62); }   /* QA r6: on the busy campfire strip the billing line sits on a quiet backing (text on art = on a scrim, SPEC 12.1) */
.login .cap-bottom { display: none; position: absolute; left: 1.25rem; bottom: .875rem; }
/* band */
.login .band { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--band); border-top: 1px solid var(--line-1); }
.login .band-gate { position: absolute; left: 0; right: 0; top: -1px; height: 2px; overflow: hidden; z-index: 1; pointer-events: none; }
.login .band-gate > i { position: absolute; top: 0; bottom: 0; left: 0; width: 42%; background: linear-gradient(90deg, rgba(255, 178, 63, 0), var(--accent));
  box-shadow: 0 0 12px rgba(255, 178, 63, .6); display: none; }
.login .band-gate.run > i { display: block; animation: gateRun 1.6s var(--ease-inout) infinite; }
.login .band-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 1rem; padding: 1rem calc(1.25rem + var(--safe-r)) .75rem calc(1.25rem + var(--safe-l)); scroll-padding-block: .75rem 2rem; }
.login .band-body::-webkit-scrollbar { display: none; }
.login .band-foot { flex: none; display: flex; flex-direction: column; gap: .75rem; padding: .75rem calc(1.25rem + var(--safe-r)) calc(.5rem + var(--safe-b)) calc(1.25rem + var(--safe-l)); }
.login .band-head { display: none; flex: none; }
.login .band-head .sub { margin-top: .625rem; color: var(--text-2); font-size: var(--fs-md); line-height: 1.45; text-wrap: balance; }
/* phones / land: no head above the tabs (the tabs are the header); a mode without tabs (first run) shows a compact one */
.login .band-head.solo { display: block; }
.login .band-head.solo > .display { font-size: var(--fs-d5); }
.login .band-head.solo > .sub { margin-top: .375rem; font-size: var(--fs-sm); }
.login .band-tabs { display: flex; align-items: flex-end; gap: .25rem; flex: none; }
.login .band-tabs > .tabs { flex: 1; }
.login .util { display: flex; align-items: center; gap: .25rem; margin: 0 -.5rem; }
.login .util > .ver { margin-left: auto; padding-right: .5rem; color: var(--text-3); }
.login .util.compact { display: none; margin: 0; gap: .125rem; }
.login .form { display: grid; gap: 1rem; align-content: start; }
.login .form .two { display: grid; gap: 1rem; }
.login .between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--tap); }
.login .band-note { justify-content: center; text-align: center; text-wrap: balance; }
.login .band.busy .form, .login .band.busy .band-tabs { opacity: .6; pointer-events: none; }
.login .band.busy .form .input { color: var(--text-2); }
.login .actions { display: grid; gap: .75rem; }
.login .actions.duo { grid-template-columns: 1fr 1fr; }
.login .actions.duo > .btn { padding: 0 .75rem; font-size: var(--fs-md); min-width: 0; }
/* status row (boot / connecting) */
.login .status { display: flex; align-items: center; gap: .875rem; padding: .25rem 0; }
.login .status > .spin { width: 1.5rem; height: 1.5rem; border-width: 2.5px; border-color: rgba(255, 236, 214, .15); border-top-color: var(--accent); }
.login .status b { display: block; font-size: var(--fs-lg); font-weight: 600; color: var(--text-0); line-height: 1.3; }
.login .status span { font-size: var(--fs-sm); color: var(--text-3); }
.login .status.later { opacity: 0; animation: fadeIn var(--dur-3) var(--ease-out) .4s forwards; }
/* one solid state card (offline / cannot reach the server) */
.login .state-card { display: grid; gap: .75rem; justify-items: start; }
.login .state-card > .ico-tile { width: 2.5rem; height: 2.5rem; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); }
.login .state-card > .ico-tile > .ico { width: 1.5rem; height: 1.5rem; }
.login .state-card > p { color: var(--text-2); line-height: var(--lh-body); max-width: 46ch; }
.login .retry-in { color: var(--text-3); }
/* news (MOTD) card on tall desktops */
.login .news { display: none; align-items: center; gap: .875rem; padding: .625rem; border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--line-1); }
.login .news > .art { width: 6.5rem; aspect-ratio: 16 / 10; border-radius: var(--r-xs); flex: none; }
.login .news .n-title { margin: .25rem 0 .3125rem; color: var(--text-0); font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.login .news .kunye { color: var(--text-3); }
/* the band content swaps with a short cross-fade; the tab row never moves */
.login .band-body > .swap-in, .login .band-foot > .swap-in { animation: fadeIn var(--dur-2) var(--ease-out); }
.login .shake { animation: shake .36s var(--ease-out); }
/* short phones: compact strip, no tagline */
@media (max-width: 599px) and (max-height: 700px) {
  .login .shot { height: clamp(8.5rem, calc(100vh - 28.75rem), 12.5rem); height: clamp(8.5rem, calc(100dvh - 28.75rem), 12.5rem); }
  .login .tagline, .login .cap-top { display: none; }
  .login .brand { top: calc(1rem + var(--safe-t)); }
  .login .band-body { gap: .75rem; padding-top: .75rem; }
  .login .form, .login .form .two { gap: .75rem; }
  .login .band-foot { gap: .5rem; padding-top: .5rem; }
  .login .hide-short { display: none !important; }
  .login .hint-short > .hint { display: none; }
  /* Ayarlar / Tam Ekran move beside the tabs (like land) when the tab row is there */
  .login.has-compact .util.compact { display: flex; }
  .login.has-compact .util.full { display: none; }
}
/* portrait tablets and narrow desktop windows: the phone layout, centred */
@media (min-width: 600px) and (max-width: 839px) and (min-height: 501px) {
  .login .band-body > *, .login .band-foot > * { width: 100%; max-width: 30rem; margin-inline: auto; }
  .login .shot { height: min(38vh, 22rem); }
  .login .logo, .login .logo-text { width: min(24rem, 60vw); }
}
/* landscape phones: shot left, band right, compact (designed for 330 px of usable height) */
@media (min-width: 600px) and (max-height: 500px) {
  .login { flex-direction: row; }
  .login .shot { flex: 1 1 auto; height: auto; }
  .login .shot .bg { object-position: 79% 50%; }
  .login .brand { left: calc(1.5rem + var(--safe-l)); right: auto; top: 1.25rem; align-items: flex-start; padding: 0; gap: .375rem; }
  .login .logo, .login .logo-text { width: min(15rem, calc(100vw - min(30rem, 58vw) - 3rem - var(--safe-l))); }
  .login .logo-text { font-size: 2rem; justify-content: flex-start; }
  .login .tagline { text-align: left; font-size: 1rem; }
  .login .cap-top { display: none; }
  .login .cap-bottom { display: flex; left: calc(1.5rem + var(--safe-l)); bottom: 1rem; }
  .login .brand-scrim { background: radial-gradient(110% 80% at 0% 0%, rgba(10, 8, 6, .6), rgba(10, 8, 6, 0) 65%), var(--scrim-art-b); }
  .login .band { flex: none; width: min(30rem, 58vw); border-top: 0; border-left: 1px solid var(--line-1); }
  .login .band-gate { top: 0; bottom: 0; left: -1px; right: auto; width: 2px; height: auto; }
  .login .band-gate > i { left: 0; right: 0; top: 0; width: auto; height: 42%; background: linear-gradient(180deg, rgba(255, 178, 63, 0), var(--accent)); }
  .login .band-gate.run > i { animation-name: gateRunY; }
  .login .band-body { padding: .75rem calc(1.5rem + var(--safe-r)) .25rem 1.5rem; gap: .75rem; }
  .login .band-foot { padding: .625rem calc(1.5rem + var(--safe-r)) calc(.75rem + var(--safe-b)) 1.5rem; gap: .5rem; }
  .login .form { gap: .625rem; }
  .login .form .two { grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }
  .login .form .two.one { grid-template-columns: 1fr; }
  .login.has-compact .util.compact { display: flex; }
  .login.has-compact .util.full { display: none; }
  .login .hide-short { display: none !important; }
  .login .hint-short > .hint { display: none; }
  .login .actions.land-duo { grid-template-columns: 1fr 1fr; }
  .login .actions.land-duo > .btn { padding: 0 .75rem; font-size: .9375rem; gap: .375rem; min-width: 0; }
  .login .state-card { gap: .5rem; }
}
/* wide (tablet, laptop, desktop): shot fills the frame, band = side panel */
@media (min-width: 840px) and (min-height: 501px) {
  .login { flex-direction: row; }
  .login .shot { flex: 1 1 auto; height: auto; }
  .login .shot .bg { object-position: 78% 50%; }
  .login .brand { left: 6vw; right: auto; top: 25vh; align-items: flex-start; padding: 0; gap: 1rem; }
  .login .logo, .login .logo-text { width: 20rem; }
  .login .logo-text { font-size: 3rem; justify-content: flex-start; }
  .login .tagline { font-size: var(--fs-xl); text-align: left; padding-left: .375rem; }
  .login .cap-top { display: none; }
  .login .cap-bottom { display: flex; left: 6vw; bottom: 2.25rem; }
  .login .brand-scrim { background: radial-gradient(70% 60% at 18% 26%, rgba(10, 8, 6, .62), rgba(10, 8, 6, 0) 70%), var(--scrim-art-b); }
  .login .band { flex: none; width: 26rem; border-top: 0; border-left: 1px solid var(--line-1); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
  .login .band::-webkit-scrollbar { display: none; }
  .login .band-gate { top: 0; bottom: 0; left: -1px; right: auto; width: 2px; height: auto; }
  .login .band-gate > i { left: 0; right: 0; top: 0; width: auto; height: 38%; background: linear-gradient(180deg, rgba(255, 178, 63, 0), var(--accent)); }
  .login .band-gate.run > i { animation-name: gateRunY; }
  .login .band-body { flex: none; overflow: visible; padding: clamp(2rem, 6vh, 4rem) 2.5rem 0; gap: 1.25rem; }
  .login .band-body > *, .login .band-foot > * { width: 100%; max-width: 25rem; margin-inline: auto; }
  /* sticky: right under the form while it fits, pinned to the band bottom when an error / short screen makes the band scroll */
  .login .band-foot { flex: 1 0 auto; padding: 1.25rem 2.5rem 1rem; gap: .625rem; position: sticky; bottom: 0; z-index: 1; background: var(--band); }
  .login .band-head { display: block; height: 6.5rem; }
  .login .band-head.solo > .display { font-size: var(--fs-d4); }
  .login .band-head.solo > .sub { margin-top: .625rem; font-size: var(--fs-md); }
  .login .util.full { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line-1); width: calc(100% + 1rem); max-width: 26rem; }
}
/* short laptops (a 768 px screen minus the browser chrome is ~650 px): the head shrinks to its content and Ayarlar /
   Tam Ekran sit beside the tabs (the sticky foot keeps the CTA in view if the form still overflows) */
@media (min-width: 840px) and (min-height: 501px) and (max-height: 760px) {
  .login .band-body { padding-top: 2rem; gap: 1rem; }
  .login .band-head { height: auto; }
  .login.has-compact .util.compact { display: flex; }
  .login.has-compact .util.full { display: none; }
}
@media (min-width: 840px) and (min-height: 501px) and (max-height: 640px) {
  .login .band-head .sub, .login .hide-short { display: none !important; }
  .login .hint-short > .hint { display: none; }
}
@media (min-width: 840px) and (max-width: 1199px) and (min-height: 501px) {
  .login .brand { left: 3rem; } .login .cap-bottom { left: 3rem; }
  .login .band { width: 27rem; }
  .login .band-body { padding-left: 2.25rem; padding-right: 2.25rem; }
  .login .band-foot { padding-left: 2.25rem; padding-right: 2.25rem; }
}
@media (min-width: 1200px) and (min-height: 501px) {
  .login .shot .bg { object-position: 61% 50%; }
  .login .band { width: clamp(26rem, 34vw, 32rem); }
  .login .logo, .login .logo-text { width: clamp(20rem, 32vw, 40rem); }
  .login .band-body { padding-top: 4rem; }
}
@media (min-width: 1200px) and (min-height: 900px) {
  .login .news { display: flex; margin-top: auto; }
  .login .news + .util.full { margin-top: .75rem; }
}
/* QA r6: 1366x768-class laptops and 1024x768 tablets. The lg padding (4rem) above came after the short-laptop rule and won
   at every height, so the register form's last row ("Beni hatırla") slid under the sticky foot at 768 px (worse in a ~657 px
   browser viewport). Up to 800 px tall: a FIXED 5.5rem head (title + a 2-line sub: the tab row keeps ONE y in every state,
   SPEC 7.5 — an auto head moved it by a line between login and register) and less top padding; without the sub (≤ 640) auto. */
@media (min-width: 840px) and (min-height: 501px) and (max-height: 800px) {
  .login .band-head { height: 5.5rem; }
}
@media (min-width: 840px) and (min-height: 501px) and (max-height: 640px) {
  .login .band-head { height: auto; }
}
@media (min-width: 1200px) and (min-height: 501px) and (max-height: 800px) {
  .login .band-body { padding-top: 2.5rem; }
}
@media (min-width: 1200px) and (min-height: 501px) and (max-height: 760px) {
  .login .band-body { padding-top: 2rem; }
}

/* ================================================================ HUB FRAME (SPEC 6.2) */
.hub-view { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.hub-view > .topband { grid-row: 1; grid-column: 1 / -1; }
.hub-view > .hub-main { grid-row: 2; grid-column: 1; position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.hub-view > .tabbar { grid-row: 3; grid-column: 1 / -1; }
.hub-view > .rail, .hub-view > .social { display: none; }
.hub-main > .hub-body { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--carbon-5) transparent; }
.hub-main > .hub-body.fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5rem), transparent); }
.hub-main > .hub-body.fade-b.at-end { -webkit-mask-image: none; mask-image: none; }
.hub-pane { min-height: 100%; animation: fadeIn var(--dur-3) var(--ease-out); }
.hub-pane > .hub-pane-inner { padding: 1rem var(--pad-x) 1.5rem; min-height: 100%; }
.hub-pane > .hub-pane-inner.bleed { padding: 0; }
.hub-loading { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 4rem 0; color: var(--text-2); }
/* top band (phones portrait: 52 + safe-t; wide+: 64) */
.topband { position: relative; z-index: var(--z-band); display: flex; align-items: center; gap: .75rem; min-width: 0;
  height: calc(var(--band-h-phone) + var(--safe-t)); padding: var(--safe-t) calc(var(--pad-x) + var(--safe-r)) 0 calc(var(--pad-x) + var(--safe-l));
  background: var(--band); border-bottom: 1px solid var(--line-1); }
.topband > .lockup > span { font-size: 1.25rem; }
.topband > .nav { display: none; }
.topband > .band-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; flex: none; min-width: 0; }
.topband .wide-only { display: none; }
.topband .me { display: none; }
.nav { display: flex; align-items: stretch; align-self: stretch; gap: .25rem; min-width: 0; }
.nav > a { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: 0 .875rem; color: var(--text-2); text-decoration: none; white-space: nowrap;
  font-size: var(--fs-md); font-weight: 500; transition: color var(--dur-2); }
.nav > a > .ico { width: 1.25rem; height: 1.25rem; color: var(--text-3); transition: color var(--dur-2); }
.nav > a.on { color: var(--text-0); font-weight: 600; }
.nav > a.on > .ico { color: var(--accent); }
.nav > a.on::after { content: ""; position: absolute; left: .875rem; right: .875rem; bottom: -1px; height: 2px; background: var(--accent); }
.nav > a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); border-radius: var(--r-xs); }
/* people chip: who is online */
.people { position: relative; display: inline-flex; align-items: center; gap: .625rem; height: var(--ctl-sm); padding: 0 .75rem 0 .5rem; border-radius: var(--r-sm); flex: none;
  background: rgba(91, 210, 122, .08); border: 1px solid rgba(91, 210, 122, .22); color: var(--success-text); font: 500 var(--fs-sm)/1 var(--font-ui); white-space: nowrap; cursor: pointer; }
.people::before { content: ""; position: absolute; inset: min(0px, calc((var(--ctl-sm) - var(--tap)) / 2)) 0; }
.people > .av-stack { display: none; }
.people .num { font-size: 1rem; color: var(--success-text); }
.people .lbl { display: none; }
.people:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 4px var(--focus); }
/* me chip: the Profil destination */
.me { position: relative; display: inline-flex; align-items: center; gap: .625rem; height: var(--ctl-sm); padding: 0 .625rem 0 .25rem; border-radius: var(--r-sm); flex: none;
  border: 1px solid transparent; background: none; color: var(--text-0); font: 600 var(--fs-sm)/1 var(--font-ui); white-space: nowrap; cursor: pointer; text-decoration: none; }
.me > .av { width: 1.75rem; height: 1.75rem; }
.me > .name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
.me.on::after { content: ""; position: absolute; left: .25rem; right: .25rem; bottom: calc((var(--ctl-sm) - var(--band-h)) / 2 - 1px); height: 2px; background: var(--accent); }
.me:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 4px var(--focus); }
/* phone bottom tab bar: solid band, flush with the edge */
.tabbar { position: relative; z-index: var(--z-band); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: var(--band); border-top: 1px solid var(--line-1); }
.tabbar > a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3125rem; min-width: 0;
  color: var(--text-3); text-decoration: none; font: 500 var(--fs-xs)/1 var(--font-ui); letter-spacing: .01em; }
.tabbar > a > .ico { width: 1.5rem; height: 1.5rem; }
.tabbar > a > .av { width: 1.5rem; height: 1.5rem; }
.tabbar > a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .25rem; }
.tabbar > a.on { color: var(--text-0); font-weight: 600; }
.tabbar > a.on > .ico { color: var(--accent); }
.tabbar > a.on > .av > canvas, .tabbar > a.on > .av > img { box-shadow: 0 0 0 2px var(--accent); }
.tabbar > a.on::before { content: ""; position: absolute; top: -1px; left: 50%; width: 2rem; margin-left: -1rem; height: 2px; background: var(--accent); border-radius: 0 0 2px 2px; }
.tabbar > a > .badge-n { position: absolute; top: .5rem; left: calc(50% + .5rem); }
.tabbar > a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
/* phone landscape rail: flush, safe-area aware */
.rail { position: relative; z-index: var(--z-band); flex-direction: column; align-items: stretch; width: calc(var(--rail-w) + var(--safe-l)); padding-left: var(--safe-l);
  background: var(--band); border-right: 1px solid var(--line-1); overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > .r-logo { height: 3.5rem; display: grid; place-items: center; flex: none; }
.rail > .r-logo > img { width: 1.75rem; height: 1.75rem; border-radius: 3px; }
.rail > a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; height: 3.75rem; flex: none;
  color: var(--text-3); text-decoration: none; font: 500 var(--fs-xs)/1 var(--font-ui); }
.rail > a > .ico { width: 1.375rem; height: 1.375rem; }
.rail > a > .av { width: 1.375rem; height: 1.375rem; }
.rail > a.on { color: var(--text-0); font-weight: 600; }
.rail > a.on > .ico { color: var(--accent); }
.rail > a.on > .av > canvas, .rail > a.on > .av > img { box-shadow: 0 0 0 2px var(--accent); }
.rail > a.on::before { content: ""; position: absolute; left: 0; top: .875rem; bottom: .875rem; width: 2px; background: var(--accent); border-radius: 0 2px 2px 0; }
.rail > a > .badge-n { position: absolute; top: .375rem; left: calc(50% + .375rem); }
.rail > a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.rail > .r-foot { margin-top: auto; display: grid; place-items: center; gap: .25rem; padding: .5rem 0 calc(.5rem + var(--safe-b)); }
/* room bar (while in a room on another tab) and connection banner: pinned bars, never over content */
.roombar { display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .375rem calc(var(--pad-x) + var(--safe-r)) .375rem calc(var(--pad-x) + var(--safe-l));
  background: var(--surface-1); border-bottom: 1px solid var(--line-1); flex: none; font-size: var(--fs-sm); color: var(--text-1); }
.roombar > .thumb { width: 3.5rem; aspect-ratio: 16 / 9; border-radius: var(--r-xs); overflow: hidden; flex: none; background: var(--carbon-0); }
.roombar > .thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roombar > .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roombar > .tx b { color: var(--text-0); font-weight: 600; }
.roombar .ready-no { color: var(--warning-text); } .roombar .ready-yes { color: var(--success-text); }
/* QA r6: phones portrait — mode name on line 1, "3/8 · Hazırsın" on line 2 (never cut before the status word) */
@media (max-width: 599px) {
  .roombar > .tx { display: grid; white-space: normal; line-height: 1.25; }
  .roombar > .tx > b, .roombar > .tx > .rb-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .roombar > .tx > .rb-sep { display: none; }
  .roombar > .tx > .rb-st { font-size: var(--fs-sm); color: var(--text-2); }
}
.hub-main > .banner { flex: none; padding-left: calc(var(--pad-x) + var(--safe-l)); padding-right: calc(var(--pad-x) + var(--safe-r)); }
.hub-view[data-conn="offline"] .needs-net { opacity: .5; pointer-events: none; }
/* a BUTTON takes the SPEC 5 disabled look instead of a half-opacity amber block; cards and rows keep the dim (QA r6: was a hub.css override) */
.hub-view[data-conn="offline"] .btn.needs-net { opacity: 1; background: rgba(255, 236, 214, .06); border-color: transparent; color: var(--text-disabled); box-shadow: none; }
/* social band (xl): who is online + where, open rooms, the server's MOTD */
.social { flex-direction: column; gap: 1.75rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 1.5rem 1.5rem 1.25rem; background: var(--band); border-left: 1px solid var(--line-1); }
.social::-webkit-scrollbar { display: none; }
.social .s-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; min-height: var(--ctl-sm); }
.social .s-foot { margin-top: auto; color: var(--text-3); }
.social .room-row .grow { display: grid; gap: .25rem; }
.social .room-row .thumb { width: 2.5rem; height: 2.5rem; border-radius: var(--r-xs); overflow: hidden; flex: none; background: var(--carbon-0); }
.social .room-row .thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* people panel (popover / sheet) */
.people-panel { display: grid; gap: .25rem; min-width: min(22rem, 100%); }
.people-panel .s-sub { margin: .75rem 0 .25rem; }

/* portrait tablets and narrow desktop windows: the phone layout, content centred */
@media (min-width: 600px) and (max-width: 839px) and (min-height: 501px) {
  .hub-pane > .hub-pane-inner:not(.bleed) { max-width: 44rem; margin: 0 auto; }
}
/* landscape phones: rail, no top band, no tab bar */
@media (min-width: 600px) and (max-height: 500px) {
  .hub-view { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .hub-view > .topband, .hub-view > .tabbar { display: none; }
  .hub-view > .rail { display: flex; grid-column: 1; grid-row: 1; }
  .hub-view > .hub-main { grid-column: 2; grid-row: 1; }
  .hub-main > .hub-body.fade-b { -webkit-mask-image: none; mask-image: none; }
  .hub-main > .roombar { order: 9; border-bottom: 0; border-top: 1px solid var(--line-1); padding-right: calc(var(--pad-x) + var(--safe-r)); }
  .hub-pane > .hub-pane-inner { padding: .75rem calc(var(--pad-x) + var(--safe-r)) 1rem var(--pad-x); }
}
/* wide (tablet / small laptop): top band with nav in flow; tab bar gone */
@media (min-width: 840px) and (min-height: 501px) {
  .hub-view { grid-template-rows: auto minmax(0, 1fr); }
  .hub-view > .tabbar { display: none; }
  .topband { height: var(--band-h); padding: 0 var(--pad-x); gap: 1.5rem; }
  .topband > .lockup > span { font-size: 1.375rem; }
  .topband > .nav { display: flex; }
  .topband .wide-only { display: inline-flex; }
  .topband .me { display: inline-flex; }
  .topband .phone-only { display: none; }
  html.is-mobile .topband .phone-only { display: inline-flex; }   /* tablets: the fullscreen button stays (R2.20) */
  .people > .av-stack { display: inline-flex; }
  .hub-main > .hub-body.fade-b { -webkit-mask-image: none; mask-image: none; }
}
/* collapse order when the band gets tight (never overlap): people label -> Davet Et label -> me name -> nav labels -> lockup word.
   Defaults per tier here; hub.js adds .c1..c5 on the band when the real content still does not fit (long names, big scale). */
@media (min-width: 840px) and (max-width: 1199px) and (min-height: 501px) {
  .topband .invite > .invite-lbl, .topband .me > .name { display: none; }
  .topband .invite { width: var(--ctl-sm); padding: 0; }
}
@media (min-width: 840px) and (max-width: 899px) and (min-height: 501px) {
  .topband > .nav > a > .lbl { display: none; }
  .topband > .nav > a { padding: 0 .75rem; }
}
@media (min-width: 1200px) and (min-height: 501px) {
  .topband { gap: 2.5rem; }
  .people .lbl { display: inline; }
}
.topband.c1 .people .lbl { display: none; }
.topband.c2 .invite > .invite-lbl { display: none; }
.topband.c2 .invite { width: var(--ctl-sm); padding: 0; }
.topband.c3 .me > .name { display: none; }
.topband.c4 > .nav > a > .lbl { display: none; }
.topband.c4 > .nav > a { padding: 0 .75rem; }
.topband.c5 > .lockup > span { display: none; }
.topband.c5 { gap: 1rem; }
/* xl: + social band on Dünyalar and Mini Oyunlar (room and character use the full width) */
@media (min-width: 1600px) and (min-height: 700px) {
  .hub-view.has-social { grid-template-columns: minmax(0, 1fr) var(--social-w); }
  .hub-view.has-social > .social { display: flex; grid-column: 2; grid-row: 2; }
}

/* ================================================================ settings sheet host (the ONE settings component, owner ingame) */
.dlg.settings-sheet { width: min(60rem, 100%); height: min(46rem, var(--dlg-max-h)); }
.dlg.settings-sheet > .dlg-body { justify-content: center; align-items: stretch; }
.settings-host { flex: 1; display: flex; min-width: 0; min-height: 0; justify-content: center; }
.settings-host > .scr-settings { width: 100%; height: 100%; max-width: none; max-height: none; }
.dlg-root.v-full .dlg.settings-sheet, .dlg-root.v-land .dlg.settings-sheet { width: 100%; height: 100%; }

/* ================================================================ LOADING (world / mode / invite join): ONE letterbox composition */
.loading-view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--band); }
.loading-view > .ltop { flex: none; display: flex; align-items: center; gap: 1rem; height: calc(3.25rem + var(--safe-t));
  padding: var(--safe-t) calc(var(--pad-x) + var(--safe-r)) 0 calc(var(--pad-x) + var(--safe-l)); border-bottom: 1px solid var(--line-1); }
.loading-view > .ltop > .lockup > span { font-size: 1.125rem; color: var(--paper-2); }
.loading-view > .ltop > .lockup > img { width: 1.5rem; height: 1.5rem; }
.loading-view > .ltop > .cancel-top { display: none; margin-left: auto; }
.loading-view > .lshot { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--band); }
.loading-view > .lshot > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; opacity: 0; transition: opacity var(--dur-4) var(--ease-out); }
.loading-view > .lshot > .bg.ready { opacity: 1; }
.loading-view > .lshot.contain > .bg { inset: 0; margin: auto; width: auto; height: auto; max-width: min(100%, 62.5rem); max-height: 100%; object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.loading-view > .lshot > .grade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(10, 8, 6, .55), rgba(10, 8, 6, 0) 35%); }
.loading-view > .lshot > .cancel-art { display: none; position: absolute; top: .75rem; right: calc(var(--pad-x) + var(--safe-r)); }
.loading-view > .lbot { position: relative; flex: none; display: grid; gap: 1rem; padding: 1.25rem calc(var(--pad-x) + var(--safe-r)) calc(1rem + var(--safe-b)) calc(var(--pad-x) + var(--safe-l)); }
.loading-view > .lbot > .progress { position: absolute; left: 0; right: 0; top: calc(var(--progress-h) / -2); }
.loading-view .ltitle { display: grid; gap: .375rem; min-width: 0; order: 0; }
.loading-view .ltitle > .display { font-size: var(--fs-d4); overflow-wrap: anywhere; }
.loading-view .ltitle > .display.clamp2 { -webkit-line-clamp: 2; }
.loading-view .lprog { display: flex; align-items: flex-end; gap: 1rem; order: 1; min-width: 0; }
.loading-view .lprog > .st { flex: 1; display: grid; gap: .25rem; min-width: 0; }
.loading-view .lprog > .st > b { color: var(--text-0); font-weight: 600; font-size: var(--fs-md); }
.loading-view .lprog > .pct { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: .9; color: var(--amber-300); font-feature-settings: "tnum" 1; }
.loading-view .ltip { display: flex; gap: .75rem; align-items: flex-start; padding-top: .875rem; border-top: 1px solid var(--line-1); order: 2; min-width: 0; }
.loading-view .ltip > .kicker { flex: none; padding-top: .125rem; }
.loading-view .ltip > p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; transition: opacity var(--dur-4) var(--ease-out); }
.loading-view .ltip > p.swap { opacity: 0; }
.loading-view .lbot > .cancel { order: 3; width: 100%; }
/* phones (portrait and land): a mode thumbnail (800 px) covers the shot at ~1x, so no letterbox inside the letterbox */
@media (max-width: 599px), (min-width: 600px) and (max-height: 500px) {
  .loading-view > .lshot.contain > .bg { width: 100%; height: 100%; max-width: none; object-fit: cover; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 599px) {
  .loading-view > .lshot { flex: none; height: 56%; }
  .loading-view > .lbot { flex: 1 1 auto; align-content: start; }
  .loading-view .lbot > .cancel { margin-top: auto; align-self: end; }
}
@media (max-width: 599px) and (max-height: 700px) { .loading-view .ltip { display: none; } .loading-view > .lshot { height: 48%; } }
@media (min-width: 600px) and (max-height: 500px) {
  .loading-view > .ltop { display: none; }
  .loading-view > .lshot > .cancel-art { display: inline-flex; }
  .loading-view > .lbot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem; min-height: 6rem; padding: .875rem calc(var(--pad-x) + var(--safe-r)) calc(.875rem + var(--safe-b)) calc(var(--pad-x) + var(--safe-l)); }
  .loading-view .ltitle > .display { font-size: 2rem; -webkit-line-clamp: 1; }
  .loading-view .ltip, .loading-view .lbot > .cancel { display: none; }
  .loading-view .lprog { min-width: 15rem; }
  .loading-view .lprog > .st .steps { display: none; }
}
@media (min-width: 840px) and (min-height: 501px) {
  .loading-view > .ltop { height: max(4rem, 9vh); padding-top: 0; }
  .loading-view > .ltop > .cancel-top { display: inline-flex; }
  .loading-view > .lbot { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .8fr); align-items: end; gap: 2.5rem;
    min-height: max(10rem, 22vh); padding: 1.75rem var(--pad-x) 2rem; }
  .loading-view .ltitle > .display { font-size: var(--fs-d3); }
  .loading-view .ltip { order: 0; border-top: 0; padding-top: 0; padding-left: 1.5rem; border-left: 1px solid var(--line-1); align-self: center; flex-direction: column; gap: .5rem; }
  .loading-view .ltip > p { font-size: var(--fs-md); max-width: 30rem; }
  .loading-view .lprog { order: 0; flex-direction: column; align-items: flex-end; text-align: right; gap: .5rem; }
  .loading-view .lprog > .pct { font-size: 3.5rem; order: -1; }
  .loading-view .lprog > .st { flex: none; justify-items: end; }
  .loading-view .lbot > .cancel { display: none; }
}
@media (min-width: 1600px) and (min-height: 700px) { .loading-view .ltitle > .display { font-size: var(--fs-d2); } }

/* ================================================================ pinch-zoom: menus allow it, play locks it (main.js) */
html.playing { touch-action: none; }

/* ================================================================ phones are landscape only: portrait is covered (main.js forceLandscape) */
.rot-lock { display: none; }
@media (orientation: portrait) {
  html.is-mobile .rot-lock { position: fixed; inset: 0; z-index: calc(var(--z-tooltip) + 10); display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .75rem; padding: calc(1.5rem + var(--safe-t)) calc(1.5rem + var(--safe-r)) calc(1.5rem + var(--safe-b)) calc(1.5rem + var(--safe-l));
    background: var(--bg-app, #0A0806); color: var(--text-1); text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; }
}
.rot-lock-ico { width: 5rem; height: 5rem; color: var(--amber-300); animation: rot-lock-turn 2.4s ease-in-out infinite; }
.rot-lock-ico > svg { width: 100%; height: 100%; }
.rot-lock-title { margin: .5rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--paper-1); }
.rot-lock-sub { margin: 0 0 .5rem; max-width: 20rem; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; }
@keyframes rot-lock-turn { 0%, 30% { transform: rotate(0); } 55%, 85% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
html.reduce-motion .rot-lock-ico { animation: none; }
/* the login / sign-up screens work upright too (main.js setPortraitAllowed) */
html.is-mobile.allow-portrait .rot-lock { display: none !important; }
