/* aow-hub.com: "AoW Hub is now 9Yin Manual".
   The look follows the 9Yin Manual sealed gate (dark ground, gold, Cinzel, the crest).
   Strict CSP (style-src 'self', font-src 'self', img-src 'self'): no data: URIs, no inline styles,
   every font a self-hosted subset under ../fonts (see tools/build-site.py in the owner kit).
   Motion lives only inside prefers-reduced-motion: no-preference. */

@font-face { font-family: "MV Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/cinzel.v1.woff2") format("woff2"); }
@font-face { font-family: "MV Serif"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/noto-serif.v1.woff2") format("woff2"); }
@font-face { font-family: "MV Arabic"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("../fonts/cairo-arabic.v1.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "MV Arabic Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/amiri-700-arabic.v1.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "MV Han"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/noto-serif-tc-400.v1.woff2") format("woff2"); unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: "MV Han"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/noto-serif-tc-700.v1.woff2") format("woff2"); unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }

:root {
  color-scheme: dark;
  --mv-ink-950: #05070b;
  --mv-ink-900: #090c12;
  --mv-gold-hi: #fff3cf;
  --mv-gold: #e5c96b;
  --mv-gold-mid: #c9a84c;
  --mv-gold-lo: #8d6418;
  --mv-gold-line: rgba(229, 201, 107, 0.45);
  --mv-gold-faint: rgba(229, 201, 107, 0.18);
  --mv-cinnabar: #c03a30;
  --mv-text: #f1eadc;
  --mv-text-soft: #d6cebf;
  --mv-muted: #ada594;
  --mv-f-head: "MV Cinzel", "Cinzel", Georgia, "Times New Roman", serif;
  --mv-f-body: "MV Serif", "Noto Serif", Georgia, "Times New Roman", serif;
  /* system CJK serifs after the subset, so a character outside it still never shows as a box */
  --mv-f-han: "MV Han", "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Microsoft JhengHei", serif;
  --mv-f-zh: "MV Serif", var(--mv-f-han);
  --mv-f-zh-head: "MV Cinzel", var(--mv-f-han);
  --mv-f-ar: "MV Arabic", "MV Serif", Tahoma, "Segoe UI", sans-serif;
  --mv-f-ar-display: "MV Arabic Display", "MV Arabic", "MV Cinzel", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.mv {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--mv-ink-950);
  color: var(--mv-text);
  font-family: var(--mv-f-body);
  line-height: 1.6;
}
.mv :where(p, h1, ul) { margin: 0; }
.mv a:focus-visible, .mv button:focus-visible {
  outline: 2px solid var(--mv-gold-hi);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- the old AoW Hub art, kept quiet behind the card ---------- */
.mv-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--mv-ink-950);
  background-image: url("../images/bg-960.v1.webp");
  background-size: cover;
  background-position: 46% 20%;
}
@media (min-width: 700px) {
  .mv-bg { background-image: url("../images/bg-1920.v1.webp"); background-position: 50% 24%; }
}
.mv-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 52%, rgba(3, 5, 8, 0.72), transparent 80%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.55) 0%, rgba(7, 10, 16, 0.35) 40%, rgba(4, 6, 10, 0.9) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 50%, rgba(2, 4, 7, 0.85) 100%);
}

/* ---------- layout ---------- */
.mv-main {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(3.4rem, 9vh, 5.5rem) 16px 2rem;
}
.mv-card {
  position: relative;
  width: min(100%, 38rem);
  padding: clamp(4.1rem, 10vw, 4.9rem) clamp(1.1rem, 5vw, 2.8rem) clamp(1.5rem, 4vw, 2.2rem);
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(229, 201, 107, 0.09), transparent 62%),
    linear-gradient(180deg, rgba(29, 23, 18, 0.94), rgba(12, 10, 9, 0.95));
  border: 1px solid rgba(229, 201, 107, 0.7);
  box-shadow:
    0 0 0 4px #0d0a08,
    0 0 0 5px rgba(229, 201, 107, 0.35),
    0 28px 60px -18px rgba(0, 0, 0, 0.95);
}
.mv-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(229, 201, 107, 0.2);
  pointer-events: none;
}

