/* ==========================================================================
   LOST — «المناخ»: الواجهة مصنوعة من حالة العالم (تُحمَّل بعد style.css في كل الصفحات)
   متغيرات --glass / --edge / --sheen / --lx / --ly / --frost / --w-heat … يكتبها assets/js/world.js على <html>.
   النص فاتح دائمًا على زجاج داكن دائمًا ⇒ التباين مضمون في كل طور وحدث (يُقاس بـ tools/ في الاختبارات).
   ========================================================================== */

:root {
  /* قيم افتراضية (نهار) قبل أن يعمل world.js */
  --glass: rgba(13, 28, 26, .78); --glass-solid: rgb(13, 28, 26); --edge: rgba(255, 243, 196, .5); --sheen: rgba(255, 243, 196, .09);
  --accent-w: rgb(242, 193, 78); --heat-c: rgb(242, 193, 78); --sky-tint: rgba(0, 0, 0, 0);
  --frost: 3px; --lx: 0px; --ly: 1px; --sheen-angle: 180deg; --w-heat: 0; --w-pop: .5; --w-day: 1; --w-beat: 4s; --shade: .08;
  --ink: #f4ecd8; --ink-mute: #cfc1a1;
  --header-h: 68px;
  --leaf-r: 22px;
  --slot-bg: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .3));
  --bevel: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 2px var(--edge);
}
@media (max-width: 1240px) { :root { --header-h: 58px; } }

html { background: #0b0805; }
body { background: transparent; }
body { color: var(--ink); }
.muted, .sec-lead, .prose p, .step__text { color: var(--ink-mute); }

/* ==========================================================================
   المشهد (يُنشئه scene.js): لوحة + طبقات إضاءة + جسيمات
   ========================================================================== */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0b0805; pointer-events: none; }
