@font-face { font-family: "Galmuri11"; src: url("fonts/Galmuri11.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Galmuri11"; src: url("fonts/Galmuri11-Bold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }

:root {
  --bg: #070c0a; --panel: #0e1613; --panel-2: #131e1a; --line: #1f2d27; --line-2: #2a3b33;
  --text: #dfe6e2; --muted: #8fa199; --dim: #5c6b64;
  --gold: #d9b062; --gold-hi: #ecca80; --gold-lo: #a8864a;
  --em: #2ec471; --em-hi: #8cf4b6; --em-lo: #146838;
  --danger: #e2685a; --warn: #e2b45a;
  --radius: 4px;
  --title: "Galmuri11", system-ui, sans-serif;
  --body: "Galmuri11", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--body); }
body { min-height: 100vh; display: flex; flex-direction: column;
  background-image: radial-gradient(1200px 500px at 10% -10%, #10261b 0%, transparent 60%),
                    radial-gradient(900px 400px at 100% 0%, #1d1a0e 0%, transparent 55%); }
a { color: var(--em-hi); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img.pixel, .pixel { image-rendering: pixelated; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: rgba(7, 12, 10, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: var(--title); font-size: 18px; letter-spacing: .5px; font-weight: 700; }
.brand img { width: 30px; height: 30px; }
#nav { display: flex; gap: 4px; flex-wrap: wrap; }
#nav a { padding: 6px 12px; border-radius: var(--radius); color: var(--muted); font-family: var(--title); font-size: 14px; }
#nav a:hover { color: var(--text); background: var(--panel-2); }
#nav a.active { color: var(--gold-hi); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--em); }
.nav-group { position: relative; }
.nav-ico { width: 20px; height: 20px; margin-right: 6px; vertical-align: -5px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.rank-demo { margin-left: 6px; font-size: 10px; vertical-align: 2px; }
.nav-drop { padding: 6px 12px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font-family: var(--title);
  font-size: 14px; cursor: pointer; }
.nav-drop::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px; border: 4px solid transparent;
  border-top-color: currentColor; border-bottom: 0; }
.nav-drop:hover, .nav-group.open .nav-drop { color: var(--text); background: var(--panel-2); }
.nav-group.active .nav-drop { color: var(--gold-hi); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--em); }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 160px; padding: 6px; display: none;
  flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu, .nav-group.open .nav-menu { display: flex; }
#nav .nav-menu a { white-space: nowrap; display: flex; align-items: center; }
.nav-ico.sub { width: 18px; height: 18px; margin-right: 8px; vertical-align: 0; flex: none; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.board-head h1 { margin: 0; }
.board-en { font-family: var(--title); font-size: 12px; letter-spacing: 1.5px; color: var(--em); margin-bottom: 4px; }
.post-list { display: flex; flex-direction: column; }
.post-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.post-row:last-child { border-bottom: 0; }
.post-row:hover .post-title { color: var(--gold-hi); }
.post-row.pinned { background: linear-gradient(90deg, rgba(217, 176, 98, .06), transparent); }
.post-main { min-width: 0; }
.post-title { font-family: var(--title); font-size: 16px; display: flex; gap: 8px; align-items: center; }
.post-excerpt { margin-top: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-meta { flex: none; text-align: right; font-size: 12px; line-height: 1.6; }
.badge.pin { color: var(--gold-hi); border-color: var(--gold-lo); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.post-view-title { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 22px; }
.post-view-meta { font-size: 13px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.post-body { white-space: pre-wrap; word-break: break-word; line-height: 1.8; }
.board-actions { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 16px; }
.board-admin { display: flex; gap: 8px; }
.post-form { display: flex; flex-direction: column; gap: 8px; }
.post-form .post-input { width: 100%; font: inherit; color: var(--text); padding: 10px 12px; }
.post-pin { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.home-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home-board-head a { font-size: 13px; }
.home-board-list { list-style: none; margin: 0; padding: 0; }
.home-board-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.home-board-list li:last-child { border-bottom: 0; }
.home-board-list a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.home-board-list a:hover { color: var(--gold-hi); }
.home-board-list .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-board-list .dim { flex: none; font-size: 12px; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 38px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 1px; transition: transform .15s, opacity .15s; }
.topbar.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topbar.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.me-progress { margin: 10px 0 8px; display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.me-level { display: flex; align-items: center; gap: 10px; }
.me-lv { font-family: var(--title); color: var(--gold-hi); font-weight: 700; white-space: nowrap; }
.me-xp { flex: 1; height: 10px; background: #0a110e; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.me-xp span { display: block; height: 100%; background: linear-gradient(90deg, var(--em-lo), var(--em)); }
.me-pct { font-family: var(--title); color: var(--em-hi); font-size: 13px; min-width: 52px; text-align: right; }
.me-power { display: flex; align-items: baseline; gap: 8px; }
.me-power b { font-family: var(--title); color: #ff8a5c; font-size: 18px; }
.rank-refresh { display: flex; gap: 10px; align-items: center; margin: -6px 0 14px; font-size: 13px; }
.rank-head, .rank-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rank-head span { white-space: nowrap; }
.rank-head { padding: 0 8px 8px; font-size: 12px; border-bottom: 1px solid var(--line); }
.rank-head span:last-child, .rank-val { text-align: right; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-no { font-family: var(--title); color: var(--muted); text-align: center; }
.rank-name { font-family: var(--title); color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-family: var(--title); color: var(--gold-hi); white-space: nowrap; }
.rank-list li.top .rank-no { font-weight: 700; }
.rank-pvp .rank-head, .rank-pvp .rank-list li { grid-template-columns: 56px minmax(0, 1fr) 110px 96px; }
.rank-head .short { display: none; }
.rank-sub { font-family: var(--title); color: var(--muted); text-align: right; white-space: nowrap; }
.rank-pvp .rank-head span:nth-child(3) { text-align: right; }
.rank-list li.top1 { background: linear-gradient(90deg, rgba(236, 202, 128, .14), transparent); }
.rank-list li.top1 .rank-no { color: #ffd76a; }
.rank-list li.top2 .rank-no { color: #d7dde2; }
.rank-list li.top3 .rank-no { color: #d9965b; }
.ct-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 36px 32px; margin-bottom: 18px;
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.ct-hero.loot { background: radial-gradient(120% 140% at 90% 10%, rgba(214, 72, 52, .35), transparent 55%), linear-gradient(135deg, #1a0f0d, #0d1512); }
.ct-hero.dungeon { background: radial-gradient(120% 140% at 90% 10%, rgba(46, 196, 113, .28), transparent 55%), linear-gradient(135deg, #0b1611, #12101a); }
.ct-hero h1 { font-size: 40px; margin: 4px 0 10px; }
.ct-hero p { color: var(--text); max-width: 520px; line-height: 1.7; margin: 0; }
.ct-hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 4px; padding: 10px 0 18px; }
.ct-hero-art::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 6px; height: 18px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.ct-hero-art img { position: relative; z-index: 1; width: 30%; max-width: 140px; image-rendering: pixelated; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.ct-hero-art img:nth-child(1) { transform: rotate(-10deg) translateY(4px); }
.ct-hero-art img:nth-child(2) { transform: translateY(-14px) scale(1.12); }
.ct-hero-art img:nth-child(3) { transform: rotate(10deg) translateY(4px); }
.ct-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-bottom: 16px; }
.ct-section.flip .ct-text { order: 2; }
.ct-section h2 { margin: 2px 0 10px; }
.ct-section p { line-height: 1.8; margin: 0 0 10px; }
.ct-media { min-width: 0; }
.ct-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.ct-strip.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ct-icon { --g: #5c6b64; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px;
  background: radial-gradient(90% 70% at 50% 35%, color-mix(in srgb, var(--g) 22%, transparent), transparent 70%), #0a110e;
  border: 1px solid color-mix(in srgb, var(--g) 45%, var(--line-2)); border-radius: var(--radius); color: var(--text); font-size: 12px; text-align: center; }
.ct-icon:hover { border-color: var(--g); }
.ct-icon-art { width: 100%; aspect-ratio: 1 / 1; max-width: 72px; display: grid; place-items: center; }
.ct-icon-art img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55)); }
.ct-icon-name { width: 100%; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ct-icon-grade { font-size: 11px; color: var(--g); font-family: var(--title); }
.ct-set { min-width: 0; }
.ct-set-name { font-family: var(--title); color: var(--gold-hi); margin: 0 0 8px; font-size: 15px; }
.ft-hero { grid-template-columns: minmax(0, 1fr); }
.ft-icon { width: 40px; height: 40px; margin-right: 10px; vertical-align: -6px; }
.ft-shot { margin-bottom: 16px; }
.ft-shot .ct-shot { width: 100%; margin: 0; }
.ft-note { margin: 8px 0 0; font-size: 13px; }
.ft-warn { color: #ff8a80; margin: 4px 0 0; }
.ft-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.ft-card h2 { margin: 2px 0 10px; }
.ft-card p { line-height: 1.8; margin: 0 0 10px; }
.ft-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.8; }
@media (max-width: 760px) { .ft-grid { grid-template-columns: minmax(0, 1fr); } .ft-icon { width: 32px; height: 32px; } }
.ct-shot { display: block; max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line-2); margin-top: 6px; }
.ct-chat { overflow-wrap: anywhere; background: rgba(0, 0, 0, .55); border-radius: var(--radius); padding: 14px 16px; font-family: var(--title); font-size: 14px; line-height: 2; }
.ct-chat-gray { color: #aaaaaa; }
.ct-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ct-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ct-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; font-family: var(--title); font-size: 13px; }
.ct-stat img { width: 40px; height: 40px; }
.ct-stats.big { justify-content: center; gap: 16px; }
.ct-stats.big .ct-stat { width: 84px; padding: 12px 6px; background: #0a110e; border: 1px solid var(--line-2); border-radius: var(--radius); }
.ct-stats.big .ct-stat img { width: 56px; height: 56px; }
.ct-cta { text-align: center; }
.ct-cta .ct-links { justify-content: center; }
@media (max-width: 760px) {
  .ct-hero, .ct-section { grid-template-columns: minmax(0, 1fr); }
  .ct-section.flip .ct-text { order: 0; }
  .ct-hero { padding: 24px 18px; }
  .ct-hero h1 { font-size: 32px; }
  .ct-strip.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-head, .rank-list li { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; }
  .rank-name { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.35; }
  .rank-val, .rank-sub { font-size: 13px; }
  .rank-pvp .rank-head, .rank-pvp .rank-list li { grid-template-columns: 36px minmax(0, 1fr) 58px 58px; }
  .rank-head .long { display: none; }
  .rank-head .short { display: inline; }
  .ct-hero-art img { max-width: 110px; }
}
.nav-login { margin-left: auto; padding: 7px 18px; border-radius: var(--radius); border: 1px solid var(--em);
  background: linear-gradient(#1e7a48, #155c36); color: #effff5; font-family: var(--title); font-size: 14px; white-space: nowrap; }
.nav-login:hover { background: linear-gradient(#26915a, #1a6c40); color: #fff; }
.nav-login.active { box-shadow: 0 0 0 2px rgba(46, 196, 113, .35); }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 20px; border-top: 1px solid var(--line); }
.foot-join:empty { display: none; }
.foot-join { margin-bottom: 8px; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.foot-join code, .join code { font-size: 1.05em; }
.copy-btn { padding: 4px 12px; min-width: 64px; }
.copy-btn.done { border-color: #5ad08a; color: #5ad08a; }

h1, h2, h3 { font-family: var(--title); font-weight: normal; margin: 0 0 12px; color: var(--gold-hi); }
h1 { font-size: 30px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
.muted { color: var(--muted); } .dim { color: var(--dim); }

/* panels share the tooltip's "spine" motif */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 24px; }
.panel::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--em-hi), var(--em)); border-radius: 1px; }
.panel.gold { border-color: #3a3121; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px; margin-bottom: 20px; }
.hero img { width: 96px; height: 96px; }
.hero h1 { font-weight: 700; }
.hero .tag { display: inline-block; margin-right: 8px; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); margin-right: 6px; vertical-align: middle; }
.status-dot.on { background: var(--em); box-shadow: 0 0 8px var(--em); }
.big-number { font-family: var(--title); font-size: 32px; color: var(--text); }
.join { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.join code { background: #0a110e; border: 1px solid var(--line-2); padding: 6px 12px; border-radius: var(--radius); font-family: var(--title); color: var(--gold-hi); }

.tag { font-family: var(--title); font-size: 12px; padding: 2px 8px 2px 10px; background: #112c20; color: #d2f6e0;
  border-left: 2px solid var(--em-hi); border-bottom: 1px solid var(--em); }
.grade { font-family: var(--title); font-size: 12px; padding: 1px 8px; border-radius: 2px; border: 1px solid var(--line-2); color: var(--gold-hi); }
.badge { font-size: 11px; padding: 1px 6px; border-radius: 2px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.badge.warn { color: var(--warn); border-color: #4a3c1d; }
.badge.ok { color: var(--em-hi); border-color: var(--em-lo); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; font-family: var(--title); font-size: 13px; }
.btn:hover { border-color: var(--gold-lo); }
.btn.primary { background: linear-gradient(#1e7a48, #155c36); border-color: var(--em); color: #effff5; }
.btn.gold { background: linear-gradient(#3b301a, #2a2212); border-color: var(--gold-lo); color: var(--gold-hi); }
.btn.danger { border-color: #5a2a24; color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ms { background: #fff; color: #222; border-color: #ddd; font-family: var(--body); font-weight: 600; }
.btn.ms img { width: 18px; height: 18px; }

input[type=text], input[type=number], select, textarea { background: #0a110e; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 8px; min-width: 0; }
input[type=number] { width: 84px; }
textarea { width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--em); }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; margin: 2px 12px 2px 0; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--muted); background: transparent; }
.chip.active { color: var(--gold-hi); border-color: var(--gold-lo); background: #1a1710; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=text] { width: 220px; }

.card { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; text-align: left; }
.card:hover { border-color: var(--gold-lo); }
.card .icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: #0a110e; border: 1px solid var(--line-2); border-radius: 3px; }
.card .icon img { width: 40px; height: 40px; image-rendering: pixelated; }
.card .icon span { font-size: 10px; color: var(--dim); text-align: center; line-height: 1.1; padding: 2px; word-break: break-all; }
.card .meta { min-width: 0; }
.card .name { font-family: var(--title); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* In-game tooltip (same sprites as the resource pack, 2x nine-slice) */
.mc-tooltip { position: relative; display: inline-block; min-width: 340px; max-width: 100%; padding: 24px 24px 24px 24px; image-rendering: pixelated; }
.mc-tooltip::before, .mc-tooltip::after { content: ""; position: absolute; inset: 0; border-style: solid; border-width: 24px; pointer-events: none; }
.mc-tooltip::before { border-image: url("tooltip/standard_background.png") 12 fill / 24px stretch; z-index: 0; }
.mc-tooltip::after { border-image: url("tooltip/standard_frame.png") 12 / 24px stretch; z-index: 2; }
.mc-tooltip > * { position: relative; z-index: 1; }
.mc-tooltip .tt-name-row { display: flex; align-items: flex-start; justify-content: flex-start; gap: 6px; }
.mc-tooltip .tt-name { font-family: "Galmuri11"; font-weight: 700; font-size: 22px; color: #e9d29a; text-shadow: 2px 2px 0 #3e3418; line-height: 1.2; margin-bottom: 4px; }
.mc-tooltip .tt-grade-badge { display: block; height: 24px; flex: none; border: 0; outline: 0; box-shadow: none; text-decoration: none; image-rendering: pixelated; }
.mc-tooltip .tt-line { font-family: "Galmuri11"; font-size: 16px; line-height: 20px; color: #aaa; text-shadow: 2px 2px 0 #2a2a2a; display: flex; justify-content: space-between; gap: 16px; min-height: 20px; }
.mc-tooltip .tt-line .v { color: #fff; }
.mc-tooltip .tt-label { display: inline-flex; align-items: center; gap: 4px; }
.mc-tooltip .tt-stat-icon { width: 18px; height: 18px; flex: none; image-rendering: pixelated; }
.mc-tooltip .tt-glyph { display: block; height: 18px; width: auto; margin: 6px 0 4px; image-rendering: pixelated; }
.mc-tooltip .tt-type-row { display: flex; align-items: flex-start; gap: 6px; margin: 2px 6px 20px 0; }
.type-edit-row { display: grid; grid-template-columns: minmax(120px, 1fr) 60px minmax(80px, auto); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.type-edit-row img { object-fit: contain; object-position: left center; }
.type-edit-row input[type="color"] { width: 52px; height: 32px; padding: 2px; }
.mc-tooltip .tt-tag { display: block; height: 24px; border: 0; outline: 0; box-shadow: none; text-decoration: none; image-rendering: pixelated; }
.mc-tooltip .tt-dot { width: 10px; height: 12px; margin-right: 8px; vertical-align: middle; image-rendering: pixelated; }
.mc-tooltip .tt-gap { height: 10px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: middle; }
table.data th { color: var(--muted); font-weight: normal; font-size: 12px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 3vh 2vw; overflow: auto; }
.modal { width: min(1280px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 6px 6px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: none; border: none; padding: 8px 16px; color: var(--muted); cursor: pointer; font-family: var(--title); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--gold-hi); border-bottom-color: var(--em); }
.bulk { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: #0b1310; border: 1px dashed var(--line-2); border-radius: var(--radius); margin-bottom: 12px; }
.row { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: #0b1210; }
.row.disabled { opacity: .45; }
.row-main { display: grid; grid-template-columns: 24px 52px minmax(160px, 1.4fr) 110px 110px minmax(150px, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; }
.row-main .thumb { width: 48px; height: 48px; display: grid; place-items: center; background: #070c0a; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.row-main .thumb img { max-width: 44px; max-height: 44px; image-rendering: pixelated; }
.row-detail { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.field-title { font-family: var(--title); color: var(--gold); font-size: 13px; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.gen-box { background: #0a1410; border: 1px solid var(--em-lo); border-radius: var(--radius); padding: 10px; }
.notice { padding: 10px 14px; border-radius: var(--radius); background: #12201a; border: 1px solid var(--em-lo); margin: 10px 0; }
.notice.err { background: #261412; border-color: #5a2a24; color: #ffd7d1; }
.notice.warn { background: #241d10; border-color: #4a3c1d; }
.log { font-family: ui-monospace, monospace; font-size: 12px; white-space: pre-wrap; background: #070c0a; border: 1px solid var(--line); padding: 10px; border-radius: var(--radius); max-height: 260px; overflow: auto; }
.empty { padding: 40px; text-align: center; color: var(--dim); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 180px; padding: 40px 16px; color: var(--dim); text-align: center; }
.loading .spin { width: 28px; height: 28px; border-width: 3px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--em); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* hamburger header on phones and tablets: up to 1024px or any touch-only screen, however few the menus (2026-11-22) */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  #nav { display: none; order: 3; width: 100%; flex-direction: column; gap: 2px; padding: 8px 0 4px; border-top: 1px solid var(--line); }
  .topbar.menu-open #nav { display: flex; }
  #nav a, .nav-drop { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 15px; }
  .nav-menu { position: static; min-width: 0; margin: 2px 0 4px 12px; padding: 2px 0 2px 8px; border: 0; border-left: 1px solid var(--line-2);
    border-radius: 0; box-shadow: none; background: none; }
  .nav-menu::before { display: none; }
  .nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { display: none; }
  .nav-group.open .nav-menu { display: flex; }
}
@media (max-width: 760px) {
  .topbar { padding: 10px 16px; }
  main { padding: 18px 16px 40px; }
  .hero { grid-template-columns: 1fr; text-align: left; }
  .row-main { grid-template-columns: 24px 52px 1fr; }
  .row-main > :nth-child(n+4) { grid-column: 1 / -1; }
  .mc-tooltip { min-width: 0; width: 100%; }
}

/* 도감 상세 팝업 (2026-11-21) */
body.modal-locked { position: fixed; left: 0; right: 0; overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 6, 4, .78); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain; }
.modal-panel { position: relative; max-width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  -webkit-overflow-scrolling: touch; outline: none; border-radius: 6px; }
.modal-body { padding: 0; }
.modal-body .mc-tooltip { display: block; min-width: 0; width: auto; }
.modal-x { position: sticky; top: 0; float: right; z-index: 5; width: 40px; height: 40px; margin: 0 0 -40px 0;
  border: 1px solid var(--line-2); border-radius: 4px; background: rgba(14, 22, 19, .92); color: var(--text);
  font: 26px/1 var(--title); cursor: pointer; }
.modal-x:hover, .modal-x:focus-visible { border-color: var(--gold-lo); color: var(--gold-hi); outline: none; }
@media (max-width: 600px) {
  .modal-backdrop { padding: 10px; align-items: flex-start; padding-top: max(10px, env(safe-area-inset-top)); }
  .modal-panel { max-height: calc(100dvh - 20px); max-width: 100%; width: 100%; }
  .modal-body .mc-tooltip { padding: 18px; }
  .modal-body .mc-tooltip .tt-name { font-size: 19px; padding-right: 40px; }
  .modal-body .mc-tooltip .tt-line { font-size: 14px; line-height: 19px; gap: 10px; }
}

.star-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 48px 10px 0; }
.star-tab { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--panel-2); color: var(--muted);
  font: 14px/1 var(--title); cursor: pointer; min-width: 48px; }
.star-tab[aria-selected="true"] { color: var(--gold-hi); border-color: var(--gold-lo); background: #2a2212; }
.star-tab:focus-visible { outline: 2px solid var(--em); outline-offset: 1px; }

.mc-tooltip .tt-game { align-items: center; white-space: pre; }
.mc-tooltip .tt-game .tt-label, .mc-tooltip .tt-game .v { display: inline-flex; align-items: center; white-space: pre; }
.mc-tooltip .tt-game-glyph { width: auto; image-rendering: pixelated; flex: none; }
.mc-tooltip .tt-space { display: inline-block; height: 1px; }

.monster-detail { display: flex; flex-direction: column; gap: 10px; }
.monster-model { display: flex; justify-content: center; align-items: center; background: radial-gradient(circle at 50% 60%, #1d2b25, #0a110e 70%);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 48px; }
.monster-model img { width: min(256px, 70vw); height: auto; image-rendering: pixelated; }
.mc-tooltip .tt-section { color: #e9d29a; margin-top: 8px; }
.mc-tooltip .tt-drop { align-items: flex-start; }
.mc-tooltip .tt-drop .tt-label { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.mc-tooltip .tt-drop .v { flex: none; text-align: right; }
.modal-body .mc-tooltip .tt-line { overflow-wrap: anywhere; }

.mc-tooltip .tt-game-line { position: relative; display: block; height: 20px; white-space: pre; }
.mc-tooltip .tt-abs { position: absolute; top: 0; white-space: pre; line-height: 20px; }
.mc-tooltip img.tt-abs { image-rendering: pixelated; }
.modal-body .mc-tooltip { overflow-x: auto; }

.tt-drop-icon { width: 18px; height: 18px; image-rendering: pixelated; object-fit: contain; vertical-align: -4px; margin-right: 6px; }

/* wear preview (viewer.js) */
.wear-view { width: 100%; min-height: 300px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #1d2a24 0%, #0b100e 70%); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.wear-stage, .wear-stage canvas { width: 100%; display: block; touch-action: none; }
.wear-tabs:empty { display: none; }
.star-tab[disabled] { opacity: .4; cursor: not-allowed; }
.wear-none { padding: 40px 0; }

/* monster drops with the item image (card size, text scaled to match) */
.mc-tooltip .tt-drop-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.mc-tooltip .tt-drop-img { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: #0a110e; border: 1px solid var(--line-2); border-radius: 3px; }
.mc-tooltip .tt-drop-img img { width: 40px; height: 40px; image-rendering: pixelated; }
.mc-tooltip .tt-drop-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mc-tooltip .tt-drop-name { font-size: 17px; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.mc-tooltip .tt-drop-meta { font-size: 15px; line-height: 1.2; color: var(--dim); }