/* ---------- the crest on the card's brow, ringed by the countdown ---------- */
.mv-crest {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: clamp(5.4rem, 22vw, 6.6rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 18px rgba(229, 201, 107, 0.16));
}
.mv-crest img {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
}
.mv-ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.mv-ring__track { fill: #0d0a08; stroke: rgba(229, 201, 107, 0.28); stroke-width: 3; }
.mv-ring__arc {
  fill: none;
  stroke: var(--mv-gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 0;
  opacity: 0;
}
/* the sweep: stepped by default (reduced motion), one second at a time */
.mv-js .mv-ring__arc { opacity: 1; }
.mv-crest[data-left="4"] .mv-ring__arc { stroke-dashoffset: 20; }
.mv-crest[data-left="3"] .mv-ring__arc { stroke-dashoffset: 40; }
.mv-crest[data-left="2"] .mv-ring__arc { stroke-dashoffset: 60; }
.mv-crest[data-left="1"] .mv-ring__arc { stroke-dashoffset: 80; }
.mv-crest[data-left="0"] .mv-ring__arc { stroke-dashoffset: 100; opacity: 0; }
.mv-crest[data-left="stopped"] .mv-ring__arc { opacity: 0; }
[dir="rtl"] .mv-ring { scale: -1 1; rotate: 90deg; }
@keyframes mv-sweep { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 100; } }
@keyframes mv-rise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .mv-run .mv-ring__arc { animation: mv-sweep 5s linear forwards; }
  .mv-card { animation: mv-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}

/* ---------- the language switch ---------- */
.mv-langs { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.mv-langs ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.2rem;
  list-style: none;
  border: 1px solid var(--mv-gold-faint);
  border-radius: 999px;
  background: rgba(5, 7, 11, 0.62);
}
.mv-langs a {
  display: block;
  min-height: 2rem;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  color: var(--mv-text-soft);
  font-family: var(--mv-f-body);
  font-size: 0.82rem;
  line-height: 1.45rem;
  text-decoration: none;
}
.mv-langs a:lang(ar) { font-family: var(--mv-f-ar); font-size: 0.9rem; }
.mv-langs a:lang(zh-TW) { font-family: var(--mv-f-zh); }
.mv-langs a:hover { color: var(--mv-gold-hi); }
.mv-langs a[aria-current] { background: linear-gradient(180deg, #f0d47d, var(--mv-gold-mid)); color: #1b1408; font-weight: 700; }

/* ---------- the message, one section per language ---------- */
/* with JavaScript only the chosen language shows; without it all three stand, English first */
.mv-js[data-lang="en"] .mv-msg:not([data-lang="en"]),
.mv-js[data-lang="ar"] .mv-msg:not([data-lang="ar"]),
.mv-js[data-lang="zh-TW"] .mv-msg:not([data-lang="zh-TW"]) { display: none; }
.mv-msg { display: grid; justify-items: center; }
.mv-msg + .mv-msg {
  margin-top: 1.9rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--mv-gold-faint);
}
.mv-js .mv-msg + .mv-msg { margin-top: 0; padding-top: 0; border-top: 0; }
/* a brand or address never breaks inside itself */
.mv-msg bdi { white-space: nowrap; }
.mv-msg:lang(ar) { font-family: var(--mv-f-ar); }
.mv-msg:lang(zh-TW) { font-family: var(--mv-f-zh); }

.mv-kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mv-f-head);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mv-gold);
}
.mv-kicker::before, .mv-kicker::after {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mv-gold-line));
}
.mv-kicker::after { transform: scaleX(-1); }
.mv-kicker:lang(ar) { font-family: var(--mv-f-ar); font-weight: 700; font-size: 0.95rem; letter-spacing: 0; }
.mv-kicker:lang(zh-TW) { font-family: var(--mv-f-han); font-weight: 700; font-size: 0.88rem; letter-spacing: 0.5em; text-indent: 0.5em; }

