:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1d2329;
  --muted: #6b7680;
  --line: #dde2e7;
  --main: #1f4e79;
  --main-text: #ffffff;
  --ok: #1e7b3c;
  --bad: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15191d;
    --card: #1f252b;
    --text: #e6eaee;
    --muted: #96a1ab;
    --line: #333b43;
    --main: #6fa8dc;
    --main-text: #0d1a26;
    --ok: #6cc38a;
    --bad: #f08a80;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
[hidden] { display: none !important; }

.screen { min-height: 100dvh; }
.center { display: flex; align-items: center; justify-content: center; padding: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.narrow { width: 100%; max-width: 360px; }
h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 13px; }

label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input {
  display: block; width: 100%; margin-top: 4px; padding: 10px;
  font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px;
}
button {
  font: inherit; cursor: pointer;
}
form button[type=submit] {
  width: 100%; padding: 11px; border: 0; border-radius: 8px;
  background: var(--main); color: var(--main-text); font-weight: 600;
}
button.link { background: none; border: 0; color: var(--muted); padding: 4px 0; }
.msg { min-height: 1.5em; margin: 8px 0 0; font-size: 13px; color: var(--bad); }

/* 본 화면 */
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
main { padding: 16px 16px calc(80px + env(safe-area-inset-bottom)); max-width: 900px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  background: none; border: 0; padding: 12px 0; font-size: 13px; color: var(--muted);
}
.tabs button.on { color: var(--main); font-weight: 700; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
/* 장비 */
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.btns button, .file-btn {
  padding: 9px 12px; border-radius: 8px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); margin: 0;
}
.btns .primary { background: var(--main); color: var(--main-text); border-color: var(--main); font-weight: 600; }
.busy { opacity: .5; pointer-events: none; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.filters select, .filters input[type=search] {
  width: 100%; padding: 8px; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; margin: 0;
}
.filters .check { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; }
.filters .check input { width: auto; margin: 0; }
h3.sub { font-size: 15px; margin: 16px 0 4px; }
ul.eq { list-style: none; margin: 0; padding: 0; }
ul.eq li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.eq li.del .eq-name { text-decoration: line-through; color: var(--muted); }
.eq-name { font-weight: 600; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--line); color: var(--text); vertical-align: 1px; }
.badge.new { background: var(--bad); color: #fff; }
details { margin-top: 6px; }
details summary { cursor: pointer; font-size: 14px; }
details .list li { flex-direction: column; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
