/* 3K-Classic website - game theme: black lacquer, red, gold and parchment (same look as the launcher) */
:root {
  --ink: #0f0806; --ink-2: #1b0f0a; --ink-3: #2a1710;
  --lacquer: #5e0d09; --lacquer-2: #8f1a12; --lacquer-3: #b8281a;
  --gold: #e3b358; --gold-2: #fbe2a0; --gold-3: #9a6a22;
  --paper: #f1e3c4; --paper-2: #e6d2a8; --paper-ink: #3a2414; --paper-muted: #7a5c3e;
  --text: #f3e6cf; --muted: #b9a284; --line: rgba(227, 179, 88, .28);
  --ok: #7be36b; --bad: #ff7b62; --radius: 6px; --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --font-body: 'Sarabun', 'Tahoma', sans-serif; --font-head: 'Chonburi', 'Sarabun', serif; --font-latin: 'Cinzel', 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font: 16px/1.65 var(--font-body);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(143, 26, 18, .35), transparent 60%),
    radial-gradient(circle at 15% 40%, rgba(227, 179, 88, .05), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 8px);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.3; margin: 0 0 .5em; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
main { flex: 1; }

/* ---------- header / nav */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(#2a0805, #170504 70%, #0f0303);
  border-bottom: 2px solid var(--gold-3);
  box-shadow: 0 2px 0 #000, 0 6px 22px rgba(0, 0, 0, .6);
}
.site-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.head-in { display: flex; align-items: center; gap: 18px; height: 72px; }
.site-head .wrap { width: min(1320px, 100% - 32px); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 56px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .7)); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .nav .drop > span {
  display: block; padding: 8px 13px; font-family: var(--font-head); font-size: 15px; color: var(--paper-2);
  border-radius: 4px; cursor: pointer; white-space: nowrap; letter-spacing: .2px;
}
.nav a:hover, .nav .drop:hover > span, .nav a.on { color: #fff; background: linear-gradient(rgba(227, 179, 88, .18), rgba(227, 179, 88, .05)); box-shadow: inset 0 -2px 0 var(--gold); }
.nav .drop { position: relative; }
.nav .drop > span::after { content: ' ▾'; font-size: 11px; opacity: .7; }
.nav .menu {
  position: absolute; top: 100%; left: 0; z-index: 2; min-width: 190px; padding: 8px; display: none;
  background: #1a0806; border: 1px solid var(--gold-3); border-radius: 6px; box-shadow: var(--shadow);
}
.nav .drop:hover .menu, .nav .drop:focus-within .menu { display: block; }
.nav .menu a { font-size: 15px; }
.nav .drop.on > span { color: #fff; background: linear-gradient(rgba(227, 179, 88, .18), rgba(227, 179, 88, .05)); box-shadow: inset 0 -2px 0 var(--gold); }
.nav .btn-reg { margin-left: 8px; }
/* game-database tab bar (items / soldiers / monsters / bosses / maps) under the page banner */
.dbtabs { background: linear-gradient(#2c1810, #1a0e08); border-bottom: 1px solid var(--gold-3); }
.dbtabs .wrap { display: flex; justify-content: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.dbtabs a { flex: none; padding: 10px 18px; font-family: var(--font-head); font-size: 15px; color: var(--paper-2); white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
.dbtabs a:hover { color: #fff; background: rgba(227, 179, 88, .1); }
.dbtabs a.on { color: #fff; background: linear-gradient(rgba(227, 179, 88, .22), rgba(227, 179, 88, .06)); box-shadow: inset 0 -3px 0 var(--gold); }
@media (max-width: 600px) { .dbtabs .wrap { justify-content: space-between; gap: 0; } .dbtabs a { padding: 9px 6px; font-size: 13px; } }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--gold-3); color: var(--gold-2); border-radius: 6px; padding: 6px 10px; font-size: 20px; cursor: pointer; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border-radius: 4px; cursor: pointer; font: 18px var(--font-head); letter-spacing: .3px;
  color: #fff4d6; text-shadow: 0 1px 0 #3a0603, 0 0 10px rgba(255, 190, 90, .35);
  background: linear-gradient(#c6341f, #8c140c 55%, #5c0805);
  border: 1px solid #f0c060; box-shadow: inset 0 1px 0 rgba(255, 230, 170, .55), inset 0 -2px 6px rgba(0, 0, 0, .45), 0 4px 14px rgba(0, 0, 0, .55);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { color: #fff; filter: brightness(1.12); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .6), 0 0 0 2px rgba(240, 192, 96, .35), 0 6px 22px rgba(200, 60, 20, .45); transform: translateY(-1px); }
.btn.gold { color: #3a1d06; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); background: linear-gradient(#fff0b8, #e3b358 50%, #a8701f); border-color: #fff0c0; }
.btn.ghost { background: rgba(0, 0, 0, .35); border-color: var(--gold-3); box-shadow: none; }
.btn.small { padding: 6px 14px; font-size: 15px; }
.btn.big { padding: 14px 34px; font-size: 21px; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; min-height: 600px; display: flex; align-items: center; isolation: isolate; border-bottom: 2px solid var(--gold-3); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url(../img/bg/heaven.jpg) center 30% / cover no-repeat; filter: saturate(.85) brightness(.75); transform: scale(1.04); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 8, 6, .92), rgba(15, 8, 6, .35) 30%, rgba(15, 8, 6, .35) 70%, rgba(15, 8, 6, .92)), linear-gradient(transparent 55%, var(--ink)); }
.hero .cut { position: absolute; bottom: 0; height: 92%; width: auto; max-width: none; z-index: -1; filter: drop-shadow(0 0 24px rgba(0, 0, 0, .8)); pointer-events: none; }
.hero .cut.l { left: max(-80px, 50% - 860px); }
.hero .cut.r { right: max(-90px, 50% - 880px); }
.hero-in { width: 100%; text-align: center; padding: 56px 16px 70px; }
.hero-logo { width: min(760px, 92vw); height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .8)); }
.hero p.tag { font: 22px var(--font-head); color: var(--paper); margin: 6px auto 26px; text-shadow: 0 2px 8px #000; max-width: 720px; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 8px 18px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--line); font-size: 15px; color: var(--paper-2);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #777; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.dot.on { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.off { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

/* ---------- page banner (inner pages) */
.banner { position: relative; padding: 70px 0 54px; text-align: center; overflow: hidden; isolation: isolate; border-bottom: 2px solid var(--gold-3); }
.banner::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; filter: brightness(.45) saturate(.8); }
.banner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 40%, var(--ink)), radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, .6)); }
.banner h1 { font-size: clamp(32px, 5vw, 50px); color: var(--gold-2); text-shadow: 0 3px 0 #3a0a04, 0 0 24px rgba(255, 160, 60, .35); margin: 0; }
.banner p { color: var(--paper-2); margin: 6px 0 0; font-size: 18px; }

/* ---------- section titles + ornaments */
.section { padding: 56px 0; }
.title { text-align: center; margin-bottom: 30px; }
.title h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--gold-2); margin: 0; text-shadow: 0 2px 0 #3a0a04; }
.title .sub { color: var(--muted); font-size: 16px; }
.title::after {
  content: ''; display: block; width: 220px; height: 14px; margin: 10px auto 0;
  background: radial-gradient(circle, var(--gold) 0 3px, transparent 4px) center / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 45%, transparent 45% 55%, var(--gold) 55%, var(--gold) 70%, transparent) center / 100% 1px no-repeat;
}

