/* Metin2 Reborn website. The game's own language: dark leather and stone, bronze frames, gold titles, ember
   accents (2DOrders.md "Tarzımız"). The frame and button art is the launcher's (2D-003). */

@font-face {
  font-family: "Cinzel";
  src: url("/static/fonts/Cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #120f0d;
  --bg-2: #18130f;
  --panel: #1c1712;
  --panel-2: #241d16;
  --line: #3e3020;
  --line-2: #5a4630;
  --bronze: #8a6a3a;
  --gold: #d4a84a;
  --gold-2: #f2d995;
  --ember: #e0662a;
  --crimson: #8b1e1e;
  --text: #e8dcc0;
  --muted: #a89880;
  --faint: #76695a;
  --ok: #7cc46e;
  --warn: #e6a046;
  --err: #e86a58;
  --info: #6ab8d8;
  --shinsoo: #e0533f;
  --chunjo: #e3b94e;
  --jinno: #4f92e0;
  --display: "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --wrap: 1200px;
  --topbar: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 16px/1.65 var(--body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(139, 30, 30, 0.16), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .26 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

img { max-width: 100%; }
a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-2); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
code { background: #0d0b09; border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; font-size: .92em; }
hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); margin: 28px 0; }
::selection { background: rgba(212, 168, 74, 0.35); color: #fff; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0 0 .6em; color: var(--gold); letter-spacing: .02em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(21px, 2.4vw, 26px); }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 36px; padding-bottom: 56px; }
main { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; z-index: 100; border-radius: 3px; }
.skip-link:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(14, 11, 9, 0.97), rgba(18, 14, 11, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(212, 168, 74, 0.08), 0 6px 18px rgba(0, 0, 0, 0.45);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze) 20%, var(--gold) 50%, var(--bronze) 80%, transparent);
  opacity: .7;
}
.topbar.over-hero { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(8, 6, 5, 0.85), rgba(8, 6, 5, 0)); border-bottom-color: transparent; box-shadow: none; transition: background .25s, box-shadow .25s; }
.topbar.over-hero::after { opacity: 0; transition: opacity .25s; }
.topbar.over-hero.scrolled { background: linear-gradient(180deg, rgba(14, 11, 9, 0.97), rgba(18, 14, 11, 0.94)); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.topbar.over-hero.scrolled::after { opacity: .7; }
.topbar-inner { display: flex; align-items: center; gap: 22px; height: var(--topbar); }
.brand { flex: none; display: flex; }
.brand img { height: 50px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.menu-panel { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.menu > a, .dropdown-toggle {
  font-family: var(--display); font-weight: 700; font-size: 14.5px; letter-spacing: .06em;
  color: var(--text); background: none; border: 0; cursor: pointer;
  padding: 10px 12px; display: inline-flex; align-items: center; gap: 6px; position: relative;
  text-shadow: 0 1px 2px #000; white-space: nowrap; flex-shrink: 0;
}
.menu > a::after, .menu .dropdown > .dropdown-toggle::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0); transition: transform .2s;
}
.menu > a:hover, .dropdown-toggle:hover, .menu > a.active, .dropdown.active > .dropdown-toggle { color: var(--gold-2); }
.menu > a:hover::after, .menu > a.active::after, .menu .dropdown:hover > .dropdown-toggle::after,
.menu .dropdown.active > .dropdown-toggle::after { transform: scaleX(1); }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .7; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; z-index: 60;
  background: linear-gradient(180deg, #221b15, #17120e); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.dropdown-menu::before { content: ""; position: absolute; top: -7px; left: 0; right: 0; height: 8px; }
.dropdown-right { left: auto; right: 0; }
.dropdown:hover > .dropdown-menu, .dropdown.open > .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu .link-button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 3px;
  color: var(--text); font: 15px var(--body); background: none; border: 0; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu .link-button:hover { background: rgba(212, 168, 74, 0.1); color: var(--gold-2); }
.dropdown-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }

.account-box { display: flex; align-items: center; gap: 8px; flex: none; }
.account-toggle { font-family: var(--body); font-size: 15px; letter-spacing: 0; text-transform: none; gap: 10px; border: 1px solid var(--line-2); border-radius: 3px; padding: 7px 12px; background: rgba(0, 0, 0, .25); }
.account-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-2); font-weight: 600; font-variant-numeric: tabular-nums; }

