:root {
  color-scheme: light;
  --ink: #4c586b;
  --muted: #78859a;
  --line: #d7dfec;
  --panel: #f7f9fd;
  --panel-strong: #f1eef7;
  --accent: #c6a5bd;
  --accent-dark: #92718a;
  --accent-soft: #f5edf3;
  --rose-line: #e2d4e1;
  --white: #ffffff;
  --focus: #b68ca6;
  --shadow: 0 6px 18px rgb(73 89 115 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f0f3fa;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  font-size: 18px;
}

.app {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1.15;
  letter-spacing: 0;
}

.summary {
  min-width: 118px;
  padding: 10px 14px;
  border: 1px solid #d8dce9;
  border-radius: 6px;
  background: #f8f7fc;
  text-align: right;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.summary span:first-child {
  font-size: 34px;
}

.search-panel {
  padding: 16px;
  border: 1px solid #d9deea;
  border-radius: 6px;
  background: #f9f8fc;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ded8e6;
  border-radius: 4px;
  background: #f8f9fe;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
}

input {
  padding: 0 14px;
}

select {
  padding: 0 36px 0 12px;
}

input:focus,
select:focus {
  outline: 4px solid color-mix(in srgb, var(--focus) 28%, transparent);
  border-color: var(--focus);
  background: var(--white);
}

.filters {
  display: grid;
  grid-template-columns: minmax(160px, 320px);
  gap: 12px;
  margin-top: 14px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

button {
  min-height: 40px;
  border: 1px solid #c9a7b5;
  border-radius: 4px;
  background: #fbf8fc;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  padding: 0 14px;
}

button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.table-wrap {
  position: relative;
  margin-top: 18px;
  border: 1px solid #d9deea;
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e4ee;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-strong);
  color: #665f78;
  font-size: 17px;
}

td {
  font-size: 18px;
}

tbody tr:hover {
  background: #f8f3f8;
}

tbody tr.deceased-row {
  background: #e3e7ee;
  color: #687386;
}

tbody tr.deceased-row > td {
  background: #e3e7ee;
}

tbody tr.deceased-row:hover {
  background: #d9dee8;
}

tbody tr.deceased-row:hover > td {
  background: #d9dee8;
}

tbody tr.transferred-row {
  background: #d8f3ff;
  color: #3f6170;
}

tbody tr.transferred-row > td {
  background: #d8f3ff;
}

tbody tr.transferred-row:hover {
  background: #c5ecfb;
}

tbody tr.transferred-row:hover > td {
  background: #c5ecfb;
}

tbody tr.deceased-row.transferred-row {
  background: #e3e7ee;
  box-shadow: inset 6px 0 0 #70c9e8;
  color: #687386;
}

tbody tr.deceased-row.transferred-row > td {
  background: #e3e7ee;
}

tbody tr.deceased-row.transferred-row:hover {
  background: #d9dee8;
}

tbody tr.deceased-row.transferred-row:hover > td {
  background: #d9dee8;
}

.number-cell {
  font-weight: 700;
  color: #805f72;
}

.empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .summary {
    text-align: left;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: stretch;
  }

  button {
    width: 100%;
  }
}
