/* ==========================================================================
   LOST — Metin2 server site · RTL / Arabic
   Palette comes from the logo: bark-brown ground, gold metal, red & green brush.
   ========================================================================== */

/* >>> fonts (self-hosted, OFL): Aref Ruqaa, IBM Plex Sans Arabic, Cinzel <<< */
@font-face { font-family: 'Aref Ruqaa'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/aref-ruqaa-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Aref Ruqaa'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/aref-ruqaa-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/cinzel-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-400-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-500-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-600-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-700-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* <<< fonts >>> */


:root {
  --bark: #120d09;
  --cavern: #1a120b;
  --ember: #261a10;
  --gold: #e9b24c;
  --gold-hi: #ffd980;
  --gold-lo: #8f6420;
  --gold-faint: rgba(233, 178, 76, .22);
  --blood: #c42a1e;
  --blood-hi: #e8452f;
  --blood-lo: #6f130e;
  --leaf: #5cb83f;
  --leaf-lo: #2f7d2a;
  --text: #f3e6c8;
  --muted: #b7a584;
  --danger: #ff8a7a;

  --font-display: 'Aref Ruqaa', 'Amiri', serif;
  --font-ui: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;

  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 32px);
  --wrap: 1200px;

  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6C20 2 45 8 80 4S140 7 175 3 210 6 220 4L219 7C190 10 160 6 120 8S50 10 0 9Z'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bark);
  color: var(--text);
  font: 400 1.0625rem/1.9 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {            /* film grain over everything: stone / parchment feel */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: var(--grain);
}

[hidden] { display: none !important; }      /* وإلا تُبطلها قواعد display الخاصة بالمكوّنات */
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--blood); color: #fff; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 300;
  padding: .5rem 1rem; background: var(--gold); color: #2a1604; font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- gold plate: chamfered frame, the one container used site-wide ---------- */
.plate {
  --cut: 14px;
  --cut-in: calc(var(--cut) - 1px);
  position: relative;
  isolation: isolate;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.plate::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(160deg, var(--gold-hi) 0, var(--gold-lo) 22%, #4f3611 55%, var(--gold-lo) 82%, var(--gold) 100%);
}
.plate::after {
  content: ""; position: absolute; inset: 1.5px; z-index: -1;
  background: linear-gradient(180deg, rgba(40, 28, 16, .97), rgba(20, 14, 8, .98));
  clip-path: polygon(var(--cut-in) 0, calc(100% - var(--cut-in)) 0, 100% var(--cut-in), 100% calc(100% - var(--cut-in)), calc(100% - var(--cut-in)) 100%, var(--cut-in) 100%, 0 calc(100% - var(--cut-in)), 0 var(--cut-in));
}
.plate--soft::after { background: linear-gradient(180deg, rgba(26, 18, 11, .9), rgba(16, 11, 7, .94)); }
.plate--pad { padding: clamp(1.25rem, 3vw, 2.25rem); }

/* ---------- buttons: pointed hex ends, as in the reference mockup ---------- */
.btn {
  --c: 16px;
  --btn-bg: linear-gradient(180deg, #2a1d10, #150f09);
  --btn-edge: linear-gradient(180deg, var(--gold-lo), #4a3414);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 54px; padding: 0 2.1rem;
  border: 0; background: none;
  font-weight: 600; font-size: 1.05rem; line-height: 1; color: var(--text);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% 50%, calc(100% - var(--c)) 100%, var(--c) 100%, 0 50%);
  transition: filter .2s, transform .2s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--btn-edge); }
.btn::after {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--btn-bg);
  clip-path: polygon(calc(var(--c) - 1px) 0, calc(100% - var(--c) + 1px) 0, 100% 50%, calc(100% - var(--c) + 1px) 100%, calc(var(--c) - 1px) 100%, 0 50%);
}
.btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: linear-gradient(180deg, #b72b1d, #6a120d); --btn-edge: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.btn--gold { --btn-bg: linear-gradient(180deg, #f0bf5e, #a8741f); --btn-edge: linear-gradient(180deg, #fff0bf, var(--gold-lo)); color: #2a1604; }
.btn--sm { min-height: 44px; padding: 0 1.4rem; font-size: .97rem; --c: 12px; }
.btn--block { width: 100%; }
.btn[disabled] { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn .ic { width: 1.2em; height: 1.2em; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(18, 13, 9, .85), rgba(18, 13, 9, 0));
  transition: background .3s;
}
.site-header::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(to left, transparent, var(--gold-lo) 20%, var(--gold-lo) 80%, transparent); opacity: .65;
}
.site-header.is-solid { background: rgba(18, 13, 9, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header__in { display: flex; align-items: center; gap: 1.25rem; }
.site-header .btn, .site-nav a { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: .6rem; flex: none; }
.brand__emblem { width: 56px; height: 56px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }
.brand__word { height: 46px; width: auto; }
.site-nav { display: flex; align-items: center; gap: .25rem; margin-inline: auto; }
.site-nav a {
  position: relative; padding: .5rem .65rem; font-weight: 500; font-size: 1rem; color: var(--text); opacity: .86;
  transition: opacity .2s, color .2s;
}
.site-nav a::after {
  content: ""; position: absolute; inset-inline: .55rem; bottom: .1rem; height: 6px;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--blood));
  -webkit-mask: var(--brush) center / 100% 100% no-repeat; mask: var(--brush) center / 100% 100% no-repeat;
  transform: scaleX(0); transform-origin: right; transition: transform .25s;
}
.site-nav a:hover { opacity: 1; color: var(--gold-hi); }
.site-nav a[aria-current="page"] { opacity: 1; color: var(--gold-hi); }
.site-nav a[aria-current="page"]::after, .site-nav a:hover::after { transform: scaleX(1); }
.site-header__actions { display: flex; align-items: center; gap: .75rem; }
.nav-auth { display: none; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--gold-faint); background: rgba(0, 0, 0, .35); align-items: center; justify-content: center; }
.nav-toggle .ic { width: 24px; height: 24px; }
.nav-toggle .ic--close { display: none; }
.nav-open .nav-toggle .ic--menu { display: none; }
.nav-open .nav-toggle .ic--close { display: block; }

@media (max-width: 1240px) {
  :root { --header-h: 66px; }
  .brand__emblem { width: 42px; height: 42px; }
  .brand__word { height: 32px; }
  .nav-toggle { display: inline-flex; }
  .site-header__in { gap: 1rem; }
  .site-header__actions { margin-inline-start: auto; }
  .site-header__actions .btn--login { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem; background: rgba(18, 13, 9, .98); border-bottom: 1px solid var(--gold-lo);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 1rem .25rem; border-bottom: 1px solid rgba(233, 178, 76, .12); font-size: 1.1rem; }
  .site-nav a::after { display: none; }
  .nav-auth { display: block; }
  .nav-auth a { display: block; }
}
/* ---------- section scaffolding ---------- */
.section { position: relative; padding-block: clamp(48px, 6.5vw, 88px); }
.section--tight { padding-block: clamp(32px, 4.5vw, 56px); }
.section--backdrop { isolation: isolate; }
.section--backdrop::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-sm.webp") center / cover no-repeat; filter: saturate(.8);
}
.section--backdrop::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--bark), rgba(18, 13, 9, .86) 18%, rgba(18, 13, 9, .86) 82%, var(--bark));
}

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-title { font: 700 clamp(2.1rem, 3.8vw, 3.1rem)/1.35 var(--font-display); color: var(--text); }
.sec-lead { margin-top: .4rem; color: var(--muted); max-width: 54ch; }
.brush {
  display: block; width: min(230px, 60%); height: 10px; margin-top: .55rem;
  background: linear-gradient(90deg, var(--leaf), var(--gold) 50%, var(--blood));
  -webkit-mask: var(--brush) center / 100% 100% no-repeat; mask: var(--brush) center / 100% 100% no-repeat;
}
.more { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--gold); padding-bottom: .2rem; border-bottom: 1px solid var(--gold-lo); transition: color .2s, gap .2s; }
.more:hover { color: var(--gold-hi); gap: .8rem; }