.menu-toggle { display: none; margin-left: auto; width: 44px; height: 40px; border: 1px solid var(--line-2); border-radius: 3px; background: rgba(0, 0, 0, .3); cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 2px; background: var(--gold); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ------------------------------------------------------------ buttons (launcher art, 9-slice) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; letter-spacing: .06em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  border-style: solid; background: none; transition: filter .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-ember {
  color: #fff1d0; text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 10px rgba(255, 120, 40, .35);
  font-size: 17px; min-height: 58px; padding: 0 22px;
  border-width: 16px 20px; border-image: url("/static/img/ui/btn_play_normal.png") 22 28 fill / 16px 20px stretch;
}
.btn-ember:hover { color: #fff; border-image-source: url("/static/img/ui/btn_play_hover.png"); }
.btn-ember:active { border-image-source: url("/static/img/ui/btn_play_pressed.png"); }
.btn-stone {
  color: var(--text); text-shadow: 0 1px 2px #000;
  font-size: 15px; min-height: 46px; padding: 0 16px;
  border-width: 8px; border-image: url("/static/img/ui/btn_small_normal.png") 8 fill / 8px stretch;
}
.btn-stone:hover { color: var(--gold-2); border-image-source: url("/static/img/ui/btn_small_hover.png"); }
.btn-stone:active { border-image-source: url("/static/img/ui/btn_small_pressed.png"); }
.btn-sm.btn-ember { font-size: 14.5px; min-height: 44px; padding: 0 10px; border-width: 12px 15px; border-image-width: 12px 15px; }
.btn-sm.btn-stone { font-size: 14px; min-height: 38px; padding: 0 10px; border-width: 6px; border-image-width: 6px; }
.btn-lg.btn-ember { font-size: 20px; min-height: 68px; padding: 0 34px; border-width: 18px 22px; border-image-width: 18px 22px; }
.btn-lg.btn-stone { font-size: 18px; min-height: 58px; padding: 0 26px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled { filter: grayscale(1) brightness(.7); pointer-events: none; }
.btn svg { flex: none; }
.link-button { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; padding: 0; }
.link-button:hover { color: var(--gold-2); text-decoration: underline; }

/* ------------------------------------------------------------ panels (launcher frame) */
.panel {
  position: relative; margin: 0 0 26px;
  background: linear-gradient(180deg, rgba(36, 29, 22, 0.97), rgba(24, 19, 15, 0.97));
  border: 14px solid transparent; border-image: url("/static/img/ui/panel_9slice.png") 20 / 14px round;
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 0; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 19px; text-shadow: 0 1px 2px #000; }
.panel-head h2::before, .panel-head h3::before { content: "◆"; font-size: 11px; color: var(--bronze); margin-right: 10px; vertical-align: 3px; }
.panel-head a { font-size: 14px; font-family: var(--display); letter-spacing: .04em; }
.panel-body { padding: 12px 14px 12px; }
.panel-head + .panel-body { padding-top: 10px; }
.panel-body > :last-child { margin-bottom: 0; }
.panel.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.panel.medium { max-width: 760px; margin-left: auto; margin-right: auto; }
.panel-divider { height: 1px; margin: 14px -14px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* ------------------------------------------------------------ page header (inner pages) */
.page-header {
  position: relative; padding: 50px 0 42px; margin-bottom: 0;
  background: linear-gradient(180deg, rgba(18, 15, 13, .35), rgba(18, 15, 13, .55) 60%, var(--bg)), var(--banner) center 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-header h1 {
  margin: 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800;
  background: linear-gradient(180deg, #fff3cc 0%, var(--gold-2) 35%, var(--gold) 70%, #a8782e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .9));
}
.page-subtitle { margin: 10px auto 0; max-width: 720px; color: var(--text); text-shadow: 0 1px 3px #000; }
.crumbs { display: flex; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; text-shadow: 0 1px 2px #000; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold-2); }

/* ------------------------------------------------------------ forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field .label { font-weight: 600; font-size: 15px; color: var(--text); }
.hint { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.input-wrap { position: relative; display: block; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 16px var(--body); color: var(--text);
  background: linear-gradient(180deg, #0d0b09, #14100d); border: 1px solid var(--line-2); border-radius: 3px;
  padding: 11px 13px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6), 0 0 0 3px rgba(212, 168, 74, .18); }
input.code-input { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding: 12px 8px; }
.input-wrap input[type=password], .input-wrap input.revealed { padding-right: 46px; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; display: flex; }
.reveal:hover { color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--gold); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.form-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.trap { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
details { border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; background: rgba(0, 0, 0, .2); }
details summary { cursor: pointer; color: var(--gold); font-weight: 600; }
details[open] summary { margin-bottom: 8px; }

/* ------------------------------------------------------------ alerts */
.alert { border: 1px solid; border-left-width: 4px; border-radius: 3px; padding: 12px 16px; margin: 0 0 18px; background: rgba(0, 0, 0, .3); }
.alert ul { margin: 0; }
.alert { padding-left: 50px; background-repeat: no-repeat; background-position: 14px 11px; background-size: 24px 24px; }
.alert-ok { background-image: url("/static/img/ikon/onay.png"); }
.alert-warn { background-image: url("/static/img/ikon/uyari.png"); }
.alert-err { background-image: url("/static/img/ikon/hata.png"); }
.alert-info { background-image: url("/static/img/ikon/bilgi.png"); }
.ico { width: 22px; height: 22px; flex: none; vertical-align: -5px; margin-right: 9px; }
.menu-ico { display: none; }
.dropdown-menu a, .dropdown-menu .link-button { display: flex; align-items: center; }
.alert-ok { border-color: rgba(124, 196, 110, .5); border-left-color: var(--ok); color: #cdeec4; }
.alert-warn { border-color: rgba(230, 160, 70, .45); border-left-color: var(--warn); color: #f3d5ab; }
.alert-err { border-color: rgba(232, 106, 88, .5); border-left-color: var(--err); color: #f6c5bc; }
.alert-info { border-color: rgba(106, 184, 216, .45); border-left-color: var(--info); color: #c6e6f2; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 0 4px; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-family: var(--display); font-size: 13px; letter-spacing: .06em; color: var(--gold); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid rgba(62, 48, 32, .6); vertical-align: middle; }
.table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
.table tbody tr:hover td { background: rgba(212, 168, 74, .05); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .rank { width: 56px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--muted); }
.medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 14px; color: #1a1209; box-shadow: inset 0 1px 2px rgba(255, 255, 255, .5), 0 2px 4px rgba(0, 0, 0, .6); }
.medal-1 { background: radial-gradient(circle at 35% 30%, #fff1b8, #e0b24a 55%, #8e6420); }
.medal-2 { background: radial-gradient(circle at 35% 30%, #ffffff, #b9c0c8 55%, #6c737c); }
.medal-3 { background: radial-gradient(circle at 35% 30%, #ffd6b0, #c47a3e 55%, #6e3c16); }
.medal-img { width: 34px; height: 34px; display: block; margin: 0 auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.class-icon, .empire-icon { width: 22px; height: 22px; vertical-align: -5px; margin-right: 7px; }
.empire-shinsoo { color: var(--shinsoo); }
.empire-chunjo { color: var(--chunjo); }
.empire-jinno { color: var(--jinno); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; border: 1px solid; vertical-align: 2px; }
.tag-duyuru { color: var(--gold); border-color: rgba(212, 168, 74, .5); background: rgba(212, 168, 74, .08); }
.tag-guncelleme { color: var(--info); border-color: rgba(106, 184, 216, .5); background: rgba(106, 184, 216, .08); }
.tag-etkinlik { color: var(--ember); border-color: rgba(224, 102, 42, .55); background: rgba(224, 102, 42, .1); }
.tag-bakim { color: var(--warn); border-color: rgba(230, 160, 70, .5); background: rgba(230, 160, 70, .08); }
.tag-pin { color: #fff1d0; border-color: var(--crimson); background: rgba(139, 30, 30, .55); }

/* ------------------------------------------------------------ grid helpers */
.grid { display: grid; gap: 26px; }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 26px; }

/* ------------------------------------------------------------ home: hero */
.hero {
  position: relative; min-height: clamp(600px, 88vh, 860px); display: flex; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--topbar) + 30px) 20px 120px; overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: var(--hero) center 35% / cover no-repeat; transform: scale(1.04); animation: hero-drift 30s ease-in-out infinite alternate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 55% 45% at 50% 46%, rgba(10, 8, 7, .55), transparent 70%),
  linear-gradient(180deg, rgba(10, 8, 7, .7) 0%, rgba(10, 8, 7, .1) 22%, rgba(10, 8, 7, .15) 60%, var(--bg) 100%); }
.hero-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffb060; box-shadow: 0 0 6px 2px rgba(255, 120, 40, .7); opacity: 0; animation: ember 9s linear infinite; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx, 30px), -85vh); opacity: 0; } }
@keyframes hero-drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.08) translateX(-1.5%); } }
.hero-content { max-width: 900px; }
.hero-text { max-width: 640px; }
.hero-logo { width: min(560px, 86vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .85)); }
.hero-slogan { font-family: var(--display); font-weight: 700; font-size: clamp(19px, 2.2vw, 25px); line-height: 1.3; color: var(--gold-2); margin: 8px 0 10px; letter-spacing: .08em; text-shadow: 0 2px 8px #000, 0 0 18px rgba(0, 0, 0, .8); }
.hero-sep { margin: 0 .45em; color: var(--ember); }
.hero-slogan > span:not(.hero-sep) { white-space: nowrap; }
.hero-br { display: none; }
.why { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.why-text .ornament { margin-left: 0; }
.why-text h2 { font-size: clamp(26px, 3.2vw, 34px); background: linear-gradient(180deg, #fff3cc, var(--gold) 70%, #a8782e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.why-text p { font-size: 16.5px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.why-list li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, rgba(36, 29, 22, .9), rgba(24, 19, 15, .9)); }
.why-list li::before { content: ""; grid-row: span 2; width: 28px; height: 28px; background: url("/static/img/ikon/onay.png") center / contain no-repeat; }
.why-list b { font-family: var(--display); color: var(--gold); font-size: 16px; letter-spacing: .03em; }
.why-list span { color: var(--muted); font-size: 14.5px; }
.hero-text { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--text); max-width: 600px; margin: 0 auto 26px; text-shadow: 0 1px 4px #000, 0 0 12px rgba(0, 0, 0, .9); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 20px; font-size: 14.5px; background: rgba(10, 8, 7, .72); border: 1px solid rgba(138, 106, 58, .55); backdrop-filter: blur(3px); text-shadow: 0 1px 2px #000; }
.chip b { color: var(--gold-2); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.online { background: var(--ok); box-shadow: 0 0 0 0 rgba(124, 196, 110, .7); animation: pulse 2.2s infinite; }
.dot.maintenance { background: var(--warn); }
.dot.offline { background: var(--err); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(124, 196, 110, .6); } 70% { box-shadow: 0 0 0 8px rgba(124, 196, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 196, 110, 0); } }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 13px; letter-spacing: .2em; font-family: var(--display); }

/* ------------------------------------------------------------ home: sections */
.section { padding: 64px 0; position: relative; }
.section-tight { padding: 40px 0; }
.section-title { text-align: center; margin: 0 auto 34px; max-width: 760px; }
.section-title h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; background: linear-gradient(180deg, #fff3cc, var(--gold) 70%, #a8782e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.section-title p { color: var(--muted); margin: 0; }
.ornament { height: 32px; width: min(620px, 92%); margin: 0 auto 10px; background: url("/static/img/ui/ayirici.png") center / contain no-repeat; }
.ornament span { display: none; }
.divider { height: 32px; margin: 26px auto; background: url("/static/img/ui/ayirici.png") center / contain no-repeat; }
.page-header::after { content: ""; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); width: min(620px, 90%); height: 32px; background: url("/static/img/ui/ayirici.png") center / contain no-repeat; }
.band { background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .1)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat { padding: 22px 10px; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: linear-gradient(180deg, transparent, var(--line-2), transparent); }
.stat b { display: block; font-family: var(--display); font-size: clamp(26px, 3vw, 36px); color: var(--gold-2); font-weight: 800; line-height: 1.1; text-shadow: 0 2px 4px #000; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14.5px; }

.news-list { display: grid; gap: 4px; }
.news-item { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 14px 4px; border-bottom: 1px solid rgba(62, 48, 32, .6); }
.news-item:last-child { border-bottom: 0; }
.news-date { text-align: center; border: 1px solid var(--line-2); border-radius: 3px; background: rgba(0, 0, 0, .3); padding: 6px 0; height: fit-content; font-family: var(--display); line-height: 1.15; }
.news-date b { display: block; font-size: 24px; color: var(--gold-2); }
.news-date span { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.news-item h3 { font-size: 18px; margin: 2px 0 6px; }
.news-item h3 a { color: var(--gold); }
.news-item h3 a:hover { color: var(--gold-2); }
.news-item p { margin: 0; color: var(--text); opacity: .92; }
.news-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.news-body { white-space: pre-line; }
.article { max-width: 820px; margin: 0 auto; }
.article .news-meta { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.article-body { font-size: 17px; line-height: 1.75; white-space: pre-line; }

.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(62, 48, 32, .55); }
.side-list li:last-child { border-bottom: 0; }
.side-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list .val { color: var(--gold-2); font-family: var(--display); font-weight: 700; white-space: nowrap; }
.feed li { align-items: flex-start; font-size: 14.5px; }
.feed time { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.feed-icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); }
.feed-boss { color: var(--ember); }
.feed-level { color: var(--ok); }
.feed-refine { color: var(--gold-2); }

.status-big { display: flex; align-items: center; gap: 14px; }
.status-big .dot { width: 14px; height: 14px; }
.status-big b { font-family: var(--display); font-size: 21px; display: block; color: var(--text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0 0; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

.feature-card { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--bronze); }
.feature-img { aspect-ratio: 16 / 10; background: radial-gradient(ellipse at 50% 40%, rgba(139, 30, 30, .35), transparent 70%), linear-gradient(180deg, #2a2119, #15110d); display: grid; place-items: center; position: relative; overflow: hidden; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.feature-card:hover .feature-img img { transform: scale(1.05); }
.feature-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(28, 23, 18, .95)); }
.feature-img .placeholder { width: 46%; opacity: .9; filter: drop-shadow(0 6px 16px #000); }
.feature-body { padding: 4px 20px 22px; }
.feature-body h3 { margin: 0 0 8px; }
.feature-body p { margin: 0; color: var(--text); opacity: .9; font-size: 15px; }

.class-card { text-align: center; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.class-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.class-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.class-card .class-body { padding: 14px 16px 18px; background: linear-gradient(180deg, rgba(28, 23, 18, .2), var(--panel) 30%); margin-top: -40px; position: relative; }
.class-card h3 { margin: 0 0 6px; font-size: 21px; }
.class-card p { margin: 0; font-size: 14.5px; color: var(--muted); }

.empire-card { text-align: center; padding: 26px 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: radial-gradient(ellipse at 50% 0%, var(--tint, rgba(212, 168, 74, .12)), transparent 70%), var(--panel); box-shadow: var(--shadow); }
.empire-card img { width: 120px; height: 120px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .8)); }
.empire-card h3 { margin: 12px 0 6px; }
.empire-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.empire-card.shinsoo { --tint: rgba(224, 83, 63, .22); }
.empire-card.chunjo { --tint: rgba(227, 185, 78, .2); }
.empire-card.jinno { --tint: rgba(79, 146, 224, .22); }
.empire-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 10px 0 6px; background: #0d0b09; border: 1px solid var(--line); }
.empire-bar span { display: block; height: 100%; }
.empire-bar .shinsoo { background: var(--shinsoo); }
.empire-bar .chunjo { background: var(--chunjo); }
.empire-bar .jinno { background: var(--jinno); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { text-align: center; padding: 30px 22px 26px; border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, rgba(36, 29, 22, .9), rgba(24, 19, 15, .9)); position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 54px; height: 54px; margin: -58px auto 14px; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 24px; color: #fff1d0; background: radial-gradient(circle at 35% 30%, #c94a2a, var(--crimson) 60%, #4a0e0e); border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 6px 14px rgba(0, 0, 0, .7); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

.cta-band { position: relative; text-align: center; padding: 70px 20px; background: linear-gradient(180deg, rgba(18, 15, 13, .82), rgba(18, 15, 13, .92)), var(--banner) center / cover; border-top: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); }
.cta-band p { max-width: 620px; margin: 0 auto 24px; }

/* ------------------------------------------------------------ account */
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; }
.account-nav { position: sticky; top: calc(var(--topbar) + 16px); }
.account-nav .panel-body { padding: 8px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 3px; color: var(--text); font-weight: 600; }
.account-nav a:hover { background: rgba(212, 168, 74, .08); color: var(--gold-2); }
.account-nav a.active { background: linear-gradient(90deg, rgba(139, 30, 30, .55), rgba(139, 30, 30, .1)); color: #fff1d0; box-shadow: inset 3px 0 0 var(--gold); }
.account-nav .nav-icon { width: 22px; height: 22px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.summary-box { border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(0, 0, 0, .25); padding: 14px 16px; }
.summary-box > span { display: block; color: var(--muted); font-size: 13.5px; }
.summary-box b { font-family: var(--display); font-size: 21px; color: var(--gold-2); display: flex; align-items: center; gap: 8px; }
.state-ok { color: var(--ok) !important; }
.state-warn { color: var(--warn) !important; }
.state-err { color: var(--err) !important; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.char-card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(0, 0, 0, .25); }
.char-card > img { width: 72px; height: 72px; border-radius: 3px; border: 1px solid var(--bronze); object-fit: cover; }
.char-card h3 { margin: 0 0 2px; font-size: 18px; }
.char-card .meta { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.qr-box { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.qr-box .qr { background: #fff; padding: 10px; border-radius: 4px; border: 2px solid var(--bronze); }
.qr-box .qr svg { display: block; width: 100%; height: auto; }
.secret { font-family: Consolas, "Courier New", monospace; font-size: 17px; letter-spacing: .08em; background: #0d0b09; border: 1px dashed var(--line-2); border-radius: 3px; padding: 8px 12px; display: inline-block; color: var(--gold-2); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-family: Consolas, "Courier New", monospace; font-size: 18px; background: #0d0b09; border: 1px solid var(--line-2); border-radius: 4px; padding: 16px 20px; margin: 0 0 16px; color: var(--gold-2); }
.device-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line-2); }
.device-list li { display: flex; align-items: center; gap: 16px; padding: 12px 6px; border-bottom: 1px solid rgba(62, 48, 32, .6); }
.device-list li:nth-child(even) { background: rgba(255, 255, 255, .015); }
.device-main { flex: 1; min-width: 0; }
.device-name { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.device-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 3px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.device-list form { flex: none; margin: 0; }
.amount-plus { color: var(--ok); }
.amount-minus { color: var(--err); }

/* ------------------------------------------------------------ market */
.market-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.product { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, rgba(36, 29, 22, .95), rgba(22, 18, 14, .95)); box-shadow: var(--shadow); position: relative; }
.product-head { display: flex; gap: 14px; align-items: center; }
.item-slot { flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: radial-gradient(circle, #2a2219, #0f0c0a); border: 1px solid var(--bronze); border-radius: 3px; box-shadow: inset 0 0 8px #000; }
.item-slot img { image-rendering: auto; max-width: 44px; max-height: 44px; }
.product h3 { margin: 0; font-size: 17px; }
.product-form { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variants label { cursor: pointer; }
.variants input { position: absolute; opacity: 0; pointer-events: none; }
.variants span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 3px; font-size: 14px; background: rgba(0, 0, 0, .3); }
.variants input:checked + span { border-color: var(--gold); color: #fff1d0; background: rgba(139, 30, 30, .55); }
.variants input:focus-visible + span { outline: 2px solid var(--gold); }
.price { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--gold-2); }
.price img { width: 24px; height: 24px; }
.old-price { color: var(--faint); text-decoration: line-through; font-size: 15px; font-weight: 600; }
.sale-ribbon { position: absolute; top: 10px; right: -2px; background: var(--crimson); color: #fff1d0; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 3px 10px; border: 1px solid var(--gold); border-right: 0; }
.ep-wallet { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.ep-wallet .price { font-size: 28px; }

/* ------------------------------------------------------------ guide / text pages */
.prose { max-width: 860px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .4em; }
.faq details { margin-bottom: 10px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.calendar-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid rgba(62, 48, 32, .6); }
.calendar-when { font-family: var(--display); color: var(--gold-2); font-weight: 700; line-height: 1.3; }
.calendar-when span { display: block; color: var(--muted); font-size: 13px; font-family: var(--body); font-weight: 400; }
.live { color: var(--ember); font-weight: 700; }
.guide-step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(62, 48, 32, .6); }
.guide-step:last-child { border-bottom: 0; }
.guide-step h3 { margin: 4px 0 6px; font-size: 18px; }
.guide-step p { margin: 0; }
.guide-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 18px; color: #fff1d0; background: radial-gradient(circle at 35% 30%, #c94a2a, var(--crimson) 60%, #4a0e0e); border: 2px solid var(--gold); box-shadow: 0 4px 10px rgba(0, 0, 0, .6); }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty img { width: min(420px, 90%); border-radius: var(--radius); margin-bottom: 14px; opacity: .95; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.filters .field { min-width: 160px; }
.filters select, .filters input { padding: 9px 12px; }
.pill-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.pill-nav a { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 20px; color: var(--text); font-size: 14.5px; background: rgba(0, 0, 0, .25); }
.pill-nav a:hover { color: var(--gold-2); border-color: var(--bronze); }
.pill-nav a.active { color: #fff1d0; background: rgba(139, 30, 30, .6); border-color: var(--gold); }

/* ------------------------------------------------------------ footer */
.footer { margin-top: auto; background: linear-gradient(180deg, #0f0c0a, #0a0807); border-top: 1px solid var(--line); position: relative; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--bronze) 30%, var(--gold) 50%, var(--bronze) 70%, transparent); opacity: .6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-top: 44px; padding-bottom: 30px; }
.footer-brand img { height: 46px; width: auto; margin-bottom: 10px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 340px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h3 { font-size: 15px; letter-spacing: .08em; margin: 0 0 6px; }
.footer-links a { color: var(--muted); font-size: 14.5px; }
.footer-links a:hover { color: var(--gold-2); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 22px; color: var(--faint); font-size: 13px; text-align: center; }
.discord { gap: 8px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .menu > a, .dropdown-toggle { padding: 10px 7px; font-size: 13.5px; letter-spacing: .03em; }
  .account-name { max-width: 90px; }
}
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 960px) {
  :root { --topbar: 66px; }
  .brand img { height: 42px; }
  .menu-toggle { display: flex; }
  .menu-panel { position: fixed; top: var(--topbar); left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 20px 30px; background: rgba(12, 10, 8, .98); overflow-y: auto; transform: translateX(100%); transition: transform .25s; }
  .menu-panel.open { transform: none; }
  .menu { flex-direction: column; align-items: stretch; margin: 0; }
  .menu > a, .dropdown-toggle { font-size: 17px; padding: 14px 6px; width: 100%; justify-content: flex-start; border-bottom: 1px solid var(--line); }
  .dropdown-toggle .caret { margin-left: auto; }
  .menu-ico { display: inline-block; width: 26px; height: 26px; margin-right: 12px; }
  .menu > a::after, .menu .dropdown > .dropdown-toggle::after { display: none; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; background: rgba(255, 255, 255, .03); margin: 4px 0 8px; }
  .dropdown:hover > .dropdown-menu { display: none; }
  .dropdown.open > .dropdown-menu { display: block; }
  .account-box { margin-top: 18px; justify-content: center; flex-wrap: wrap; }
  .account-menu { width: 100%; }
  .account-toggle { width: 100%; justify-content: space-between; }
  .grid-main, .grid-2, .account-layout { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .account-nav { position: static; }
  .account-nav .panel-body { display: flex; flex-wrap: wrap; gap: 4px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .why { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-sep { display: none; }
  .hero-br { display: inline; }
  .hero-bg { background-image: var(--hero-mobile, var(--hero)); }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .qr-box { grid-template-columns: 1fr; }
  .qr-box .qr { max-width: 240px; }
  .news-item { grid-template-columns: 58px 1fr; gap: 12px; }
  .calendar-item { grid-template-columns: 1fr; gap: 4px; }
  .codes { grid-template-columns: 1fr; }
  .panel { border-width: 12px; border-image-width: 12px; }
  .btn-lg.btn-ember { font-size: 18px; padding: 0 22px; }
  .hero { padding-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
