:root {
  --bg: #0e1116;
  --bg2: #151a22;
  --panel: #1a2029;
  --panel2: #212834;
  --line: #2c3544;
  --text: #e7e2d6;
  --muted: #9198a3;
  --gold: #e3b448;
  --gold2: #b8862b;
  --exp: #6cc4ff;
  --good: #5fcf80;
  --bad: #ef6461;
  --warn: #f0a33a;
  --r-common: #b8bec7;
  --r-uncommon: #5fcf80;
  --r-rare: #4ea3ff;
  --r-epic: #b57bff;
  --r-legendary: #ffb63d;
  --radius: 12px;
  --head: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(227,180,72,.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(108,196,255,.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); letter-spacing: .02em; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; color: var(--gold); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack > * + * { margin-top: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.app-side {
  background: linear-gradient(180deg, #121720, #0f131a);
  border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: var(--gold); padding: 4px 10px 16px; display: flex; gap: 8px; align-items: center; }
.brand small { display: block; font-family: var(--body); font-weight: 500; font-size: .7rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.nav a {
  display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--text);
  font-weight: 500; margin-bottom: 2px;
}
.nav a:hover { background: var(--panel); text-decoration: none; }
.nav a.on { background: linear-gradient(90deg, rgba(227,180,72,.18), transparent); color: var(--gold); box-shadow: inset 2px 0 0 var(--gold); }
.nav .sect { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 14px 12px 6px; }
.nav .badge { margin-left: auto; }
.app-main { padding: 0 28px 40px; min-width: 0; }
.hud {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 18px; align-items: center; padding: 12px 0;
  background: linear-gradient(180deg, var(--bg) 70%, transparent); margin-bottom: 8px;
}
.hud .lvl { font-family: var(--head); font-weight: 800; color: var(--gold); white-space: nowrap; }
.hud .expwrap { flex: 1; max-width: 360px; }
.hud .pts { white-space: nowrap; font-weight: 600; }
.bell { position: relative; background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--text); padding: 4px; }
.bell .dot { position: absolute; top: -2px; right: -4px; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 1.1rem; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .app-side { position: fixed; z-index: 50; left: 0; top: 0; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .app-side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); }
  .burger { display: block; }
  .app-main { padding: 0 16px 40px; }
  .hud { gap: 10px; }
  .hud .expwrap { display: none; }
}

/* ---------- components ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.25);
}
.card.gold { border-color: rgba(227,180,72,.45); }
.card.click { cursor: pointer; transition: transform .12s, border-color .12s; }
.card.click:hover { transform: translateY(-2px); border-color: var(--gold2); }
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.btn:hover { border-color: var(--gold2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #1b1404; border-color: var(--gold); }
.btn.good { background: #1f3b2a; border-color: #2f6b45; color: #bff0cd; }
.btn.bad { background: #3b1f22; border-color: #6b2f34; color: #ffc9c7; }
.btn.sm { padding: 5px 10px; font-size: .85rem; }
.btn.ghost { background: transparent; }
input, textarea, select {
  width: 100%; background: #0f141b; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold2); }
input[type=checkbox] { width: auto; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--panel2); border: 1px solid var(--line); white-space: nowrap;
}
.badge.red { background: var(--bad); color: #fff; border: 0; }
.rank { font-family: var(--head); font-weight: 800; min-width: 26px; justify-content: center; }
.bar { height: 8px; background: #0b0f14; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #3d8bd6, var(--exp)); border-radius: 99px; transition: width .4s; }
.bar.gold > i { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.bar.green > i { background: linear-gradient(90deg, #2f8b52, var(--good)); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.tabs a.on { border-color: var(--gold); color: var(--gold); background: rgba(227,180,72,.08); }
.tabs a:hover { text-decoration: none; }
.empty { text-align: center; padding: 30px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.tablewrap { overflow-x: auto; }

/* rarity */
.r-common { color: var(--r-common); } .r-uncommon { color: var(--r-uncommon); } .r-rare { color: var(--r-rare); }
.r-epic { color: var(--r-epic); } .r-legendary { color: var(--r-legendary); }
.rb-common { border-color: #4a515b !important; } .rb-uncommon { border-color: #2f6b45 !important; } .rb-rare { border-color: #2b5c93 !important; }
.rb-epic { border-color: #6a43a3 !important; } .rb-legendary { border-color: #a37422 !important; box-shadow: 0 0 18px rgba(255,182,61,.15); }

/* quest */
.quest .top { display: flex; gap: 10px; align-items: flex-start; }
.quest .title { font-weight: 700; font-size: 1.02rem; }
.quest .desc { color: var(--muted); font-size: .9rem; margin: 8px 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qtype { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.qtype.main { color: var(--gold); } .qtype.bounty { color: var(--bad); } .qtype.side { color: var(--exp); }
.qtype.daily { color: var(--good); } .qtype.weekly { color: var(--r-epic); }
.rewards { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.rewards span { background: #0f141b; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.locked { opacity: .55; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; cursor: pointer; background: #0f141b; }
.check.done { border-color: #2f6b45; }
.check.done span { text-decoration: line-through; color: var(--muted); }
.check .box { width: 20px; height: 20px; border: 2px solid var(--gold2); border-radius: 5px; flex: none; display: grid; place-items: center; font-size: .8rem; }
.check.done .box { background: var(--good); border-color: var(--good); color: #062; }
.status { font-weight: 700; font-size: .8rem; }
.status.active { color: var(--exp); } .status.submitted { color: var(--warn); } .status.approved { color: var(--good); } .status.expired { color: var(--muted); }
.feedback { border-left: 3px solid var(--warn); padding: 8px 12px; background: rgba(240,163,58,.07); border-radius: 0 8px 8px 0; margin: 10px 0; }

/* character */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.avatar {
  width: 92px; height: 92px; border-radius: 18px; display: grid; place-items: center; font-size: 3rem;
  background: radial-gradient(circle at 30% 30%, #2a3342, #141922); border: 2px solid var(--gold2); position: relative;
}
.avatar .rk { position: absolute; bottom: -8px; right: -8px; }
.name { font-family: var(--head); font-size: 1.35rem; font-weight: 800; }
.titleline { color: var(--gold); font-style: italic; font-size: .9rem; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; }
.stats div { background: #0f141b; border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; }
.stats b { display: block; font-size: 1.25rem; font-family: var(--head); }
.stats small { color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; }
.skill { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.skill .lv { font-weight: 700; color: var(--gold); font-size: .85rem; }
.classcard { text-align: center; }
.classcard .ic { font-size: 3rem; }
.classcard.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227,180,72,.3); }

/* items */
.item { display: flex; flex-direction: column; gap: 8px; }
.item .ic { font-size: 2.2rem; }
.item .qty { font-family: var(--head); font-weight: 800; color: var(--gold); }
.feed li { padding: 8px 0; border-bottom: 1px dashed var(--line); list-style: none; font-size: .9rem; }
.feed { padding: 0; margin: 0; }

/* auth */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.authcard { width: 100%; max-width: 400px; }
.crest { font-size: 3.2rem; text-align: center; }

/* toast / modal */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--panel2);
  border: 1px solid var(--gold2); padding: 12px 18px; border-radius: 10px; z-index: 200; transition: transform .25s, visibility .25s; max-width: calc(100vw - 32px); visibility: hidden;
}
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
.toast.err { border-color: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; }

/* chest opening */
.chest-stage { text-align: center; padding: 20px 0; }
.chest-big { font-size: 5rem; display: inline-block; }
.chest-big.shake { animation: shake .5s ease-in-out 3; }
@keyframes shake { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-12deg) scale(1.05) } 75% { transform: rotate(12deg) scale(1.05) } }
.loot { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.2); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.loot .ic { font-size: 4rem; }
.loot .lbl { font-family: var(--head); font-size: 1.4rem; font-weight: 800; margin-top: 6px; }
.glow-legendary { text-shadow: 0 0 24px var(--r-legendary); } .glow-epic { text-shadow: 0 0 20px var(--r-epic); } .glow-rare { text-shadow: 0 0 16px var(--r-rare); }

/* ---------- RPG ---------- */
.avatar { overflow: visible; background: none; border: 0; width: auto; height: auto; }
.avatar-svg { display: block; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.mini-av .avatar-svg { border-radius: 8px; box-shadow: none; }
.gearline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: .8rem; }
.gearline span { background: #0f141b; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.hud .pts { font-size: .92rem; }
@media (max-width: 860px) { .hud .hide-sm { display: none; } .hud .pts { font-size: .8rem; } }

.wardrobe { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 18px; align-items: start; }
.wardrobe > .card { position: sticky; top: 70px; }
#preview .avatar-svg { margin: 0 auto; max-width: 100%; height: auto; }
.optgrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.opt { padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.opt .avatar-svg { box-shadow: none; }
.opt.sel { border-color: var(--gold) !important; box-shadow: 0 0 0 2px rgba(227,180,72,.35); }
.opt.locked { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
@media (max-width: 760px) { .wardrobe { grid-template-columns: 1fr; } .wardrobe > .card { position: static; } }

.eqslot { background: #0f141b; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.talent .lv { font-family: var(--head); font-weight: 800; color: var(--gold); }
.talent.locked { opacity: .55; }
.pips { display: flex; gap: 5px; margin-top: 10px; }
.pips i { flex: 1; height: 7px; border-radius: 4px; background: #0b0f14; border: 1px solid var(--line); }
.pips i.on { background: linear-gradient(90deg, var(--gold2), var(--gold)); border-color: var(--gold2); }

.spotbtn { justify-content: flex-start; text-align: left; gap: 10px; }
.catchlist { max-height: 320px; overflow-y: auto; }
.catchlist .row { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.pond { position: relative; height: 210px; margin-top: 14px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #23435f 0%, #1a3550 45%, #10243a 100%); border: 1px solid var(--line); }
.pond.spot-pond { background: linear-gradient(180deg, #2d5a3a, #1f4a52 50%, #12303a); }
.pond.spot-river { background: linear-gradient(180deg, #3a6a4a, #1f5a7a 50%, #10304a); }
.pond.spot-lake { background: linear-gradient(180deg, #f0a35a, #8a5a7a 35%, #24406a 55%, #10243a); }
.pond.spot-sea { background: linear-gradient(180deg, #5aa9e6, #2a6fa8 45%, #0b2a4a); }
.pond.spot-abyss { background: linear-gradient(180deg, #2a1f4a, #1a1440 45%, #07051a); }
.pond.spot-void { background: radial-gradient(circle at 70% 20%, #8a5cf0 0, transparent 30%), linear-gradient(180deg, #120a2a, #05030f); }
.pond .waves { position: absolute; left: -50%; right: -50%; top: 46%; height: 40px; opacity: .35;
  background: repeating-radial-gradient(ellipse at 50% 0, transparent 0 12px, rgba(255,255,255,.5) 13px 14px, transparent 15px 26px);
  animation: wave 6s linear infinite; }
@keyframes wave { from { transform: translateX(0) } to { transform: translateX(26px) } }
.pond .line { position: absolute; right: 120px; top: 30px; width: 2px; height: 70px; background: rgba(255,255,255,.55); transform-origin: top; transform: rotate(-28deg); }
.pond .bobber { position: absolute; right: 150px; top: 92px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(180deg, #e8505b 50%, #fff 50%); animation: bob 2.4s ease-in-out infinite; }
.pond .bobber.bite { animation: bite .6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(4px) } }
@keyframes bite { 0%,100% { transform: translateY(0) } 30% { transform: translateY(9px) } 60% { transform: translateY(-2px) } }
.pond .pond-av { position: absolute; right: 8px; bottom: 6px; }
.pond .pond-av .avatar-svg { box-shadow: none; }
.pond .pond-info { position: absolute; left: 12px; bottom: 12px; background: rgba(8,12,18,.7); padding: 8px 12px; border-radius: 10px; max-width: 60%; }

.dungeon.locked { opacity: .55; }
.run summary { cursor: pointer; list-style: none; }
.run summary::-webkit-details-marker { display: none; }
.battlelog { margin: 10px 0 0; padding-left: 20px; line-height: 1.7; color: var(--muted); }
.run-anim { width: 40% !important; animation: runbar 1.8s ease-in-out infinite alternate; }
@keyframes runbar { from { margin-left: 0 } to { margin-left: 60% } }
.member .avatar-svg { margin: 0 auto; }

/* ---------- Missions, Quest Path & Timeline ---------- */
.mpill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; color: var(--mc, var(--gold));
  background: color-mix(in srgb, var(--mc, var(--gold)) 14%, #0f141b);
  border: 1px solid color-mix(in srgb, var(--mc, var(--gold)) 45%, transparent);
  white-space: nowrap;
}
.mpill:hover { text-decoration: none; filter: brightness(1.15); }
.phase-tag {
  display: inline-block; font-size: .72rem; padding: 2px 7px; border-radius: 6px;
  background: #0f141b; border: 1px solid var(--line); color: var(--muted); font-weight: 600;
}
.due-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--muted);
  background: #0f141b; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.due-chip.overdue { color: #ffb3b1; border-color: var(--bad); background: rgba(239,100,97,.12); font-weight: 600; }

.qst {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.qst.completed { color: var(--good); background: rgba(95,207,128,.12); border-color: rgba(95,207,128,.35); }
.qst.in_progress { color: var(--exp); background: rgba(108,196,255,.12); border-color: rgba(108,196,255,.35); }
.qst.submitted { color: var(--warn); background: rgba(240,163,58,.14); border-color: rgba(240,163,58,.35); }
.qst.available { color: var(--gold); background: rgba(227,180,72,.14); border-color: rgba(227,180,72,.4); }
.qst.locked { color: var(--muted); background: rgba(145,152,163,.1); border-color: var(--line); }
.qst.overdue { color: #ffb3b1; background: rgba(239,100,97,.18); border-color: rgba(239,100,97,.5); }

.mission-card, .mission-hero { position: relative; overflow: hidden; }
.mission-stripe {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--mc, var(--gold)), transparent);
}
.m-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 1.5rem; flex: none;
  background: color-mix(in srgb, var(--mc, var(--gold)) 16%, #0f141b);
  border: 1px solid color-mix(in srgb, var(--mc, var(--gold)) 45%, var(--line));
}
.m-icon.lg { width: 56px; height: 56px; font-size: 2rem; border-radius: 14px; }
.m-title { font-family: var(--head); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.m-nextbox {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px;
  background: #0f141b; border: 1px solid var(--line);
}

.m-mini {
  padding: 10px 12px; border-radius: 9px; background: #0f141b;
  border: 1px solid var(--line); border-left: 3px solid var(--mc, var(--gold));
}
.m-mini-title { color: var(--text); font-size: .98rem; }
.m-mini-title:hover { color: var(--gold); text-decoration: none; }
.next-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.next-chip {
  font-size: .78rem; padding: 3px 8px; border-radius: 6px; background: var(--panel);
  border: 1px solid var(--line); color: var(--text);
}
.next-chip.available { border-color: rgba(227,180,72,.45); }
.next-chip.in_progress { border-color: rgba(108,196,255,.45); }
.next-chip:hover { border-color: var(--gold); text-decoration: none; }

.next-spotlight { border-color: rgba(227,180,72,.35); background: linear-gradient(180deg, rgba(227,180,72,.05), var(--bg2)); }
.next-card { padding: 13px; background: #121720; }
.next-card.available { border-color: rgba(227,180,72,.4); }
.next-card.in_progress { border-color: rgba(108,196,255,.45); }
.done-card { border-color: rgba(95,207,128,.35); }

.lock-banner {
  padding: 12px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(145,152,163,.08); color: var(--text);
}
.dep-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; font-size: .78rem; }
.dep-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px;
  background: #0f141b; border: 1px solid var(--line); color: var(--text); max-width: 100%;
}
.dep-chip.ok { border-color: rgba(95,207,128,.4); color: var(--good); }
.dep-chip.need { border-color: rgba(240,163,58,.45); color: var(--warn); }
.dep-chip.next { border-color: rgba(108,196,255,.35); color: var(--exp); }
.dep-chip:hover { border-color: var(--gold); text-decoration: none; }
.dep-mtag {
  font-size: .7rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-right: 3px;
  color: var(--mc, var(--gold));
  background: color-mix(in srgb, var(--mc, var(--gold)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--mc, var(--gold)) 40%, transparent);
}

.filterbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line);
}
.on-chip { border-color: var(--gold) !important; color: var(--gold) !important; background: rgba(227,180,72,.1) !important; }

/* Quest Path / Dependency Graph */
.path-board {
  position: relative; overflow-x: auto; padding: 16px; border-radius: var(--radius);
  background: #0c1016; border: 1px solid var(--line);
}
.path-svg { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; }
.path-cols { position: relative; z-index: 2; display: flex; gap: 56px; align-items: flex-start; min-width: max-content; }
.path-col { width: 290px; flex: none; }
.path-col-head {
  font-family: var(--head); font-weight: 700; font-size: .92rem; color: var(--gold);
  padding: 6px 10px; margin-bottom: 12px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); text-align: center;
}
.qnode { padding: 14px; position: relative; }
.qnode.st-completed { border-color: rgba(95,207,128,.55); background: linear-gradient(180deg, rgba(95,207,128,.08), var(--bg2)); }
.qnode.st-available { border-color: rgba(227,180,72,.65); box-shadow: 0 0 18px rgba(227,180,72,.12); }
.qnode.st-in_progress { border-color: rgba(108,196,255,.6); }
.qnode.st-submitted { border-color: rgba(240,163,58,.6); }
.qnode.st-locked { opacity: .68; }
.qnode.is-overdue { border-color: rgba(239,100,97,.75); }
.qnode-title { font-weight: 700; font-size: .98rem; margin: 8px 0 4px; line-height: 1.3; }
.qnode-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dep-edge { fill: none; stroke-width: 2.2; transition: opacity .15s, stroke .15s, stroke-width .15s; }
.dep-edge.done { stroke: rgba(95,207,128,.75); }
.dep-edge.locked { stroke: rgba(120,132,150,.55); stroke-dasharray: 6 4; }
.dep-edge.hi { stroke: var(--gold) !important; stroke-width: 3.2; stroke-dasharray: none; opacity: 1; }
.dep-edge.dim { opacity: .16; }
.phase-section { padding: 16px; border-radius: var(--radius); background: #11161f; border: 1px solid var(--line); }

/* Timeline / Gantt Manager */
.gantt-wrap { padding: 14px; }
.gantt-legend { padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.lg-dot.completed { background: var(--good); } .lg-dot.in_progress { background: var(--exp); }
.lg-dot.submitted { background: var(--warn); } .lg-dot.available { background: var(--gold); }
.lg-dot.locked { background: #4a5568; } .lg-dot.overdue { background: var(--bad); }
.gantt-scroll { overflow-x: auto; }
.gantt-inner { min-width: 780px; }
.gantt-head, .gantt-row { display: grid; grid-template-columns: 270px 1fr; align-items: stretch; border-bottom: 1px solid var(--line); }
.gantt-head { background: #10151d; border-radius: 8px 8px 0 0; }
.gantt-label { padding: 9px 10px; border-right: 1px solid var(--line); min-width: 0; }
.gantt-qtitle { font-weight: 600; font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.gantt-qtitle:hover { color: var(--gold); }
.gantt-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.gantt-ed { padding: 2px 6px !important; font-size: .78rem !important; flex: none; }
.gantt-group {
  padding: 8px 12px; background: color-mix(in srgb, var(--mc, var(--gold)) 10%, #10151d);
  border-bottom: 1px solid var(--line); border-left: 3px solid var(--mc, var(--gold));
}
.gantt-mhead { font-family: var(--head); font-weight: 700; color: var(--text); font-size: .95rem; }
.gantt-track { position: relative; min-height: 46px; }
.gantt-axis { min-height: 36px; }
.gantt-tick {
  position: absolute; top: 8px; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap;
}
.gantt-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.04); pointer-events: none; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(227,180,72,.75); z-index: 2; pointer-events: none; }
.gantt-today-lbl {
  position: absolute; bottom: 2px; transform: translateX(-50%); font-size: .66rem; font-weight: 700;
  color: #1b1404; background: var(--gold); padding: 1px 5px; border-radius: 4px; white-space: nowrap; z-index: 3;
}
.gantt-bar {
  position: absolute; top: 9px; height: 28px; border-radius: 7px; z-index: 3;
  display: flex; align-items: center; padding: 0 8px; font-size: .74rem; font-weight: 700;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  border: 1px solid transparent; transition: transform .12s, filter .12s;
}
.gantt-bar:hover { text-decoration: none; filter: brightness(1.15); transform: translateY(-1px); z-index: 5; }
.gantt-bar.completed { background: rgba(95,207,128,.25); border-color: var(--good); color: #d5f9df; }
.gantt-bar.in_progress { background: rgba(108,196,255,.25); border-color: var(--exp); color: #dceeff; }
.gantt-bar.submitted { background: rgba(240,163,58,.25); border-color: var(--warn); color: #ffe6bf; }
.gantt-bar.available { background: rgba(227,180,72,.26); border-color: var(--gold); color: #fff0c2; }
.gantt-bar.locked { background: rgba(100,112,130,.22); border-color: #566173; color: #b5bcc7; border-style: dashed; }
.gantt-bar.overdue { box-shadow: 0 0 0 1.5px var(--bad); }

/* Admin form pickers */
.icon-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-pick {
  background: #0f141b; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px;
  cursor: pointer; font-size: 1rem; color: var(--text);
}
.icon-pick:hover { border-color: var(--gold); }
.color-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); cursor: pointer; padding: 0; }
.color-dot:hover { transform: scale(1.15); border-color: #fff; }
.prereq-box {
  max-height: 170px; overflow-y: auto; background: #0f141b; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px;
}
.prereq-opt {
  display: flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 5px 6px;
  border-radius: 6px; cursor: pointer; font-size: .82rem; color: var(--text);
}
.prereq-opt:hover { background: var(--panel); }
.prereq-opt.same-m { background: rgba(227,180,72,.06); }
