:root {
	--bg: #0b0d12; --panel: #141821; --panel2: #1a1f2b; --line: #262c3a; --text: #e6e2d6; --muted: #8a8f9c;
	--gold: #e8b64c; --hp: #e5484d; --sp: #4c8dff; --exp: #e8b64c; --jexp: #b07cff; --good: #7bd88f; --bad: #ff7a59;
	--radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
	font: 13px/1.45 "Sarabun", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { background: radial-gradient(1200px 500px at 20% -10%, #1b2233 0%, transparent 60%), var(--bg); }
.muted { color: var(--muted); }
.pad { padding: 14px; margin: 0; }
b { font-weight: 600; }

/* header */
.top { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line);
	background: rgba(11, 13, 18, .85); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .14em; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.brand small { font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.gem { width: 30px; height: 30px; border-radius: 7px; display: block; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--panel2);
	border: 1px solid var(--line); font-size: 12px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.on i { background: var(--good); box-shadow: 0 0 8px var(--good); animation: pulse 2s infinite; }
.pill.warn i { background: var(--gold); }
.pill.off i { background: var(--hp); }
@keyframes pulse { 50% { opacity: .45; } }
.crumb { color: var(--text); }
.crumb.ai b { color: var(--good); }

/* layout */
.grid { display: grid; gap: 12px; padding: 12px; height: calc(100vh - 53px); min-height: 640px;
	grid-template-columns: 290px minmax(360px, 1fr) 320px;
	grid-template-rows: minmax(300px, 1fr) 260px;
	grid-template-areas: "char map near" "inv con con"; }
.panel { background: linear-gradient(180deg, var(--panel), #11141b); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.char { grid-area: char; padding: 14px; overflow-y: auto; }
.map { grid-area: map; }
.near { grid-area: near; }
.inv { grid-area: inv; }
.console { grid-area: con; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }

/* character */
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.who h1 { font-size: 17px; margin: 0; }
.avatar { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
	background: linear-gradient(135deg, #2b3550, #1a2030); border: 1px solid #3a4560; color: var(--gold); text-transform: uppercase; }
.avatar.look { width: 76px; height: 112px; place-items: end center; padding-bottom: 5px; overflow: hidden;
	background: radial-gradient(ellipse 20px 5px at 50% calc(100% - 7px), #0008, transparent), linear-gradient(160deg, #2b3550, #1a2030); }
.avatar.look img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.tag { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); }
.tag.dead { background: #3a1416; border-color: #6b2125; color: #ffb3b3; }
.bar { position: relative; height: 22px; border-radius: 6px; background: #0b0d12; border: 1px solid var(--line);
	margin-bottom: 6px; overflow: hidden; }
.bar.thin { height: 16px; font-size: 11px; }
.bar span { position: absolute; inset: 0 auto 0 0; transition: width .4s ease; }
.bar.hp span { background: linear-gradient(90deg, #a52a2e, var(--hp)); }
.bar.sp span { background: linear-gradient(90deg, #2a55a5, var(--sp)); }
.bar.exp span { background: linear-gradient(90deg, #9a7322, var(--exp)); }
.bar.jexp span { background: linear-gradient(90deg, #6d45b3, var(--jexp)); }
.bar label, .bar em { position: relative; z-index: 1; font-style: normal; font-weight: 600; padding: 0 8px; line-height: 20px;
	text-shadow: 0 1px 2px #000; }
.bar.thin label, .bar.thin em { line-height: 14px; }
.bar em { position: absolute; right: 0; top: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 12px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv dd.warn { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 12px; }
.stats div { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; text-align: center; padding: 4px 0; }
.stats small { display: block; color: var(--muted); font-size: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: #1f2a22; border: 1px solid #2e4535; color: #b9e6c4; padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.chip.st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 7px; cursor: help; }
.chip.st img { width: 22px; height: 22px; border-radius: 5px; image-rendering: pixelated; }
.chip.st small { color: #ffb062; font-variant-numeric: tabular-nums; }
.chip.st.sys { background: var(--panel2); border-color: var(--line); color: var(--muted); padding-left: 8px; }
.empty { display: grid; place-items: center; }

/* map */
.maptools, .contools { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.maptools button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2);
	color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; }
.maptools button:hover { border-color: var(--gold); }
.chk { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); cursor: pointer; user-select: none; }
.legend { margin-left: auto; color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 6px; }
.lg.me { background: #7bd88f; } .lg.mob { background: #d9534f; } .lg.pl { background: #5aa9ff; }
.lg.npc { background: #e8b64c; } .lg.it { background: #f2efe6; border-radius: 2px; }
.canvaswrap { position: relative; flex: 1; min-height: 0; }
.canvaswrap canvas { position: absolute; inset: 0; display: block; }
.nomap { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }

/* tabs + lists */
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 9px 9px; font-size: 12.5px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a b { font-size: 11px; background: var(--panel2); padding: 0 6px; border-radius: 99px; color: var(--text); margin-left: 2px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--gold); }
.list { overflow-y: auto; flex: 1; }
.row { padding: 7px 12px; border-bottom: 1px solid #1c2130; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { display: flex; gap: 10px; justify-content: flex-end; font-variant-numeric: tabular-nums; font-size: 12px; }
.row.mob { grid-template-columns: 34px 1fr 90px auto; align-items: center; cursor: help; }
.mobimg { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.row.hover { background: #1a2030; }
.row.target { background: linear-gradient(90deg, rgba(229, 72, 77, .18), transparent); }
.tgt { color: var(--hp); margin-right: 4px; }
.minibar { height: 6px; border-radius: 3px; background: #0b0d12; overflow: hidden; border: 1px solid var(--line); }
.minibar span { display: block; height: 100%; background: var(--good); transition: width .3s; }
.minibar span.low { background: var(--bad); }
.minibar span.unk { background: #3a4152; }

/* inventory */
.items { overflow-y: auto; flex: 1; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 6px; align-content: start; }
.item { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; gap: 0 8px; padding: 6px;
	border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.item.eq { border-color: #6b5420; background: linear-gradient(135deg, #2a2412, var(--panel2)); }
.ico { grid-row: span 2; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 700;
	background: #232a3a; color: var(--muted); }
.ico.g-use { background: #20311f; color: #9fe0a9; }
.ico.g-equip { background: #33290f; color: var(--gold); }
.iname { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iamt { font-size: 11px; color: var(--muted); }

/* console */
.con { flex: 1; overflow-y: auto; padding: 6px 10px; background: #07080b;
	font: 12px/1.55 ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }
.ln { white-space: pre-wrap; word-break: break-word; color: #c9ccd4; }
.ln time { color: #555c6b; margin-right: 8px; }
.ln.t-warning { color: #e09a5a; }
.ln.t-error { color: #ff6b6b; font-weight: 600; }
.ln.t-debug { color: #5e6676; }
.ln.exp { color: #ffd54a; }
.ln.loot { color: #5ee08a; font-weight: 600; }
.ln.ground { color: #4f9a68; }
.ln.atk { color: #ff5c5c; }
.ln.hurt { color: #ff9f6e; }
.ln.kill { color: #5fd4d0; }
.ln.buff { color: #b48cff; }
.ln.dim { color: #6b7385; }
.ln.other { color: #5a6273; }

@media (max-width: 1100px) {
	.grid { height: auto; grid-template-columns: 1fr; grid-template-rows: auto 420px 360px 300px 320px;
		grid-template-areas: "char" "map" "near" "inv" "con"; }
}

/* buttons */
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px;
	font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover:not([disabled]) { border-color: var(--gold); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.gold { background: linear-gradient(180deg, #f0c560, #c4862a); color: #1a1408; border-color: #c4862a; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 2px 9px; font-size: 12px; }
.btn.atk { color: #ffb0a0; } .btn.flee { color: #f0c560; } .btn.no { color: #9fb4d8; }
.top .me { margin-left: auto; color: var(--muted); }
.top .me a { color: var(--gold); cursor: pointer; }
.err { color: var(--bad); } .ok { color: var(--good); }

/* login */
.login { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: auto; padding: 24px 16px;
	background: radial-gradient(ellipse 70% 55% at 50% 30%, #12245a 0%, #0a1430 45%, #070d1c 75%); }
.lg-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lg-sky i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #9fd0ff;
	box-shadow: 0 0 8px 2px rgba(110, 180, 255, .7); opacity: 0; animation: lg-rise 9s linear infinite; }
.lg-sky i:nth-child(1) { left: 8%; animation-delay: 0s; } .lg-sky i:nth-child(2) { left: 17%; animation-delay: 3.2s; animation-duration: 11s; }
.lg-sky i:nth-child(3) { left: 26%; animation-delay: 6s; } .lg-sky i:nth-child(4) { left: 37%; animation-delay: 1.5s; animation-duration: 12s; }
.lg-sky i:nth-child(5) { left: 46%; animation-delay: 4.4s; } .lg-sky i:nth-child(6) { left: 55%; animation-delay: 7.5s; animation-duration: 10s; }
.lg-sky i:nth-child(7) { left: 63%; animation-delay: .8s; } .lg-sky i:nth-child(8) { left: 71%; animation-delay: 5.1s; animation-duration: 13s; }
.lg-sky i:nth-child(9) { left: 79%; animation-delay: 2.4s; } .lg-sky i:nth-child(10) { left: 86%; animation-delay: 8.2s; }
.lg-sky i:nth-child(11) { left: 92%; animation-delay: 3.9s; animation-duration: 12s; } .lg-sky i:nth-child(12) { left: 3%; animation-delay: 6.7s; }
@keyframes lg-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh) scale(1.1); opacity: 0; } }
.lg-wrap { position: relative; width: min(360px, 100%); display: grid; justify-items: center; }
.lg-emblem { width: 230px; height: 230px; margin-bottom: -46px; position: relative; z-index: 1;
	filter: drop-shadow(0 10px 30px rgba(60, 140, 255, .35)); animation: lg-float 6s ease-in-out infinite; }
.lg-emblem img { width: 100%; height: 100%; display: block;
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%); mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 71%); }
@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.loginbox { width: 100%; padding: 58px 26px 26px; border-radius: 16px; display: grid; gap: 14px;
	background: linear-gradient(180deg, rgba(22, 30, 54, .92), rgba(12, 16, 30, .95)); backdrop-filter: blur(8px);
	border: 1px solid rgba(232, 182, 76, .28); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 24px 70px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 224, 138, .12); }
.lg-head { text-align: center; }
.lg-head h1 { margin: 0; font-size: 22px; letter-spacing: .3em; padding-left: .3em; color: var(--gold);
	background: linear-gradient(180deg, #ffe9a8, #d39a35); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lg-head p { margin: 4px 0 0; color: #8e9ab8; font-size: 13px; }
.lg-f { gap: 6px; font-size: 12px; color: #9aa6c4; }
.lg-in { position: relative; display: flex; align-items: center; }
.lg-in svg { position: absolute; left: 12px; width: 17px; height: 17px; fill: #5d6c92; pointer-events: none; transition: fill .15s; }
.lg-in input { width: 100%; padding: 11px 12px 11px 38px; font-size: 15px; border-radius: 10px; background: rgba(5, 9, 20, .75); border-color: #2a3555; }
.lg-in input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 182, 76, .15); }
.lg-in:focus-within svg { fill: var(--gold); }
.lg-in input[autocomplete=current-password], .lg-in input[autocomplete=new-password] { padding-right: 58px; }
.lg-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: rgba(5, 9, 20, .6); border: 1px solid #2a3555; }
.lg-tabs a { text-align: center; padding: 8px 0; border-radius: 8px; font-size: 14px; color: #8e9ab8; cursor: pointer; user-select: none; }
.lg-tabs a.on { background: rgba(232, 182, 76, .16); color: var(--gold); font-weight: 600; }
.lg-f small { color: #6c7a9e; }
.lg-note { margin: 0; font-size: 13px; color: #9aa6c4; text-align: center; }
.lg-ok { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(70, 211, 154, .1); border: 1px solid rgba(70, 211, 154, .35); color: #8ee6bf; font-size: 13px; }
.lg-link { justify-self: center; font-size: 13px; color: #8e9ab8; cursor: pointer; }
.lg-link:hover { color: var(--gold); }
.lg-eye { position: absolute; right: 10px; font-size: 12px; color: #8e9ab8; cursor: pointer; user-select: none; }
.lg-eye:hover { color: var(--gold); }
.lg-err { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 122, 89, .1); border: 1px solid rgba(255, 122, 89, .3); font-size: 13px; }
.lg-go { padding: 12px; font-size: 15px; border-radius: 10px; margin-top: 2px; }
.lg-go[disabled] { opacity: .55; }
.lg-play { margin-top: 18px; font-size: 13px; color: #8e9ab8; text-decoration: none; }
.lg-play b { color: #9fd0ff; font-weight: 600; }
.lg-play:hover b { text-decoration: underline; }
@media (max-height: 640px) { .lg-emblem { width: 170px; height: 170px; margin-bottom: -34px; } .loginbox { padding-top: 44px; } }
@media (prefers-reduced-motion: reduce) { .lg-sky, .lg-emblem { animation: none; } .lg-sky i { display: none; } }
label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
input, select.act { background: #0b0d12; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; }
input:focus, select:focus { outline: none; border-color: var(--gold); }

/* modal + dialog */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(4, 5, 8, .72); display: grid; place-items: center; }
.dialog { width: min(440px, 94vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
	display: grid; gap: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.dialog h2 { margin: 0; font-size: 17px; }
.dialog p { margin: 0; }
.dialog ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modal.confirm { z-index: 30; }

/* world map */
.wbox { width: min(1500px, 97vw); height: 94vh; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
	display: flex; flex-direction: column; overflow: hidden; }
.whead, .wfoot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line);
	background: var(--panel); flex-wrap: wrap; }
.wfoot { border-bottom: 0; border-top: 1px solid var(--line); }
.wfoot .sp { flex: 1; }
.wtabs { display: flex; gap: 2px; }
.wtabs a { padding: 4px 10px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.wtabs a.on { background: var(--panel2); color: var(--text); }
.wtabs a b { background: var(--hp); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 3px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search input { width: 100%; }
.dd { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--panel); border: 1px solid var(--line);
	border-radius: 10px; z-index: 5; max-height: 380px; overflow-y: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.dd a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; }
.dd a:hover, .dd a.on { background: var(--panel2); }
.dd a small { margin-left: auto; }
.dd .k { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: #3a1d1f; color: #ffb3b3; }
.dd .k.map { background: #1d2a3a; color: #a9cdf5; }
.mobchip a { cursor: pointer; margin-left: 4px; }
.wbody { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: 0; }
.wmapwrap { display: flex; flex-direction: column; min-height: 0; padding: 10px; gap: 8px; }
.wmap { position: relative; aspect-ratio: 1280 / 1024; max-height: 100%; max-width: 100%; margin: 0 auto; flex: 1; min-height: 0;
	border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.wmap img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.rect { position: absolute; border: 1px solid transparent; cursor: pointer; display: grid; place-items: center; }
.rect:hover { border-color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .12); }
.rect.spawn:hover { background: rgba(232, 182, 76, .25); }
.rect.hit { border-color: rgba(255, 140, 120, .9); }
.rect.lock { box-shadow: inset 0 0 0 2px var(--gold); }
.rect.here::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good);
	position: absolute; top: 3px; right: 3px; }
.rect.sel { border: 2px solid #fff; background: rgba(255, 255, 255, .18); }
.rect .cnt { background: rgba(0, 0, 0, .75); color: #fff; font-weight: 700; font-size: 11px; padding: 0 5px; border-radius: 6px; }
.wlegend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.lg.here { background: var(--good); } .lg.lock { border: 2px solid var(--gold); border-radius: 2px; } .lg.hit { background: #ff5d5d; border-radius: 2px; }
.wside { border-left: 1px solid var(--line); overflow-y: auto; padding: 12px; background: var(--panel); }
.wside h3 { margin-top: 0; }
.row.link { cursor: pointer; } .row.link:hover { background: var(--panel2); }
.mhead { margin-bottom: 10px; }
.mhead h2 { margin: 2px 0; font-size: 18px; }
.mhead .back { color: var(--gold); cursor: pointer; font-size: 12px; }
.tag.lockt { margin-left: 6px; color: var(--gold); border-color: #6b5420; }
.tag.mvp { background: #4a1630; border-color: #8a2b5a; color: #ffb3d9; margin-left: 4px; }
.tag.boss { background: #3a2a10; border-color: #6b5420; color: var(--gold); margin-left: 4px; }
.bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.mob2 { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: #11141b; }
.mob2.searched { border-color: #ff8c7a; }
.mob2.danger .mstat { color: var(--bad); }
.mrow { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 2px 10px; padding: 7px 9px; align-items: center; }
.mpic { grid-column: 1; grid-row: 1 / 4; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: #0b0e14; overflow: hidden; }
.mpic img { max-width: 46px; max-height: 46px; image-rendering: pixelated; }
.mname { cursor: pointer; font-weight: 600; grid-column: 2; }
.car { color: var(--muted); display: inline-block; width: 12px; }
.mstat { font-size: 12px; color: var(--muted); grid-column: 2; grid-row: 2; padding-left: 16px; }
.minfo { font-size: 12px; color: var(--muted); grid-column: 2; grid-row: 3; padding-left: 16px; display: flex; flex-direction: column; gap: 2px; }
.minfo b { color: var(--text); font-weight: 600; }
.minfo i, .minfo .el { font-style: normal; white-space: nowrap; }
.minfo .el { padding: 0 6px; margin-right: 6px; border-radius: 4px; border: 1px solid var(--line); }
.el-Water { color: #8cc8ff; } .el-Earth { color: #d2b07a; } .el-Fire { color: #ff9a7a; } .el-Wind { color: #9fe6a8; }
.el-Poison { color: #c99cf0; } .el-Holy { color: #fff0a8; } .el-Dark { color: #a7a2c8; } .el-Ghost { color: #c8d4e8; } .el-Undead { color: #b8c79a; }
.mcnt { font-variant-numeric: tabular-nums; color: var(--muted); grid-row: 1 / 4; grid-column: 3; }
.mrow select.act { grid-row: 1 / 4; grid-column: 4; }
select.act { padding: 4px 6px; font-size: 12px; min-width: 112px; }
select.act.a-attack { color: #ffb0a0; } select.act.a-flee { color: #f0c560; } select.act.a-noattack { color: #9fb4d8; }
select.act.a-store { color: #a9cdf5; } select.act.a-sell { color: #f0c560; } select.act.a-skip { color: #8a8f9c; }
select.act.a-keep { color: #b9e6c4; }
select.act.dirty { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(232, 182, 76, .35); }
.drops { border-top: 1px dashed var(--line); padding: 6px 9px 8px 25px; display: grid; gap: 4px; }
.drop { display: grid; grid-template-columns: 1fr 56px auto; gap: 8px; align-items: center; font-size: 12.5px; }
.drop .rate { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.drop .iname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* map window tabs + settings tab */
.mtabs { display: flex; gap: 2px; background: #0b0d12; border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.mtabs a { padding: 4px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; }
.mtabs a.on { background: var(--panel2); color: var(--gold); }
.mtabs a b { color: var(--gold); margin-left: 2px; }
.whead .sp { flex: 1; }
.cbody { flex: 1; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.card.wide { grid-column: 1 / -1; }
.card h3 { margin: 0 0 2px; display: flex; align-items: baseline; gap: 8px; }
.card h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.card .line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text); font-size: 13.5px; margin: 0; }
.card .hint { margin: 0; font-size: 12px; }
input.num { width: 64px; padding: 4px 6px; text-align: right; }
input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; margin: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 5px 8px; border-bottom: 1px solid #1c2130; vertical-align: middle; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.off td { color: var(--muted); }
.tbl tr.sum td { border-bottom: 0; color: var(--muted); font-weight: 600; }
.tbl td.muted { font-size: 12px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1000px) {
	.cbody { grid-template-columns: 1fr; }
	.wbody { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
	.wmap { flex: none; width: 100%; }
	.wside { border-left: 0; border-top: 1px solid var(--line); }
}

/* item icons + hover tooltip (data/icons, data/iteminfo from tools/build-iteminfo.py) */
img.iic { width: 24px; height: 24px; vertical-align: middle; margin: -4px 6px -4px 0; image-rendering: pixelated; }
img.iic.noic { display: none; }
.ico { position: relative; }
.ico img.iic { margin: 0; }
.ico > span { display: none; }
.ico.noic > span { display: inline; }
[data-item] { cursor: help; }
.itip { position: fixed; z-index: 1000; display: none; max-width: 340px; padding: 10px 12px; border-radius: 8px; pointer-events: none;
	background: #10141c; border: 1px solid #3a4256; box-shadow: 0 8px 28px rgba(0, 0, 0, .55); font-size: 12.5px; line-height: 1.45; }
.itip-h { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.itip-h img { width: 48px; height: 48px; image-rendering: pixelated; background: #1a1f2b; border-radius: 6px; }
.itip-h b { display: block; color: var(--gold); font-size: 13.5px; }
.itip-h small { color: var(--muted); }
.itip-d hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.itip-mob { display: grid; place-items: end center; min-height: 60px; margin: -2px 0 8px; padding: 8px; border-radius: 6px;
	background: radial-gradient(ellipse 40% 10px at 50% calc(100% - 10px), #0008, transparent), #1a1f2b; }
.itip-mob img { max-width: 220px; max-height: 180px; image-rendering: pixelated; }

/* dark thin scrollbars everywhere (the default white ones stood out) */
* { scrollbar-width: thin; scrollbar-color: #343c50 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #343c50; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #4a5470; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* inventory tabs: game icons instead of words (label in title) */
.inv .tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; }
.inv .tabs a img.iic { margin: 0; opacity: .55; }
.inv .tabs a.on img.iic { opacity: 1; }
.tbl td.nowrap { white-space: nowrap; }

/* clickable inventory + toast */
.item.act { cursor: pointer; }
.item.act:hover { border-color: var(--gold); }
.item.act:active { transform: translateY(1px); }
.toast { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1100; padding: 8px 16px; border-radius: 8px;
	background: #1a2233; border: 1px solid var(--gold); color: var(--text); font-size: 13px; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }

/* ---- line icons (svg sprite in index.html) */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 12px; height: 12px; vertical-align: -1px; opacity: .7; }

/* ---- header: account switcher + one command button */
.top { gap: 12px; }
.av { position: relative; width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
	background: linear-gradient(135deg, #2b3550, #1a2030); border: 1px solid #3a4560; color: var(--gold); font-weight: 800;
	text-transform: uppercase; }
.av.on::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%;
	background: var(--good); border: 2px solid var(--bg); }
.avhead { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; display: grid; place-items: center; }
.avhead img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.av.big { width: 46px; height: 46px; border-radius: 12px; font-size: 20px; }
.acc { position: relative; min-width: 0; }
.accbtn { display: flex; align-items: center; gap: 9px; max-width: 290px; padding: 4px 10px 4px 4px; border-radius: 11px;
	background: var(--panel2); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.accbtn:hover, .acc.open .accbtn { border-color: #4a5470; }
.acc.open .accbtn .ic { transform: rotate(180deg); }
.acctext { display: grid; min-width: 0; line-height: 1.25; }
.acctext b, .acctext small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctext small { color: var(--muted); font-size: 11.5px; }
.accbtn .ic { color: var(--muted); transition: transform .15s; }
.accshade { position: fixed; inset: 0; z-index: 6; }
.accdd { position: absolute; top: calc(100% + 6px); left: 0; z-index: 7; width: 330px; max-height: 70vh; overflow-y: auto; padding: 6px;
	background: var(--panel); border: 1px solid #343c50; border-radius: 13px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); }
.accrow { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 9px;
	cursor: pointer; color: var(--text); }
.accrow:hover { background: var(--panel2); }
.accrow.on { background: linear-gradient(90deg, rgba(232, 182, 76, .14), transparent 70%); box-shadow: inset 2px 0 0 var(--gold); }
.accrow .st { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #1b1f29; color: var(--muted); }
.accrow .st.on { background: #17301f; color: #9fe0a9; }
.accrow.add { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; padding-top: 10px; }
.accrow.add .av, .accrow.out .av { color: var(--muted); background: transparent; border-style: dashed; }
.accrow.out { color: var(--muted); }
.accrow.out b { font-weight: 500; }
.cmdbtn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 11px; border-radius: 10px; cursor: pointer;
	font: inherit; font-weight: 700; color: #1a1408; border: 1px solid #c4862a;
	background: linear-gradient(180deg, #f3cb6a, #c4862a); box-shadow: 0 2px 12px rgba(232, 182, 76, .22); }
.cmdbtn:hover { filter: brightness(1.08); }
.cmdbtn em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #1a1408;
	color: #f3cb6a; animation: pulse 1.6s infinite; }

/* ---- command sheet */
.modal.cmdm { backdrop-filter: blur(3px); }
.sheet { width: min(540px, 94vw); max-height: 92vh; overflow-y: auto; padding: 16px 18px 18px; border-radius: 18px;
	background: linear-gradient(180deg, #171c27, #10131a 60%); border: 1px solid #2e3546; box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
	animation: sheetin .18s ease-out; }
@keyframes sheetin { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.sh-head { display: flex; align-items: center; gap: 12px; }
.sh-who { display: grid; min-width: 0; flex: 1; }
.sh-who b { font-size: 17px; }
.sh-who small { color: var(--muted); }
.x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted);
	display: grid; place-items: center; cursor: pointer; }
.x:hover { color: var(--text); border-color: #4a5470; }

/* the state band: green while working, hazard stripes while paused, grey when the bot is off */
.sh-state { --c: var(--good); margin: 14px 0 4px; padding: 14px 14px 14px 16px; border-radius: 14px; display: flex; align-items: center;
	gap: 12px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
	background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 80%); position: relative; overflow: hidden; }
.sh-state::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.st-paused .sh-state { --c: #f0a73a;
	background: repeating-linear-gradient(-45deg, rgba(240, 167, 58, .13) 0 12px, transparent 12px 24px),
		linear-gradient(90deg, rgba(240, 167, 58, .12), transparent 80%); }
.st-off .sh-state { --c: #6b7385; }
.now { flex: 1; display: grid; min-width: 0; }
.now small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.now b { font-size: 19px; color: var(--c); line-height: 1.3; }
.bigbtn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font: inherit; font-size: 15px;
	font-weight: 700; cursor: pointer; border: 1px solid; white-space: nowrap; }
.bigbtn.pause { background: #2c2210; border-color: #8a6420; color: #ffd27a; }
.bigbtn.play { background: linear-gradient(180deg, #4fbf6a, #2e8a48); border-color: #2e8a48; color: #06140a; }
.bigbtn.start { background: linear-gradient(180deg, #f3cb6a, #c4862a); border-color: #c4862a; color: #1a1408; }
.bigbtn:hover:not([disabled]) { filter: brightness(1.1); }
.bigbtn[disabled] { opacity: .5; }

.sheet h4 { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.sheet h4 small { letter-spacing: 0; color: #f0a73a; font-weight: 400; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { --a: var(--gold); display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center;
	padding: 10px; border-radius: 13px; text-align: left; font: inherit; color: var(--text); text-decoration: none; cursor: pointer;
	background: #12161f; border: 1px solid var(--line); transition: border-color .12s, transform .12s, background .12s; }
.tile b { font-size: 14px; align-self: end; }
.tile small { color: var(--muted); font-size: 11.5px; align-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* icon slot: a little bevelled square like a game hotkey */
.slot { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--a);
	background: linear-gradient(160deg, color-mix(in srgb, var(--a) 26%, #1a1f2b), #0e1117);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1px color-mix(in srgb, var(--a) 35%, transparent); }
.slot .ic { width: 22px; height: 22px; }
.tile:hover:not([disabled]) { border-color: color-mix(in srgb, var(--a) 60%, transparent); background: #161b26; transform: translateY(-1px); }
.tile:active:not([disabled]) { transform: translateY(0); }
.tile[disabled] { opacity: .4; cursor: default; }
.t-buy { --a: #6aa8ff; } .t-sell { --a: #f0c560; } .t-store { --a: #b48cff; } .t-home { --a: #7bd88f; }
.t-reload { --a: #5fd4d0; grid-column: 1 / -1; }
.t-open { --a: #9fb4d8; } .t-game { --a: #ff8c6b; }
.tiles.three .tile { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: start; row-gap: 2px; }
.tiles.three .slot { grid-row: auto; margin-bottom: 6px; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px;
	border-top: 1px solid var(--line); font-size: 12px; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #ff9a9a; font: inherit; cursor: pointer;
	padding: 4px 6px; border-radius: 7px; }
.linkbtn:hover:not([disabled]) { background: #2a1416; }

/* ---- mobile: header in one row, one panel at a time + bottom tab bar (console first) */
.mnav { display: none; }
@media (max-width: 760px) {
	.top { height: 56px; flex-wrap: nowrap; gap: 8px; padding: 0 10px; }
	.top .bt, .top .crumb, .top .me, .pill > span { display: none; }
	.pill { padding: 0; width: 22px; height: 22px; justify-content: center; flex: none; }
	.acc { flex: 1; }
	.accbtn { max-width: none; width: 100%; }
	.acctext { flex: 1; }
	.accdd { position: fixed; top: 60px; left: 8px; right: 8px; width: auto; }
	.cmdbtn { padding: 8px 12px 8px 10px; flex: none; }
	.cmdbtn em { display: none; }
	.cmdbtn.paused { background: linear-gradient(180deg, #ffb84d, #d0801f); }

	.grid { position: fixed; top: 56px; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); height: auto; min-height: 0;
		padding: 8px; display: block; }
	.grid > .panel { display: none; height: 100%; }
	.grid > .panel.mon { display: flex; }
	.grid > .panel.empty.mon { display: grid; }
	.contools { gap: 6px 10px; }

	.mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; height: calc(60px + env(safe-area-inset-bottom));
		padding-bottom: env(safe-area-inset-bottom); background: rgba(13, 15, 21, .96); border-top: 1px solid var(--line);
		backdrop-filter: blur(8px); }
	.mnav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
		color: var(--muted); font-size: 11px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.mnav a.on { color: var(--gold); }
	.mnav a.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px;
		background: var(--gold); box-shadow: 0 0 10px var(--gold); }
	.mnav a b { position: absolute; top: 6px; left: calc(50% + 6px); font-size: 10px; min-width: 16px; padding: 0 4px; text-align: center;
		border-radius: 99px; background: var(--hp); color: #fff; line-height: 15px; }

	/* command sheet slides up from the bottom */
	.modal.cmdm { place-items: end stretch; }
	.sheet { width: 100%; max-height: 88dvh; border-radius: 20px 20px 0 0; border-bottom: 0;
		padding: 8px 14px calc(16px + env(safe-area-inset-bottom)); animation: sheetup .22s ease-out; }
	.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: #3a4256; margin: 0 auto 10px; }
	@keyframes sheetup { from { transform: translateY(40%); opacity: .4; } }
	.sh-state { flex-wrap: wrap; }
	.bigbtn { flex: 1; justify-content: center; }
	.tile small { white-space: normal; }

	.wbox { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
	.toast { top: 64px; max-width: 92vw; }
}

/* ---- character tabs: summary / status / skills */
.char > * { flex-shrink: 0; }
.ctabs { flex: none; margin: 12px -14px 0; padding: 0 8px; position: sticky; top: -14px; z-index: 2; background: var(--panel); }
.ctabs a { flex: 1; text-align: center; }
.tabs a b.hot { background: var(--gold); color: #1a1405; font-weight: 800; }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.sumhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 10px; font-size: 12px; }
.sumhead b { color: var(--text); }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rate { --c: var(--exp); position: relative; overflow: hidden; padding: 8px 9px 7px; border-radius: 8px; background: var(--panel2);
	border: 1px solid var(--line); }
.rate::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--c); }
.rate.r-job { --c: var(--jexp); }
.rate.r-zeny { --c: var(--good); }
.rate small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.rate b { display: block; font-size: 17px; line-height: 1.35; color: var(--c); font-variant-numeric: tabular-nums;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate em { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); line-height: 1.35; }
h3 .cnt { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 4px; }
.tally { display: grid; gap: 2px; }
.trow { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; }
.trow:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.trow:hover { background: var(--panel2); }
.tic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 6px; background: #0b0d12;
	border: 1px solid var(--line); }
.tic .iic { margin: 0; }
.tic.mob { background: #2a1517; border-color: #4a2427; color: #ff9a8f; font-size: 11px; font-weight: 700; }
.tic.mob .mobimg { width: 22px; height: 22px; }
.tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow b { font-variant-numeric: tabular-nums; color: var(--gold); font-size: 12.5px; }

.ptsbox { margin: 12px 0 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel2); border: 1px dashed var(--line);
	color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.ptsbox b { font-size: 16px; color: var(--muted); margin-left: 6px; }
.upbtn { padding: 5px 12px; border-radius: 7px; border: 1px solid #6b5420; cursor: pointer; font: inherit; font-size: 12.5px;
	font-weight: 700; color: #1a1405; background: linear-gradient(180deg, #f3c967, #c8952e);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 rgba(0, 0, 0, .4); }
.upbtn.on { background: var(--panel2); color: var(--text); border-color: var(--line); box-shadow: none; }
.upbtn[disabled] { cursor: default; background: var(--panel2); border-color: var(--line); color: #4b5160; box-shadow: none; }
.ptsbox.has { border: 1px solid #6b5420; background: linear-gradient(90deg, #2a2412, var(--panel2)); color: var(--text); }
.ptsbox.has b { color: var(--gold); }
.plus { width: 26px; height: 26px; flex: none; border-radius: 7px; border: 1px solid #6b5420; cursor: pointer; font-size: 16px;
	font-weight: 800; line-height: 1; color: #1a1405; background: linear-gradient(180deg, #f3c967, #c8952e);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 0 rgba(0, 0, 0, .4); }
.plus:hover:not([disabled]) { filter: brightness(1.1); }
.plus:active:not([disabled]) { transform: translateY(1px); }
.plus[disabled] { cursor: default; background: var(--panel2); border-color: var(--line); color: #4b5160; box-shadow: none; }
.strow { display: grid; grid-template-columns: 34px 52px 1fr auto auto; min-height: 30px; align-items: center; gap: 8px; padding: 4px 0; }
.strow label { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.stval b { font-size: 15px; font-variant-numeric: tabular-nums; }
.stval small { color: var(--good); margin-left: 3px; font-size: 11px; }
.stbar { height: 6px; border-radius: 3px; background: #0b0d12; border: 1px solid var(--line); overflow: hidden; }
.stbar span { display: block; height: 100%; background: linear-gradient(90deg, #9a7322, var(--gold)); }
.strow .need { color: var(--muted); font-size: 11px; min-width: 42px; text-align: right; }
.kv.calc { grid-template-columns: auto 1fr auto 1fr; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.kv.calc small { color: var(--good); }
.skrow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; min-height: 36px; box-sizing: border-box; }
.skrow:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.skrow.zero .skname { color: var(--muted); }
.skinfo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; cursor: help; }
.skrow.zero .tic img { filter: grayscale(1) opacity(.5); }
.skname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sklv { font-size: 12px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.skrow.zero .sklv { color: #4b5160; }
.sklink { display: block; margin: 0 0 8px; padding: 7px 10px; border-radius: 8px; border: 1px dashed #3a4560; color: var(--gold);
	font-size: 13px; cursor: pointer; text-align: center; }
.sklink:hover { background: var(--panel2); }

/* ---- settings: skill tab */
.sktbl .skinfo { white-space: nowrap; }
.sktbl td.mons { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 220px; }
.sktbl .chip a { cursor: pointer; margin-left: 4px; }
.monpick { position: relative; flex: 1; min-width: 140px; }
.monpick input { width: 100%; box-sizing: border-box; background: #0b0d12; border: 1px solid var(--line); color: var(--text);
	border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12.5px; }
.monpick .dd { z-index: 20; min-width: 220px; }
@media (max-width: 760px) {
	/* skill settings: one card per skill */
	.sktbl, .sktbl tbody, .sktbl td { display: block; }
	.sktbl tr:first-child { display: none; }
	.sktbl tr { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px 8px; padding: 8px 0;
		border-bottom: 1px solid #1c2130; }
	.sktbl td { padding: 0; border: 0; }
	.sktbl td[data-l] { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding-left: 34px; }
	.sktbl td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; min-width: 70px; }
	.sktbl td.mons { min-width: 0; }
	.sktbl tr.off td[data-l] { display: none; }
	.plus { width: 32px; height: 32px; }
	.ctabs { top: -14px; }
}

/* party tab */
.pname { background: var(--panel2); border: 1px solid var(--line); color: inherit; border-radius: 6px; padding: 4px 8px; width: 170px; font: inherit; }
.pname:focus { outline: none; border-color: var(--gold); }
.ptbl tr.off td { opacity: .55; }
@media (max-width: 760px) {
	.ptbl, .ptbl tbody, .ptbl td { display: block; }
	.ptbl tr:first-child { display: none; }
	.ptbl tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
	.ptbl td { padding: 0; border: 0; }
}

/* settings tab: buy item picker (+ เพิ่มไอเทม) */
.card h3 .btn.sm { float: right; }
.dialog.bpick { width: min(520px, 94vw); max-height: 86vh; grid-template-rows: auto auto 1fr auto; }
.bplist { overflow-y: auto; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.bplist h4 { margin: 12px 0 4px; font-size: 12px; font-weight: 600; color: var(--gold); }
.bplist h4 small { font-weight: 400; margin-left: 4px; }
.bpi { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; margin: 0; background: none; border: 0;
	border-radius: 8px; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.bpi:hover:not([disabled]) { background: var(--panel2); }
.bpi[disabled] { opacity: .45; cursor: default; }
.bpi span { flex: 1; }
.bpi b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---- account switcher: เดี่ยว / Multiple */
.accmode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; margin-bottom: 6px; border-radius: 10px;
	background: #0d1017; border: 1px solid var(--line); }
.accmode a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 8px;
	cursor: pointer; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.accmode a.on { background: var(--panel2); color: var(--gold); box-shadow: inset 0 0 0 1px #4a3f22; }
.acchint { margin: 0 4px 6px; font-size: 11.5px; color: var(--muted); }
.accrow { grid-template-columns: 14px 30px 1fr auto; }
.accrow.multi { grid-template-columns: 14px 20px 30px 1fr auto; }
.accrow.add, .accrow.out, .accrow.dev { grid-template-columns: 30px 1fr auto; padding-left: 32px; }
.grip { color: #4b5366; cursor: grab; touch-action: none; user-select: none; font-size: 15px; line-height: 1; text-align: center; margin: -8px -4px; padding: 8px 4px; }
.grip:hover { color: var(--text); }
.accrow.dragging { background: var(--panel2); box-shadow: 0 0 0 1px var(--gold) inset; cursor: grabbing; }
.accrow.dragging .grip { cursor: grabbing; color: var(--gold); }
.accrow .ck { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #3e4760; display: grid; place-items: center;
	font-size: 11px; font-weight: 800; color: #1a1408; }
.accrow.multi.on { background: linear-gradient(90deg, rgba(232, 182, 76, .12), transparent 70%); box-shadow: none; }
.accrow.multi.on .ck { background: var(--gold); border-color: var(--gold); }
.accrow.full { opacity: .45; }

/* ---- multi view: grid of panes (columns x rows set by content.layout) */
.mpager { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: 9px; background: var(--panel2);
	border: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; }
.mpager span { min-width: 34px; text-align: center; }
.mpager button { width: 28px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent;
	color: var(--text); cursor: pointer; }
.mpager button:hover:not([disabled]) { background: #262d3d; }
.mpager button[disabled] { opacity: .3; cursor: default; }
.mgrid { display: grid; gap: 8px; padding: 8px; height: calc(100vh - 53px); height: calc(100dvh - 53px); }
.slotbox { display: flex; min-width: 0; min-height: 0; }
.slotbox > * { flex: 1; min-width: 0; }
.pane { position: relative; }
.pno { flex: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; display: grid; place-items: center;
	font-size: 10.5px; font-weight: 800; background: #0b0d12; color: var(--muted); border: 1px solid var(--line); }
.phead { display: flex; align-items: center; gap: 7px; padding: 6px 6px 4px 8px; flex: none; }
.pwho { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwho b { font-size: 14px; }
.pwho i { font-style: normal; color: var(--muted); }
.pwho em { font-style: normal; font-size: 11.5px; color: var(--gold); margin-left: 6px; font-variant-numeric: tabular-nums; }
.pcmd { flex: none; width: 30px; height: 28px; display: grid; place-items: center; border-radius: 8px; cursor: pointer;
	color: #1a1408; border: 1px solid #c4862a; background: linear-gradient(180deg, #f3cb6a, #c4862a); }
.pcmd:hover { filter: brightness(1.08); }
.picon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; padding: 0;
	color: var(--muted); border: 1px solid var(--line); background: var(--panel2); }
.picon:hover { color: var(--text); border-color: #4a3f22; }
.backmulti { margin-left: auto; align-self: flex-start; flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0;
	border-radius: 9px; cursor: pointer; color: #1a1408; border: 1px solid #c4862a; background: linear-gradient(180deg, #f3cb6a, #c4862a); }
.backmulti:hover { filter: brightness(1.08); }
.tag + .backmulti { margin-left: 8px; }
.pcmd.paused { background: linear-gradient(180deg, #ffb84d, #d0801f); animation: pulse 1.6s infinite; }
/* status line: dot colour = what the bot is doing */
.pst { --c: var(--muted); display: flex; align-items: center; gap: 6px; padding: 0 8px 5px; font-size: 12px; flex: none; min-width: 0; }
.pst i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 6px var(--c); }
.pst b { color: var(--c); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pst .muted { margin-left: auto; font-size: 11px; white-space: nowrap; }
.pst.k-atk { --c: #ff5c5c; } .pst.k-walk { --c: #5aa9ff; } .pst.k-rest { --c: #5fd4d0; } .pst.k-busy { --c: var(--good); }
.pst.k-pause { --c: #ffb84d; } .pst.k-wait { --c: var(--gold); } .pst.k-dead { --c: #ff8080; } .pst.k-idle { --c: #c9ccd4; }
.pst.k-off { --c: #5e6676; } .pst.k-off i { box-shadow: none; }
.pvis { display: grid; grid-template-columns: 60px 1fr 1fr; gap: 6px; height: 92px; padding: 0 8px; flex: none; }
.pvis .avatar { width: 60px; height: 92px; }
.pvis .avatar.look { padding-bottom: 3px; }
.pmap { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0d0f14; }
.pmap canvas { position: absolute; inset: 0; display: block; }
.ptgt { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 3px; padding: 4px 5px 5px; border-radius: 8px;
	border: 1px solid #5a2a2c; background: radial-gradient(circle at 50% 40%, #2a1517, #0d0f14 75%); }
.ptgt img { min-height: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.ptgt .tn { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ptgt .tn small { color: var(--muted); }
.ptgt .bar { margin: 0; height: 12px; }
.ptgt .bar em { line-height: 10px; font-size: 10px; padding: 0 5px; }
.bar.mhp span { background: linear-gradient(90deg, #2f7a45, var(--good)); }
.bar.mhp.low span { background: linear-gradient(90deg, #a52a2e, var(--bad)); }
.ptgt.none { border: 1px dashed var(--line); background: #0d0f14; place-items: center; align-content: center; grid-template-rows: none; color: var(--muted); font-size: 11px; }
.ptgt.none .ic { opacity: .5; }
.pbars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; padding: 6px 8px 0; flex: none; }
.pbars .bar { margin: 0; }
.pbars .bar label, .pbars .bar em { padding: 0 6px; }
.ptabs { display: flex; flex-wrap: wrap; flex: none; margin-top: 4px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.ptabs a { flex: 1 1 auto; text-align: center; padding: 6px 5px 5px; font-size: 11.5px; cursor: pointer; color: var(--muted);
	border-bottom: 2px solid transparent; white-space: nowrap; }
.ptabs a.on { color: var(--text); border-bottom-color: var(--gold); }
.ptabs a b.hot { font-size: 10px; padding: 0 5px; margin-left: 3px; border-radius: 99px; background: var(--gold); color: #1a1405; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.pbody.flush { padding: 0; }
.pbody.con { padding: 4px 8px; background: #07080b; font: 11.5px/1.5 ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }
.pbody .rates { gap: 4px; }
.pbody .rate { padding: 6px 7px 5px; }
.pbody .rate b { font-size: 14px; }
.pbody .kv { margin-top: 8px; }
.pbody h3 { margin: 10px 0 4px; }
.pbody .items { padding: 0; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.pbody .stats { margin-top: 0; grid-template-columns: repeat(3, 1fr); }
.stats small.bonus { color: var(--good); }
.pbody .row { padding: 5px 8px; }
.pbody .row.mob { grid-template-columns: 28px 1fr 60px auto; }
.pbody .mobimg { width: 28px; height: 28px; }
.pseg { display: flex; gap: 4px; padding: 6px 8px; position: sticky; top: 0; z-index: 1; background: var(--panel); border-bottom: 1px solid var(--line); }
.pseg a { flex: 1; text-align: center; padding: 3px 4px; border-radius: 7px; font-size: 11.5px; cursor: pointer; color: var(--muted);
	background: #0d1017; border: 1px solid var(--line); white-space: nowrap; }
.pseg a.on { color: var(--text); border-color: #4a3f22; background: var(--panel2); }
.pseg a b { font-size: 10.5px; color: var(--gold); margin-left: 2px; }
.ptsbox.sm { margin: 0 0 8px; padding: 5px 8px; font-size: 12px; }
.ptsbox.sm b { font-size: 14px; }
.ptsbox.sm .upbtn { padding: 4px 10px; font-size: 12px; }
.pbody .strow { grid-template-columns: 30px 44px 1fr auto auto; gap: 6px; min-height: 28px; padding: 2px 0; }
.stohead { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 12px; }
.stohead .good { color: var(--good); }
/* empty box: keeps the grid full, opens the character picker */
.pane.blank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative;
	border: 1.5px dashed #2c3346; border-radius: var(--radius); color: #5e6676; cursor: pointer; font-size: 12.5px; }
.pane.blank:hover { border-color: #4a5470; color: var(--muted); background: rgba(255, 255, 255, .015); }
.pane.blank .pno { position: absolute; top: 8px; left: 8px; }
@media (max-width: 760px) {
	.mgrid { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; height: auto;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
	.mpager { flex: none; }
	.mpager span { min-width: 28px; }
	.ptabs { padding: 0 2px; }
	.ptabs a { padding: 6px 3px 5px; font-size: 11px; }
}

/* skill tree modal */
.ptsbtns { display: flex; gap: 6px; }
.upbtn.treebtn { background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: none; }
.upbtn.treebtn:hover { border-color: var(--gold); }
.ktbox { width: min(1240px, 97vw); max-height: 92vh; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
	display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.kthead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kthead h2 { margin: 0; font-size: 17px; flex: 1; min-width: 0; }
.kthead h2 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.ktpts { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ktpts b { font-size: 16px; margin-left: 4px; }
.ktpts.has b { color: var(--gold); }
.ktlg { margin: 0; padding: 8px 16px; font-size: 12px; color: var(--text); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center;
	border-bottom: 1px solid var(--line); }
.ktlg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid; }
.ktlg i.max { border-color: var(--gold); background: #3a2f12; }
.ktlg i.ready { border-color: var(--good); background: #12301f; }
.ktlg i.lock { border-color: var(--line); background: var(--panel2); opacity: .6; }
.ktlg i.quest { border: 1px dashed var(--muted); }
.ktmsg { padding: 16px; margin: 0; }
.ktbody { overflow: auto; padding: 0 16px 16px; }
.ktsec h3 { font-size: 13px; color: var(--gold); margin: 14px 0 8px; }
.ktcols { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
.ktcol { display: grid; gap: 8px; align-content: start; width: 214px; flex: none; }
.ktn { display: grid; grid-template-columns: 26px 1fr; gap: 4px 8px; align-items: center; padding: 7px 9px; border-radius: 9px;
	background: var(--panel2); border: 1px solid var(--line); transition: opacity .15s, box-shadow .15s; }
.ktn img.iic { margin: 0; }
.ktnm { min-width: 0; display: grid; }
.ktnm b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ktnm span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ktreq { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px; }
.ktreq span { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: rgba(255, 93, 93, .13); color: #ff8f8f; }
.ktreq span.ok { background: rgba(80, 200, 120, .12); color: var(--good); }
.ktn.max { border-color: #6b5420; background: linear-gradient(90deg, #2a2412, var(--panel2)); }
.ktn.max .ktnm span { color: var(--gold); }
.ktn.ready { border-color: var(--good); }
.ktn.ready .ktnm span { color: var(--good); }
.ktn.lock { opacity: .55; }
.ktn.quest { border-style: dashed; }
.ktbody.hl .ktn { opacity: .25; }
.ktbody.hl .ktn.need, .ktbody.hl .ktn.cur { opacity: 1; }
.ktn.cur { box-shadow: 0 0 0 2px var(--gold); }
.ktn.need { box-shadow: 0 0 0 2px #5aa9ff; }
@media (max-width: 600px) {
	.ktbox { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
	.ktcol { width: 180px; }
}

/* ---- devices: local + PCs running rowatch-agent. Each one is a rack unit: LED, name, bays with the
   bots docked on it. LED: green = online, gold pulse = bots running there, grey = offline */
.led { --l: #59606f; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--l);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--l) 22%, transparent); }
.led.on { --l: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--l) 22%, transparent), 0 0 8px var(--l); }
.led.busy { --l: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--l) 25%, transparent), 0 0 10px var(--l); animation: ledglow 1.6s infinite; }
@keyframes ledglow { 50% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--l) 12%, transparent), 0 0 2px var(--l); } }
.led.big { width: 13px; height: 13px; }
.accrow.dev .av { color: #5fd4d0; background: transparent; border-style: dashed; }
.accrow.dev .st.on { background: #12302f; color: #8fe6e2; }

.sheet.devs { width: min(600px, 95vw); }
.dav { color: #5fd4d0; background: linear-gradient(160deg, #183a3a, #0e1117); }
.rack { display: grid; gap: 6px; margin-top: 14px; }
.station { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto 14px; align-items: center; gap: 12px; cursor: pointer;
	padding: 11px 12px 11px 14px; border-radius: 12px; color: var(--text); text-decoration: none; position: relative;
	background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .018) 3px 4px), #12161f;
	border: 1px solid var(--line); transition: border-color .12s, transform .12s; }
.station::before, .station::after { content: ''; position: absolute; left: 4px; width: 3px; height: 3px; border-radius: 50%; background: #2c3344; }
.station::before { top: 6px; } .station::after { bottom: 6px; }
.station:hover { border-color: #3c8c8a; transform: translateX(2px); }
.station.off .st-name b { color: var(--muted); }
.st-name { display: grid; min-width: 0; }
.st-name b { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; letter-spacing: .02em; }
.st-name small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: #0b0e14; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.bay { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 700;
	background: #1a1f2b; color: var(--muted); border: 1px solid #262c3a; }
.bay img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.bay.on { border-color: var(--good); box-shadow: 0 0 6px rgba(123, 216, 143, .35); }
.bay.empty { width: auto; padding: 0 8px; font-weight: 400; font-size: 11px; }
.bay.more { width: auto; padding: 0 6px; font-size: 11px; }
.station .tag { font-size: 11px; color: #8fe6e2; background: #12302f; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.station .car { color: var(--muted); }
.addst { width: 100%; margin-top: 8px; padding: 11px; border-radius: 12px; border: 1px dashed #3c8c8a; background: transparent;
	color: #8fe6e2; font: inherit; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.addst:hover { background: #10201f; }

.dform { display: grid; gap: 10px; margin-top: 14px; }
.dform input { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.tokrow { display: flex; gap: 6px; }
.tokrow input { flex: 1; min-width: 0; }
.small { font-size: 12px; }

.dstate { --c: var(--good); }
.dstate.doff { --c: #6b7385; }
.dmeta { color: var(--muted); font-size: 11px; text-align: right; line-height: 1.5; }
.dbots { display: grid; gap: 4px; }
.dbot { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.dbot.here { background: linear-gradient(90deg, rgba(95, 212, 208, .1), transparent 70%); box-shadow: inset 2px 0 0 #5fd4d0; }
.dact { display: flex; gap: 6px; align-items: center; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.kv > span:not(.kvb) { color: var(--muted); }
.kvb { display: flex; gap: 4px; }
.kv code, .more code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; background: #0b0e14; border: 1px solid var(--line);
	border-radius: 6px; padding: 3px 7px; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.term { position: relative; margin-top: 6px; border-radius: 10px; background: #07090d; border: 1px solid #1f3a3a; }
.term pre { margin: 0; padding: 12px 12px 12px 14px; font: 12px/1.55 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #b9f0ec;
	white-space: pre-wrap; word-break: break-all; }
.term .tcopy { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11px;
	padding: 3px 8px; border-radius: 6px; border: 1px solid #2c5452; background: #10201f; color: #8fe6e2; cursor: pointer; }
.term .tcopy + pre { padding-top: 30px; }
.more { margin-top: 10px; font-size: 12.5px; }
.more summary { cursor: pointer; color: #8fe6e2; }
.more ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 5px; color: var(--muted); }

/* bot sheet: where this bot runs */
.runon { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px 8px 12px; border-radius: 12px;
	background: #12161f; border: 1px solid var(--line); }
.runon.open { border-color: #3c8c8a; }
.runon-t { flex: 1; display: grid; }
.runon-t small { color: var(--muted); font-size: 11px; }
.runon-t b { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 14px; }
.runon-pick { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 2px 2px; }
.runon-pick p { width: 100%; margin: 0; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.dchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line);
	background: #12161f; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none;
	font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.dchip.on { border-color: #5fd4d0; background: #10201f; color: #8fe6e2; }
.dchip:hover:not([disabled]) { border-color: #3c8c8a; }
.dchip[disabled]:not(.on) { opacity: .45; cursor: default; }
.dchip.add { border-style: dashed; color: #8fe6e2; font-family: inherit; }

/* save point + NPCs of the selected map (world modal) */
.rect .savei { position: absolute; left: 2px; bottom: 1px; font-size: 13px; line-height: 1; filter: drop-shadow(0 0 3px #000); pointer-events: none; }
.wlegend .link { color: var(--gold); cursor: pointer; }
.tag.savet { margin-left: 6px; color: #9fd0ff; border-color: #2c4a6b; }
.npcs { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.npcs h3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.npcs .nf { font-size: 11.5px; font-weight: 400; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; user-select: none; }
.npcs .nf.on.t-k { color: #e8b64c; border-color: #6b5420; background: rgba(232, 182, 76, .1); }
.npcs .nf.on.t-s { color: #7bd88f; border-color: #2e4535; background: rgba(123, 216, 143, .1); }
.npcs .nf.on.t-w { color: #5aa9ff; border-color: #2c4a6b; background: rgba(90, 169, 255, .1); }
.npcmap { width: 100%; margin: 6px 0 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.npc { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 5px; background: #11141b; }
.npc:hover { border-color: #3a4256; }
.npc .nrow { display: flex; align-items: center; gap: 8px; padding: 6px 9px; font-size: 13px; }
.npc .nd { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.npc.t-k .nd { background: #e8b64c; } .npc.t-s .nd { background: #7bd88f; } .npc.t-w .nd { background: #5aa9ff; }
.npc .nname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npc a.nname { cursor: pointer; }
.npc .car { color: var(--muted); margin-right: 4px; }
.npc .npos { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.npc .tag.savet { margin-left: 0; }
.npc .drop { grid-template-columns: 1fr auto 40px; }
.npc .drop .price { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.npc .drop .r { text-align: right; font-variant-numeric: tabular-nums; }