.mv-title {
  margin-top: 0.75rem;
  font-family: var(--mv-f-head);
  font-weight: 600;
  font-size: clamp(1.55rem, 6.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: 0.05em;
  text-wrap: balance;
  background: linear-gradient(180deg, #fffaf0 0%, #f1e3bd 52%, #cfae5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(229, 201, 107, 0.14));
}
.mv-name, .mv-keep { white-space: nowrap; }
.mv-title:lang(ar) { font-family: var(--mv-f-ar-display); font-weight: 700; letter-spacing: 0; line-height: 1.45; font-size: clamp(1.75rem, 7vw, 2.7rem); }
.mv-title:lang(ar) .mv-name { font-family: var(--mv-f-head); font-weight: 600; letter-spacing: 0.04em; font-size: 0.84em; }
.mv-title:lang(zh-TW) { font-family: var(--mv-f-zh-head); font-weight: 700; letter-spacing: 0.08em; line-height: 1.35; font-size: clamp(1.6rem, 6.4vw, 2.5rem); word-break: keep-all; }
.mv-title:lang(zh-TW) .mv-name { font-weight: 600; letter-spacing: 0.04em; }

.mv-lede {
  max-width: 30rem;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--mv-text-soft);
  text-wrap: pretty;
}
.mv-lede:lang(ar) { font-size: 1.08rem; line-height: 1.95; }
.mv-lede:lang(zh-TW) { font-size: 1.02rem; line-height: 1.95; letter-spacing: 0.02em; word-break: keep-all; overflow-wrap: anywhere; }
.mv-domain { color: var(--mv-gold-hi); white-space: nowrap; }

.mv-count, .mv-note, .mv-status {
  max-width: 30rem;
  margin-top: 1.15rem;
  font-size: 0.95rem;
  color: var(--mv-text);
}
.mv-status:empty { display: none; }
.mv-status { color: var(--mv-gold-hi); }
.mv-n {
  display: inline-block;
  min-width: 0.75em;
  text-align: center;
  font-family: var(--mv-f-head);
  font-weight: 700;
  font-size: 1.18em;
  color: var(--mv-gold);
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- the two controls ---------- */
.mv-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.mv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.6rem;
  border: 1px solid #f6df95;
  border-radius: 2px;
  background: linear-gradient(180deg, #f6df95, var(--mv-gold) 45%, #b8913a);
  color: #1b1408;
  font: inherit;
  font-family: var(--mv-f-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 12px 26px -12px rgba(229, 201, 107, 0.6);
}
.mv-btn:hover { background: linear-gradient(180deg, #fbe9b0, #edd585 45%, #c49d44); }
.mv-btn:lang(ar) { font-family: var(--mv-f-ar); font-size: 1rem; letter-spacing: 0; text-transform: none; }
.mv-btn:lang(zh-TW) { font-family: var(--mv-f-han); font-size: 0.95rem; letter-spacing: 0.12em; text-transform: none; }
.mv-btn--ghost {
  background: rgba(5, 7, 11, 0.6);
  color: var(--mv-gold-hi);
  border-color: var(--mv-gold-line);
  box-shadow: none;
}
.mv-btn--ghost:hover { background: rgba(229, 201, 107, 0.12); }

/* ---------- old address to new ---------- */
.mv-dest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.6rem;
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--mv-gold-faint);
  font-family: var(--mv-f-body);
  font-size: 0.82rem;
  color: var(--mv-muted);
}
.mv-dest__from { text-decoration: line-through; text-decoration-color: rgba(173, 165, 148, 0.6); }
.mv-dest__arrow { width: 1.4rem; height: 0.7rem; fill: none; stroke: var(--mv-gold-mid); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mv-dest__to { color: var(--mv-gold); overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 380px) {
  .mv-btn { width: 100%; }
  .mv-kicker::before, .mv-kicker::after { width: 1rem; }
}
@media (forced-colors: active) {
  .mv-title { background: none; color: CanvasText; filter: none; }
}
