/* ==========================================================================
   Cerebro Cockpit — Graphite / Satin Silver design system
   Monochrome silver-grey palette. Gradients, hairline borders, restrained
   typography. Reflection (sheen) appears only on interaction.
   ========================================================================== */

:root {
  /* surfaces — satin silver, never flat */
  --page-0: #e6e8ec;
  --page-1: #d4d7dd;
  --panel-hi: rgba(255, 255, 255, 0.92);
  --panel-lo: rgba(255, 255, 255, 0.55);
  --panel-well: rgba(255, 255, 255, 0.28);

  /* ink */
  --ink: #22262c;
  --ink-2: #565d66;
  --ink-3: #8b929c;

  /* lines & shade */
  --line: rgba(28, 32, 38, 0.14);
  --line-soft: rgba(28, 32, 38, 0.08);
  --line-strong: rgba(28, 32, 38, 0.30);

  /* graphite (dark) — for high-strength elements */
  --graphite-0: #3a3f47;
  --graphite-1: #23272d;
  --graphite-2: #171a1f;

  /* elevation */
  --shadow-1: 0 1px 2px rgba(22, 26, 32, 0.07), 0 3px 10px rgba(22, 26, 32, 0.06);
  --shadow-2: 0 2px 6px rgba(22, 26, 32, 0.12), 0 12px 30px rgba(22, 26, 32, 0.16);
  --shadow-drawer: -20px 0 55px rgba(22, 26, 32, 0.30);

  --radius: 10px;
  --radius-s: 7px;
  --radius-pill: 999px;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", YuGothic, Meiryo, system-ui, -apple-system, sans-serif;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(255, 255, 255, 0.8), transparent 62%),
    radial-gradient(900px 560px at 88% -6%, rgba(255, 255, 255, 0.5), transparent 58%),
    linear-gradient(180deg, var(--page-0) 0%, var(--page-1) 100%);
  min-height: 100vh;
}

#app {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 28px 96px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
button { font-family: inherit; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--graphite-0);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: var(--mono); }

/* satin panel — the standard surface */
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-1);
}

/* interaction sheen — reflection only on hover / focus */
.sheen { position: relative; overflow: hidden; }
.sheen::after {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.18) 54%,
    transparent 62%
  );
  transform: translateX(-130%) skewX(-8deg);
  transition: transform 0.65s cubic-bezier(0.3, 0.6, 0.3, 1);
  pointer-events: none;
}
.sheen:hover::after,
.sheen:focus-visible::after {
  transform: translateX(130%) skewX(-8deg);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0 6px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 46%),
    linear-gradient(165deg, var(--graphite-0), var(--graphite-2));
  border: 1px solid rgba(15, 17, 20, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 8px rgba(22, 26, 32, 0.35);
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-130%);
}
.topbar:hover .brand-mark::after { transform: translateX(130%); transition: transform 0.7s ease; }

.wordmark {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
}
.wordmark small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, #4a505a, #23272d);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* ---------- brief (LLM-facing) ---------- */

.brief-block { margin-top: 14px; }

.brief-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 7px;
}
.brief-head .t {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}
.brief-head .s { font-size: 10.5px; color: var(--ink-3); }

.brief {
  margin: 0;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.15) 60%),
    linear-gradient(180deg, #eef0f4, #e2e5ea);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-1);
}

/* ---------- view tabs (segmented satin control) ---------- */

.tabs {
  display: inline-flex;
  gap: 3px;
  margin: 18px 0 30px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #d9dce1, #cfd3d9);
  box-shadow:
    inset 0 1px 3px rgba(22, 26, 32, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, transform 0.15s ease;
}
.tab .n {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.55) 60%),
    linear-gradient(180deg, #fdfdff, #e9ebf0);
  box-shadow:
    0 1px 4px rgba(22, 26, 32, 0.22),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(22, 26, 32, 0.05);
}
.tab[aria-selected="true"] .n { color: var(--ink-2); }

/* ---------- view scaffolding ---------- */

