:root {
  --ink: #1f2933;
  --muted: #69727d;
  --line: #dfe4e8;
  --paper: #ffffff;
  --wash: #f4f6f7;
  --accent: #c85c3d;
  --accent-dark: #a9462c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, "Noto Sans JP", system-ui, -apple-system, sans-serif;
}
button, input { font: inherit; }
button, .upload span {
  border: 0;
  border-radius: 9px;
  padding: 10px 15px;
  color: white;
  background: var(--accent);
  cursor: pointer;
}
button:hover, .upload span:hover { background: var(--accent-dark); }
button.quiet {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}
.hidden { display: none !important; }
.shell { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.login-card {
  width: min(420px, 100%);
  margin: 11vh auto 0;
  padding: 34px;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(31, 41, 51, .09);
}
.login-card .mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font-weight: 800;
}
.login-card h1 { margin: 18px 0 4px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.login-card label { display: block; margin: 14px 0; font-size: 14px; }
.login-card input {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.login-card button { width: 100%; margin-top: 8px; }
.error { min-height: 22px; padding-top: 10px; color: #b42318; font-size: 14px; }
.login-notice { padding-top: 10px; color: #227447; font-size: 14px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
header h1 { margin: 2px 0 0; font-size: 34px; }
.header-actions, .toolbar { display: flex; gap: 10px; align-items: center; }
.breadcrumbs { margin: 28px 0 16px; color: var(--muted); }
.breadcrumbs button { padding: 0; color: var(--muted); background: transparent; }
.breadcrumbs button:hover { color: var(--accent); background: transparent; }
.breadcrumbs span { padding: 0 7px; color: #a1a8af; }
.toolbar { flex-wrap: wrap; }
.upload input { display: none; }
.drop-zone {
  margin: 18px 0;
  padding: 18px;
  border: 1px dashed #b9c1c8;
  border-radius: 11px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.45);
}
.drop-zone.active { border-color: var(--accent); color: var(--accent); background: #fff7f3; }
.progress, .notice {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #fff3ec;
}
.notice.error { color: #b42318; background: #fff0f0; }
.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 700; }
td:nth-child(2), td:nth-child(3) { color: var(--muted); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.name-button {
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
  text-align: left;
}
.name-button:hover { color: var(--accent); background: transparent; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions button { padding: 7px 10px; font-size: 13px; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
dialog { width: min(700px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; }
dialog::backdrop { background: rgba(22, 28, 34, .42); }
.dialog-card { padding: 22px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-copy { color: var(--muted); line-height: 1.6; }
.dialog-card label { display: block; margin: 14px 0; font-size: 14px; }
.dialog-card input {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.trash-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.trash-row small { display: block; margin-top: 3px; color: var(--muted); }

@media (max-width: 700px) {
  .shell { padding: 20px 12px 40px; }
  .login-card { margin-top: 5vh; padding: 26px 22px; }
  header { align-items: flex-start; flex-direction: column; }
  .header-actions { flex-wrap: wrap; }
  th:nth-child(2), td:nth-child(2), th:nth-child(3), td:nth-child(3) { display: none; }
  th, td { padding: 13px 10px; }
  .row-actions button { padding: 7px 8px; }
}
