/* MYSTIC FOREST — site theme.
   Built from the game's own art: the server logo, Runes of Magic key art, the in-game brown panel
   button, the gold text button and the login loading bar (interface.fdb), and real item icons.
   Loaded last on every page; replaces the old layered landing themes. */

:root {
  --mf-bg: #0b0906;
  --mf-bg2: #13100b;
  --mf-panel: #17120c;
  --mf-panel2: #1f1810;
  --mf-line: #4a3a22;
  --mf-line2: #6b5532;
  --mf-gold: #d6b06a;
  --mf-gold2: #f1d79a;
  --mf-text: #efe5cf;
  --mf-muted: #a99a7c;
  --mf-green: #46c97c;
  --mf-red: #d7614f;
  --mf-head: "Marcellus", "Libre Baskerville", Georgia, serif;
  --mf-body: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
  --mf-nav-h: 74px;

  /* the shared variables the inner pages (style.css / page css) read */
  --bg-dark: var(--mf-bg);
  --bg-panel: rgba(23, 18, 12, .94);
  --bg-card: rgba(27, 21, 14, .92);
  --bg-card-hover: rgba(36, 28, 18, .96);
  --border: rgba(214, 176, 106, .24);
  --text: var(--mf-text);
  --text-muted: var(--mf-muted);
  --gold: var(--mf-gold);
  --gold-light: var(--mf-gold2);
  --accent: var(--mf-gold);
  --purple: #7a5d33;
  --purple-dark: #4d3a1f;
  --emerald: var(--mf-green);
  --cyan: var(--mf-gold2);
  --success: var(--mf-green);
  --danger: var(--mf-red);
  --font-display: var(--mf-head);
  --font-body: var(--mf-body);
}
html[dir="rtl"] {
  --mf-head: "Tajawal", "Marcellus", Tahoma, sans-serif;
  --mf-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

/* ------------------------------------------------------------------ base */
html { scroll-behavior: smooth; }
body.mystic-forest *, body.mystic-forest *::before, body.mystic-forest *::after { box-sizing: border-box; }
body.mystic-forest {
  margin: 0;
  background: var(--mf-bg) url("../img/mf/art/village.jpg") center top / cover fixed no-repeat;
  color: var(--mf-text);
  font-family: var(--mf-body);
  line-height: 1.6;
  cursor: auto !important;
}
body.mystic-forest::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; display: block;
  background: linear-gradient(180deg, rgba(11, 9, 6, .82), rgba(11, 9, 6, .94) 40%, rgba(11, 9, 6, .98));
}
body.mystic-forest.page-inner { padding-top: var(--mf-nav-h); background-color: var(--mf-bg); }
body.mystic-forest *, body.mystic-forest *::before, body.mystic-forest *::after { cursor: inherit; }
body.mystic-forest a, body.mystic-forest button, body.mystic-forest summary { cursor: pointer; }
.mw-cosmos, .mw-scroll-bar, .mx-lux, #mw-universe, .ml-intro, .mw-rail { display: none !important; }
a { color: var(--mf-gold2); }
img { max-width: 100%; }
::selection { background: rgba(214, 176, 106, .35); color: #fff; }

.mf-wrap { width: min(1200px, calc(100% - 2.5rem)); margin-inline: auto; }

/* ------------------------------------------------------------------ game buttons */
.mf-btn, .mw-btn {
  --b: url("../img/mf/ui/btn.png");
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 40px; padding: .5rem 1.35rem;
  border: 10px solid transparent; border-image: var(--b) 12 fill / 10px / 0 stretch;
  background: none; color: #ffd100; font: 700 .98rem/1 var(--mf-body); letter-spacing: .03em;
  text-decoration: none; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, .6);
  white-space: nowrap; transition: filter .15s ease, transform .1s ease;
}
.mf-btn:hover, .mw-btn:hover { color: #fff; filter: brightness(1.18) drop-shadow(0 0 6px rgba(255, 200, 80, .35)); }
.mf-btn:active, .mw-btn:active { --b: url("../img/mf/ui/btn_down.png"); transform: translateY(1px); }
.mf-btn img { width: 22px; height: 22px; border-radius: 3px; }
.mf-btn--play, .mw-btn--glow {
  --b: url("../img/mf/ui/play_hot.png");
  color: #1a0e02; font-weight: 800; text-shadow: 0 1px 0 rgba(255, 246, 214, .75);
}
.mf-btn--play:hover, .mw-btn--glow:hover { --b: url("../img/mf/ui/play_hot.png"); color: #000; filter: brightness(1.12) drop-shadow(0 0 10px rgba(255, 210, 90, .45)); }
.mf-btn--play:active, .mw-btn--glow:active { --b: url("../img/mf/ui/play_down.png"); }
.mf-btn--xl, .mw-btn--xl { min-height: 56px; padding: .7rem 2.4rem; font-size: 1.25rem; }
.mw-btn--ghost { --b: url("../img/mf/ui/btn.png"); }

/* ------------------------------------------------------------------ header */
.mw-chrome { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.mw-chrome__frame { display: none; }
.mw-nav {
  height: var(--mf-nav-h); display: flex; align-items: center; gap: 1.2rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, rgba(12, 10, 7, .96), rgba(12, 10, 7, .88));
  border-bottom: 1px solid var(--mf-line);
  box-shadow: 0 1px 0 rgba(241, 215, 154, .08), 0 10px 30px rgba(0, 0, 0, .45);
  transition: background .2s ease;
}
.mw-nav.is-scrolled { background: rgba(10, 8, 5, .98); }
.mw-brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.mw-brand img { height: 50px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .7)); }
.mw-nav__links { display: flex; align-items: center; gap: .15rem; flex: 1; min-width: 0; }
.mw-nav__item, .mw-drop__btn {
  display: flex; align-items: center; gap: .45rem; height: 44px; padding: 0 .75rem;
  color: var(--mf-text); text-decoration: none; font: 600 .95rem var(--mf-head); letter-spacing: .02em;
  border-radius: 4px; border: 1px solid transparent; white-space: nowrap;
}
.mw-nav__item:hover, .mw-drop__btn:hover, .mw-drop:hover .mw-drop__btn, .mw-drop.is-open .mw-drop__btn {
  color: #ffd100; background: rgba(214, 176, 106, .08); border-color: rgba(214, 176, 106, .22);
}
.mw-nav__item.active, .mw-nav__item.is-active, .mw-drop.is-active .mw-drop__btn { color: var(--mf-gold2); box-shadow: inset 0 -2px 0 var(--mf-gold); }
.mw-nav__ico img { width: 24px; height: 24px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.mw-drop { position: relative; }
.mw-drop__btn::after { content: ""; width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: .7; }
.mw-drop__menu {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 210px; padding: .4rem;
  background: rgba(15, 12, 8, .98); border: 1px solid var(--mf-line2); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8), 0 14px 34px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s ease; z-index: 60;
}
.mw-drop:hover .mw-drop__menu, .mw-drop.is-open .mw-drop__menu, .mw-drop:focus-within .mw-drop__menu { opacity: 1; visibility: visible; transform: none; }
.mw-drop__menu a { display: block; padding: .55rem .8rem; color: var(--mf-text); text-decoration: none; border-radius: 3px; font-size: .93rem; }
.mw-drop__menu a:hover { background: rgba(214, 176, 106, .12); color: #ffd100; }
.mw-nav__end { display: flex; align-items: center; gap: .6rem; flex: none; }
.mw-nav__actions { display: flex; align-items: center; gap: .5rem; }
.mw-nav__actions .mw-btn, .mw-nav__actions .mf-btn { min-height: 0; padding: .35rem 1rem; font-size: .9rem; border-width: 8px; border-image-width: 8px; }
.mw-nav__actions .mw-btn img { width: 18px; height: 18px; }
.mw-nav__user { display: inline-flex; align-items: center; gap: .4rem; }
.mw-nav__user-ico { display: none; }
.mw-nav__user img { width: 20px; height: 20px; border-radius: 3px; }

/* language switcher */
.mw-lang { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: .45rem; height: 38px; padding: 0 .65rem;
  background: rgba(214, 176, 106, .06); color: var(--mf-text); border: 1px solid var(--mf-line); border-radius: 4px; font: 600 .85rem var(--mf-body);
}
.lang-toggle:hover { border-color: var(--mf-gold); }
.lang-meta { display: flex; flex-direction: column; line-height: 1.05; text-align: start; }
.lang-code { font-weight: 700; color: var(--mf-gold2); font-size: .78rem; }
.lang-name { font-size: .7rem; color: var(--mf-muted); }
.lang-caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: var(--mf-muted); margin-top: 4px; }
.mw-flag { width: 20px; height: 14px; display: block; border-radius: 2px; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; width: 200px; padding: .35rem; z-index: 60;
  background: rgba(15, 12, 8, .98); border: 1px solid var(--mf-line2); border-radius: 4px; box-shadow: 0 14px 34px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s ease;
}
.lang-switcher.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-option { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; color: var(--mf-text); text-decoration: none; border-radius: 3px; }
.lang-option:hover, .lang-option.is-active { background: rgba(214, 176, 106, .12); color: #ffd100; }
.lang-option__body { display: flex; justify-content: space-between; flex: 1; }
.lang-option__code { color: var(--mf-muted); font-size: .75rem; }

/* mobile */
.mw-nav__burger { display: none; width: 42px; height: 40px; background: rgba(214, 176, 106, .06); border: 1px solid var(--mf-line); border-radius: 4px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.mw-nav__burger span { width: 20px; height: 2px; background: var(--mf-gold2); display: block; }
.mw-drawer { position: fixed; inset: var(--mf-nav-h) 0 0 0; z-index: 49; background: rgba(10, 8, 5, .98); overflow: auto; transform: translateX(100%); transition: transform .2s ease; }
html[dir="rtl"] .mw-drawer { transform: translateX(-100%); }
.mw-drawer.is-open { transform: none !important; }
.mw-drawer nav { padding: 1rem 1.25rem 3rem; display: flex; flex-direction: column; gap: .2rem; }
.mw-drawer nav a { color: var(--mf-text); text-decoration: none; padding: .65rem .5rem; border-bottom: 1px solid rgba(74, 58, 34, .5); display: flex; align-items: center; gap: .55rem; }
.mw-drawer__group p { margin: .9rem 0 .2rem; color: var(--mf-gold); font: 600 .85rem var(--mf-head); display: flex; align-items: center; gap: .5rem; }
.mw-drawer__lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem; }
.mw-drawer__lang-grid a.is-active { color: #ffd100; }
.mw-drawer__cta { margin-top: 1rem; justify-content: center; color: #1a0e02 !important; border: 10px solid transparent !important; border-image: url("../img/mf/ui/play_hot.png") 12 fill / 10px / 0 stretch !important; font-weight: 800; }
.mw-drawer .mw-nav__ico img { width: 22px; height: 22px; }

@media (max-width: 1180px) {
  .mw-nav__txt { display: none; }
  .mw-nav__item, .mw-drop__btn { padding: 0 .5rem; }
  .mw-drop__btn::after { display: none; }
}
@media (max-width: 860px) {
  :root { --mf-nav-h: 64px; }
  .mw-nav__links, .mw-nav__actions, .mw-lang { display: none; }
  .mw-nav__burger { display: flex; }
  .mw-nav { justify-content: space-between; }
  .mw-brand img { height: 42px; }
}

/* ------------------------------------------------------------------ flash */
.mw-flash, .flash { width: min(760px, calc(100% - 2rem)); margin: 1rem auto 0; padding: .8rem 1rem; text-align: center; background: rgba(23, 18, 12, .96); border: 1px solid var(--mf-line2); border-radius: 4px; color: var(--mf-text); position: relative; z-index: 5; }
.mw-flash-success, .flash-success { border-color: rgba(70, 201, 124, .5); color: #8ee6b1; }
.mw-flash-error, .flash-error { border-color: rgba(215, 97, 79, .55); color: #f2b0a6; }
.flash .container { width: auto; }

/* ------------------------------------------------------------------ section scaffolding */
.mf-sec { position: relative; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.mf-sec--dark { background: rgba(9, 7, 5, .82); border-block: 1px solid rgba(74, 58, 34, .55); }
.mf-head { text-align: center; margin-bottom: 2.6rem; }
.mf-head h2 { margin: 0; font: 400 clamp(1.8rem, 3.6vw, 2.6rem)/1.15 var(--mf-head); color: var(--mf-gold2); text-shadow: 0 2px 0 #000, 0 0 24px rgba(0, 0, 0, .7); }
.mf-head p { margin: .7rem auto 0; max-width: 640px; color: var(--mf-muted); font-size: 1.05rem; }
.mf-rule { display: block; width: min(360px, 70%); height: 2px; margin: 1rem auto 0; background: url("../img/mf/ui/line.png") center / 100% 2px no-repeat; opacity: .9; }
.mf-kicker { display: inline-block; margin-bottom: .55rem; color: #ffd100; font: 700 .78rem var(--mf-body); letter-spacing: .28em; text-transform: uppercase; }
html[dir="rtl"] .mf-kicker { letter-spacing: 0; font-size: .9rem; }

/* framed panel, like the in-game windows */
.mf-panel {
  position: relative; background: linear-gradient(180deg, rgba(31, 24, 16, .96), rgba(19, 15, 10, .97));
  border: 1px solid var(--mf-line2); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(241, 215, 154, .12), 0 16px 34px rgba(0, 0, 0, .45);
}
.mf-panel::before, .mf-panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--mf-gold); opacity: .8; pointer-events: none;
}
.mf-panel::before { top: -3px; inset-inline-start: -3px; border-inline-end: 0; border-bottom: 0; }
.mf-panel::after { bottom: -3px; inset-inline-end: -3px; border-inline-start: 0; border-top: 0; }

/* ------------------------------------------------------------------ home: hero */
.mf-hero {
  position: relative; min-height: min(100vh, 980px); display: flex; align-items: center; justify-content: center;
  padding: calc(var(--mf-nav-h) + 2rem) 1.25rem 5rem; overflow: hidden; isolation: isolate;
}
.mf-hero__art { position: absolute; inset: 0; z-index: -2; background: #000 url("../img/mf/art/hero.jpg") center 35% / cover no-repeat; }
.mf-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center 42%, rgba(0, 0, 0, .1), rgba(0, 0, 0, .55) 70%), linear-gradient(180deg, rgba(11, 9, 6, .35), rgba(11, 9, 6, 0) 30%, rgba(11, 9, 6, .7) 80%, var(--mf-bg));
}
.mf-hero__inner { text-align: center; max-width: 820px; }
.mf-hero__logo { width: min(560px, 86vw); height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .85)); }
.mf-hero__tag { margin: .4rem 0 0; font: italic 400 clamp(1.1rem, 2.2vw, 1.45rem) var(--mf-head); color: #f4ead2; text-shadow: 0 2px 6px #000; }
html[dir="rtl"] .mf-hero__tag { font-style: normal; }
.mf-hero__rates { margin: .5rem 0 0; color: #ffd100; font-weight: 700; letter-spacing: .06em; text-shadow: 0 1px 3px #000; }
.mf-status {
  display: inline-flex; align-items: center; gap: .9rem; margin: 1.6rem auto 0; padding: .7rem 1.2rem;
  background: rgba(10, 8, 5, .78); border: 1px solid var(--mf-line2); border-radius: 4px; box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.mf-status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mf-green); box-shadow: 0 0 10px var(--mf-green); flex: none; }
.mf-status__dot.is-off { background: var(--mf-red); box-shadow: 0 0 10px var(--mf-red); }
.mf-status b { color: var(--mf-text); }
.mf-status__count { padding-inline-start: .9rem; border-inline-start: 1px solid var(--mf-line); color: var(--mf-muted); }
.mf-status__count strong { color: #ffd100; font-size: 1.15rem; }
.mf-hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.mf-countdown { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; }
.mf-countdown div { min-width: 70px; padding: .5rem; background: rgba(10, 8, 5, .8); border: 1px solid var(--mf-line2); border-radius: 4px; }
.mf-countdown span { display: block; font: 700 1.6rem var(--mf-head); color: #ffd100; }
.mf-countdown small { color: var(--mf-muted); }
.mf-news {
  display: inline-flex; align-items: center; gap: .65rem; margin-top: 1rem; padding: .45rem 1.1rem .45rem .5rem;
  background: rgba(10, 8, 5, .72); border: 1px solid rgba(214, 176, 106, .55); border-radius: 999px;
  color: #f1d79a; font-weight: 600; text-decoration: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  transition: border-color .2s, background .2s;
}
html[dir="rtl"] .mf-news { padding: .45rem .5rem .45rem 1.1rem; }
.mf-news:hover { border-color: #f1d79a; background: rgba(28, 22, 13, .85); }
.mf-news b { background: #c99a3e; color: #140f08; border-radius: 999px; padding: .1rem .6rem; font-size: .78rem; letter-spacing: .05em; }

/* ------------------------------------------------------------------ home: steps */
.mf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.mf-step { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.mf-step:hover { transform: translateY(-3px); border-color: var(--mf-gold); }
.mf-step__icon { position: relative; flex: none; width: 64px; height: 64px; }
.mf-step__icon img { width: 64px; height: 64px; border-radius: 6px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--mf-line2), 0 6px 16px rgba(0, 0, 0, .6); }
.mf-step__num { position: absolute; bottom: -8px; inset-inline-end: -8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #1a1209; border: 1px solid var(--mf-gold); color: #ffd100; font: 700 .85rem var(--mf-head); }
.mf-step h3 { margin: .1rem 0 .3rem; font: 400 1.3rem var(--mf-head); color: var(--mf-gold2); }
.mf-step p { margin: 0; color: var(--mf-muted); }

/* ------------------------------------------------------------------ home: features */
.mf-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.mf-feature { padding: 1.2rem 1rem; text-align: center; }
.mf-feature img { width: 48px; height: 48px; border-radius: 5px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--mf-line2); }
.mf-feature__val { display: block; margin-top: .6rem; font: 400 2rem/1 var(--mf-head); color: #ffd100; text-shadow: 0 2px 0 #000; }
.mf-feature__label { display: block; margin-top: .35rem; color: var(--mf-muted); font-size: .95rem; }
.mf-feature.is-hl { border-color: var(--mf-gold); }

/* ------------------------------------------------------------------ home: heroes + server */
.mf-split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.5rem; align-items: start; }
.mf-board { padding: 1.3rem 1.4rem 1.5rem; }
.mf-board__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.mf-board__head h3 { margin: 0; display: flex; align-items: center; gap: .6rem; font: 400 1.45rem var(--mf-head); color: var(--mf-gold2); }
.mf-board__head h3 img { width: 30px; height: 30px; border-radius: 4px; }
.mf-table { width: 100%; border-collapse: collapse; }
.mf-table th { text-align: start; padding: .55rem .5rem; color: var(--mf-gold); font: 600 .8rem var(--mf-body); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--mf-line2); }
html[dir="rtl"] .mf-table th { letter-spacing: 0; font-size: .9rem; }
.mf-table td { padding: .65rem .5rem; border-bottom: 1px solid rgba(74, 58, 34, .45); }
.mf-table tr:last-child td { border-bottom: 0; }
.mf-table a { color: var(--mf-text); text-decoration: none; font-weight: 700; }
.mf-table a:hover { color: #ffd100; }
.mf-rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 700 .85rem var(--mf-head); background: #241a10; border: 1px solid var(--mf-line2); color: var(--mf-muted); }
.mf-rank--1 { background: linear-gradient(180deg, #f6d885, #b8862c); color: #2b1904; border-color: #f6d885; }
.mf-rank--2 { background: linear-gradient(180deg, #e6e6e6, #8d8d8d); color: #1b1b1b; border-color: #e6e6e6; }
.mf-rank--3 { background: linear-gradient(180deg, #e2a46c, #8a5226); color: #1f1006; border-color: #e2a46c; }
.mf-muted { color: var(--mf-muted); }
.mf-empty { padding: 1.5rem; text-align: center; color: var(--mf-muted); }
.mf-server { padding: 1.3rem 1.4rem 1.5rem; }
.mf-server h3 { margin: 0 0 .9rem; font: 400 1.45rem var(--mf-head); color: var(--mf-gold2); }
.mf-kv { display: grid; gap: .1rem; margin: 0 0 1.2rem; }
.mf-kv div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(74, 58, 34, .45); }
.mf-kv dt { color: var(--mf-muted); }
.mf-kv dd { margin: 0; color: var(--mf-text); font-weight: 700; }
.mf-kv dd.is-on { color: var(--mf-green); }
.mf-server .mf-btn { width: 100%; }
.mf-bar { position: relative; height: 26px; margin: .2rem 0 1rem; }
.mf-bar__fill { position: absolute; inset: 4px 11% 5px 11%; overflow: hidden; background: rgba(0, 0, 0, .7); }
.mf-bar__fill i { display: block; height: 100%; background: url("../img/mf/ui/bar_fill.png") center / 100% 100%; }
.mf-bar__frame { position: absolute; inset: 0; border: 0 solid transparent; border-width: 0 34px; border-image: url("../img/mf/ui/bar_border.png") 0 66 fill / 0 34px / 0 stretch; }

/* ------------------------------------------------------------------ home: gallery */
.mf-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: .9rem; }
.mf-gallery figure { margin: 0; position: relative; overflow: hidden; border: 1px solid var(--mf-line2); border-radius: 4px; box-shadow: inset 0 0 0 1px #000; }
.mf-gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.mf-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.mf-gallery figure:hover img { transform: scale(1.05); }
.mf-gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 1.4rem .8rem .6rem; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); color: var(--mf-text); font: 400 1rem var(--mf-head); }

/* ------------------------------------------------------------------ classes (shared section) */
.mw-classgrid { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.mw-classgrid__inner { width: min(1200px, calc(100% - 2.5rem)); margin-inline: auto; }
.mw-classgrid__head { text-align: center; margin-bottom: 2.4rem; }
.mw-classgrid__kicker { margin: 0 0 .5rem; color: #ffd100; font: 700 .78rem var(--mf-body); letter-spacing: .28em; text-transform: uppercase; }
.mw-classgrid__head h2 { margin: 0; font: 400 clamp(1.8rem, 3.6vw, 2.6rem) var(--mf-head); color: var(--mf-gold2); text-shadow: 0 2px 0 #000; }
.mw-classgrid__head p { margin: .7rem auto 0; color: var(--mf-muted); }
.mw-classgrid__divider { display: block; width: min(360px, 70%); height: 2px; margin: 1rem auto 0; background: url("../img/mf/ui/line.png") center / 100% 2px no-repeat; }
.mw-classgrid__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.mw-classcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: linear-gradient(180deg, #1f1810, #130f0a); border: 1px solid var(--mf-line2); border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #000; transition: transform .15s ease, border-color .15s ease; }
.mw-classcard:hover { transform: translateY(-3px); border-color: var(--mf-gold); }
.mw-classcard__imgwrap { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #000; }
.mw-classcard__bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-classcard__pair { position: absolute; inset: auto 0 0 0; width: 100%; height: auto; }
.mw-classcard__body { padding: .8rem .85rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.mw-classcard__name { font: 400 1.2rem var(--mf-head); color: var(--mf-gold2); }
.mw-classcard__role { color: #ffd100; font-size: .82rem; font-weight: 700; }
.mw-classcard__desc { color: var(--mf-muted); font-size: .86rem; line-height: 1.45; }
.mw-classcard__stats { display: flex; gap: .35rem; margin-top: .45rem; flex-wrap: wrap; }
.mw-classcard__stat { display: inline-flex; gap: .25rem; align-items: baseline; padding: .1rem .4rem; background: rgba(0, 0, 0, .45); border: 1px solid rgba(74, 58, 34, .7); border-radius: 3px; font-size: .75rem; }
.mw-classcard__stat b { color: var(--mf-text); }
.mw-classcard__stat i { font-style: normal; color: var(--mf-muted); }

/* ------------------------------------------------------------------ community banner */
.mf-banner { position: relative; overflow: hidden; padding: clamp(2.5rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.mf-banner__art { position: absolute; inset: 0; z-index: 0; background: url("../img/mf/art/coast.jpg") center / cover; opacity: .32; }
.mf-banner > *:not(.mf-banner__art) { position: relative; z-index: 1; }
.mf-banner h2 { margin: 0; font: 400 clamp(1.6rem, 3vw, 2.2rem) var(--mf-head); color: var(--mf-gold2); }
.mf-banner p { margin: .6rem 0 0; color: var(--mf-text); max-width: 620px; }
.mf-banner__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ footer */
.mw-footer { margin-top: 0; padding: 3rem 1.25rem 2rem; background: rgba(8, 6, 4, .96); border-top: 1px solid var(--mf-line); text-align: center; color: var(--mf-muted); }
.mw-footer .mw-brand { justify-content: center; margin-bottom: 1.2rem; }
.mw-footer .mw-brand img { height: 64px; }
.mw-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; margin: .4rem 0; }
.mw-footer nav a { color: var(--mf-text); text-decoration: none; }
.mw-footer nav a:hover { color: #ffd100; }
.mw-footer__legal a { color: var(--mf-muted) !important; font-size: .9rem; }
.mw-specs { margin: 1.2rem auto 0; max-width: 640px; text-align: start; border: 1px solid var(--mf-line); border-radius: 4px; padding: .6rem 1rem; background: rgba(23, 18, 12, .6); }
.mw-specs summary { color: var(--mf-gold); font-weight: 700; }
.mw-specs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .8rem; }
.mw-specs h3 { margin: 0 0 .4rem; font: 400 1rem var(--mf-head); color: var(--mf-gold2); }
.mw-specs ul { margin: 0; padding-inline-start: 1.1rem; }
.mw-footer > p { margin: 1.4rem 0 0; font-size: .85rem; }
.mw-dock { display: none !important; }

/* ------------------------------------------------------------------ inner pages: shared bits */
body.page-inner main { position: relative; z-index: 1; }
body.page-inner h1, body.page-inner h2 { font-family: var(--mf-head); }
body.page-inner .btn, body.page-inner button[type="submit"], body.page-inner .button {
  border: 10px solid transparent; border-image: url("../img/mf/ui/btn.png") 12 fill / 10px / 0 stretch; background: none;
  color: #ffd100; font-weight: 700; text-shadow: 0 1px 0 #000; border-radius: 0; box-shadow: none;
}
body.page-inner .btn:hover, body.page-inner button[type="submit"]:hover { filter: brightness(1.18); color: #fff; }
body.page-inner .btn-primary, body.page-inner button.btn-primary, body.page-inner .btn-gold {
  border-image: url("../img/mf/ui/play_hot.png") 12 fill / 10px / 0 stretch; color: #1a0e02; text-shadow: 0 1px 0 rgba(255, 246, 214, .75);
}
body.page-inner input[type="text"], body.page-inner input[type="password"], body.page-inner input[type="email"], body.page-inner input[type="search"], body.page-inner input[type="number"], body.page-inner select, body.page-inner textarea {
  background: rgba(10, 8, 5, .85); color: var(--mf-text); border: 1px solid var(--mf-line2); border-radius: 3px;
}
body.page-inner input:focus, body.page-inner select:focus, body.page-inner textarea:focus { outline: none; border-color: var(--mf-gold); box-shadow: 0 0 0 2px rgba(214, 176, 106, .2); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .mw-classgrid__grid { grid-template-columns: repeat(3, 1fr); }
  .mf-split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .mf-steps { grid-template-columns: 1fr; }
  .mf-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .mf-banner { grid-template-columns: 1fr; }
  .mw-specs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mw-classgrid__grid { grid-template-columns: repeat(2, 1fr); }
  .mf-gallery { grid-template-columns: 1fr; }
  .mf-gallery figure:first-child { grid-column: auto; grid-row: auto; }
  .mf-status { flex-direction: column; gap: .4rem; }
  .mf-status__count { border: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ home: rates in two groups */
.mf-rategroups { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.mf-rategroup { padding: 1.3rem 1.5rem 1.1rem; }
.mf-rategroup h3 { display: flex; align-items: center; gap: .65rem; margin: 0 0 .6rem; font: 400 1.45rem var(--mf-head); color: var(--mf-gold2); }
.mf-rategroup h3 img { border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--mf-line2); }
.mf-ratelist { list-style: none; margin: 0; padding: 0; }
.mf-ratelist li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid rgba(74, 58, 34, .5); }
.mf-ratelist li:last-child { border-bottom: 0; }
.mf-ratelist img { border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--mf-line2); }
.mf-ratelist__name { display: flex; flex-direction: column; color: var(--mf-text); font-weight: 600; line-height: 1.25; }
.mf-ratelist__name small { color: var(--mf-muted); font-weight: 400; font-size: .85rem; margin-top: .15rem; }
.mf-ratelist b { font: 400 1.9rem/1 var(--mf-head); color: var(--mf-muted); text-shadow: 0 2px 0 #000; min-width: 3ch; text-align: end; }
.mf-ratelist li.is-up b { color: #ffd100; }
.mf-ratelist li.is-up .mf-ratelist__name small { color: var(--mf-green); }
@media (max-width: 860px) { .mf-rategroups { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ icons (inline SVG) */
.mf-ico { display: inline-block; flex: none; vertical-align: middle; }
.mf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mw-nav__ico { display: inline-flex; color: var(--mf-gold); }
.mw-nav__item:hover .mw-nav__ico, .mw-drop:hover .mw-nav__ico { color: #ffd100; }
.mw-nav__ico .mf-ico { width: 20px; height: 20px; }
.mw-nav__user .mf-ico { color: var(--mf-gold); }
.mf-ico--discord { color: #8b95f2; }
.mw-nav__ico .mf-ico--discord { color: #8b95f2; }
/* the slot frame: a dark square with a bronze rim, like an item slot in the game */
.mf-slot {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; color: var(--mf-gold2);
  background: radial-gradient(circle at 50% 35%, #2c2216, #120d08 75%);
  border: 1px solid var(--mf-line2); border-radius: 5px;
  box-shadow: inset 0 0 0 1px #000, inset 0 1px 0 rgba(241, 215, 154, .15), 0 4px 10px rgba(0, 0, 0, .45);
}
.mf-slot .mf-ico--discord { color: #9aa3ff; }
.mf-step__icon { width: 60px; height: 60px; }
.mf-step__icon .mf-slot { width: 60px; height: 60px; }
.mf-step__icon .mf-slot .mf-ico { width: 30px; height: 30px; }
.mf-ratelist li { grid-template-columns: 44px 1fr auto; }
.mf-ratelist li.is-up .mf-slot { color: #ffd100; border-color: rgba(214, 176, 106, .55); }
.mf-rategroup h3 .mf-slot, .mf-board__head h3 .mf-slot { width: 38px; height: 38px; }
.mf-btn .mf-ico { width: 20px; height: 20px; }
.mf-btn--play .mf-ico { color: #1a0e02; }