/* ---------- hex rune icon ---------- */
.rune {
  position: relative; isolation: isolate; flex: none; width: 58px; height: 64px;
  display: grid; place-items: center; color: var(--gold-hi);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.rune::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(160deg, var(--gold-hi), var(--gold-lo) 50%, var(--gold)); }
.rune::after {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: radial-gradient(circle at 50% 35%, #3a2713, #17100a);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.rune .ic { width: 26px; height: 26px; }
.rune--sm { width: 44px; height: 49px; }
.rune--sm .ic { width: 20px; height: 20px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(700px, 100svh); padding-top: var(--header-h);
  display: grid; grid-template-rows: 1fr auto;
}
.hero__bg { position: absolute; inset: 0; z-index: -4; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.07);
  transition: transform .35s ease-out; will-change: transform;
}
.hero__rays {
  position: absolute; inset: 0; z-index: -3; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse 38% 48% at 52% 41%, rgba(255, 214, 130, .4), transparent 72%);
  animation: breathe 9s ease-in-out infinite;
}
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(18, 13, 9, .72) 0, rgba(18, 13, 9, 0) 22%, rgba(18, 13, 9, 0) 50%, rgba(18, 13, 9, .78) 84%, var(--bark) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 48%, rgba(10, 7, 4, .6) 100%);
}
.hero__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding-block: clamp(24px, 6vh, 72px) clamp(16px, 3vh, 32px);
}
.hero__logo {
  width: clamp(290px, 50vw, 660px); height: auto;
  filter: drop-shadow(0 10px 36px rgba(0, 0, 0, .65));
  animation: forge 1.5s cubic-bezier(.2, .8, .2, 1) both;
}
.hero__inner { position: relative; }
.hero__inner::before {              /* soft pool of shade so gold text stays legible over the bright sky */
  content: ""; position: absolute; inset-inline: 8%; top: 38%; bottom: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(14, 9, 5, .62), transparent 72%);
}
.hero__tag {
  margin-top: clamp(.5rem, 2vh, 1.25rem);
  font: 700 clamp(2.3rem, 5vw, 3.9rem)/1.3 var(--font-display);
  background: linear-gradient(180deg, #fff6d6 10%, #ffd980 55%, #e9a93a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .9)) drop-shadow(0 6px 16px rgba(0, 0, 0, .75));
  animation: rise .9s .55s cubic-bezier(.2, .8, .2, 1) both;
}
.hero__sub {
  display: flex; align-items: center; gap: 1rem; margin-top: .25rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--text); text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
  animation: rise .9s .75s cubic-bezier(.2, .8, .2, 1) both;
}
.hero__sub::before, .hero__sub::after { content: ""; width: clamp(24px, 6vw, 80px); height: 1px; background: linear-gradient(to left, transparent, var(--gold)); }
.hero__sub::after { transform: scaleX(-1); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: clamp(1.25rem, 3.5vh, 2.25rem); animation: rise .9s .95s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes forge { from { opacity: 0; transform: scale(.93); filter: brightness(2.4) blur(8px) drop-shadow(0 0 40px #ffb347); } to { opacity: 1; transform: none; filter: drop-shadow(0 10px 36px rgba(0, 0, 0, .65)); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.hero__stats { margin-bottom: clamp(18px, 3vh, 34px); display: grid; grid-template-columns: repeat(4, 1fr); animation: rise .9s 1.15s cubic-bezier(.2, .8, .2, 1) both; }
.stat { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; position: relative; transition: background .2s; }
.stat + .stat::before {
  content: ""; position: absolute; inset-block: 18%; inset-inline-start: 0; width: 1px;
  background: linear-gradient(transparent, var(--gold-lo), transparent);
}
a.stat:hover { background: rgba(233, 178, 76, .07); }
.stat__ic { color: var(--gold); }
.stat__ic .ic { width: 34px; height: 34px; stroke-width: 1.5; }
.stat__val { display: block; font: 700 1.55rem/1.2 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.stat__cap { display: block; font-size: .92rem; line-height: 1.4; color: var(--muted); }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--muted); vertical-align: middle; margin-inline-start: .35em; }
.dot--on { background: #6fe04f; box-shadow: 0 0 10px #6fe04f; }
.dot--off { background: #e8452f; box-shadow: 0 0 10px #e8452f; }

@media (max-width: 860px) {
  .hero { min-height: auto; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--gold-faint); }
  .stat { padding: .9rem 1rem; gap: .75rem; }
  .stat__val { font-size: 1.2rem; }
  .stat__ic .ic { width: 28px; height: 28px; }
}

/* ==========================================================================
   FEATURE TABLET (no cards — two columns split by a gold line)
   ========================================================================== */
.tablet { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.tablet::before {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 50%; width: 1px;
  background: linear-gradient(transparent, var(--gold-lo) 15%, var(--gold-lo) 85%, transparent);
}
.feat { display: flex; gap: 1.4rem; padding: 2rem clamp(1rem, 3vw, 2.75rem); }
.feat__title { font: 600 1.25rem/1.5 var(--font-ui); color: var(--gold-hi); margin-bottom: .2rem; }
.feat__text { color: var(--muted); max-width: 44ch; }
@media (max-width: 760px) {
  .tablet { grid-template-columns: 1fr; }
  .tablet::before { display: none; }
  .feat { padding-inline: 0; border-bottom: 1px solid var(--gold-faint); }
  .feat:last-child { border: 0; }
}

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--gold-faint); }
.tab {
  position: relative; padding: .8rem 1.4rem; border: 0; background: none; font-weight: 600; color: var(--muted);
  transition: color .2s;
}
.tab::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi), var(--gold-lo));
  transform: scaleX(0); transition: transform .25s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--gold-hi); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

/* ---------- ranking rows ---------- */
.rank-box { padding: 0; }
.rank-box__bar { padding: .5rem 1.25rem 0; }
.ranks { padding: .5rem 0; }
.rank-row {
  display: grid; grid-template-columns: 54px 1fr auto auto; align-items: center; gap: 1rem;
  padding: .8rem 1.5rem; border-bottom: 1px solid rgba(233, 178, 76, .1);
  transition: background .2s;
}
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: linear-gradient(to left, rgba(233, 178, 76, .1), transparent); }
.rank-name { font-weight: 600; display: flex; align-items: center; gap: .6rem; min-width: 0; }
.rank-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { color: var(--muted); font-size: .95rem; }
.rank-num { font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: end; }