#view > .section { animation: view-in 0.3s ease both; }
#view > .section:nth-child(2) { animation-delay: 0.04s; }
#view > .section:nth-child(3) { animation-delay: 0.08s; }
#view > .section:nth-child(4) { animation-delay: 0.12s; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section { margin-bottom: 44px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head .idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.section-head h2 { font-size: 15px; letter-spacing: 0.03em; }
.section-head .en {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.section-head .rule {
  flex: 1;
  height: 1px;
  align-self: center;
  background: linear-gradient(90deg, var(--line-strong), rgba(28, 32, 38, 0.02));
}
.section-head .aside { font-size: 11.5px; color: var(--ink-3); }

/* ---------- overview: stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}

.stat {
  padding: 15px 16px 13px;
  border-radius: var(--radius);
  position: relative;
}
.stat .num {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat .num small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.stat .lbl {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.stat .sub {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.stat .sub .warn { color: var(--ink); font-weight: 600; }

/* ---------- overview: resume banner ---------- */

.resume {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-radius: var(--radius);
  color: #eceef2;
  border: 1px solid rgba(12, 14, 17, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 45%),
    linear-gradient(120deg, #33383f 0%, var(--graphite-1) 55%, #1b1e23 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 22px rgba(22, 26, 32, 0.35);
}
.resume .glyph {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  color: #14171b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(226, 229, 234, 0.75)),
    linear-gradient(180deg, #f4f5f8, #d7dae0);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 #fff;
}
.resume .body { flex: 1; min-width: 0; }
.resume .k {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #aeb4bd;
}
.resume .v { font-size: 14px; font-weight: 700; margin-top: 1px; }
.resume .s { font-size: 11.5px; color: #b9bec7; margin-top: 2px; }

.btn {
  appearance: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 8px 15px;
  border-radius: var(--radius-s);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4) 55%),
    linear-gradient(180deg, #f6f7f9, #dde0e5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(0, 0, 0, 0.45);
}
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  box-shadow: none;
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- overview: architecture layers ---------- */

.layers { display: flex; flex-direction: column; }

.layer {
  position: relative;
  padding: 22px 24px 20px 30px;
  border-radius: var(--radius);
}
.layer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4c525b, #262a31);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.5);
}
.layer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.layer-idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}
.layer-name { font-size: 17px; letter-spacing: 0.02em; }
.layer-en {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.layer-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}
.layer-count small { color: var(--ink-3); font-weight: 500; }
.layer .progress-line {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.layer .progress-line b { color: var(--ink); font-weight: 700; }
.layer .summary {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 78ch;
}
.layer .items {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.layer .items li {
  font-size: 11.5px;
  line-height: 1.5;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
  color: var(--ink-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.layer .flow {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
}
.layer .flow b { color: var(--ink-2); font-weight: 600; }

.layer-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  color: var(--ink-3);
}
.layer-connector .bar {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
  position: relative;
}
.layer-connector .bar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--line-strong);
}
.layer-connector .cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

/* ---------- overview: principles & team ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 12px;
}
.principle { padding: 15px 17px; }
.principle .pid {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.principle h3 { font-size: 13px; margin: 3px 0 5px; letter-spacing: 0.01em; }
.principle p { font-size: 12px; line-height: 1.75; color: var(--ink-2); }

.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.member { padding: 14px 16px; }
.member .tid {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.member .role {
  display: inline-block;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  color: var(--ink-2);
}
.member h3 { font-size: 13.5px; margin: 8px 0 4px; }
.member p { font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- kanban ---------- */

.kanban-scroll { overflow-x: auto; padding-bottom: 10px; }
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(218px, 1fr));
  gap: 14px;
  min-width: 1420px;
}

.kcol {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.12)),
    rgba(226, 229, 234, 0.5);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 220px;
}

