/* =========================================================
   استاد تعمیر — استایل اصلی
   تم: کارگاه چوبی، برنجی و گرم
   ========================================================= */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #241505;
  --bg0: #2a1b12;
  --bg1: #3a2719;
  --wood: #4d3422;
  --wood-2: #634530;
  --panel: rgba(58, 40, 28, 0.9);
  --panel-solid: #3b281c;
  --panel-2: #4a3323;
  --line: #725033;
  --line-soft: rgba(255, 196, 110, 0.2);
  --cream: #fff5e6;
  --muted: #d6c2a6;
  --amber: #ffc163;
  --amber-2: #ff9f3a;
  --gold: #f4c266;
  --gold-deep: #b47b28;
  --teal: #5ad3bf;
  --teal-deep: #258f80;
  --red: #ff8577;
  --green: #8fe3a2;
  --blue: #93c0ff;
  --shadow: 0 18px 50px rgba(40, 20, 5, 0.38);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--bg0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--amber); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.5; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; line-height: 1.9; }
b { font-weight: 700; }

::selection { background: rgba(255, 180, 74, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: #4b3525; border-radius: 10px; border: 2px solid #1a120d; }
::-webkit-scrollbar-thumb:hover { background: #6a4b31; }

/* ------------------------- پس‌زمینه ------------------------- */
.bg-decor {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: #2a1b12 url('../images/bg-workshop.svg') center / cover no-repeat;
}
.bg-decor::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 17, 10, 0.16) 0%, rgba(28, 17, 10, 0.34) 46%, rgba(28, 17, 10, 0.6) 100%),
    radial-gradient(ellipse at 50% 30%, rgba(255, 214, 150, 0.06), transparent 62%);
}
.bg-decor::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0 2px, transparent 2px 8px);
  pointer-events: none;
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; }
.glow-amber { width: 60vw; height: 60vw; top: -25vw; right: -15vw; background: radial-gradient(circle, rgba(255, 170, 70, 0.32), transparent 65%); }
.glow-teal { width: 55vw; height: 55vw; bottom: -28vw; left: -18vw; background: radial-gradient(circle, rgba(90, 211, 191, 0.2), transparent 65%); }
/* ------------------------- دکمه‌ها ------------------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 13px;
  padding: 12px 20px;
  font-size: 14.5px; font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, #ffc56d, var(--amber-2));
  box-shadow: 0 4px 0 var(--gold-deep), 0 10px 22px rgba(255, 154, 46, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 6px 0 var(--gold-deep), 0 14px 26px rgba(255, 154, 46, 0.24); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-deep), 0 4px 10px rgba(0, 0, 0, 0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: grayscale(0.4); }
.btn-primary { color: #241505; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #6a4b31; }
.btn-soft {
  background: rgba(255, 180, 74, 0.1);
  color: var(--amber);
  border: 1px solid rgba(255, 180, 74, 0.28);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.btn-soft:hover { background: rgba(255, 180, 74, 0.16); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { padding: 15px 28px; font-size: 17px; border-radius: 15px; }
.btn-danger { background: linear-gradient(180deg, #ff8b7d, #e85b4b); color: #2a0d09; box-shadow: 0 4px 0 #9e372c; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cream); font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: 0.15s;
}
.icon-btn:hover { background: rgba(255, 180, 74, 0.12); border-color: rgba(255, 180, 74, 0.4); }
.link-btn { background: none; border: 0; color: var(--amber); font-size: 12px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------- کارت و بج ------------------------- */
.card {
  background: linear-gradient(180deg, rgba(78, 54, 38, 0.93), rgba(52, 35, 24, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 20px;
  position: relative;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 99px;
  background: rgba(255, 180, 74, 0.1);
  border: 1px solid rgba(255, 180, 74, 0.22);
  color: var(--amber); font-size: 11.5px; font-weight: 700;
}
.eyebrow {
  color: var(--teal); font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; margin-bottom: 4px;
}
.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.section-head h2 { font-size: 26px; font-weight: 900; }
.section-head h3 { font-size: 18px; }

/* ------------------------- صفحه ورود ------------------------- */
.screen { animation: screenIn 0.35s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 28px;
}
.auth-hero { padding: 10px 10px 10px 0; }
.hero-badge { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.logo-mark {
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center;
  font-size: 32px;
  background: linear-gradient(145deg, #5b4029, #332218);
  border: 1px solid #8a613c;
  box-shadow: 0 10px 26px rgba(40, 20, 5, 0.4), inset 0 1px 0 rgba(255, 220, 160, 0.3);
  transform: rotate(-6deg);
}
.logo-title {
  font-size: 40px; font-weight: 900; line-height: 1.15;
  background: linear-gradient(180deg, #ffe1a8, #ffb44a 55%, #d57c19);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.25));
}
.logo-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hero-lead { font-size: 16.5px; line-height: 2.05; color: #e2cfb4; max-width: 560px; }
.hero-lead b { color: var(--amber); }

.hero-scene {
  position: relative;
  height: 220px;
  margin: 26px 0 22px;
  max-width: 560px;
}
.scene-desk {
  position: absolute; inset: auto 0 0 0; height: 34px;
  background: linear-gradient(180deg, #4a3120, #2c1c12);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 200, 120, 0.15);
}
.scene-board {
  position: absolute; left: 34%; bottom: 34px; width: 210px; height: 104px;
  background: linear-gradient(145deg, #134d3c, #0b3328);
  border: 1px solid #2d7a60; border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(120, 255, 210, 0.15);
  transform: perspective(500px) rotateX(18deg);
}
.scene-board .chip {
  position: absolute; top: 22px; left: 76px; width: 56px; height: 46px;
  background: #161a18; border: 1px solid #3b4a44; border-radius: 4px;
  color: #7a8f86; font-size: 9px; display: grid; place-items: center;
  font-family: monospace;
}
.scene-board .dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #d9a441; box-shadow: 0 0 6px #ffb44a; }
.scene-board .d1 { top: 12px; left: 12px; } .scene-board .d2 { bottom: 12px; right: 14px; } .scene-board .d3 { top: 14px; right: 18px; }
.scene-board .trace { position: absolute; background: rgba(255, 190, 90, 0.55); height: 2px; }
.scene-board .t1 { top: 40px; left: 20px; width: 48px; }
.scene-board .t2 { bottom: 26px; left: 30px; width: 70px; }
.scene-board .t3 { top: 60px; right: 20px; width: 40px; }
.scene-lamp { position: absolute; right: 8%; bottom: 34px; width: 130px; height: 170px; }
.lamp-base { position: absolute; bottom: 0; left: 35px; width: 60px; height: 12px; border-radius: 50%; background: #1b120c; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.lamp-arm { position: absolute; bottom: 8px; left: 60px; width: 6px; height: 110px; background: linear-gradient(90deg, #6f4c2c, #a97840, #5c3d22); border-radius: 4px; transform: rotate(12deg); transform-origin: bottom; }
.lamp-head { position: absolute; top: 18px; left: 8px; width: 74px; height: 44px; background: linear-gradient(145deg, #f0b64b, #a86f1f); border-radius: 50% 50% 42% 42%; transform: rotate(18deg); box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.lamp-light {
  position: absolute; top: 48px; left: 22px; width: 130px; height: 120px;
  background: radial-gradient(ellipse at top, rgba(255, 210, 120, 0.45), transparent 70%);
  filter: blur(6px);
  animation: lampGlow 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lampGlow { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.float-tool {
  position: absolute; font-size: 24px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45));
  animation: floaty 5s ease-in-out infinite;
}
.ft1 { left: 8%; top: 30px; animation-delay: -1s; }
.ft2 { left: 24%; top: 8px; font-size: 20px; animation-delay: -2.5s; }
.ft3 { right: 34%; top: 22px; font-size: 20px; animation-delay: -0.5s; }
.ft4 { left: 47%; top: 54px; font-size: 18px; animation-delay: -3.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(5deg); } }
.spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 10px #ffb44a; animation: sparkle 2.4s ease-in-out infinite; }
.s1 { left: 40%; top: 30px; } .s2 { left: 55%; top: 78px; animation-delay: -0.8s; } .s3 { left: 30%; top: 60px; animation-delay: -1.6s; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }

.hero-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; max-width: 560px; }
.hero-points li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #d8c5aa; }
.hero-points li span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 180, 74, 0.08); border: 1px solid rgba(255, 180, 74, 0.18); font-size: 14px; flex: 0 0 auto; }

.auth-card {
  width: 100%; max-width: 440px; justify-self: center;
  background: linear-gradient(180deg, rgba(78, 54, 38, 0.97), rgba(48, 32, 21, 0.98));
  border: 1px solid #7a5535;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(30, 15, 4, 0.45), inset 0 1px 0 rgba(255, 220, 160, 0.14);
  padding: 26px;
}
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: rgba(0, 0, 0, 0.25); padding: 5px; border-radius: 13px; margin-bottom: 22px; }
.auth-tab {
  border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px;
  padding: 9px 6px; border-radius: 9px; transition: 0.2s;
}
.auth-tab.active { background: linear-gradient(180deg, #5a3f2a, #3d2b1e); color: var(--amber); box-shadow: 0 2px 8px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,220,160,.12); }
.auth-form { display: flex; flex-direction: column; gap: 14px; animation: screenIn 0.25s ease both; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid #6b4a2f; background: rgba(20, 12, 7, 0.32); color: var(--cream);
  font-size: 14px; outline: none; transition: 0.18s;
}
.field input::placeholder { color: #9c8870; }
.field input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 180, 74, 0.13); background: rgba(0, 0, 0, 0.4); }
.form-note { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.9; }
.guest-illustration { font-size: 46px; text-align: center; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.guest-text { font-size: 13px; line-height: 2; color: #d8c5aa; text-align: center; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px dashed #3d2b1e; font-size: 11px; color: #8b7660; }
.version-tag { background: rgba(255, 180, 74, 0.08); padding: 2px 8px; border-radius: 6px; color: var(--amber); }

/* ------------------------- اپ و هدر ------------------------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px;
  background: rgba(38, 25, 16, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 196, 110, 0.16);
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; padding: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px;
  background: linear-gradient(145deg, #5b4029, #332218); border: 1px solid #8a613c;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.24), 0 6px 14px rgba(30,15,4,.3);
}
.brand-text { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.brand-text b { font-size: 15.5px; font-weight: 900; color: var(--amber); }
.brand-text small { font-size: 10px; color: var(--muted); }
.topnav { display: flex; gap: 4px; margin-inline-start: 10px; }
.nav-btn {
  border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px;
  padding: 9px 15px; border-radius: 10px; transition: 0.18s;
}
.nav-btn:hover { color: var(--cream); background: rgba(255, 255, 255, 0.04); }
.nav-btn.active { color: var(--amber); background: rgba(255, 180, 74, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 180, 74, 0.18); }
.top-stats { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.stat-chip {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 11px; font-size: 13px;
}
.stat-chip.coins b { color: var(--amber); }
.stat-chip.level b { color: var(--teal); }
.coin-ico, .lvl-ico { font-size: 14px; }
.app-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; }
.screen { width: 100%; }

/* ------------------------- کارگاه ------------------------- */
.hub-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.welcome-text h2 { font-size: 30px; font-weight: 900; }
.wave { display: inline-block; animation: waveHand 2.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes waveHand { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(16deg); } 80% { transform: rotate(-8deg); } 90% { transform: rotate(12deg); } }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.xp-strip { margin-bottom: 20px; }
.xp-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; }
.xp-info b { color: var(--teal); }
.xp-bar { height: 9px; background: rgba(0, 0, 0, 0.35); border-radius: 99px; overflow: hidden; border: 1px solid rgba(255,255,255,.04); }
.xp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal-deep), var(--teal), #8ff0df); box-shadow: 0 0 12px rgba(73, 197, 177, 0.5); transition: width 0.6s ease; }

.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.job-board { padding: 22px; }
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid #5c4029;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer; position: relative; overflow: hidden;
}
.job-card:hover { transform: translateY(-3px); border-color: rgba(255, 180, 74, 0.45); background: linear-gradient(180deg, rgba(255, 180, 74, 0.07), rgba(255,255,255,.015)); }
.job-card.locked { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.6); }
.job-card.locked:hover { transform: none; border-color: #3f2c1e; }
.job-card.done { border-color: rgba(73, 197, 177, 0.3); }
.job-ico {
  width: 58px; height: 58px; border-radius: 15px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 29px;
  background: radial-gradient(circle at 30% 20%, #5a3f2a, #332218);
  border: 1px solid #7a5535;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.2);
}
.job-main { flex: 1; min-width: 0; }
.job-main h4 { font-size: 15.5px; margin-bottom: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-main p { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-tags { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.05); color: #c9b79e; border: 1px solid rgba(255,255,255,.06); }
.tag.diff { color: var(--amber); background: rgba(255,180,74,.08); border-color: rgba(255,180,74,.16); }
.tag.done { color: var(--teal); background: rgba(73,197,177,.08); border-color: rgba(73,197,177,.2); }
.job-side-info { text-align: left; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.job-reward { font-size: 12.5px; color: var(--amber); font-weight: 700; }
.job-reward span { font-size: 11px; color: var(--muted); font-weight: 400; }
.job-arrow { color: #6f5842; font-size: 18px; }
.stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }

.hub-side { display: flex; flex-direction: column; gap: 16px; }
.promo-league { overflow: hidden; background: linear-gradient(160deg, rgba(92, 63, 30, 0.95), rgba(52, 35, 24, 0.96)); border-color: rgba(255, 190, 90, 0.34); }
.promo-glow { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,180,74,.25), transparent 65%); top: -80px; left: -50px; filter: blur(10px); }
.promo-ico { font-size: 34px; margin-bottom: 8px; }
.promo-league h3, .promo-ref h3, .mini-social h3 { font-size: 17px; margin-bottom: 6px; }
.promo-league p, .promo-ref p { font-size: 12.5px; line-height: 1.95; margin-bottom: 14px; overflow-wrap: anywhere; }
.prize-row { display: flex; gap: 6px; margin-bottom: 14px; }
.prize-pill { flex: 1; text-align: center; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.06); border-radius: 9px; padding: 6px 4px; font-size: 11px; }
.prize-pill b { display: block; color: var(--amber); font-size: 12px; }
.promo-ref { background: linear-gradient(160deg, rgba(40, 74, 64, 0.92), rgba(48, 34, 24, 0.96)); border-color: rgba(90, 211, 191, 0.3); }
.promo-ref .promo-ico { color: var(--teal); }
.mini-social { padding: 18px; }
.mini-social h3 { font-size: 15px; margin-bottom: 10px; }
.mini-social .social-row { padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.mini-social .social-row:last-child { border-bottom: 0; }

/* ------------------------- لیگ ------------------------- */
.league-lobby { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 18px; }
.league-hero { padding: 28px; text-align: center; overflow: hidden; }
.league-hero-art { font-size: 54px; margin-bottom: 8px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.4)); animation: floaty 6s ease-in-out infinite; }
.league-hero h3 { font-size: 22px; margin-bottom: 12px; }
.rules { text-align: right; max-width: 640px; margin: 0 auto 18px; padding-inline-start: 20px; color: #d8c5aa; font-size: 13px; line-height: 2.1; }
.rules li::marker { color: var(--amber); font-weight: 700; }
.prize-table { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 640px; margin: 0 auto 20px; }
.prize-cell { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 11px; padding: 10px 4px; }
.prize-cell b { display: block; color: var(--amber); font-size: 14px; }
.prize-cell span { font-size: 10px; color: var(--muted); }
.prize-cell:first-child { border-color: rgba(255,180,74,.4); background: rgba(255,180,74,.08); }
.league-side { display: flex; flex-direction: column; gap: 16px; }
.leaderboard { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lb-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 7px 9px; border-radius: 9px; background: rgba(255,255,255,.025); }
.lb-row .rank { width: 22px; color: var(--amber); font-weight: 700; }
.lb-row .lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .lb-xp { color: var(--teal); font-size: 11px; }
.fair-list { margin: 8px 0 0; padding-inline-start: 18px; font-size: 12.5px; line-height: 2; color: #d0bda3; }
.fair-list li::marker { color: var(--teal); }

.league-queue { display: grid; place-items: center; min-height: 60vh; }
.queue-card { text-align: center; padding: 34px; max-width: 460px; width: 100%; }
.radar { position: relative; width: 150px; height: 150px; margin: 0 auto 18px; display: grid; place-items: center; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(73,197,177,.35); animation: radarPulse 2.4s ease-out infinite; }
.radar span:nth-child(2) { animation-delay: 0.8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
.radar i { font-size: 42px; font-style: normal; animation: floaty 3s ease-in-out infinite; }
@keyframes radarPulse { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.queue-count { font-size: 20px; margin: 16px 0; }
.queue-count b { color: var(--amber); font-size: 28px; }
.queue-count span { color: var(--muted); }
.league-queue h3 { font-size: 20px; margin-bottom: 8px; }

.league-match { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; }
.match-head { display: flex; align-items: center; gap: 20px; padding: 14px 20px; flex-wrap: wrap; }
.match-timer { font-size: 20px; font-weight: 700; color: var(--amber); display: flex; align-items: center; gap: 6px; min-width: 100px; }
.match-timer.urgent { color: var(--red); animation: pulseRed 1s infinite; }
@keyframes pulseRed { 50% { opacity: 0.55; } }
.match-progress { flex: 1; min-width: 180px; font-size: 12px; }
.progress-bar { height: 8px; background: rgba(0,0,0,.35); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); transition: width .4s; }
.match-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.match-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.match-item {
  border-radius: 15px; border: 1px solid #3f2c1e; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  padding: 14px; cursor: pointer; transition: .18s; position: relative; overflow: hidden; text-align: right;
}
.match-item:hover { transform: translateY(-3px); border-color: rgba(255,180,74,.45); }
.match-item.claimed { opacity: 0.45; cursor: default; filter: grayscale(0.7); transform: none; }
.match-item .mi-ico { font-size: 26px; margin-bottom: 6px; }
.match-item h4 { font-size: 13.5px; margin-bottom: 4px; }
.match-item p { font-size: 11px; color: var(--muted); line-height: 1.8; }
.match-item .mi-read { margin-top: 8px; font-size: 11.5px; color: var(--teal); background: rgba(0,0,0,.25); border-radius: 7px; padding: 4px 7px; display: inline-block; }
.match-item .mi-owner { position: absolute; top: 8px; left: 8px; font-size: 9.5px; background: rgba(0,0,0,.45); border-radius: 6px; padding: 2px 6px; color: var(--amber); }
.match-item .mi-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; background: rgba(73,197,177,.12); border: 1px solid rgba(73,197,177,.3); border-radius: 6px; padding: 2px 6px; color: var(--teal); }
.match-side { display: flex; flex-direction: column; gap: 14px; }
.scoreboard h3, .match-tip h3 { font-size: 15px; margin-bottom: 10px; }
.score-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 8px; font-size: 12.5px; border-bottom: 1px dashed rgba(255,255,255,.05); }
.score-row:last-child { border-bottom: 0; }
.score-row.me { background: rgba(255,180,74,.08); border-radius: 9px; }
.score-av { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,0,0,.3); font-size: 14px; }
.score-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-val { color: var(--amber); font-weight: 700; }
.score-row .bot-tag { font-size: 9px; color: var(--muted); }

/* ------------------------- فروشگاه ------------------------- */
.shop-section { margin-top: 18px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.avatar-card {
  border: 1px solid #3f2c1e; border-radius: 15px; padding: 16px 12px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  transition: .18s; cursor: pointer;
}
.avatar-card:hover { transform: translateY(-3px); border-color: rgba(255,180,74,.4); }
.avatar-card.owned { border-color: rgba(73,197,177,.28); }
.avatar-card.equipped { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 10px 22px rgba(255,180,74,.12); }
.avatar-card .av-emoji { font-size: 36px; margin-bottom: 6px; filter: drop-shadow(0 5px 8px rgba(0,0,0,.35)); }
.avatar-card b { display: block; font-size: 13px; margin-bottom: 6px; }
.avatar-card .av-price { font-size: 11.5px; color: var(--amber); }
.avatar-card .av-state { font-size: 10.5px; color: var(--teal); }
.title-list { display: flex; flex-direction: column; gap: 8px; }
.title-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #3f2c1e; background: rgba(255,255,255,.025); cursor: pointer; transition: .15s;
}
.title-row:hover { border-color: rgba(255,180,74,.4); }
.title-row.equipped { border-color: var(--amber); background: rgba(255,180,74,.06); }
.title-row .tr-name { flex: 1; font-size: 13.5px; }
.title-row .tr-price { font-size: 12px; color: var(--amber); }
.title-row .tr-state { font-size: 11px; color: var(--teal); }

/* ------------------------- پروفایل ------------------------- */
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar-big {
  width: 86px; height: 86px; border-radius: 24px; display: grid; place-items: center; font-size: 44px;
  background: radial-gradient(circle at 30% 20%, #4a3120, #1d140e);
  border: 1px solid #6a4b31; box-shadow: 0 12px 26px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,210,140,.2);
}
.profile-id { flex: 1; min-width: 180px; }
.profile-id h2 { font-size: 24px; }
.profile-badges { display: flex; gap: 6px; margin-top: 8px; }
.profile-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.pstat { text-align: center; background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 88px; }
.pstat b { display: block; font-size: 20px; color: var(--amber); }
.pstat span { font-size: 10.5px; color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.profile-grid h3 { font-size: 17px; margin-bottom: 8px; }
.profile-grid p { font-size: 12.5px; line-height: 1.95; margin-bottom: 12px; }
.ref-code-box { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ref-code-box b {
  flex: 1; font-size: 24px; letter-spacing: 3px; text-align: center; color: var(--amber);
  background: rgba(0,0,0,.28); border: 1px dashed rgba(255,180,74,.35); border-radius: 12px; padding: 10px;
}
.ref-link { font-size: 11px; color: var(--muted); background: rgba(0,0,0,.22); border-radius: 8px; padding: 8px 10px; word-break: break-all; margin-bottom: 10px; }
.reward-note { font-size: 12px; color: var(--teal); margin-bottom: 12px; }
.invited-list { display: flex; flex-direction: column; gap: 6px; }
.invited-row { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.025); }
.social-list { display: flex; flex-direction: column; gap: 8px; }
.social-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid #3f2c1e; background: rgba(255,255,255,.025); flex-wrap: wrap; }
.social-row .sr-name { flex: 1; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; }
.social-row .sr-reward { font-size: 11px; color: var(--amber); }
.earn-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.earn-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 11px; border: 1px solid #3f2c1e; background: rgba(255,255,255,.025); color: var(--cream); font-size: 13px; transition: .15s; text-align: right; }
.earn-row:hover { border-color: rgba(255,180,74,.4); background: rgba(255,180,74,.06); }
.earn-row b { color: var(--amber); }
.earn-row.static { cursor: default; }
.earn-row.static:hover { border-color: #3f2c1e; background: rgba(255,255,255,.025); }

/* ------------------------- ناوبری موبایل ------------------------- */
.bottom-nav { display: none; }

/* ------------------------- مودال / توست ------------------------- */
.toast-stack { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(58, 40, 28, 0.97); border: 1px solid #5a4029; border-radius: 13px;
  padding: 12px 14px; font-size: 12.5px; line-height: 1.8; color: var(--cream);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  animation: toastIn 0.3s cubic-bezier(.2,.9,.3,1.2) both;
  pointer-events: auto;
}
.toast.leaving { animation: toastOut 0.25s ease forwards; }
.toast .t-ico { font-size: 16px; line-height: 1.3; }
.toast.success { border-color: rgba(73,197,177,.45); }
.toast.error { border-color: rgba(255,117,102,.45); }
.toast.warn { border-color: rgba(255,180,74,.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(8, 5, 3, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(92vw, 520px); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #5a4029, #3a281c);
  border: 1px solid #5a4029; border-radius: 22px;
  box-shadow: 0 40px 90px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,220,160,.1);
  padding: 24px;
  animation: modalIn 0.28s cubic-bezier(.2,.9,.3,1.1) both;
}
.modal.wide { width: min(94vw, 680px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 20px; }
.modal-close { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; font-size: 16px; flex: 0 0 auto; }
.modal-close:hover { color: var(--cream); background: rgba(255,255,255,.09); }
.modal-body { font-size: 13px; line-height: 1.95; color: #dfcdb5; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.modal-foot .btn { flex: 1; min-width: 120px; }
.modal-icon { font-size: 46px; text-align: center; margin-bottom: 6px; }

.result-stars { display: flex; justify-content: center; gap: 10px; font-size: 44px; margin: 8px 0 4px; }
.result-stars span { opacity: 0.2; transform: scale(0.7); transition: .4s cubic-bezier(.2,.9,.3,1.4); }
.result-stars span.on { opacity: 1; transform: scale(1); filter: drop-shadow(0 4px 10px rgba(255,180,74,.4)); }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.result-cell { text-align: center; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 11px; padding: 10px 6px; }
.result-cell b { display: block; font-size: 18px; color: var(--amber); }
.result-cell span { font-size: 10.5px; color: var(--muted); }

.report-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.report-table th, .report-table td { padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: right; }
.report-table th { color: var(--muted); font-weight: 500; font-size: 11px; }
.report-table .bad { color: var(--red); }
.report-table .good { color: var(--green); }

/* ------------------------- لودر ------------------------- */
.boot-loader {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg0);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.boot-loader.done { opacity: 0; visibility: hidden; }
.loader-wrench { font-size: 54px; animation: wrenchSpin 1.6s ease-in-out infinite; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
@keyframes wrenchSpin { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
.boot-loader p { color: var(--muted); font-size: 13px; }

/* ------------------------- تبلیغ ------------------------- */
.ad-box {
  text-align: center;
  background: linear-gradient(160deg, rgba(255, 180, 74, 0.1), rgba(73, 197, 177, 0.06));
  border: 1px solid rgba(255, 180, 74, 0.25);
  border-radius: 16px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
}
.ad-label {
  position: absolute; top: 10px; right: 12px;
  font-size: 9px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px; background: rgba(0, 0, 0, 0.3);
}
.ad-art { font-size: 52px; margin: 6px 0 8px; animation: floaty 4s ease-in-out infinite; }
.ad-box h4 { font-size: 17px; margin-bottom: 4px; }
.ad-box p { font-size: 12px; color: var(--muted); line-height: 1.9; }
.ad-progress { height: 7px; background: rgba(0, 0, 0, 0.35); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.ad-progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); transition: width 1s linear; }
.ad-timer { font-size: 11.5px; color: var(--teal); }

/* ------------------------- گشت راهنمای سایت ------------------------- */
.tour-layer { position: fixed; inset: 0; z-index: 260; pointer-events: auto; }
.tour-spot {
  position: fixed; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(8, 5, 3, 0.78), 0 0 0 2px rgba(255, 180, 74, 0.85), 0 0 24px rgba(255, 180, 74, 0.35);
  pointer-events: none;
}
.tour-spot.hidden { display: none; }
.tour-card {
  position: fixed; width: min(92vw, 370px);
  background: linear-gradient(180deg, #33241a, #241811);
  border: 1px solid rgba(255, 180, 74, 0.38);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--cream); pointer-events: auto;
}
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tour-step {
  font-size: 10.5px; color: var(--amber);
  background: rgba(255, 180, 74, 0.1); border: 1px solid rgba(255, 180, 74, 0.25);
  border-radius: 99px; padding: 2px 9px;
}
.tour-skip { background: none; border: 0; color: var(--muted); font-size: 11px; cursor: pointer; }
.tour-skip:hover { color: var(--cream); }
.tour-title { font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.tour-text { font-size: 12.5px; line-height: 1.95; color: #e6d4bc; }
.tour-text b { color: var(--amber); }
.tour-text .tour-ico { font-size: 15px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tour-dots { display: flex; gap: 4px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); transition: 0.2s; }
.tour-dot.on { background: var(--amber); transform: scale(1.3); }
.tour-dot.done { background: var(--teal); }
.tour-card .btn-sm { padding: 7px 12px; font-size: 11.5px; }

/* ------------------------- آموزش پایه‌ی برق ------------------------- */
.basics-lead {
  background: rgba(90, 211, 191, 0.07); border: 1px solid rgba(90, 211, 191, 0.22);
  border-radius: 12px; padding: 10px 13px; font-size: 12.5px; line-height: 1.9;
}
.basics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 8px; margin: 12px 0; }
.basics-card {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px; padding: 10px 12px;
}
.basics-card b { display: block; color: var(--teal); font-size: 12.5px; margin-bottom: 3px; }
.basics-card p { font-size: 11.5px; line-height: 1.85; color: var(--muted); }
.basics-law {
  text-align: center; margin-bottom: 12px; padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 180, 74, 0.13), rgba(255, 180, 74, 0.04));
  border: 1px solid rgba(255, 180, 74, 0.3); border-radius: 12px;
}
.basics-law b { color: var(--amber); font-size: 19px; letter-spacing: 1px; direction: ltr; display: inline-block; }
.basics-law span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.8; }
.basics-sub { font-size: 13px; font-weight: 700; margin: 14px 0 7px; color: #ffe9c7; }

/* ------------------------- ریسپانسیو ------------------------- */
@media (max-width: 1080px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr); }
  .hub-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .league-lobby { grid-template-columns: 1fr; }
  .match-body { grid-template-columns: 1fr; }
  .match-side { flex-direction: row; }
  .match-side > * { flex: 1; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; gap: 20px; padding: 24px 18px 40px; }
  .auth-hero { order: 2; padding: 0; }
  .auth-card { order: 1; max-width: 100%; }
  .hero-scene { height: 180px; }
  .logo-title { font-size: 32px; }
  .hero-points { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .app-main { padding: 18px 14px 90px; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(40, 27, 18, 0.95); backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,196,110,.16); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .bnav {
    background: none; border: 0; color: var(--muted); font-size: 10px; font-weight: 700;
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; border-radius: 10px;
  }
  .bnav span { font-size: 19px; }
  .bnav.active { color: var(--amber); background: rgba(255,180,74,.08); }
  .profile-grid { grid-template-columns: 1fr; }
  .hub-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bottom-nav { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bnav { padding: 6px 0; }
  .hub-welcome { gap: 12px; }
  .welcome-text h2 { font-size: 23px; }
  .welcome-actions { width: 100%; }
  .welcome-actions .btn { flex: 1; padding: 10px 12px; font-size: 12px; }
  .job-board { padding: 14px; }
  .job-card { gap: 10px; padding: 11px; }
  .job-ico { width: 46px; height: 46px; font-size: 23px; border-radius: 12px; }
  .job-main h4 { font-size: 13.5px; }
  .job-side-info { display: none; }
  .section-head h2 { font-size: 21px; }
  .section-head h3 { font-size: 16px; }
  .card { padding: 16px; border-radius: 15px; }
  .profile-head { gap: 12px; }
  .avatar-big { width: 64px; height: 64px; font-size: 32px; border-radius: 18px; }
  .profile-stats { width: 100%; }
  .pstat { flex: 1; min-width: 0; padding: 8px 6px; }
  .pstat b { font-size: 16px; }
  .prize-table { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .prize-cell b { font-size: 11px; }
  .prize-cell span { font-size: 8.5px; }
  .match-side { flex-direction: column; }
  .match-items { grid-template-columns: 1fr 1fr; }
  .match-item { padding: 10px; }
  .match-item h4 { font-size: 12px; }
  .match-item p { display: none; }
  .top-stats .stat-chip { padding: 6px 8px; font-size: 11.5px; }
  .brand-text small { display: none; }
  .app-main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .toast-stack { top: auto; bottom: calc(88px + env(safe-area-inset-bottom)); width: min(94vw, 460px); }
  .modal { padding: 18px; border-radius: 18px; }
  .result-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-foot { flex-direction: column; }
  .modal-foot .btn { width: 100%; }
  .tour-card { width: min(94vw, 430px); padding: 14px; }
  .tour-title { font-size: 15.5px; }
  .tour-text { font-size: 12px; line-height: 1.9; }
  .tour-card .btn-sm { padding: 7px 10px; font-size: 11px; }
  .basics-grid { grid-template-columns: 1fr; }
  .basics-law b { font-size: 17px; }
}

/* ------------------------- �äá ãÏíÑíÊ ------------------------- */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}
.admin-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.admin-sort { max-width: 170px; }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cream); padding-bottom: 10px; }
.admin-check input { width: 18px; height: 18px; accent-color: var(--amber); }
.admin-json {
  width: 100%; min-height: 360px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.7; direction: ltr; text-align: left;
  background: rgba(12, 8, 5, 0.55); border: 1px solid #4b3525; border-radius: 12px;
  color: #ffe8c7; padding: 12px;
}
.admin-json:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 180, 74, 0.12); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-hint { margin-top: 12px; }
.admin-hint code { background: rgba(0, 0, 0, 0.3); padding: 1px 5px; border-radius: 5px; direction: ltr; display: inline-block; }
.admin-list { display: flex; flex-direction: column; gap: 8px; max-height: 640px; overflow: auto; }
.admin-level {
  border: 1px solid rgba(255, 196, 110, 0.14); background: rgba(0, 0, 0, 0.14);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.admin-level.off { opacity: 0.62; }
.admin-level-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-level-title b { font-size: 14px; }
.admin-level-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); }
.admin-level-meta code { direction: ltr; color: var(--teal); background: rgba(0, 0, 0, 0.25); padding: 1px 6px; border-radius: 5px; }
.admin-level-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.ok { color: var(--green); border-color: rgba(123, 216, 143, 0.4); background: rgba(123, 216, 143, 0.1); }

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-list { max-height: none; }
  .bottom-nav.admin-on { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 640px) {
  .admin-row { align-items: stretch; }
  .admin-sort { max-width: none; }
  .admin-check { padding-bottom: 0; }
  .admin-json { min-height: 300px; font-size: 12px; }
  .admin-actions .btn { flex: 1 1 45%; }
}