.medal {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  font-weight: 700; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--gold-faint);
}
.medal--1 { color: #3a2300; background: radial-gradient(circle at 35% 30%, #fff1b8, #e9b24c 60%, #9a6a1f); border-color: #ffe9a0; box-shadow: 0 0 14px rgba(255, 200, 80, .5); }
.medal--2 { color: #202428; background: radial-gradient(circle at 35% 30%, #fff, #c9d0d8 60%, #8a929c); border-color: #e8edf2; }
.medal--3 { color: #2b1405; background: radial-gradient(circle at 35% 30%, #ffd3a8, #cd8040 60%, #7d4318); border-color: #f0b27e; }

.emp { display: inline-block; flex: none; width: 12px; height: 14px; clip-path: polygon(50% 0, 100% 20%, 100% 65%, 50% 100%, 0 65%, 0 20%); }
.emp--shinsoo { background: #e0392b; }
.emp--chunjo { background: #f1c232; }
.emp--jinno { background: #3d86e8; }

/* ---------- events ---------- */
.events { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch; }
.ev-main { padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.ev-main::before { background: linear-gradient(160deg, var(--gold-hi), var(--blood) 40%, var(--gold-lo) 80%, var(--gold)); }
.ev-main__head { display: flex; align-items: center; gap: 1.1rem; }
.ev-state { font-weight: 600; font-size: .95rem; color: var(--leaf); }
.ev-state--live { color: #ff9b7e; }
.ev-main__name { font: 700 clamp(1.7rem, 3vw, 2.3rem)/1.3 var(--font-display); color: var(--text); }
.ev-main__desc { color: var(--muted); max-width: 46ch; }
.cd { display: flex; gap: .75rem; direction: ltr; margin-top: auto; padding-top: .5rem; }
.cd__seg { text-align: center; min-width: 4.4rem; padding: .55rem .4rem .4rem; background: rgba(0, 0, 0, .38); border: 1px solid var(--gold-faint); }
.cd__n { display: block; font: 700 clamp(1.9rem, 4vw, 2.7rem)/1.1 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.cd__l { display: block; font-size: .8rem; color: var(--muted); direction: rtl; }
.ev-list { display: flex; flex-direction: column; }
.ev-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(233, 178, 76, .1); }
.ev-item:last-child { border-bottom: 0; }
.ev-item__name { font-weight: 600; line-height: 1.4; }
.ev-item__when { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.ev-item__cd { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) { .events { grid-template-columns: 1fr; } }

/* weekly schedule (about / support) */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--gold-faint); border: 1px solid var(--gold-faint); }
.week__day { background: var(--cavern); padding: .9rem .75rem; min-height: 150px; }
.week__day h4 { font-size: .95rem; font-weight: 600; color: var(--gold); margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--gold-faint); }
.week__day li { font-size: .88rem; line-height: 1.5; margin-bottom: .55rem; color: var(--text); }
.week__day li b { display: block; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.week__day--today { background: #2a1c10; }
.week__day--today h4 { color: var(--gold-hi); }
@media (max-width: 900px) { .week { grid-template-columns: repeat(2, 1fr); } .week__day { min-height: 0; } }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: 1.35fr 1fr; grid-auto-rows: 1fr; gap: 24px; }
.news-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--cavern); border: 1px solid var(--gold-faint); text-align: start; padding: 0; transition: border-color .25s, transform .25s; width: 100%; }
.news-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.news-card--lead { grid-row: span 2; }
.news-card__cover { aspect-ratio: 16 / 9; background-image: url("../img/hero-sm.webp"); background-repeat: no-repeat; background-size: 280%; background-position: var(--bgp, 50% 40%); position: relative; }
.news-card--lead .news-card__cover { aspect-ratio: auto; flex: 1; min-height: 260px; background-size: cover; }
.news-card__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--cavern), transparent 60%); }
.news-card__body { padding: 1.1rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.news-card:not(.news-card--lead) .news-card__body { flex: 1; }
.news-card__title { font: 700 1.35rem/1.5 var(--font-ui); color: var(--text); }
.news-card--lead .news-card__title { font: 700 clamp(1.7rem, 3vw, 2.2rem)/1.4 var(--font-display); }
.news-card__ex { color: var(--muted); font-size: .98rem; line-height: 1.8; }
.news-meta { display: flex; align-items: center; gap: .8rem; font-size: .88rem; color: var(--muted); }
.tag { display: inline-block; padding: .05rem .75rem; font-weight: 600; font-size: .85rem; color: #1a0f05; background: var(--gold); }
.tag--update { background: var(--leaf); }
.tag--event { background: var(--gold); }
.tag--notice { background: var(--blood-hi); color: #fff; }
@media (max-width: 860px) { .news-grid { grid-template-columns: 1fr; } .news-card--lead { grid-row: auto; } }

/* ---------- steps (a real sequence → numbered) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.step { position: relative; padding-top: .5rem; }
.step__n {
  display: block; font: 700 clamp(4.5rem, 8vw, 6.5rem)/1 var(--font-display);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9;
}
.step__title { font: 700 1.5rem/1.5 var(--font-ui); margin: .25rem 0 .4rem; }
.step__text { color: var(--muted); max-width: 36ch; margin-bottom: 1rem; }
.step + .step::before {
  content: ""; position: absolute; inset-inline-start: calc(clamp(1.5rem, 4vw, 3.5rem) / -2); inset-block: 12% 0; width: 1px;
  background: linear-gradient(var(--gold-lo), transparent);
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step + .step::before { display: none; } }

/* ---------- faq ---------- */
.faq { display: grid; gap: .75rem; }
.faq details { background: rgba(26, 18, 11, .75); border: 1px solid var(--gold-faint); transition: border-color .2s; }
.faq details[open] { border-color: var(--gold-lo); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.4rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-inline-end: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .25s; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details > div { padding: 0 1.4rem 1.2rem; color: var(--muted); max-width: 70ch; }

/* ---------- closing call to action ---------- */
.cta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; padding: clamp(1.75rem, 4vw, 3.5rem); overflow: hidden; }
.cta::before { background: linear-gradient(160deg, var(--gold-hi), var(--leaf-lo) 30%, var(--gold-lo) 50%, var(--blood) 75%, var(--gold)); }
.cta__title { font: 700 clamp(2.2rem, 4.4vw, 3.6rem)/1.3 var(--font-display); }
.cta__text { color: var(--muted); margin: .5rem 0 1.5rem; max-width: 46ch; }
.cta__btns { display: flex; flex-wrap: wrap; gap: 1rem; }
.cta__emblem { width: clamp(180px, 26vw, 330px); aspect-ratio: 1; margin-block: -1rem; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; text-align: center; } .cta__text { margin-inline: auto; } .cta__btns { justify-content: center; } .cta__emblem { order: -1; margin-inline: auto; } }

/* ==========================================================================
   INNER PAGES
   ========================================================================== */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + clamp(48px, 8vw, 104px)) 0 clamp(36px, 6vw, 68px); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero.webp") var(--ph-pos, 50% 40%) / cover no-repeat; filter: brightness(.6) saturate(.9);
}
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(18, 13, 9, .55), rgba(18, 13, 9, .2) 40%, var(--bark)); }
.page-title { font: 700 clamp(2.6rem, 6.4vw, 4.8rem)/1.3 var(--font-display); background: linear-gradient(180deg, #fff1c4 10%, var(--gold) 70%, #b97e24); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .6)); }
.page-lead { max-width: 56ch; color: var(--text); opacity: .9; font-size: 1.15rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }

/* settings tablet */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--muted); max-width: 60ch; }
.prose h3 { font: 700 1.5rem/1.5 var(--font-ui); color: var(--gold-hi); margin: 1.5rem 0 .4rem; }
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { padding: .8rem 1.4rem; text-align: start; border-bottom: 1px solid rgba(233, 178, 76, .12); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv th { font-weight: 500; color: var(--muted); }
.kv td { font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; }

/* classes */
.class-view { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.25rem); }
.class-view__glyph { display: grid; place-items: center; aspect-ratio: 1; color: var(--gold-hi); background: radial-gradient(circle, rgba(233, 178, 76, .18), transparent 65%); }
.class-view__glyph .ic { width: 62%; height: 62%; stroke-width: 1.1; filter: drop-shadow(0 0 16px rgba(255, 190, 80, .45)); }
.class-view h3 { font: 700 2.2rem/1.3 var(--font-display); color: var(--text); }
.class-view__branches { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.chip { padding: .1rem .85rem; border: 1px solid var(--gold-lo); font-size: .92rem; color: var(--gold); }
.bars { display: grid; gap: .55rem; margin-top: 1.25rem; max-width: 420px; }
.bar { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: .8rem; font-size: .95rem; color: var(--muted); }
.bar__track { height: 7px; background: rgba(255, 255, 255, .08); }
.bar__track i { display: block; height: 100%; width: var(--v); background: linear-gradient(to left, var(--gold-hi), var(--gold-lo)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
@media (max-width: 700px) { .class-view { grid-template-columns: 1fr; } .class-view__glyph { max-width: 150px; margin-inline: auto; } }

/* empires */
.empires { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.empire { position: relative; padding: 2rem 1.5rem 1.75rem; text-align: center; border-top: 3px solid var(--c); background: linear-gradient(to bottom, var(--tint), rgba(18, 13, 9, .6) 70%); clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%); padding-bottom: 3.5rem; }
.empire__crest { width: 64px; height: 72px; margin: 0 auto 1rem; clip-path: polygon(50% 0, 100% 20%, 100% 65%, 50% 100%, 0 65%, 0 20%); background: var(--c); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .25); }
.empire h3 { font: 700 1.9rem/1.3 var(--font-display); }
.empire p { color: var(--muted); font-size: .98rem; margin-top: .4rem; }
.empire--shinsoo { --c: #e0392b; --tint: rgba(224, 57, 43, .28); }
.empire--chunjo { --c: #f1c232; --tint: rgba(241, 194, 50, .22); }
.empire--jinno { --c: #3d86e8; --tint: rgba(61, 134, 232, .26); }
@media (max-width: 760px) { .empires { grid-template-columns: 1fr; } }

/* systems */
.systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem 2.5rem; }
.system { display: flex; gap: 1rem; align-items: flex-start; }
.system h3 { font: 600 1.15rem/1.5 var(--font-ui); color: var(--gold-hi); }
.system p { color: var(--muted); font-size: .98rem; line-height: 1.8; }

/* rankings page */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.fchip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem 1rem; border: 1px solid var(--gold-faint); background: rgba(0, 0, 0, .3); color: var(--muted); font-weight: 500; font-size: .95rem; transition: all .2s; }
.fchip:hover { color: var(--text); border-color: var(--gold-lo); }
.fchip[aria-pressed="true"] { color: #2a1604; background: var(--gold); border-color: var(--gold-hi); }
.search { position: relative; }
.search .ic { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { height: 46px; width: min(280px, 100%); padding-inline: 2.7rem 1rem; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; align-items: end; margin-bottom: 2rem; }
.pod { text-align: center; padding: 1.5rem 1rem 1.4rem; }
.pod .medal { width: 54px; height: 54px; font-size: 1.3rem; margin: 0 auto .75rem; }
.pod__name { font: 700 1.35rem/1.4 var(--font-ui); word-break: break-word; }
.pod__meta { color: var(--muted); font-size: .95rem; }
.pod__lvl { margin-top: .5rem; font: 700 2rem/1.1 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.pod--1 { padding-block: 2.2rem 1.9rem; }
.pod--1::before { background: linear-gradient(160deg, #fff1b8, var(--gold) 40%, #8a5a14); }
@media (max-width: 700px) { .podium { grid-template-columns: 1fr; } .pod--1 { order: -1; } }
.dt { width: 100%; border-collapse: collapse; }
.dt th { position: sticky; top: var(--header-h); background: #21170d; text-align: start; padding: .85rem 1rem; font-weight: 600; font-size: .92rem; color: var(--gold); border-bottom: 1px solid var(--gold-lo); z-index: 1; }
.dt td { padding: .75rem 1rem; border-bottom: 1px solid rgba(233, 178, 76, .1); }
.dt tbody tr:hover { background: linear-gradient(to left, rgba(233, 178, 76, .09), transparent); }
.dt .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-hi); }
.dt .rk { width: 70px; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; flex-wrap: wrap; }
@media (max-width: 700px) { .dt .hide-sm { display: none; } .dt th, .dt td { padding-inline: .6rem; } }

.split--rank { grid-template-columns: 1.3fr .7fr; align-items: center; }
@media (max-width: 900px) { .split--rank { grid-template-columns: 1fr; } }
.legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1.25rem 0 1.5rem; }
.legend li { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 500; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.faq-cat { font: 700 1.2rem/1.6 var(--font-ui); color: var(--gold); margin: 2rem 0 .75rem; }
.faq-cat:first-child { margin-top: 0; }

/* news page dialog */
.dlg { padding: 0; border: 0; background: none; color: var(--text); max-width: min(720px, calc(100% - 2 * var(--gutter))); width: 100%; max-height: calc(100dvh - 2 * var(--gutter)); overflow: visible; }
.dlg::backdrop { background: rgba(8, 5, 3, .82); backdrop-filter: blur(4px); }
.dlg[open] { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
.dlg .plate { max-height: calc(100dvh - 2 * var(--gutter)); overflow-y: auto; }
.dlg__close { position: absolute; top: .75rem; inset-inline-end: .9rem; z-index: 2; width: 40px; height: 40px; background: rgba(0, 0, 0, .4); border: 1px solid var(--gold-faint); display: grid; place-items: center; }
.dlg__close:hover { border-color: var(--gold); color: var(--gold-hi); }
.article h2 { font: 700 clamp(1.7rem, 4vw, 2.3rem)/1.4 var(--font-display); margin: .75rem 0 1rem; padding-inline-end: 2.5rem; }
.article p { color: var(--text); opacity: .88; margin-bottom: 1rem; }
.article ul { margin: 0 0 1rem; padding-inline-start: 1.25rem; list-style: disc; color: var(--text); opacity: .88; }
.article li::marker { color: var(--gold); }

/* download page */
.dl-main { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.dl-main__big { padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: 1.25rem; }
.dl-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 1.25rem 2rem; justify-content: start; }
.dl-meta dt { color: var(--muted); font-size: .9rem; }
.dl-meta dd { margin: 0; font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.dl-btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.hash { unicode-bidi: plaintext; text-align: start; font: 500 .82rem/1.6 ui-monospace, Consolas, monospace; color: var(--muted); word-break: break-all; padding: .6rem .8rem; background: rgba(0, 0, 0, .35); border: 1px dashed var(--gold-faint); }
.reqs { display: grid; grid-template-columns: 1fr 1fr; }
.reqs h3 { font: 600 1.1rem/1.5 var(--font-ui); color: var(--gold); padding: 1.1rem 1.4rem .2rem; }
.reqs ul { padding: 0 1.4rem 1.2rem; }
.reqs li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid rgba(233, 178, 76, .1); font-size: .95rem; }
.reqs li span:first-child { color: var(--muted); }
.reqs li span:last-child { direction: ltr; unicode-bidi: plaintext; font-weight: 600; }
.reqs > div + div { border-inline-start: 1px solid var(--gold-faint); }
@media (max-width: 900px) { .dl-main { grid-template-columns: 1fr; } .dl-meta { grid-template-columns: repeat(2, auto); } }
@media (max-width: 520px) { .reqs { grid-template-columns: 1fr; } .reqs > div + div { border-inline-start: 0; border-top: 1px solid var(--gold-faint); } }

/* forms */
.form-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .form-wrap { grid-template-columns: 1fr; } }
.form { display: grid; gap: 1.1rem; }
.form h2 { font: 700 2rem/1.4 var(--font-display); }
.field { display: grid; gap: .4rem; }
.field label, .field__label { font-weight: 600; font-size: .98rem; }
.field small { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.input {
  width: 100%; height: 52px; padding: 0 1rem; background: rgba(0, 0, 0, .4); border: 1px solid rgba(233, 178, 76, .3);
  border-radius: 2px; transition: border-color .2s, box-shadow .2s;
}
.input[dir="ltr"] { text-align: start; }
.input::placeholder { color: #7d6f57; }
.input:hover { border-color: var(--gold-lo); }
.input:focus { outline: 0; border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(255, 217, 128, .18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin-top: -.1rem; }
.pw { position: relative; direction: ltr; }   /* LTR input: keep the eye button on the same side as the padding */
.pw .input { padding-inline-end: 3.2rem; }
.pw input::-ms-reveal, .pw input::-ms-clear { display: none; }   /* نستعمل زرّنا بدل زر Edge الأصلي */
.pw button { position: absolute; inset-block: 0; inset-inline-end: 0; width: 3.2rem; background: none; border: 0; color: var(--muted); display: grid; place-items: center; }
.pw button:hover { color: var(--gold-hi); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .35rem; }
.strength i { height: 4px; background: rgba(255, 255, 255, .1); transition: background .2s; }
.strength[data-s="1"] i:nth-child(-n+1) { background: var(--blood-hi); }
.strength[data-s="2"] i:nth-child(-n+2) { background: #f08a2c; }
.strength[data-s="3"] i:nth-child(-n+3) { background: var(--gold); }
.strength[data-s="4"] i { background: var(--leaf); }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: .96rem; line-height: 1.7; color: var(--muted); cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; flex: none; margin: .2rem 0 0; background: rgba(0, 0, 0, .4); border: 1px solid var(--gold-lo); display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--gold); border-color: var(--gold-hi); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #2a1604; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__msg { padding: 1rem 1.25rem; border: 1px solid var(--gold-lo); background: rgba(233, 178, 76, .08); display: none; }
.form__msg.is-show { display: block; }
.form__msg--ok { border-color: var(--leaf); background: rgba(92, 184, 63, .1); }
.form__msg--err { border-color: var(--danger); background: rgba(255, 138, 122, .08); }
.perks { display: grid; gap: 1.25rem; }
.perk { display: flex; gap: 1rem; align-items: flex-start; }
.perk h3 { font: 600 1.1rem/1.5 var(--font-ui); color: var(--gold-hi); }
.perk p { color: var(--muted); font-size: .96rem; line-height: 1.8; }

/* support */
.rules { counter-reset: r; display: grid; gap: 1rem; }
.rules li { position: relative; padding-inline-start: 3.4rem; color: var(--muted); counter-increment: r; }
.rules li::before { content: counter(r); position: absolute; inset-inline-start: 0; top: .1rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; font: 700 1.2rem var(--font-display); color: var(--gold-hi); border: 1px solid var(--gold-lo); background: rgba(0, 0, 0, .3); }
.rules b { display: block; color: var(--text); font-weight: 600; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.contact a { display: flex; gap: 1rem; align-items: center; padding: 1.25rem 1.4rem; transition: filter .2s; }
.contact a:hover { filter: brightness(1.2); }
.contact b { display: block; font-weight: 600; }
.contact span { color: var(--muted); font-size: .92rem; word-break: break-all; }

/* ==========================================================================
   ACCOUNT · VOTE · SHOP · LOGIN
   ========================================================================== */
.dlg--sm { max-width: min(460px, calc(100% - 2 * var(--gutter))); }
.login-alt { text-align: center; color: var(--muted); font-size: .95rem; }
.login-alt a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.tile__val { display: block; font: 700 1.5rem/1.3 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.tile__cap { display: block; font-size: .92rem; line-height: 1.4; color: var(--muted); }

/* wallet bar (shop + vote) */
.wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; padding: 1.1rem 1.6rem; }
.wallet__cell { display: flex; align-items: center; gap: 1rem; }
.wallet .btn { margin-inline-start: auto; }
@media (max-width: 640px) { .wallet .btn { margin-inline-start: 0; } }
.shop-note { margin-top: .9rem; color: var(--muted); font-size: .94rem; }
.shop-note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 20px; }
.shop-item { display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem 1.5rem 1.3rem; }
.shop-item__top { display: flex; align-items: center; gap: 1rem; }
.shop-item h3 { font: 600 1.15rem/1.45 var(--font-ui); color: var(--text); }
.shop-item__cat { font-size: .85rem; color: var(--muted); }
.shop-item p { color: var(--muted); font-size: .96rem; line-height: 1.8; flex: 1; }
.shop-item__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; border-top: 1px solid rgba(233, 178, 76, .14); }
.price { font: 700 1.25rem/1.3 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.price small, .buy-lines small { font: 500 .85rem var(--font-ui); color: var(--muted); }
.buy-sum { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }
.buy-sum b { font-weight: 600; font-size: 1.1rem; }
.buy-sum p { color: var(--muted); font-size: .94rem; line-height: 1.7; }
.buy-lines { margin: 0 0 1rem; border-block: 1px solid var(--gold-faint); }
.buy-lines div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; }
.buy-lines div + div { border-top: 1px solid rgba(233, 178, 76, .1); }
.buy-lines dt { color: var(--muted); }
.buy-lines dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.buy-lines .neg { color: var(--danger); }
.buy-note { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.buy-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
#buy-body h2 { font: 700 1.9rem/1.4 var(--font-display); padding-inline-end: 2.5rem; }

/* vote */
.vote-list { display: grid; gap: 16px; }
.vote-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; padding: 1.1rem 1.5rem; }
.vote-row h3 { font: 600 1.2rem/1.5 var(--font-ui); color: var(--gold-hi); }
.vote-row p { color: var(--muted); font-size: .95rem; line-height: 1.7; }
.vote-row__act { display: flex; align-items: center; gap: 1rem; }
.vote-row__cd { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .vote-row { grid-template-columns: auto 1fr; }
  .vote-row__act { grid-column: 1 / -1; justify-content: space-between; }
}

/* account */
.gate { text-align: center; display: grid; justify-items: center; gap: .9rem; padding: clamp(2rem, 6vw, 4rem) 1.5rem; }
.gate h2 { font: 700 clamp(1.8rem, 4vw, 2.4rem)/1.4 var(--font-display); }
.gate p { color: var(--muted); }
.gate__btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: .5rem; }
.acct-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 2.5rem; }
.tile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }
.acct-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-title { font: 700 1.7rem/1.4 var(--font-display); margin-bottom: 1rem; }
.acct-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

/* ==========================================================================
   HERO 2.0 — depth layers (mist + foreground foliage)
   كل الحركة هنا transform/translate/rotate فقط (تُرسم على كرت الشاشة دون إعادة رسم).
   ========================================================================== */
.hero__bg { animation: push 40s ease-in-out infinite alternate; }
@keyframes push { from { transform: scale(1); } to { transform: scale(1.06) translate3d(0, -1%, 0); } }

.hero__mist {
  --tile: 1200px;
  position: absolute; left: -50%; width: 200%; z-index: -3; pointer-events: none;
  background: url("../img/fog.webp") repeat-x 0 0 / var(--tile) 100%;
  translate: calc(var(--px, 0px) * .7) 0; transition: translate .5s ease-out;
  animation: mist 140s linear infinite; will-change: transform;
}
.hero__mist--a { bottom: 4%; height: 36%; opacity: .55; }
.hero__mist--b { --tile: 1900px; bottom: -4%; height: 42%; opacity: .38; animation-duration: 230s; animation-direction: reverse; }
@keyframes mist { to { transform: translate3d(calc(var(--tile) * -1), 0, 0); } }

.hero__fol {
  position: absolute; bottom: -7%; z-index: 0; width: min(40vw, 560px); height: auto; pointer-events: none;
  filter: blur(2.8px); opacity: .92;
  translate: calc(var(--px, 0px) * -2.4) calc(var(--py, 0px) * -1.6); transition: translate .35s ease-out;
  animation: sway 9s ease-in-out infinite alternate; will-change: translate;
}
.hero__fol--l { left: -3%; transform-origin: 0 100%; }
.hero__fol--r { right: -3%; transform-origin: 100% 100%; animation-duration: 11s; animation-direction: alternate-reverse; }
@keyframes sway { from { rotate: -.9deg; } to { rotate: .9deg; } }
.hero.is-away * { animation-play-state: paused !important; }   /* لا نحرّك شيئًا والهيرو خارج الشاشة */

/* ==========================================================================
   STORY — «الطريقان»
   الافتراضي: تخطيط ثابت سليم (متصفحات قديمة أو «تقليل الحركة»).
   التحسين: يُثبَّت القسم ويُدار بالتمرير حيث يُدعم animation-timeline ولا تكون الحركة معطّلة.
   ========================================================================== */
.story { position: relative; background: var(--bark); }
.story__pin { position: relative; isolation: isolate; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0; }
.story__half { position: absolute; inset: 0; z-index: -3; background: url("../img/hero-sm.webp") var(--pos) / cover no-repeat; }
.story__half::after { content: ""; position: absolute; inset: 0; background: var(--tint); }
.story__half--green { --pos: 8% 50%; --tint: linear-gradient(90deg, rgba(14, 44, 8, .55), rgba(10, 8, 5, .82)); }
.story__half--red { --pos: 92% 50%; --tint: linear-gradient(270deg, rgba(86, 12, 6, .6), rgba(10, 8, 5, .82)); clip-path: inset(0 0 0 50%); z-index: -2; }
.story__seam {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: -1; width: 3px; margin-left: -1.5px;
  background: linear-gradient(transparent, var(--gold-hi) 14%, var(--gold-hi) 86%, transparent); box-shadow: 0 0 24px 5px rgba(255, 200, 90, .4);
}
.story__emblem { display: none; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(54vmin, 520px); translate: -50% -50%; opacity: .3; filter: drop-shadow(0 0 40px rgba(255, 170, 60, .45)); pointer-events: none; }
.story__beats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.beat { position: relative; text-align: center; padding: 1.5rem 1rem; }
.beat::before { content: ""; position: absolute; inset: -10% -6%; z-index: -1; background: radial-gradient(ellipse at center, rgba(12, 8, 5, .8), transparent 72%); }
.beat__title {
  font: 700 clamp(1.9rem, 3vw, 2.7rem)/1.3 var(--font-display);
  background: linear-gradient(180deg, #fff6d6 10%, #ffd980 55%, #e9a93a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .9)) drop-shadow(0 6px 16px rgba(0, 0, 0, .7)); margin-bottom: .5rem;
}
.beat p { font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.95; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); max-width: 46ch; margin-inline: auto; }
.beat__empires { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem 1.75rem; margin-top: 1.1rem; }
.beat__empires li { display: flex; align-items: center; gap: .55rem; font-weight: 600; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
.beat .btn { margin-top: 1.5rem; }
@media (max-width: 860px) { .story__beats { grid-template-columns: 1fr; gap: 2.5rem; } }

@keyframes beat1 { 0% { opacity: 0; transform: translateY(28px); } 7% { opacity: 1; transform: none; } 27% { opacity: 1; transform: none; } 35% { opacity: 0; transform: translateY(-28px); } 100% { opacity: 0; } }
@keyframes beat2 { 0%, 29% { opacity: 0; transform: translateY(28px); } 37% { opacity: 1; transform: none; } 60% { opacity: 1; transform: none; } 68% { opacity: 0; transform: translateY(-28px); } 100% { opacity: 0; } }
@keyframes beat3 { 0%, 62% { opacity: 0; transform: translateY(28px); } 70% { opacity: 1; transform: none; } 100% { opacity: 1; transform: none; } }
@keyframes seam-red { from { clip-path: inset(0 0 0 64%); filter: brightness(.45) saturate(.8); } to { clip-path: inset(0 0 0 36%); filter: brightness(1.15) saturate(1.15); } }
@keyframes seam-line { from { left: 64%; } to { left: 36%; } }
@keyframes green-fade { from { filter: brightness(1.15) saturate(1.15); } 50% { filter: brightness(.8); } to { filter: brightness(.45) saturate(.8); } }
@keyframes emblem-turn { from { rotate: -10deg; scale: .75; opacity: .12; } 30% { opacity: .42; } to { rotate: 10deg; scale: 1.15; opacity: .28; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .story { height: 340vh; view-timeline: --story block; }
    .story__pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; }
    .story__beats { position: absolute; inset: 0; width: auto; margin: 0; padding-inline: var(--gutter); grid-template-columns: 1fr; place-items: center; }
    .beat { grid-area: 1 / 1; width: min(580px, 100%); opacity: 0; }
    .beat__title { font-size: clamp(2.2rem, 5.2vw, 4rem); }
    .story__emblem { display: block; }
    .story__half--red { clip-path: inset(0 0 0 64%); }
    .story__seam { left: 64%; }
    .story .beat, .story__half, .story__seam, .story__emblem {
      animation-timeline: --story; animation-range: cover 25% cover 75%; animation-fill-mode: both; animation-timing-function: linear;
    }
    .beat--1 { animation-name: beat1; }
    .beat--2 { animation-name: beat2; }
    .beat--3 { animation-name: beat3; }
    .story__half--green { animation-name: green-fade; }
    .story__half--red { animation-name: seam-red; }
    .story__seam { animation-name: seam-line; }
    .story__emblem { animation-name: emblem-turn; }
  }
}

/* ==========================================================================
   MEDIA — العرض الترويجي + المعرض + صوت الأجواء
   ========================================================================== */
.trailer { position: relative; aspect-ratio: 16 / 9; max-width: 1000px; margin: 0 auto 2rem; background: #000; border: 1px solid var(--gold-lo); }
.trailer__poster {
  position: absolute; inset: 0; width: 100%; border: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--text);
  background: linear-gradient(rgba(18, 13, 9, .35), rgba(18, 13, 9, .65)), url("../img/hero.webp") 50% 40% / cover no-repeat;
}
.trailer__play { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--gold-hi); background: rgba(18, 13, 9, .7); color: var(--gold-hi); transition: transform .25s, background .25s; }
.trailer__play .ic { width: 44px; height: 44px; }
.trailer__poster:hover .trailer__play { transform: scale(1.08); background: rgba(196, 42, 30, .75); }
.trailer__label { font: 700 1.5rem var(--font-display); text-shadow: 0 2px 10px #000; }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.gallery__item { padding: 0; border: 1px solid var(--gold-faint); background: #000; aspect-ratio: 16 / 10; overflow: hidden; cursor: zoom-in; transition: border-color .2s; }
.gallery__item:hover { border-color: var(--gold); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery__item:hover img { transform: scale(1.05); }
.dlg--lightbox { max-width: min(1240px, calc(100% - 2 * var(--gutter))); }
.dlg--lightbox[open] { display: grid; }
.lb-fig { margin: 0; display: grid; gap: .6rem; justify-items: center; }
.lb-fig img { max-width: 100%; max-height: 80vh; object-fit: contain; border: 1px solid var(--gold-lo); background: #000; }
.lb-fig figcaption { color: var(--text); font-size: .98rem; text-align: center; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 46px; height: 64px; display: grid; place-items: center; background: rgba(18, 13, 9, .75); border: 1px solid var(--gold-faint); color: var(--gold-hi); }
.lb-nav:hover { border-color: var(--gold); }
.lb-nav--next { left: 8px; }
.lb-nav--prev { right: 8px; }
.lb-flip { transform: scaleX(-1); }
.ambient { position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 110; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(18, 13, 9, .88); border: 1px solid var(--gold-lo); color: var(--gold-hi); transition: border-color .2s, background .2s; }
.ambient:hover { border-color: var(--gold); }
.ambient[aria-pressed="true"] { background: rgba(196, 42, 30, .8); }

/* player profile + guild page */
.narrow--wide { max-width: 860px; }
.row-inline { display: flex; gap: .75rem; }
.row-inline .input { flex: 1; min-width: 0; }
.profile { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.25rem); }
.profile__glyph { display: grid; place-items: center; width: clamp(96px, 16vw, 150px); aspect-ratio: 1; color: var(--gold-hi); background: radial-gradient(circle, rgba(233, 178, 76, .2), transparent 68%); }
.profile__glyph .ic { width: 62%; height: 62%; stroke-width: 1.1; filter: drop-shadow(0 0 14px rgba(255, 190, 80, .45)); }
.profile__name { font: 700 clamp(1.9rem, 4vw, 2.8rem)/1.3 var(--font-ui); color: var(--text); word-break: break-word; }
.profile__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.chip--lg { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem 1rem; font-size: .98rem; }
.profile__stats { display: flex; flex-wrap: wrap; gap: .5rem 2.25rem; margin: 0; }
.profile__stats dt { color: var(--muted); font-size: .9rem; }
.profile__stats dd { margin: 0; font-weight: 700; font-size: 1.25rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.profile__stats a, .rank-name a, .pod__name a, .dt a { transition: color .2s; }
.profile__stats a:hover, .rank-name a:hover, .pod__name a:hover, .dt a:hover { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 560px) { .profile { grid-template-columns: 1fr; justify-items: center; text-align: center; } .profile__tags, .profile__stats { justify-content: center; } }

/* privacy / legal pages + 404 */
.legal .prose h2 { font: 700 1.6rem/1.5 var(--font-display); color: var(--gold-hi); margin: 1.75rem 0 .4rem; }
.legal .prose h2:first-child { margin-top: 0; }
.legal .prose p { max-width: none; }
.legal .prose ul { padding-inline-start: 1.25rem; list-style: disc; color: var(--muted); display: grid; gap: .5rem; }
.legal .prose li::marker { color: var(--gold); }
.legal .prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal .prose b { color: var(--text); font-weight: 600; }
.nf { min-height: 100svh; display: grid; place-items: center; padding: 2rem var(--gutter); background: radial-gradient(ellipse at 50% 30%, rgba(233, 178, 76, .12), transparent 60%), var(--bark); }
.nf__box { text-align: center; max-width: 560px; display: grid; justify-items: center; gap: .6rem; }
.nf__emblem { width: clamp(130px, 28vw, 220px); height: auto; filter: drop-shadow(0 0 30px rgba(255, 170, 60, .35)); }
.nf__code { font: 700 clamp(4.5rem, 14vw, 8rem)/1 var(--font-display); background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
.nf__title { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.4 var(--font-display); }
.nf__text { color: var(--muted); }
.nf__btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1rem; }
.f-legal { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.f-legal a:hover { color: var(--gold-hi); }

/* topup */
.wallet .btn + .btn { margin-inline-start: 0; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 16px; }
.pkg, .method {
  background: rgba(26, 18, 11, .8); border: 1px solid var(--gold-faint); color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.pkg:hover, .method:hover { border-color: var(--gold-lo); }
.pkg[aria-pressed="true"], .method[aria-pressed="true"] {
  border-color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold-hi);
  background: linear-gradient(180deg, rgba(233, 178, 76, .18), rgba(26, 18, 11, .92));
}
.pkg { display: grid; justify-items: center; gap: .15rem; padding: 1.4rem 1rem 1.2rem; }
.pkg__coins { font: 700 2.1rem/1.2 var(--font-ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.pkg__unit { color: var(--muted); font-size: .92rem; }
.pkg__bonus { color: var(--leaf); font-weight: 600; font-size: .94rem; min-height: 1.6em; }
.pkg__price { margin-top: .4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.method { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; text-align: start; }
.method b { display: block; font-weight: 600; }
.method small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.pay-box { margin-top: 2rem; display: grid; gap: 1rem; }
.pay-sum { font-size: 1.1rem; }
.pay-sum b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.pay-st { font-weight: 600; font-size: .92rem; }
.pay-st--paid { color: var(--leaf); }
.pay-st--pending { color: var(--gold); }
.pay-st--failed { color: var(--danger); }
#pay-banner { margin-bottom: 1.5rem; }
.form__msg--warn { border-color: var(--gold); background: rgba(233, 178, 76, .08); }

/* forgot / reset / admin */
.narrow { max-width: 620px; }
#reset-msg { margin-top: 1rem; }
select.input {
  appearance: none; -webkit-appearance: none; padding-inline-end: 2.4rem;
  background: rgba(0, 0, 0, .4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e9b24c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left .9rem center / .8rem;
}
select.input option { background: #1a120b; color: var(--text); }
.input--area { height: auto; min-height: 180px; padding: .8rem 1rem; resize: vertical; line-height: 1.9; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: inline-grid; grid-auto-flow: column; gap: 0; border: 1px solid rgba(233, 178, 76, .3); width: max-content; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: .5rem 1.6rem; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--gold); color: #2a1604; }
.seg input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.acct-grid--news { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .acct-grid--news { grid-template-columns: 1fr; } }
.adm-news { display: grid; gap: 12px; }
.adm-news__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.2rem; }
.adm-news__row b { display: block; font-weight: 600; margin-top: .3rem; line-height: 1.6; }
.adm-news__row small { color: var(--muted); }
.adm-news__act { display: flex; gap: .5rem; flex: none; }
.adm-news .empty { padding: 1.5rem 0; }

/* ---------- footer ---------- */
.site-footer { position: relative; margin-top: clamp(48px, 8vw, 96px); padding: 56px 0 28px; background: linear-gradient(to bottom, var(--bark), #0b0805); }
.site-footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: linear-gradient(to left, transparent, var(--gold-lo) 25%, var(--gold-lo) 75%, transparent); }
.f-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.f-brand img { width: 180px; height: auto; margin-bottom: .75rem; }
.f-brand p { color: var(--muted); font-size: .96rem; max-width: 34ch; }
.f-col h3 { font: 700 1.15rem var(--font-display); color: var(--gold); margin-bottom: .75rem; }
.f-col a { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; color: var(--muted); font-size: .98rem; transition: color .2s; }
.f-col a:hover { color: var(--gold-hi); }
.f-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--gold-faint); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; color: #8f8068; font-size: .88rem; line-height: 1.7; }
.f-bottom p { max-width: 70ch; }
@media (max-width: 860px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .f-grid { grid-template-columns: 1fr; } }

/* ---------- toast & demo badge ---------- */
.toast { position: fixed; bottom: 24px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); z-index: 120; padding: .85rem 1.5rem; background: #24180d; border: 1px solid var(--gold); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.is-show { opacity: 1; transform: none; }
.demo-badge { pointer-events: none; position: fixed; bottom: 6px; inset-inline-start: 12px; z-index: 110; padding: .25rem .8rem; font-size: .78rem; line-height: 1.6; background: rgba(196, 42, 30, .9); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }

/* ==========================================================================
   LANGUAGES — زر اللغة + تعديلات اتجاه LTR (الإنجليزية والفرنسية)
   الموقع مكتوب بخصائص منطقية (inline-start/end) فمعظمه ينعكس وحده. هنا ما لا ينعكس تلقائيًا.
   ========================================================================== */
html[data-i18n="pending"] body { visibility: hidden; }          /* نخفي الصفحة لحظة تحميل القاموس حتى لا يلمع العربي */

.lang { position: relative; }
.lang summary {
  list-style: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .85rem;
  border: 1px solid var(--gold-faint); background: rgba(0, 0, 0, .3); font-weight: 600; font-size: .92rem; cursor: pointer;
  transition: border-color .2s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--gold); }
.lang summary .ic { width: 1.15em; height: 1.15em; color: var(--gold); }
.lang__menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 80; min-width: 160px; display: grid; background: #1a120b; border: 1px solid var(--gold-lo); box-shadow: 0 12px 36px rgba(0, 0, 0, .6); }
.lang__menu button, .lang-row button { padding: .65rem 1rem; text-align: start; background: none; border: 0; color: var(--text); font-weight: 500; }
.lang__menu button:hover { background: rgba(233, 178, 76, .1); }
.lang__menu button[aria-checked="true"], .lang-row button[aria-pressed="true"] { color: var(--gold-hi); font-weight: 700; }
.nav-lang { display: none; }
.lang-row { display: flex; gap: .5rem; padding: 1rem 0 .25rem; }
.lang-row button { border: 1px solid var(--gold-faint); padding: .5rem 1rem; }
.lang-row button[aria-pressed="true"] { border-color: var(--gold-hi); background: rgba(233, 178, 76, .12); }
@media (max-width: 1240px) { .lang-slot { display: none; } .nav-lang { display: block; } }

/* الخط اللاتيني للعناوين: Cinzel (الذي استعملته اللوحة المرجعية) بدل خط الرقعة العربي */
html[lang="en"], html[lang="fr"] { --font-display: 'Cinzel', 'Aref Ruqaa', serif; }
html[dir="ltr"] body { line-height: 1.72; }
html[dir="ltr"] .sec-title, html[dir="ltr"] .page-title, html[dir="ltr"] .beat__title, html[dir="ltr"] .hero__tag,
html[dir="ltr"] .cta__title, html[dir="ltr"] .acct-title, html[dir="ltr"] .step__n, html[dir="ltr"] .faq-cat, html[dir="ltr"] .nf__title { letter-spacing: .03em; line-height: 1.3; }
html[dir="ltr"] .hero__tag { font-size: clamp(1.9rem, 4vw, 3.2rem); }
html[dir="ltr"] .beat__title { font-size: clamp(1.7rem, 4.4vw, 3.3rem); }
html[dir="ltr"] .sec-title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
html[dir="ltr"] .page-title { font-size: clamp(2.2rem, 5.4vw, 4rem); }
html[dir="ltr"] .brand__word { height: 46px; }
/* تسميات القائمة اللاتينية أعرض من العربية: حاوية هيدر أوسع وخط أصغر قليلًا */
html[dir="ltr"] .site-header__in { width: min(1360px, calc(100% - 2 * var(--gutter))); gap: 1rem; }
html[dir="ltr"] .site-nav a { padding: .5rem .5rem; font-size: .94rem; }
html[dir="ltr"] .site-nav a::after { inset-inline: .4rem; }
html[dir="ltr"] .site-header .btn--sm { padding: 0 1.1rem; }
@media (max-width: 1320px) { html[dir="ltr"] .brand__word { display: none; } }   /* على الشاشات المتوسطة يكفي الشعار الدائري */

/* ما يتجه فيزيائيًا نحو اليسار في RTL ننقله لليمين */
html[dir="ltr"] .rank-row:hover, html[dir="ltr"] .dt tbody tr:hover { background: linear-gradient(to right, rgba(233, 178, 76, .1), transparent); }
html[dir="ltr"] .bar__track i { background: linear-gradient(to right, var(--gold-lo), var(--gold-hi)); }
html[dir="ltr"] .hero__sub::before { background: linear-gradient(to right, transparent, var(--gold)); }
html[dir="ltr"] .hero__sub::after { transform: none; background: linear-gradient(to left, transparent, var(--gold)); }
html[dir="ltr"] .site-nav a::after { transform-origin: left; }
html[dir="ltr"] select.input { background-position: right .9rem center; }
/* الأسهم: الأيقونة الأصلية تشير لليسار (التالي في RTL). في LTR نقلبها */
html[dir="ltr"] svg:has(> use[href="#i-arrow"]) { transform: scaleX(-1); }
html[dir="ltr"] .lb-flip { transform: none; }
html[dir="ltr"] .lb-nav--next { left: auto; right: 8px; }
html[dir="ltr"] .lb-nav--prev { right: auto; left: 8px; }
html[dir="ltr"] .more .ic { transform: scaleX(-1); }

/* هيدر الجوال: النصوص الأجنبية أطول من العربية (Jouer maintenant)، فنضغط الأزرار حتى لا يخرج زر القائمة من الشاشة */
@media (max-width: 480px) {
  .site-header__in { gap: .6rem; }
  .site-header__actions { gap: .5rem; }
  .site-header__actions .btn--sm { padding: 0 .85rem; font-size: .9rem; }
  .site-header__actions .btn--sm .ic { display: none; }
  .brand__emblem { width: 40px; height: 40px; }
  .brand__word { height: 30px; }
  html[dir="ltr"] .brand__word { display: none; }       /* بالإنجليزية والفرنسية يكفي الشعار على شاشة ضيقة */
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .hero__bg img { transform: scale(1.04) !important; }
}