.kcol-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 5px 10px;
  border-bottom: 1px solid var(--line);
}
.col-marker {
  width: 11px;
  height: 11px;
  border-radius: 3.5px;
  border: 1px solid var(--line-strong);
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.col-marker[data-tone="0"] { background: transparent; }
.col-marker[data-tone="1"] { background: linear-gradient(180deg, #f6f7f9, #e0e3e8); }
.col-marker[data-tone="2"] { background: linear-gradient(180deg, #e3e6ea, #ccd1d8); }
.col-marker[data-tone="3"] { background: linear-gradient(180deg, #c6cbd3, #a9aeb8); }
.col-marker[data-tone="4"] { background: linear-gradient(180deg, #9aa0aa, #767c86); }
.col-marker[data-tone="5"] { background: linear-gradient(180deg, #4a505a, #23272d); border-color: #171a1f; }

.kcol-label { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; }
.kcol-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.kcard {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  padding: 12px 13px 11px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.5) 55%),
    linear-gradient(180deg, #f7f8fa, #e9ebef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-1);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.kcard:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-2);
}
.kcard:active { transform: translateY(0); }
.kcard .cid {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.kcard .ktitle {
  display: block;
  font-size: 13px;
  margin: 4px 0 5px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-weight: 700;
}
.kcard .sum {
  display: -webkit-box;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kcard .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.ktag {
  font-size: 10px;
  line-height: 1.4;
  padding: 1.5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-3);
}
.kcol-empty {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  padding: 18px 6px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-s);
}

/* ---------- drawer (card detail) ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(24, 28, 34, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.backdrop.show { opacity: 1; pointer-events: auto; }

.drawer[hidden] { display: none; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(480px, 94vw);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #f4f5f8, #e9ebef);
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow-drawer);
  transform: translateX(103%);
  transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .did {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.drawer-head h2 { font-size: 18px; margin-top: 4px; letter-spacing: 0.01em; }
.drawer-head .kind {
  display: inline-block;
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.45));
  color: var(--ink-2);
}
.drawer-close {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #f6f7f9, #e2e5ea);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, var(--shadow-1);
}
.drawer-close:hover { color: var(--ink); }

.drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 40px; }
.drawer-sec { padding: 15px 0 16px; border-bottom: 1px solid var(--line-soft); }
.drawer-sec:last-child { border-bottom: 0; }
.drawer-sec h3 {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.drawer-sec p { font-size: 13px; line-height: 1.85; color: var(--ink); white-space: pre-wrap; }
.drawer-sec p.dim { color: var(--ink-2); }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 0; }
.drawer-tags:empty { display: none; }

/* ---------- materials ---------- */

.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-1);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
}
.table-scroll { overflow-x: auto; }
.mtable { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12.5px; }
.mtable th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.25));
  white-space: nowrap;
}
.mtable td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.7;
}
.mtable tbody tr:last-child td { border-bottom: 0; }
.mtable tbody tr { transition: background 0.15s ease; }
.mtable tbody tr:hover { background: rgba(255, 255, 255, 0.45); }
.mtable .fid { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.06em; }
.mtable .fname { font-weight: 700; font-size: 13px; }
.mtable .fname[data-open-card] { cursor: pointer; }
.mtable .fname[data-open-card]:hover { text-decoration: underline; text-underline-offset: 3px; }
.mtable .froute { font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 3px; }
.mtable .fnote { font-size: 11px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }

.mstatus {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.mdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex: none;
}
.mdot[data-s="todo"] { background: linear-gradient(180deg, #eef0f3, #dde0e5); }
.mdot[data-s="wip"] { background: linear-gradient(180deg, #c3c8d0, #9fa5af); }
.mdot[data-s="ready"] { background: linear-gradient(180deg, #4a505a, #22262c); border-color: #171a1f; }
.mdot[data-s="na"] { background: transparent; border-style: dashed; }
.mstatus .mtext { display: flex; flex-direction: column; }
.mstatus .mlabel { font-size: 11.5px; font-weight: 600; }
.mstatus .mnote { display: block; font-weight: 400; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.55; }

.mat-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 17px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.75;
}
.mat-note .ico {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 3px 7px;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- footer ---------- */

.foot {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

/* ---------- noscript ---------- */

.noscript-note {
  margin: 20px 0;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 12.5px;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  #app { padding: 0 14px 72px; }
  .topbar { flex-wrap: wrap; }
  .wordmark small { display: none; }
  .brief { font-size: 11px; padding: 13px 15px; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 8px 10px; }
  .resume { flex-direction: column; align-items: flex-start; }
  .drawer { width: 100vw; border-left: 0; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .sheen::after { display: none; }
}
