/* =====================================================================
   K697 — ثيم v9 «مقر النخبة» (حصري)
   فخامة زجاجية ذهبية ليلية: عظم العضامة بانتظار الأنظمة الحساسة.
   مفاتيح شكلية: تكرار --accent و--duration على توكنز الهاب الموحّدة.
   ===================================================================== */
:root {
  --void: #07060b;
  --hud: #e8c777;
  --hud-dim: rgba(232, 199, 119, 0.5);
  --hud-glow: rgba(232, 199, 119, 0.22);
  --panel: rgba(24, 21, 32, 0.72);
  --text: #ece2d0;
  --text-dim: rgba(196, 181, 156, 0.62);
  --accent-canteen: #e8b45a;
  --accent-mess: #7fd8b2;
  --accent-battalion: #9db8c9;
  --font-brand: "Orbitron", "Tajawal", sans-serif;
  --font-body: "Tajawal", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--void);
  font-synthesis: none;
}

/* الخلفية: مرس زهّر ليلي داكن + شعاع ذهبي متسلق */
.stage__wash {
  background:
    radial-gradient(ellipse 60% 40% at 50% -8%, rgba(232, 199, 119, 0.13), transparent 60%),
    radial-gradient(ellipse 90% 60% at 90% 110%, rgba(122, 66, 158, 0.12), transparent 60%),
    linear-gradient(180deg, #08070c 0%, #13101c 48%, #09070e 100%);
}

.stage__grid {
  background-image:
    linear-gradient(rgba(232, 199, 119, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 199, 119, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 72% 62% at 50% 42%, #000 8%, transparent 78%);
}

.stage__beam { display: none; }

/* حلقة زخرفية: مقر افتتاحية */
.stage::after {
  content: "";
  position: absolute;
  top: 4%;
  right: 50%;
  transform: translateX(50%);
  width: min(40vw, 300px);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hud) 30%, var(--hud) 70%, transparent);
  opacity: 0.32;
  pointer-events: none;
}

.gate { gap: clamp(2rem, 4vw, 3rem); max-width: 1080px; }

/* الاسم: بار حروف ذهبية متدرّجة */
.mark__brand {
  font-size: clamp(3rem, 12.5vw, 6.4rem);
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #f4e0ad 0%, var(--hud) 45%, #a97d2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px var(--hud-glow));
  animation: none;
}
.mark__k, .mark__num { -webkit-text-fill-color: transparent; }

.mark__line {
  font-size: 0.74rem;
  letter-spacing: 0.42em;
  color: var(--hud-dim);
}
.mark__line::before, .mark__line::after {
  content: "✦";
  font-size: 0.6em;
  margin-inline: 0.7em;
  color: var(--hud);
  vertical-align: middle;
}
.mark__line::after { content: "✦"; }

.mark__status {
  margin-top: 0.85rem;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  color: rgba(232, 199, 119, 0.4);
}

/* كروت البوابات: لوحة مرآة زجاجية ذهبية */
.portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1020px;
  width: 100%;
  background: none;
  border: none;
  position: relative;
}
.portals::before {
  content: "ROYAL.SUITE // K697";
  position: absolute;
  top: -1.7rem;
  inset-inline-end: 0;
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: rgba(232, 199, 119, 0.35);
}

.portal {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.4rem) 1.2rem;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(232, 199, 119, 0.16);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(38, 32, 48, 0.68) 0%, rgba(16, 14, 22, 0.85) 100%);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 14px 44px -18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(232, 199, 119, 0.08);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

/* تاج نقطة ذهبية أعلى كل بطاقة بدل شريط التمييز الفلقي */
.portal__accent {
  inset-inline: auto;
  top: 10px;
  right: 50%;
  transform: translateX(50%);
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.85;
}

/* زخرفة أركان: زوايا قص ذهبية دقيقة */
.portal::before, .portal::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  border-style: solid;
  opacity: 0.55;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}
.portal::before { top: 9px; right: 9px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.portal::after  { bottom: 9px; left: 9px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }

.portal:hover, .portal:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:
    0 22px 54px -18px color-mix(in srgb, var(--accent) 30%, rgba(0, 0, 0, 0.6)),
    inset 0 1px 0 rgba(232, 199, 119, 0.14);
  z-index: 2;
}
.portal:hover::before, .portal:hover::after,
.portal:focus-visible::before, .portal:focus-visible::after {
  opacity: 1;
  width: 30px;
  height: 30px;
}

.portal__accent + .portal__glyph { margin-top: 4px; }

.portal__glyph {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
    rgba(9, 8, 14, 0.6);
  position: relative;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.portal__glyph::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 26%, transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.portal:hover .portal__glyph, .portal:focus-visible .portal__glyph {
  transform: translateY(-2px);
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 28%, transparent);
}
.portal:hover .portal__glyph::before { opacity: 1; transform: scale(1.04); }

.portal__glyph svg { width: 31px; height: 31px; stroke: var(--accent); }

.portal__name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text);
  transition: color 0.3s var(--ease);
}
.portal:hover .portal__name, .portal:focus-visible .portal__name { color: var(--accent); }

.portal__meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.portal__go { opacity: 0.4; transition: transform 0.35s var(--ease), opacity 0.3s var(--ease); }
.portal:hover .portal__go, .portal:focus-visible .portal__go { transform: translateX(-5px); opacity: 1; }

/* كرتون IPW: زجاج ذهبي أنيق */
.k697-install-card {
  border: 1px solid rgba(232, 199, 119, 0.18) !important;
  background: linear-gradient(160deg, rgba(38, 32, 48, 0.65), rgba(14, 12, 20, 0.85)) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(14px);
}

.colophon {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  color: rgba(232, 199, 119, 0.28);
}

@media (max-width: 720px) {
  .portals { grid-template-columns: 1fr; gap: 10px; }
  .portal {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    padding: 15px 17px;
    gap: 14px;
  }
  .portal__accent {
    inset-inline-start: 11px;
    top: 12px;
    right: auto;
    transform: none;
    width: 2px;
    height: calc(100% - 24px);
    background: linear-gradient(180deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  }
  .portal__glyph { width: 47px; height: 47px; }
  .portal__glyph::before { inset: -4px; border-radius: 11px; }
  .portal__copy { align-items: flex-start; text-align: start; }
  .portal__go { opacity: 0.5; }
  .stage::after { width: min(56vw, 240px); }
}