.scene > * { position: absolute; }
.scene__paint { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; will-change: transform; transform: scale(1.08); }
.scene__tint { inset: 0; background: var(--sky-tint); }
.scene__sun {
  inset: 0; opacity: calc(var(--so, .6) * .8);
  background: radial-gradient(circle var(--ss, 60vmax) at var(--sx, 50%) var(--sy, 30%), var(--sc, rgba(255, 232, 170, 1)) 0%, rgba(255, 200, 120, .22) 22%, transparent 62%);
}
.scene__heat {
  inset: 0; opacity: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, color-mix(in srgb, var(--heat-c) calc(var(--w-heat) * 85%), transparent), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, color-mix(in srgb, var(--heat-c) calc(var(--w-heat) * 38%), transparent), transparent 70%);
}
.scene__fog {
  left: -50%; width: 200%; background: url("../img/fog.webp") repeat-x 0 0 / var(--tile) 100%; --tile: 1200px;
  opacity: calc((1 - var(--w-pop) * .72) * .6); animation: mist 140s linear infinite; will-change: transform;
}
.scene__fog--a { bottom: 6%; height: 36%; }
@keyframes mist { to { transform: translate3d(calc(var(--tile) * -1), 0, 0); } }
.scene__fx { inset: 0; width: 100%; height: 100%; }
.scene__fol { bottom: -7%; width: min(38vw, 520px); height: auto; opacity: .8; transform-origin: 50% 100%; animation: sway 9s ease-in-out infinite alternate; }
.scene__fol--l { left: -3%; } .scene__fol--r { right: -3%; animation-duration: 11s; animation-direction: alternate-reverse; }
@keyframes sway { from { rotate: -.9deg; } to { rotate: .9deg; } }
.scene__shade {
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(11, 8, 5, .5), rgba(11, 8, 5, 0) 22%),
    radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(8, 5, 3, .5) 100%);
}
.scene__veil { inset: 0; background: #0b0805; opacity: .08; }   /* scene.js يغيّر شفافيته مباشرة مع التمرير */
html[data-calm="1"] .scene__fol, html[data-calm="1"] .scene__fog { animation: none; }
/* أثناء التمرير: لا تمويه ولا حركات ثقيلة (يعود كل شيء بعد توقف التمرير بـ140ms) */
html.is-scrolling .scene__fog, html.is-scrolling .scene__fol, html.is-scrolling .world-line .wl-event, html.is-scrolling .site-nav a, html.is-scrolling .site-nav a::after { animation-play-state: paused; }
html[data-calm="1"] .scene__fog { opacity: .22; }

/* ==========================================================================
   اللوح: زجاج حيّ (يستبدل لوحة الذهب المشطوفة وكل النوافذ)
   ضوء الشمس/القمر يلمع على الحافة المقابلة له، والتجمّد ليلًا، والجمر عند الحدث
   ========================================================================== */
.plate, .win {
  --cut: 0px;
  position: relative; isolation: isolate; clip-path: none; overflow: clip;
  border-start-start-radius: var(--leaf-r); border-end-end-radius: var(--leaf-r); border-start-end-radius: 6px; border-end-start-radius: 6px;
  background: linear-gradient(var(--sheen-angle), var(--sheen), transparent 42%), var(--glass);
  box-shadow:
    inset var(--lx) var(--ly) 0 0 var(--edge),
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 20px 44px rgba(0, 0, 0, .38),
    0 0 calc(var(--w-heat) * 14px) calc(var(--w-heat) * 1px) color-mix(in srgb, var(--heat-c) 60%, transparent);
  transition: background .6s, box-shadow .6s;
}
.plate::before, .plate::after, .win::before, .win::after { content: none; }
.plate--soft { background: linear-gradient(var(--sheen-angle), var(--sheen), transparent 42%), color-mix(in srgb, var(--glass) 82%, transparent); }
@media (max-width: 820px) {
  .plate, .win { background: linear-gradient(var(--sheen-angle), var(--sheen), transparent 42%), color-mix(in srgb, var(--glass-solid) 94%, transparent); }
}
.win { display: flex; flex-direction: column; }
.win__bar { position: relative; flex: none; display: flex; align-items: center; gap: .7rem; padding: .95rem 1.3rem .7rem; }
.win__bar::after {
  content: ""; position: absolute; inset-inline: 1.3rem; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--edge) 0 1px, transparent 1px 9px) top / 100% 5px no-repeat, linear-gradient(90deg, color-mix(in srgb, var(--accent-w) 70%, transparent), transparent 70%) bottom / 100% 1px no-repeat;
  opacity: .8;
}
.win__ic { display: grid; place-items: center; color: var(--accent-w); }
.win__ic .ic { width: 1.2rem; height: 1.2rem; }
.win__title { flex: 1; min-width: 0; font: 700 1.5rem/1.35 var(--font-display); color: var(--ink); }
.win__ctl { display: flex; gap: 6px; }
.win__ctl button { display: none; }
.win__more { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .8rem; font: 600 .84rem var(--font-ui); color: var(--ink); background: rgba(255, 255, 255, .06); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--edge); transition: background .2s; }
.win__more:hover { background: rgba(255, 255, 255, .13); }
.win__more .ic { width: .9rem; height: .9rem; }
html[dir="ltr"] .win__more .ic { transform: scaleX(-1); }
.win__body { position: relative; flex: 1; padding: clamp(1rem, 2.2vw, 1.6rem); }
.win__body--flush { padding: 0; }
.win--jade, .win--lacquer { }
.win--jade .win__ic { color: #7fe0a6; } .win--lacquer .win__ic { color: #ff9b7e; }

/* ---------- أزرار: زوايا ورقة الشجر، مضيئة بلون الطور ---------- */
.btn {
  --btn-bg: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  clip-path: none; border: 0; background: var(--btn-bg), var(--glass-solid); color: var(--ink); min-height: 48px; padding: 0 1.6rem; font-weight: 700; font-size: 1rem;
  border-start-start-radius: 14px; border-end-end-radius: 14px; border-start-end-radius: 5px; border-end-start-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--edge), 0 8px 18px rgba(0, 0, 0, .3); transition: filter .2s, transform .15s, box-shadow .2s;
}
.btn::before, .btn::after { content: none; }
.btn:hover { filter: brightness(1.18); transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--accent-w), 0 10px 22px rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--accent-w) 35%, transparent); }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: linear-gradient(180deg, #e3412f, #8a170f); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(255, 217, 128, .8), 0 8px 22px rgba(196, 42, 30, .35); }
.btn--gold { --btn-bg: linear-gradient(180deg, #f6cd6f, #b07a20); color: #2a1604; }
.btn--sm { min-height: 40px; padding: 0 1.1rem; font-size: .93rem; border-start-start-radius: 11px; border-end-end-radius: 11px; }

/* ---------- الرأس + قائمة الفوانيس ---------- */
.site-header { background: linear-gradient(180deg, rgba(8, 6, 4, .78), rgba(8, 6, 4, 0)); box-shadow: none; }
.site-header::after { display: none; }
.site-header.is-solid { background: rgba(9, 7, 5, .94); box-shadow: 0 1px 0 var(--edge); }
.site-header__in { align-items: flex-start; padding-top: 6px; }
.brand { align-self: center; }
.brand__emblem { width: 42px; height: 42px; } .brand__word { height: 34px; }
.site-header__actions { align-self: center; }
.site-nav { align-self: flex-start; align-items: flex-start; gap: 6px; margin-inline: auto; }

@media (min-width: 1241px) {
  .site-nav a {
    --paper: radial-gradient(ellipse 70% 80% at 50% 55%, #5a2418, #2d100b 85%);
    position: relative; margin-top: 14px; padding: .48rem 1rem .5rem; font-weight: 600; font-size: .95rem; line-height: 1.5; opacity: 1; color: #f2dfbf;
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 12px), var(--paper);
    border-radius: 12px / 20px; border-top: 3px solid #26150a; border-bottom: 3px solid #26150a;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, .55), 0 6px 14px rgba(0, 0, 0, .4); transform-origin: 50% -14px; transition: filter .25s, box-shadow .25s;
  }
  .site-nav a::before {                                                  /* خيط التعليق */
    content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 16px; background: linear-gradient(transparent, rgba(255, 220, 160, .6));
  }
  .site-nav a::after { display: none; }
  .site-nav a:hover { animation: swing 1.6s ease-in-out; background-color: transparent; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 0 14px rgba(0, 0, 0, .55), 0 0 0 1px var(--accent-w), 0 6px 14px rgba(0, 0, 0, .4); }
  /* فانوس مضاء: ورق ذهبي ساطع ونص داكن (تباين عالٍ في الحالتين) */
  .site-nav a[data-lit] {
    --paper: radial-gradient(ellipse 70% 80% at 50% 55%, #fff0b8, #f0a640 88%); color: #2a1604;
    box-shadow: inset 0 0 12px rgba(160, 70, 10, .45), 0 6px 14px rgba(0, 0, 0, .4);
  }
  .site-nav a[data-lit]::after { content: ""; display: block; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 26px 6px color-mix(in srgb, var(--lit-c, #ffb454) 70%, transparent); opacity: .55; animation: glow 3.6s ease-in-out infinite; }
  .site-nav a[data-lit="event"] { --lit-c: var(--heat-c); --paper: radial-gradient(ellipse 70% 80% at 50% 55%, #ffd2b0, #ff6a3a 88%); }
  .site-nav a[data-lit="event"]::after { animation-duration: 1.6s; }
  @keyframes glow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
  @keyframes swing { 0%, 100% { rotate: 0deg; } 25% { rotate: 4deg; } 60% { rotate: -3deg; } }
  html[dir="ltr"] .site-nav a { padding: .48rem .7rem .5rem; font-size: .9rem; }
}
.site-nav .lit-note { }
@media (max-width: 1240px) {
  .site-nav { background: rgba(9, 7, 5, .98); align-items: stretch; }
  .site-nav a { font-size: 1.05rem; border-bottom: 1px solid var(--edge); }
  .site-nav a[data-lit]::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-inline-end: .6rem; border-radius: 50%; background: var(--lit-c, #ffb454); box-shadow: 0 0 10px var(--lit-c, #ffb454); }
  .site-nav a[data-lit="event"] { --lit-c: var(--heat-c); }
}
.lang summary, .nav-toggle, .calm { background: rgba(255, 255, 255, .07); border: 0; box-shadow: inset 0 0 0 1px var(--edge); min-height: 40px; border-radius: 12px 4px 12px 4px; }
.lang summary:hover, .lang[open] summary, .calm:hover { box-shadow: inset 0 0 0 1px var(--accent-w); }
.lang__menu { border: 0; background: var(--glass-solid); box-shadow: inset 0 0 0 1px var(--edge), 0 14px 36px rgba(0, 0, 0, .6); border-radius: 12px 4px 12px 4px; overflow: clip; }
.nav-toggle { width: 42px; height: 42px; }
.calm { width: 40px; display: grid; place-items: center; padding: 0; color: var(--ink); }
.calm .ic { width: 1.25rem; height: 1.25rem; }
.calm[aria-pressed="true"] { color: #7fe0a6; box-shadow: inset 0 0 0 1px #7fe0a6; }

/* ---------- عناوين الأقسام (خارج الألواح) ---------- */
.sec-head { margin-bottom: clamp(20px, 3vw, 32px); }
.sec-title { font-size: clamp(1.8rem, 3vw, 2.4rem); text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.sec-lead, .page-lead { text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.brush { width: min(260px, 60%); height: 7px; margin-top: .5rem; -webkit-mask: none; mask: none;
  background: repeating-linear-gradient(90deg, var(--edge) 0 1px, transparent 1px 9px) top / 100% 5px no-repeat, linear-gradient(90deg, var(--accent-w), transparent 75%) bottom / 100% 1px no-repeat; }
.more { border: 0; padding: .3rem .85rem; background: rgba(255, 255, 255, .07); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--edge); font-size: .92rem; color: var(--ink); }
.more:hover { background: rgba(255, 255, 255, .14); gap: .5rem; }

/* ---------- خانة الغرض (.rune) ---------- */
.rune { width: 54px; height: 54px; color: var(--accent-w); clip-path: none; background: rgba(0, 0, 0, .38); border-start-start-radius: 14px; border-end-end-radius: 14px; border-start-end-radius: 4px; border-end-start-radius: 4px; box-shadow: inset 0 0 0 1px var(--edge), inset 0 6px 12px rgba(0, 0, 0, .45); }
.rune::before, .rune::after { content: none; }
.rune--sm { width: 42px; height: 42px; }

/* ---------- تبويبات / صفوف / جداول ---------- */
.tabs { gap: 4px; padding: .6rem .8rem 0; border-bottom: 1px solid var(--edge); background: transparent; box-shadow: none; }
.tab { padding: .5rem 1.15rem; font-size: .93rem; color: var(--ink-mute); background: rgba(255, 255, 255, .04); box-shadow: none; clip-path: none; border-radius: 12px 12px 0 0; }
.tab::after { display: none; }
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .09); }
.tab[aria-selected="true"] { color: var(--ink); background: rgba(255, 255, 255, .12); box-shadow: inset 0 2px 0 var(--accent-w); }
.rank-row { padding: .65rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .06); box-shadow: none; }
.rank-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.rank-row:hover { background: linear-gradient(to left, color-mix(in srgb, var(--accent-w) 18%, transparent), transparent); }
.rank-num { padding: .1rem .6rem; min-width: 5.2em; text-align: center; color: var(--ink); background: rgba(0, 0, 0, .35); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--edge); font-size: .92rem; }
.medal { border-radius: 50%; clip-path: none; border: 0; }
.dt th { background: color-mix(in srgb, var(--glass-solid) 92%, #fff); box-shadow: inset 0 -1px 0 var(--edge); border-bottom: 0; color: var(--ink); }
.dt tbody tr:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.dt td { border-bottom-color: rgba(255, 255, 255, .06); }
.fchip { border: 0; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 99px; color: var(--ink-mute); }
.fchip[aria-pressed="true"] { background: var(--accent-w); color: #2a1604; box-shadow: none; }

/* ---------- أخبار ---------- */
.news-card { border: 0; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 14px 4px 14px 4px; overflow: clip; }
.news-card:hover { transform: none; box-shadow: inset 0 0 0 1px var(--accent-w); }
.news-card:hover .news-card__title { color: var(--accent-w); }
.news-card__cover::after { background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 60%); }
.tag { padding: .05rem .6rem; background: rgba(0, 0, 0, .45); color: var(--c, var(--accent-w)); box-shadow: inset 0 0 0 1px currentColor; font-size: .8rem; border-radius: 99px; }
.tag--update { --c: #8ff07a; background: rgba(0, 0, 0, .45); } .tag--event { --c: #ffd980; background: rgba(0, 0, 0, .45); } .tag--notice { --c: #ff9b82; background: rgba(0, 0, 0, .45); color: var(--c); }

/* ---------- حقول ---------- */
.input { background: rgba(0, 0, 0, .42); border: 0; border-radius: 12px 4px 12px 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 3px 8px rgba(0, 0, 0, .45); }
.input:hover { box-shadow: inset 0 0 0 1px var(--edge), inset 0 3px 8px rgba(0, 0, 0, .45); }
.input:focus { box-shadow: inset 0 0 0 2px var(--accent-w), 0 0 0 4px color-mix(in srgb, var(--accent-w) 22%, transparent); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger); }
.check input { border: 0; box-shadow: inset 0 0 0 1px var(--edge); background: rgba(0, 0, 0, .42); border-radius: 6px; }
.seg { border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 99px; overflow: clip; }
select.input { background-color: rgba(0, 0, 0, .42); }

/* ---------- المتجر / الشحن ---------- */
.shop-item { padding: 1.1rem 1.2rem; gap: .75rem; }
.shop-item h3 { color: var(--rar-text, var(--ink)); }
.shop-item[data-cat="costume"] { --rar-text: #d9bfff; } .shop-item[data-cat="mount"] { --rar-text: #a9d1ff; } .shop-item[data-cat="boost"] { --rar-text: #b4f0b8; }
.shop-item__foot { border-top: 1px solid rgba(255, 255, 255, .1); }
.price { color: var(--accent-w); }
.pkg, .method { background: rgba(0, 0, 0, .3); border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 14px 4px 14px 4px; }
.pkg:hover, .method:hover { box-shadow: inset 0 0 0 1px var(--accent-w); }
.pkg[aria-pressed="true"], .method[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent-w); background: color-mix(in srgb, var(--accent-w) 16%, rgba(0, 0, 0, .3)); }

/* ---------- أحداث / مواعيد / أسئلة ---------- */
.ev-main { padding: clamp(1rem, 2.2vw, 1.5rem); gap: .8rem; }
.ev-item { padding: .85rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.cd__seg { background: rgba(0, 0, 0, .4); border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 10px 3px 10px 3px; }
.cd__n { color: var(--ink); }
.week { background: transparent; border: 0; gap: 4px; }
.week__day { background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--edge); border-radius: 10px 3px 10px 3px; }
.faq details { background: rgba(0, 0, 0, .3); border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 12px 4px 12px 4px; }
.faq details[open] { box-shadow: inset 0 0 0 1px var(--accent-w); }

/* ---------- رأس الصفحات الداخلية: تشفّ اللوحة خلفه ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 clamp(18px, 3vw, 32px); }
.page-hero::before, .page-hero::after { display: none; }
.page-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.page-hero > .wrap::after { content: ""; display: block; width: min(320px, 60%); height: 7px; margin-top: 1rem; background: repeating-linear-gradient(90deg, var(--edge) 0 1px, transparent 1px 9px) top / 100% 5px no-repeat, linear-gradient(90deg, var(--accent-w), transparent 75%) bottom / 100% 1px no-repeat; }
.section--backdrop::before, .section--backdrop::after { display: none; }

/* ==========================================================================
   الصفحة الرئيسية
   ========================================================================== */
.hero { min-height: max(660px, 100svh); padding-bottom: 28px; background: none; }
.hero__inner::before { background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(11, 8, 5, .5), transparent 72%); }
.hero__cta .btn { min-height: 52px; }
.world-line {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem .9rem; margin-top: 1.2rem; padding: .5rem 1.2rem;
  font: 500 1rem/1.6 var(--font-ui); color: var(--ink); background: rgba(8, 6, 4, .45); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--edge);
  animation: rise .9s 1.1s cubic-bezier(.2, .8, .2, 1) both;
}
.world-line b { font-variant-numeric: tabular-nums; color: var(--accent-w); }
.world-line i { width: 1px; height: 1em; background: var(--edge); }
.world-line .wl-event { color: var(--heat-c); font-weight: 700; }
.dot { }

.desk { position: relative; padding-block: clamp(28px, 4vw, 56px); background: none; }
.desk__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 1.8vw, 24px); align-items: stretch; }
.w-12 { grid-column: span 12; } .w-8 { grid-column: span 8; } .w-7 { grid-column: span 7; } .w-6 { grid-column: span 6; } .w-5 { grid-column: span 5; } .w-4 { grid-column: span 4; }
@media (max-width: 980px) { .w-8, .w-7, .w-6, .w-5, .w-4 { grid-column: span 12; } }
.story { background: none; }

/* المميزات */
.skills { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: stretch; }
.win__body:has(> .skills) { display: grid; }
.skills__grid { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; align-content: start; }
.skill { position: relative; width: 76px; height: 76px; display: grid; place-items: center; padding: 0; border: 0; color: var(--accent-w); background: rgba(0, 0, 0, .35); border-radius: 18px 5px 18px 5px; box-shadow: inset 0 0 0 1px var(--edge), inset 0 8px 14px rgba(0, 0, 0, .4); transition: color .15s, box-shadow .15s; }
.skill .ic { width: 34px; height: 34px; stroke-width: 1.4; }
.skill kbd { position: absolute; inset-inline-end: 6px; bottom: 3px; font: 700 .72rem var(--font-ui); color: var(--ink-mute); }
.skill:hover { color: #fff; }
.skill[aria-selected="true"] { color: #fff; box-shadow: inset 0 0 0 2px var(--accent-w), 0 0 22px color-mix(in srgb, var(--accent-w) 40%, transparent); }
.skills__tip { position: relative; display: grid; align-content: center; gap: .5rem; min-height: 190px; padding: 1.1rem 1.3rem; background: rgba(0, 0, 0, .3); border-radius: 18px 5px 18px 5px; box-shadow: inset 0 0 0 1px var(--edge); overflow: clip; }
.skills__row { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 1.8rem); }
.rune--xl { width: 92px; height: 92px; border-start-start-radius: 26px; border-end-end-radius: 26px; }
.rune--xl .ic { width: 44px; height: 44px; stroke-width: 1.3; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent-w) 60%, transparent)); }
.skills__tip h3 { font: 700 clamp(1.6rem, 2.6vw, 2.2rem)/1.3 var(--font-display); color: var(--ink); }
.skills__tip p { color: var(--ink-mute); max-width: 52ch; }
.skills__cast { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, .4); overflow: hidden; display: none; }
.skills__cast::after { content: ""; position: absolute; inset: 0; background: var(--accent-w); transform-origin: right; animation: cast 5.2s linear both; }
html[dir="ltr"] .skills__cast::after { transform-origin: left; }
.skills__tip.is-auto .skills__cast { display: block; }
@keyframes cast { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.skills__tip.is-swap h3, .skills__tip.is-swap p { animation: rise .35s ease-out both; }
@media (max-width: 640px) { .skills { grid-template-columns: 1fr; } .skills__grid { grid-template-columns: repeat(6, 1fr); } .skill { width: 100%; height: auto; aspect-ratio: 1; } .skill .ic { width: 26px; height: 26px; } .skill kbd { display: none; } .skills__row { flex-direction: column; text-align: center; } }

/* الأحداث */
.quests { display: flex; flex-direction: column; height: 100%; }
.quests .ev-main { flex: none; border-bottom: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(180deg, color-mix(in srgb, var(--heat-c) calc(var(--w-heat) * 22%), transparent), transparent); }
.quests .ev-list { flex: 1; }
.ev-state { font-size: .88rem; color: #8ff07a; } .ev-state--live { color: var(--heat-c); }
.ev-main__name { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ev-main__desc { font-size: .98rem; }
.cd__n { font-size: clamp(1.6rem, 3vw, 2.2rem); } .cd__seg { min-width: 4rem; }

/* معلومات السيرفر */
.kv--sheet th, .kv--sheet td { padding: .62rem 1.2rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.kv--sheet tr:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.kv--sheet td { text-align: end; color: var(--ink); } .kv--sheet th { color: var(--ink-mute); }

/* الترتيب */
.legend--foot { margin: 0; padding: .7rem 1.1rem; gap: .5rem 1.4rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .9rem; }

/* الأخبار: لوحة مدمجة */
.desk .news-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 10px; }
.desk .news-card, .desk .news-card--lead { flex-direction: row; align-items: stretch; grid-row: auto; }
.desk .news-card__cover, .desk .news-card--lead .news-card__cover { flex: none; width: clamp(150px, 22vw, 260px); min-height: 0; aspect-ratio: 16 / 9; background-size: 300%; }
.desk .news-card__cover::after { background: linear-gradient(to left, rgba(0, 0, 0, .5), transparent 55%); }
html[dir="ltr"] .desk .news-card__cover::after { background: linear-gradient(to right, rgba(0, 0, 0, .5), transparent 55%); }
.desk .news-card__body { justify-content: center; padding: .8rem 1.2rem; }
.desk .news-card__title, .desk .news-card--lead .news-card__title { font: 700 1.2rem/1.5 var(--font-ui); }
.desk .news-card--lead .news-card__title { font-size: 1.3rem; }
@media (max-width: 640px) { .desk .news-card, .desk .news-card--lead { flex-direction: column; } .desk .news-card__cover { width: 100%; } }

/* المهمة */
.quest-card { display: grid; grid-template-columns: 1fr auto; gap: clamp(1.25rem, 3vw, 3rem); align-items: center; }
.quest-card__t { font: 700 clamp(1.7rem, 3vw, 2.4rem)/1.3 var(--font-display); color: var(--ink); margin-bottom: .8rem; }
.objs { display: grid; gap: .55rem; margin: 0 0 1.2rem; }
.obj { display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem; background: rgba(0, 0, 0, .3); border-radius: 14px 4px 14px 4px; box-shadow: inset 0 0 0 1px var(--edge); }
.obj__box { flex: none; width: 24px; height: 24px; display: grid; place-items: center; background: rgba(0, 0, 0, .45); border-radius: 7px; box-shadow: inset 0 0 0 1px var(--edge); color: #0d2a14; }
.obj__box .ic { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.obj.is-done .obj__box { background: #7fe0a6; box-shadow: none; } .obj.is-done .obj__box .ic { opacity: 1; }
.obj.is-done .obj__name { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: rgba(207, 193, 161, .6); }
.obj__name { flex: 1; font-weight: 600; } .obj__name small { display: block; font-weight: 400; font-size: .86rem; color: var(--ink-mute); }
.obj .btn { margin-inline-start: auto; }
.quest-card__reward { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; background: color-mix(in srgb, var(--accent-w) 12%, transparent); border-radius: 14px 4px 14px 4px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-w) 50%, transparent); font-size: .95rem; }
.quest-card__reward .ic { color: var(--accent-w); width: 1.6rem; height: 1.6rem; }
.quest-card__emblem { width: clamp(150px, 20vw, 250px); aspect-ratio: 1; filter: drop-shadow(0 0 24px color-mix(in srgb, var(--accent-w) 45%, transparent)); }
@media (max-width: 760px) { .quest-card { grid-template-columns: 1fr; } .quest-card__emblem { order: -1; margin-inline: auto; width: 120px; } .obj { flex-wrap: wrap; } .obj .btn { margin-inline-start: 0; } }
.cta-win__body { display: grid; align-content: center; gap: 1.1rem; }
.cta-win__body .cta__text { margin: 0; color: var(--ink-mute); }

/* النبض: قائمة + ملاحظة طافية */
.pulse-list { display: grid; }
.pulse-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .7rem 1.2rem; border-bottom: 1px solid rgba(255, 255, 255, .07); animation: rise .5s both; }
.pulse-item:last-child { border: 0; }
.pulse-item__dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--k, var(--accent-w)); box-shadow: 0 0 12px var(--k, var(--accent-w)); }
.pulse-item--boss { --k: #5af0a0; } .pulse-item--level { --k: #ffd664; } .pulse-item--guild { --k: #78beff; } .pulse-item--war { --k: #ff5032; }
.pulse-item time { color: var(--ink-mute); font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pulse-empty { padding: 1.4rem; color: var(--ink-mute); text-align: center; }
.pulse-note {
  position: fixed; z-index: 95; inset-inline-start: 16px; bottom: 16px; max-width: min(420px, calc(100% - 32px)); padding: .6rem 1rem; display: flex; align-items: center; gap: .7rem;
  background: var(--glass-solid); border-radius: 14px 4px 14px 4px; box-shadow: inset 0 0 0 1px var(--edge), 0 12px 30px rgba(0, 0, 0, .5); font-size: .94rem; line-height: 1.6;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .35s, transform .35s;
}
.pulse-note.is-show { opacity: 1; transform: none; }
.pulse-note::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: var(--k, var(--accent-w)); box-shadow: 0 0 12px var(--k, var(--accent-w)); }
.pulse-note[data-kind="boss"] { --k: #5af0a0; } .pulse-note[data-kind="level"] { --k: #ffd664; } .pulse-note[data-kind="guild"] { --k: #78beff; } .pulse-note[data-kind="war"] { --k: #ff5032; }

/* ---------- تذييل / فوق المحتوى ---------- */
.site-footer { background: linear-gradient(to bottom, rgba(8, 6, 4, 0), rgba(8, 6, 4, .88) 120px); margin-top: clamp(32px, 5vw, 64px); }
.site-footer::before { background: linear-gradient(to left, transparent, var(--edge) 20%, var(--edge) 80%, transparent); }
.f-col h3 { font: 700 .95rem var(--font-ui); color: var(--accent-w); padding-bottom: .5rem; margin-bottom: .6rem; border-bottom: 1px solid var(--edge); }
.f-col a { font-size: .95rem; color: var(--ink-mute); } .f-col a:hover { color: var(--ink); }
.toast { background: var(--glass-solid); border: 0; box-shadow: inset 0 0 0 1px var(--edge), 0 10px 40px rgba(0, 0, 0, .6); border-radius: 14px 4px 14px 4px; bottom: 24px; }
.ambient { border: 0; box-shadow: inset 0 0 0 1px var(--edge); bottom: 16px; }
.demo-badge { inset-inline: 0; top: var(--header-h); bottom: auto; text-align: center; padding: 0 .75rem; font-size: .72rem; line-height: 1.7; background: rgba(125, 22, 14, .94); border: 0; }

/* ---------- حركة أقل ---------- */
@media (prefers-reduced-motion: reduce) {
  :root[data-event]:not([data-event=""]) .heat-frame { animation: none; }
  .site-nav a, .scene__fol, .scene__fog { animation: none !important; }
}

@media (max-width: 640px) { .desk .news-card__cover::after { background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 60%); } }

/* نبض الحدث: عنصران فقط يتحركان بالشفافية (لا إعادة حساب أنماط للصفحة كلها) */
:root[data-event]:not([data-event=""]) .scene__heat { opacity: .6; }
/* إطار الحدث: تدرّج ثابت على الحواف (القياس: النبض بملء الشاشة أو ظل داخلي كبير يخفّضان التمرير من 80 إلى 30 إطارًا) */
.heat-frame { position: fixed; inset: 0; z-index: 94; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 55%, color-mix(in srgb, var(--heat-c) calc(var(--w-heat) * 70%), transparent) 100%); }
:root[data-event]:not([data-event=""]) .heat-frame { opacity: .85; }
/* النبض على عناصر صغيرة فقط (شفافية، رخيصة): نص الحدث في سطر العالم */
:root[data-event]:not([data-event=""]) .world-line .wl-event { animation: wl-beat var(--w-beat) ease-in-out infinite; }
@keyframes wl-beat { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
html[data-calm="1"] .heat-frame, html[data-calm="1"] .scene__heat { animation: none; opacity: 0; }
/* جوال: بلا مزج ألوان على كامل الشاشة */
@media (max-width: 820px) {
  .scene__sun, .scene__heat { mix-blend-mode: normal; }
  .scene__sun { opacity: calc(var(--so, .6) * .55); }
  .scene__fol { filter: none; opacity: .7; }
}

/* الشاشات المتوسطة: الفوانيس أعرض من الروابط القديمة، فنضغطها ونكتفي بالشعار الدائري */
@media (min-width: 1241px) and (max-width: 1420px) {
  .brand__word { display: none; }
  .site-nav { gap: 4px; }
  .site-nav a { padding-inline: .72rem; font-size: .92rem; }
  html[dir="ltr"] .site-nav a { padding-inline: .55rem; font-size: .86rem; }
  .site-header__in { gap: .8rem; }
}


/* ==========================================================================
   اختر طريقك: الفئات الأربع + الممالك الثلاث (فكرة من محرك «Three Kingdoms» بألوان المناخ)
   ========================================================================== */
.class-discovery { position: relative; padding: clamp(36px, 5vw, 64px) 0; }
.section-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(18px, 2.6vw, 28px); }
.section-kicker { display: inline-block; margin-bottom: .3rem; font: 600 .86rem var(--font-ui); color: var(--accent-w); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.section-heading h2 { font: 700 clamp(1.8rem, 3vw, 2.4rem)/1.35 var(--font-display); color: var(--ink); text-shadow: 0 2px 16px rgba(0, 0, 0, .8); }
.section-heading p { margin-top: .35rem; color: var(--ink-mute); max-width: 54ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.kingdom-heading { margin-top: clamp(36px, 5vw, 56px); }

.class-stage {
  display: grid; grid-template-columns: 1fr 1.05fr; overflow: clip;
  border-start-start-radius: var(--leaf-r); border-end-end-radius: var(--leaf-r); border-start-end-radius: 6px; border-end-start-radius: 6px;
  background: linear-gradient(var(--sheen-angle), var(--sheen), transparent 42%), var(--glass);
  box-shadow: inset var(--lx) var(--ly) 0 0 var(--edge), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 44px rgba(0, 0, 0, .38);
}
.class-stage__content { grid-column: 1; grid-row: 1; padding: clamp(1.2rem, 3vw, 2.2rem); }
.class-stage__visual {
  position: relative; grid-column: 2; grid-row: 1; min-height: 440px;
  background: url("../img/lost-classes.webp") var(--class-pos, 0%) center / 400% 100% no-repeat; transition: background-position .5s cubic-bezier(.2, .8, .2, 1);
}
.class-stage__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--glass-solid) 0%, transparent 38%), linear-gradient(90deg, transparent 60%, color-mix(in srgb, var(--glass-solid) 55%, transparent)); }
html[dir="ltr"] .class-stage__visual::after { background: linear-gradient(0deg, var(--glass-solid) 0%, transparent 38%), linear-gradient(270deg, transparent 60%, color-mix(in srgb, var(--glass-solid) 55%, transparent)); }
.class-art-label { position: absolute; z-index: 1; bottom: 18px; inset-inline-start: 22px; color: var(--ink); font: .74rem 'Cinzel', serif; letter-spacing: .2em; opacity: .85; }
.class-stage__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 1.6rem; }
.class-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 72px; padding: .7rem .4rem; border: 0;
  color: var(--ink-mute); font-size: .86rem; background: rgba(0, 0, 0, .3); border-radius: 14px 4px 14px 4px; box-shadow: inset 0 0 0 1px var(--edge); transition: color .15s, box-shadow .15s, background .15s;
}
.class-choice .ic { width: 24px; height: 24px; }
.class-choice:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.class-choice[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent-w); background: color-mix(in srgb, var(--accent-w) 14%, rgba(0, 0, 0, .3)); }
.class-detail h3 { font: 700 clamp(1.9rem, 3vw, 2.4rem)/1.35 var(--font-display); color: var(--ink); }
.class-detail p { margin-block: .8rem 1.1rem; max-width: 48ch; color: var(--ink-mute); font-size: .98rem; }
.class-detail .class-view__branches { margin-bottom: .8rem; }
.class-detail .chip { border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 99px; color: var(--ink); font-size: .82rem; }
.class-role { display: flex; align-items: center; gap: .6rem; color: var(--ink-mute); font-size: .82rem; }
.class-role strong { color: var(--accent-w); font-weight: 600; }
.class-detail .bars { margin: 1.4rem 0 1.5rem; }
.bar__track i { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-w) 55%, #000), var(--accent-w)); }
html[dir="ltr"] .bar__track i { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-w) 55%, #000), var(--accent-w)); }
.class-detail.is-changing { animation: rise .25s ease both; }
@media (max-width: 980px) {
  .class-stage { grid-template-columns: 1fr; }
  .class-stage__visual { grid-column: 1; grid-row: 1; min-height: 260px; }
  .class-stage__content { grid-column: 1; grid-row: 2; }
}
@media (max-width: 520px) { .class-stage__tabs { gap: 5px; } .class-choice { font-size: .78rem; padding-inline: .2rem; } }

