:root {
  color-scheme: light;
  --ink: #111827;
  --paper: #ffffff;
  --line: #111111;
  --soft-line: #d4dce5;
  --active-line: #1967a8;
  --active-fill: #e7f2fa;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); }
button { font: inherit; }
.page-shell { width: 100%; margin-inline: auto; }

.app-layout {
  width: min(1500px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: 22px 28px;
}

.selector-section {
  padding: 0;
}

h1 { margin: 0 0 12px; font-size: 1.18rem; line-height: 1.25; }

.protocol-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.protocol-option {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--soft-line);
  color: var(--ink);
  background: var(--paper);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
}

.protocol-option:hover,
.protocol-option:focus-visible { border-color: #86a8c3; outline: 2px solid transparent; }

.protocol-option[aria-current="true"] {
  border: 2px solid var(--active-line);
  padding: 7px 9px;
  background: var(--active-fill);
}

.table-section { padding: 0; min-width: 0; }
.table-shell { display: flex; justify-content: center; }
#protocol-table { width: 100%; }
.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--paper);
}

th, td { border: 1px solid var(--line); vertical-align: middle; }

thead th {
  height: 58px;
  padding: 8px 12px;
  font-size: .82rem;
  line-height: 1.18;
  text-align: center;
}

tbody tr { height: 88px; }
tbody th { width: 28%; padding: 10px 12px; text-align: center; }
tbody td { width: 36%; padding: 10px 12px; text-align: left; }

.zone-name,
.zone-range { display: block; line-height: 1.35; font-weight: 700; }

.rule-list {
  display: grid;
  grid-template-rows: repeat(3, 20px);
  align-content: center;
  min-height: 60px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8rem;
  line-height: 20px;
}

.rule-list li {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rule-list li:empty::after { content: "\00a0"; }

@media (min-width: 901px) {
  .app-layout {
    display: grid;
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(20px, 2.2vw, 34px);
  }

  .selector-section {
    position: sticky;
    top: 18px;
  }
}

@media (max-width: 900px) {
  .app-layout { padding-block: 24px 40px; }
  .selector-section {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--soft-line);
  }
  .protocol-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .protocol-option { min-height: 52px; font-size: .8rem; }
  .table-section { padding-top: 28px; }
}

@media (max-width: 620px) {
  .app-layout { width: calc(100% - 24px); }
  .protocol-selector { grid-template-columns: 1fr; }
  .protocol-option { min-height: 56px; }
  .table-section { padding-bottom: 8px; }
}

@media print {
  .selector-section { display: none; }
  .table-section { padding: 0; }
  .app-layout { display: block; width: 100%; padding: 0; }
  .page-shell { width: 100%; }
}

