/* thietke.bntk.fun, in the game's Mực tàu colours as the main site. Radius 0. */
:root { --ground: #111315; --panel: #1a1d20; --line: #6a7078; --text: #e6e8ea; --dim: #a9aeb5; --strong: #fff; --accent: #e8e2d0; --accent-ink: #111315; --gold: #d9b45f; --red: #d9685f; --ok: #8fcf8f; --rule: #2a2e33; --hover: #202428; --wrap: 1120px; color-scheme: dark; }
:root[data-theme="light"] { --ground: #f3f0e8; --panel: #fffdf8; --line: #8b9097; --text: #1d2023; --dim: #5a6067; --strong: #000; --accent: #1d2023; --accent-ink: #f3f0e8; --gold: #8a6512; --red: #b3382f; --ok: #2f7a3a; --rule: #ddd8cc; --hover: #efebe0; color-scheme: light; }
* { box-sizing: border-box; }
html { background: var(--ground); scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.55 "Be Vietnam Pro", system-ui, sans-serif; }
a { color: var(--strong); }
main, footer { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px/1.2 "Noto Serif", Georgia, serif; color: var(--strong); text-decoration: none; }
.lang button { background: none; border: 1px solid var(--line); color: var(--dim); padding: 2px 8px; cursor: pointer; font: inherit; }
.lang button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
main { flex: 1; padding-bottom: 48px; }
footer { padding-top: 24px; padding-bottom: 32px; color: var(--dim); font-size: 13px; }
h1 { font: 600 30px/1.25 "Noto Serif", Georgia, serif; color: var(--strong); margin: 8px 0 8px; }
h2 { font: 600 20px/1.3 "Noto Serif", Georgia, serif; color: var(--strong); margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; color: var(--strong); }
.lead { color: var(--dim); max-width: 760px; margin: 0 0 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 20px; margin-bottom: 20px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); }
input, select, textarea { background: var(--ground); color: var(--text); border: 1px solid var(--line); padding: 7px 9px; font: inherit; border-radius: 0; min-width: 0; }
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); }
button, .btn { background: var(--accent); color: var(--accent-ink); border: 0; padding: 0 16px; height: 40px; font: 600 14px "Be Vietnam Pro", sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; border-radius: 0; }
button.ghost, .btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
button.small { height: 32px; padding: 0 10px; font-size: 13px; }
button.icon { height: 32px; width: 32px; padding: 0; justify-content: center; background: none; color: var(--red); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.skill { border: 1px solid var(--line); margin-bottom: 14px; }
.skill > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.skill > summary::-webkit-details-marker { display: none; }
.skill .body { padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.slot { color: var(--gold); font-weight: 600; min-width: 64px; }
.kind { color: var(--dim); font-size: 13px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-size: 11px; line-height: 1; padding: 3px 7px 2px; border: 1px solid var(--line); color: var(--dim); }
.effect { border: 1px dashed var(--line); padding: 10px; display: grid; gap: 8px; }
.stat-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.warn { color: var(--gold); font-size: 13px; margin: 0; }
.warn.err { color: var(--red); }
.ok { color: var(--ok); font-size: 13px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--rule); }
th { color: var(--dim); font-weight: 400; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { border: 1px solid var(--line); background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--accent); }
.muted { color: var(--dim); }
.bar { position: sticky; bottom: 0; background: var(--ground); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 5; }
.toast { color: var(--gold); }
@media (max-width: 640px) { h1 { font-size: 24px; } main, footer { padding-left: 16px; padding-right: 16px; } }
.who { display: flex; gap: 12px; align-items: center; }
.who a { text-decoration: none; }

/* Builder layout */
.panel h2 { margin-bottom: 14px; }
.row.between { justify-content: space-between; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { height: 36px; background: none; color: var(--text); border: 1px solid var(--line); padding: 0 14px; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.small { font-size: 13px; }
p.muted.small { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sub { margin: 4px 0 0; color: var(--dim); font-weight: 400; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.skill { background: var(--panel); }
.skill > summary { gap: 14px; flex-wrap: nowrap; }
.skill > summary::after { content: "▾"; color: var(--dim); margin-left: 4px; }
.skill[open] > summary::after { content: "▴"; }
.skill > summary:hover { background: var(--hover); }
.skill .sname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); font-weight: 600; }
.skill .slot { min-width: 0; border: 1px solid var(--gold); padding: 3px 8px 2px; font-size: 13px; }
.skill .tags { justify-content: flex-end; }
.skill .kind { white-space: nowrap; }
.skill .body { display: block; padding: 18px 16px 20px; }
.effect { background: var(--ground); }
.effect > .row { align-items: end; }
.preview table { margin-top: 4px; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } .skill > summary { flex-wrap: wrap; } .skill .sname { flex-basis: 50%; } }
@media (max-width: 640px) { .fields.two { grid-template-columns: minmax(0, 1fr); } }
.theme { background: none; border: 1px solid var(--line); color: var(--text); height: 28px; width: 32px; padding: 0; justify-content: center; font-size: 14px; line-height: 1; font-family: system-ui, sans-serif; }

/* Sidebar menu */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
#side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 24px 18px; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
#side .brand { font-size: 17px; }
#side nav { display: grid; gap: 4px; }
#side nav a { display: block; padding: 9px 12px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; }
#side nav a:hover { background: var(--hover); color: var(--strong); }
#side nav a.on { border-left-color: var(--gold); background: var(--hover); color: var(--strong); font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.who { display: grid; gap: 8px; font-size: 14px; word-break: break-word; }
.who a { color: var(--strong); }
.tools { display: flex; gap: 10px; align-items: center; }
.content { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.content main { flex: 1; }
.topbar { display: none; }
@media (max-width: 860px) {
  .shell { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; }
  .topbar .brand { font-size: 16px; }
  #side { position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .18s; }
  #side.open { transform: none; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .5); }
  .content { min-height: 0; }
}