/* ---------- panels */
.panel {
  position: relative; background: linear-gradient(#24120c, #170b07); border: 1px solid var(--gold-3); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8), inset 0 0 0 4px rgba(227, 179, 88, .08), var(--shadow); padding: 22px;
}
.panel.paper { background: linear-gradient(#f5e9cd, #e9d6ab); color: var(--paper-ink); border-color: #b88a3a; box-shadow: inset 0 0 40px rgba(122, 80, 30, .25), inset 0 0 0 1px #fff3d0, var(--shadow); }
.panel.paper h3 { color: #6a160c; }
.panel.paper .panel-head h3, .panel.paper .panel-head a { color: var(--gold-2); }
.boss-card { display: grid; grid-template-columns: 1fr; gap: 10px; }
.boss-card .top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.boss-card .top .nm { font: 24px var(--font-head); color: var(--gold-2); }
.boss-card .lv { font: 18px var(--font-head); color: #fff; background: linear-gradient(#c6341f, #7c120b); border: 1px solid #f0c060; border-radius: 4px; padding: 0 10px; }
.boss-card .maps { color: var(--paper-2); font-size: 15px; }
.boss-card .maps b { color: var(--gold); font-weight: 600; }
.boss-card .drops { display: flex; flex-wrap: wrap; gap: 6px; }
.boss-card .drops .item { width: auto; padding: 4px 10px 4px 4px; }
.boss-card .drops .icon { width: 32px; height: 32px; background-size: 28px 28px; }
.boss-card .meta { color: var(--muted); font-size: 14px; }
.mapcard { display: grid; gap: 8px; }
.mapcard .top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.mapcard .top .nm { font: 22px var(--font-head); color: var(--gold-2); }
.mapcard .lv { font: 16px var(--font-head); color: #fff; background: linear-gradient(#c6341f, #7c120b); border: 1px solid #f0c060; border-radius: 4px; padding: 0 10px; }
.mapcard .meta { color: var(--muted); font-size: 14px; }
.mapcard .maps { color: var(--paper-2); font-size: 15px; }
.bossrow { display: flex; gap: 16px; align-items: flex-start; }
.bossbody { flex: 1; min-width: 0; display: grid; gap: 10px; }
.bosspic { width: 120px; height: 120px; object-fit: contain; flex-shrink: 0; border-radius: 6px; background: radial-gradient(circle at 50% 70%, rgba(184, 40, 26, .45), rgba(0, 0, 0, .5) 70%); border: 1px solid var(--gold-3); padding: 6px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
@media (max-width: 560px) { .bosspic { width: 80px; height: 80px; } }
.panel.paper a { color: #8f1a12; }
.panel .corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold); }
.panel .corner.tl { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.panel .corner.tr { top: 5px; right: 5px; border-left: 0; border-bottom: 0; }
.panel .corner.bl { bottom: 5px; left: 5px; border-right: 0; border-top: 0; }
.panel .corner.br { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; margin: -22px -22px 18px; padding: 12px 20px; border-bottom: 1px solid var(--gold-3); background: linear-gradient(#7a140d, #4a0806); border-radius: var(--radius) var(--radius) 0 0; }
.panel-head h3 { margin: 0; font-size: 20px; color: var(--gold-2); }
.panel-head .more { margin-left: auto; font-size: 14px; }

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- status strip */
.strip { margin-top: -38px; position: relative; z-index: 2; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--gold-3); border-radius: var(--radius); overflow: hidden; background: linear-gradient(#2a120c, #160906); box-shadow: var(--shadow); }
.stat { padding: 16px 18px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 26px var(--font-head); color: var(--gold-2); }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- news list */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: flex; align-items: baseline; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed rgba(122, 80, 40, .45); }
.news li:last-child { border-bottom: 0; }
.news li::before { content: '◆'; color: #b8281a; font-size: 12px; }
.news .d { margin-left: auto; color: var(--paper-muted); font-size: 14px; white-space: nowrap; }
.panel:not(.paper) .news li { border-bottom-color: var(--line); }
.panel:not(.paper) .news .d { color: var(--muted); }

/* ---------- tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { font-family: var(--font-head); font-weight: 400; color: var(--gold-2); background: rgba(143, 26, 18, .35); }
.tbl tr:hover td { background: rgba(227, 179, 88, .06); }
.panel.paper .tbl th { color: #fff2cf; background: #7a160d; }
.panel.paper .tbl td { border-bottom-color: rgba(122, 80, 40, .3); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- class cards */
.cls-card { position: relative; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; padding: 0; isolation: isolate; transition: transform .2s; }
.cls-card:hover { transform: translateY(-4px); }
.cls-card img { position: absolute; right: -40px; bottom: 0; height: 100%; width: auto; max-width: none; z-index: -1; transition: transform .3s; }
.cls-card:hover img { transform: scale(1.04); }
.cls-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 35%, rgba(10, 4, 2, .95)); }
.cls-card .t { padding: 18px 20px; }
.cls-card h3 { font-size: 26px; color: var(--gold-2); margin: 0; }
.cls-card p { margin: 4px 0 0; color: var(--paper-2); font-size: 14px; }

.cls-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; padding: 30px 0; border-bottom: 1px solid var(--line); }
.cls-row:nth-child(even) .pic { order: 2; }
.cls-row .pic { position: relative; text-align: center; }
.cls-row .pic::before { content: ''; position: absolute; inset: 10% 8% 0; background: radial-gradient(circle, rgba(184, 40, 26, .45), transparent 65%); z-index: -1; }
.cls-row .pic img { max-height: 440px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .7)); }
.cls-row h2 { font-size: 40px; color: var(--gold-2); margin: 0; }
.cls-row h2 small { font: 16px var(--font-latin); color: var(--muted); letter-spacing: 3px; margin-left: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13px; background: rgba(227, 179, 88, .1); border: 1px solid var(--line); color: var(--paper-2); }
.chip.red { background: rgba(184, 40, 26, .3); border-color: rgba(220, 80, 60, .5); }
button.chip { cursor: pointer; font-family: inherit; }
button.chip.on { background: linear-gradient(#c6341f, #7c120b); border-color: #f0c060; color: #fff; }

/* ---------- feature cards */
.feat { text-align: center; padding: 28px 22px; display: block; color: inherit; transition: transform .2s, box-shadow .2s; }
.feat:hover { transform: translateY(-4px); color: inherit; box-shadow: 0 0 0 1px var(--gold), var(--shadow); }
.feat .ico { width: 72px; height: 72px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(#8f1a12, #3e0606); border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(184, 40, 26, .55); }
.feat .ico img { width: 40px; height: 40px; image-rendering: pixelated; }
.feat h3 { color: var(--gold-2); font-size: 22px; margin-bottom: 4px; }
.feat b { font: 30px var(--font-head); color: #fff; display: block; }
.feat p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }

/* ---------- database toolbar + item grid */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select {
  font: 15px var(--font-body); color: var(--text); background: #120806; border: 1px solid var(--gold-3); border-radius: 4px; padding: 9px 12px; min-width: 0;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 179, 88, .25); }
.toolbar .search { flex: 1 1 260px; }
.toolbar .lv { width: 84px; }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.item {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%;
  background: linear-gradient(#22110b, #160a07); border: 1px solid rgba(154, 106, 34, .5); border-radius: 5px; transition: border-color .15s, background .15s;
}
.item:hover, .item:focus-visible { border-color: var(--gold); background: linear-gradient(#3a160d, #1d0b07); outline: none; }
.icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 4px; border: 1px solid #6a4a1c; background: #000 center / 34px 34px no-repeat; box-shadow: inset 0 0 6px rgba(0, 0, 0, .9); image-rendering: auto; }
.icon.big { width: 56px; height: 56px; background-size: 48px 48px; }
.item .nm { font-weight: 600; color: var(--paper); line-height: 1.3; }
.item .sub { font-size: 13px; color: var(--muted); }
.more-row { text-align: center; margin: 18px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(2px); overflow-y: auto; }
.modal.open { display: flex; }
.modal .box { width: min(640px, 100%); position: relative; }
.modal .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--gold-2); font-size: 26px; cursor: pointer; line-height: 1; z-index: 2; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0; font-size: 15px; }
.dl dt { color: var(--paper-muted); }
.dl dd { margin: 0; font-weight: 600; }
.desc { white-space: pre-line; background: rgba(255, 255, 255, .35); border-left: 3px solid #b8281a; padding: 8px 12px; border-radius: 3px; }
.desc .hl { color: #8f1a12; font-weight: 700; }
.desc .note { color: #1c5d8a; }
.req { color: #8f1a12; font-weight: 600; }
.src a { cursor: pointer; }

/* ---------- monsters */
.tbl.mon td:first-child { font-weight: 600; color: var(--paper); }
.mcell { display: flex; align-items: center; gap: 10px; }
.mthumb { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; border-radius: 4px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(154, 106, 34, .4); }
.tbl.mon tr { cursor: pointer; }
.boss { color: #ffb347; font-size: 12px; border: 1px solid #ffb347; border-radius: 3px; padding: 0 5px; margin-left: 6px; }
.drop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.drop-list .item { padding: 6px 8px; background: rgba(255, 255, 255, .45); border-color: #c49a54; color: var(--paper-ink); }
.drop-list .item .nm { color: var(--paper-ink); }
.drop-list .item .sub { color: var(--paper-muted); }

/* ---------- soldier promotion tree */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 30px; padding-left: 24px; border-left: 2px solid rgba(227, 179, 88, .35); }
.tree li { position: relative; padding: 6px 0; }
.tree ul > li::before { content: ''; position: absolute; left: -24px; top: 38px; width: 22px; border-top: 2px solid rgba(227, 179, 88, .35); }
.sol {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; cursor: pointer; font: inherit; color: inherit; text-align: left;
  background: linear-gradient(#2a120c, #170906); border: 1px solid rgba(154, 106, 34, .7); border-radius: 6px; min-width: 300px; max-width: 100%;
}
.sol:hover { border-color: var(--gold); }
.sol .tier { font: 13px var(--font-head); color: #fff4d6; background: linear-gradient(#c6341f, #7c120b); border: 1px solid #f0c060; border-radius: 3px; padding: 1px 7px; }
.sol .nm { font-weight: 700; color: var(--paper); font-size: 16px; }
.sol .sub { font-size: 13px; color: var(--muted); }
.promo { display: inline-block; font-size: 13px; color: var(--gold-2); margin: 0 0 4px 2px; }
.promo::before { content: '▲ '; color: #e05a3a; }
.toggle { background: none; border: 0; color: var(--gold); cursor: pointer; font-size: 14px; margin-left: 6px; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

/* ---------- soldier promotion table (rows = paths, columns = tiers) */
.solpanel { padding: 0; overflow: hidden; }
.solpanel .panel-head { margin: 0; border-radius: var(--radius) var(--radius) 0 0; }
.solwrap { overflow-x: auto; padding: 10px; }
.soltbl { border-collapse: separate; border-spacing: 6px; }
.soltbl th { font: 15px var(--font-head); font-weight: 400; color: var(--gold-2); background: rgba(143, 26, 18, .35); padding: 6px 10px; border-radius: 4px; min-width: 150px; }
.soltbl td { vertical-align: middle; padding: 0; }
.soltbl td.none { background: none; }
.sol2 {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 150px; height: 100%; min-height: 150px; padding: 8px 6px; cursor: pointer; font: inherit; color: inherit; text-align: center;
  background: linear-gradient(#2a120c, #170906); border: 1px solid rgba(154, 106, 34, .7); border-radius: 6px; position: relative;
}
.sol2:hover { border-color: var(--gold); background: linear-gradient(#3a160d, #1d0b07); }
.sol2 img { height: 64px; width: auto; max-width: 90px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .7)); }
.sol2 .nm { font-weight: 700; color: var(--paper); font-size: 14px; line-height: 1.25; }
.sol2 .sub { font-size: 11px; color: var(--muted); }
.sol2 .need { font-size: 12px; color: var(--gold-2); margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); width: 100%; }
.sol2 .need a { color: #ffb347; text-decoration: underline dotted; }
.soltbl td[rowspan] .sol2 { height: 100%; }
.soltbl td:not(:first-child) .sol2::before { content: '›'; position: absolute; left: -9px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 20px; }
.sol2.dim { opacity: .25; }
.grid .sol2 { width: 100%; }

/* ---------- compact soldier grid (rows = ขั้น, columns = branch) */
.solsec { font-size: 28px; color: var(--gold-2); margin: 26px 0 10px; text-shadow: 0 2px 0 #3a0a04; }
.solgrid { border-collapse: separate; border-spacing: 4px; }
.solgrid th.t { font: 14px var(--font-head); font-weight: 400; color: var(--gold-2); background: rgba(143, 26, 18, .35); padding: 4px 8px; border-radius: 4px; white-space: nowrap; vertical-align: middle; }
.solgrid td { vertical-align: top; padding: 0; border-left: 1px dashed rgba(227, 179, 88, .15); }
.cells { display: flex; flex-wrap: wrap; gap: 4px; }
.sol3 {
  display: flex; flex-direction: column; align-items: center; width: 104px; padding: 4px 3px; gap: 1px; cursor: pointer; font: inherit; color: inherit; text-align: center;
  background: linear-gradient(#2a120c, #170906); border: 1px solid rgba(154, 106, 34, .6); border-radius: 5px;
}
.sol3:hover { border-color: var(--gold); background: linear-gradient(#3a160d, #1d0b07); }
.sol3 img { height: 46px; width: auto; max-width: 70px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.sol3 .icon { width: 36px; height: 36px; background-size: 30px 30px; }
.sol3 .nm { font-weight: 600; color: var(--paper); font-size: 12px; line-height: 1.2; }
.sol3 .need { font-size: 11px; color: var(--gold-2); }
.sol3 .need a { color: #ffb347; }
.sol3.dim { opacity: .2; }
.sol3.hit { box-shadow: 0 0 0 2px var(--gold); }

.chains { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px; }
.chain { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border: 1px solid rgba(154, 106, 34, .3); border-radius: 6px; background: rgba(0, 0, 0, .25); overflow-x: auto; }
.chain .cells { flex-wrap: nowrap; gap: 2px; }
.chain .arr { color: var(--gold); font-size: 18px; line-height: 1; padding: 0 1px; flex-shrink: 0; }
.chain .sol3 { width: 82px; padding: 3px 2px; }
.chain .sol3.royal { background: linear-gradient(#3a1a08, #1d0c05); border-color: rgba(227, 179, 88, .7); }
.chain .sol3 img { height: 40px; max-width: 60px; }
.chain .sol3 .nm { font-size: 11px; }
.chain .sol3 .need { font-size: 10px; }


/* ---------- download steps */
.steps { counter-reset: s; }
.step { position: relative; padding-left: 70px; min-height: 54px; margin-bottom: 22px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font: 24px var(--font-head); color: #fff4d6; background: radial-gradient(#c6341f, #5c0805); border: 2px solid var(--gold); }
.step h3 { color: var(--gold-2); margin-bottom: 2px; }
.step p { margin: 0; color: var(--paper-2); }

/* ---------- forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 600; color: var(--paper-ink); }
.form input { font: 16px var(--font-body); padding: 10px 12px; border: 1px solid #b88a3a; border-radius: 4px; background: #fffaf0; color: #2a1a0e; }
.form input:focus { outline: none; border-color: #8f1a12; box-shadow: 0 0 0 3px rgba(143, 26, 18, .2); }
.form .hint { font-weight: 400; font-size: 13px; color: var(--paper-muted); }
.cap { display: flex; gap: 10px; align-items: center; }
.cap img { height: 46px; border: 1px solid #b88a3a; border-radius: 4px; cursor: pointer; }
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-weight: 600; }
.alert.err { background: #fde3dc; color: #8f1a12; border: 1px solid #e3a28f; }
.alert.ok { background: #e3f6d8; color: #2c6b14; border: 1px solid #a6d98c; }

/* ---------- footer */
.site-foot { margin-top: 40px; background: linear-gradient(#170504, #0a0201); border-top: 2px solid var(--gold-3); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 26px 0; }
.foot-in img { height: 54px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .hero .cut { opacity: .45; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
/* the full menu no longer fits below ~1140px: use the burger menu */
@media (max-width: 1140px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; background: #150504; border-bottom: 2px solid var(--gold-3); }
  .nav.open { display: flex; }
  .nav .menu { position: static; display: block; border: 0; box-shadow: none; background: none; padding: 0 0 0 14px; }
  .nav .drop > span::after { content: ''; }
  .nav .btn-reg { margin: 8px 0 0; }
}
@media (max-width: 900px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cls-row { grid-template-columns: 1fr; }
  .cls-row:nth-child(even) .pic { order: 0; }
  .hero { min-height: 520px; }
  .hero .cut.r { display: none; }
  .hero .cut.l { opacity: .3; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .brand img { height: 44px; }
  .tree ul { margin-left: 12px; padding-left: 14px; }
  .tree ul > li::before { left: -14px; width: 12px; }
  .sol { min-width: 0; }
  .hide-sm { display: none; }
}

/* =====================================================================
   THEME: launcher look (user request 2026-10-13) - wood-brown frame, cream parchment panels,
   dark-red title bars with gold text. Overrides the dark defaults above. */
:root { --ink: #2a1a12; --ink-2: #3a2418; --text: #f3e6cf; --muted: #c9b595; --line: rgba(227, 179, 88, .35); }
body {
  background-color: #2b1a11;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(120, 70, 30, .35), transparent 55%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .10) 0 3px, transparent 3px 11px),
    linear-gradient(#3a2416, #22140c 60%, #1a0f09);
}
.site-head { background: linear-gradient(#4a2a16, #2c1810 70%, #1a0e08); border-bottom-color: #c9963e; }
.nav a, .nav .drop > span { color: #f0dcb0; }
.nav a:hover, .nav a.on, .nav .drop.on > span { color: #fff; background: linear-gradient(rgba(227, 179, 88, .22), rgba(227, 179, 88, .06)); }
.nav .menu { background: #2c1810; }
/* panels = parchment with a wood + gold frame (like the launcher news box) */
.panel { background: linear-gradient(#f6ead0, #ecd9b3 60%, #e6cfa3); color: #3a2414; border: 2px solid #6b4322; box-shadow: inset 0 0 0 2px #d9b36a, inset 0 0 0 4px #7a4f26, inset 0 0 40px rgba(122, 80, 30, .18), 0 10px 30px rgba(0, 0, 0, .55); }
.panel h3 { color: #6a160c; }
.panel a { color: #8f1a12; }
.panel a:hover { color: #c6341f; }
.panel .corner { border-color: #b8862e; }
.panel-head, .panel.paper .panel-head { background: linear-gradient(#8c1a10, #4e0906); border-bottom: 2px solid #c9963e; margin: -22px -22px 18px; }
.panel-head h3, .panel.paper .panel-head h3, .panel .panel-head a, .panel-head .more { color: var(--gold-2); }
.panel .muted, .panel .meta, .panel .sub, .panel .hint, .panel p[style*="muted"] { color: #7a5c3e; }
.panel [style*="color:var(--muted)"], .panel [style*="color:var(--paper-2)"] { color: #5b4027 !important; }
.panel.paper { color: #3a2414; }
.news li { border-bottom-color: rgba(122, 80, 40, .45); }
.news .d, .panel:not(.paper) .news .d { color: #7a5c3e; }
.panel .steps .step p, .panel p { color: #4a3220; }
.panel .step::before { border-color: #c9963e; }
/* tables inside parchment */
.tbl th, .panel.paper .tbl th { color: #ffe9b8; background: linear-gradient(#8c1a10, #5a0c08); }
.tbl td { border-bottom-color: rgba(122, 80, 40, .3); color: #3a2414; }
.tbl tr:hover td { background: rgba(143, 26, 18, .08); }
.tbl.mon td:first-child { color: #2a1608; }
.tbl.mon td[style*="muted"], .tbl.mon td[style*="font-size:13px"] { color: #6b4a2a !important; }
.mthumb { background: rgba(0, 0, 0, .55); border-color: #a8803a; }
/* toolbar / chips */
.toolbar input, .toolbar select { background: #fff8e8; color: #3a2414; border-color: #a8803a; }
.toolbar input::placeholder { color: #9a7a52; }
.toolbar .count { color: var(--muted); }
.chip { background: rgba(255, 244, 220, .92); color: #4a2e14; border-color: #b8862e; }
.chip.red { background: linear-gradient(#c6341f, #8c140c); color: #fff4d6; border-color: #f0c060; }
button.chip.on { background: linear-gradient(#c6341f, #7c120b); color: #fff; border-color: #f0c060; }
.panel .chip { background: #fff8e8; }
/* item / soldier / boss cards on parchment */
.item, .sol, .sol2, .sol3 { background: linear-gradient(#fff8e6, #f2e0bd); border-color: #b8862e; color: #3a2414; }
.item:hover, .item:focus-visible, .sol:hover, .sol2:hover, .sol3:hover { background: linear-gradient(#fffdf4, #f6e8c8); border-color: #8f1a12; box-shadow: 0 0 0 1px #8f1a12; }
.item .nm, .sol .nm, .sol2 .nm, .sol3 .nm { color: #2a1608; }
.item .sub, .sol .sub, .sol2 .sub, .sol3 .sub { color: #7a5c3e; }
.sol3 .need, .sol2 .need { color: #8f1a12; border-top-color: rgba(122, 80, 40, .35); }
.sol3 .need a, .sol2 .need a, .promo { color: #b8281a; }
.chain .sol3.royal { background: linear-gradient(#f3e2c0, #e4c994); border-color: #8f1a12; }
.icon { border-color: #a8803a; background-color: #1a0e08; }
.chain { background: rgba(122, 80, 40, .10); border-color: rgba(122, 80, 40, .35); }
.chain .arr { color: #8f1a12; }
.solgrid th.t, .soltbl th { color: #ffe9b8; background: linear-gradient(#8c1a10, #5a0c08); }
.solgrid td { border-left-color: rgba(122, 80, 40, .25); }
.tier-legend .chip b { color: #8f1a12; }
.boss-card .top .nm, .mapcard .top .nm { color: #6a160c; text-shadow: none; }
.boss-card .meta, .mapcard .meta, .boss-card .maps, .mapcard .maps { color: #5b4027; }
.boss-card .maps b { color: #8f1a12; }
.bosspic { background: radial-gradient(circle at 50% 70%, rgba(184, 40, 26, .35), rgba(60, 30, 10, .55) 70%); border-color: #a8803a; }
.boss { color: #b8281a; border-color: #b8281a; }
.empty { color: var(--muted); }
.panel .empty { color: #7a5c3e; }
/* feature / class cards on the home page */
.feat h3 { color: #6a160c; }
.feat b { color: #2a1608; }
.feat p { color: #5b4027; }
.feat .ico { border-color: #c9963e; }
.feat:hover { box-shadow: 0 0 0 2px #c9963e, 0 10px 30px rgba(0, 0, 0, .55); }
.cls-card { background: #1a0e08; color: var(--text); }
.cls-card h3 { color: var(--gold-2); }
.cls-card p { color: var(--paper-2); }
.stats { background: linear-gradient(#4a2a16, #2c1810); border-color: #c9963e; }
.stat b { color: var(--gold-2); }
.cls-row p, .cls-row h2 small { color: #e8d6b4; }
/* buttons like the launcher: wood with gold text, red for the main action */
.btn { color: #ffe9b8; background: linear-gradient(#7a4a24, #4a2a12 55%, #2e1808); border-color: #d9b36a; box-shadow: inset 0 1px 0 rgba(255, 230, 170, .45), inset 0 -2px 6px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .5); text-shadow: 0 1px 0 #1a0e08; }
.btn.big, .btn-reg, .panel .btn { background: linear-gradient(#c6341f, #8c140c 55%, #5c0805); border-color: #f0c060; color: #fff4d6; }
.btn.ghost { background: rgba(60, 35, 15, .6); color: #ffe9b8; }
.btn.gold { color: #3a1d06; background: linear-gradient(#fff0b8, #e3b358 50%, #a8701f); }
.site-foot { background: linear-gradient(#2c1810, #1a0e08); border-top-color: #c9963e; }
.banner::before { filter: brightness(.5) saturate(.85); }
.title h2 { color: var(--gold-2); }
.title .sub { color: var(--muted); }
.modal .box { background: linear-gradient(#f6ead0, #e6cfa3); }
.form input { background: #fffaf0; border-color: #a8803a; }
.alert.err { background: #fde3dc; } .alert.ok { background: #e3f6d8; }
.dl dt { color: #7a5c3e; }
.desc { background: rgba(255, 250, 235, .7); }
.drop-list .item { background: linear-gradient(#fff8e6, #f2e0bd); }

/* 13 menu items: keep the menu on one line on 1280-1500 px screens */
@media (min-width: 1141px) and (max-width: 1500px) { .nav a, .nav .drop > span { padding: 8px 7px; font-size: 14px; letter-spacing: 0; } .nav .btn-reg { margin-left: 4px; } .head-in .brand img { max-width: 150px; } }