.kingdom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.kingdom-card {
  --realm: #ff8a6e; position: relative; padding: 1.5rem 1.4rem; overflow: clip; border-radius: 18px 5px 18px 5px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--realm) 14%, var(--glass-solid)), var(--glass-solid) 70%);
  box-shadow: inset 0 2px 0 var(--realm), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 30px rgba(0, 0, 0, .3);
}
.kingdom-card[data-realm="shinsoo"] { --realm: #ff8a6e; } .kingdom-card[data-realm="chunjo"] { --realm: #f2c14e; } .kingdom-card[data-realm="jinno"] { --realm: #78b0ff; }
.kingdom-card__seal { display: grid; place-items: center; width: 50px; height: 58px; margin-bottom: 1rem; color: var(--realm); background: color-mix(in srgb, var(--realm) 16%, transparent); clip-path: polygon(50% 0, 100% 20%, 100% 70%, 50% 100%, 0 70%, 0 20%); }
.kingdom-card__seal .ic { width: 26px; height: 26px; }
.kingdom-card h3 { font: 700 1.3rem/1.4 var(--font-ui); color: var(--ink); }
.kingdom-card p { margin-top: .4rem; font-size: .92rem; color: var(--ink-mute); }
@media (max-width: 760px) { .kingdom-grid { grid-template-columns: 1fr; } }

/* ---------- إضافات صغيرة أُخذت من المحرك الآخر وتخدم الصفحات ---------- */
.class-view__glyph { background: url("../img/lost-classes.webp") var(--class-pos, 0%) center / 400% 100% no-repeat; min-height: 300px; aspect-ratio: auto; border-radius: 18px 5px 18px 5px; box-shadow: inset 0 0 0 1px var(--edge); }
.class-view__glyph .ic { display: none; }
.class-view__glyph[data-class="ninja"] { --class-pos: 33.3333%; } .class-view__glyph[data-class="sura"] { --class-pos: 66.6667%; } .class-view__glyph[data-class="shaman"] { --class-pos: 100%; }
.class-view { grid-template-columns: 240px 1fr; }
@media (max-width: 700px) { .class-view { grid-template-columns: 1fr; } .class-view__glyph { min-height: 220px; max-width: none; } }
.journey-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 1.6rem; counter-reset: journey; }
.journey-step { counter-increment: journey; display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: rgba(0, 0, 0, .3); border-radius: 14px 4px 14px 4px; box-shadow: inset 0 0 0 1px var(--edge); }
.journey-step::before { content: "0" counter(journey); font: 700 1.4rem 'Cinzel', serif; color: var(--accent-w); }
.journey-step strong { font-size: .95rem; } .journey-step span { display: block; font-size: .8rem; color: var(--ink-mute); }
@media (max-width: 760px) { .journey-steps { grid-template-columns: 1fr; } }
.download-extras summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ink-mute); font-size: .88rem; cursor: pointer; }
.download-extras > div { padding-top: .8rem; }
.table-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.table-scroll .dt th { position: static; }
.form-intro { margin-bottom: .3rem; color: var(--ink-mute); font-size: .94rem; }
.mobile-calm { display: none; }
@media (max-width: 1240px) { .mobile-calm { display: inline-flex; margin-top: .9rem; width: 100%; } }
