:root {
  color-scheme: light;
  --bg: #f4f8f7;
  --surface: #ffffff;
  --surface-2: #edf7f5;
  --text: #17211f;
  --muted: #64716e;
  --line: #d8e3e0;
  --soft-line: #e5eeeb;
  --primary: #00a889;
  --primary-strong: #008d76;
  --accent: #f06f42;
  --blue: #2f6fed;
  --gold: #f6c343;
  --shadow: 0 12px 32px rgba(23, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

body,
p,
h1,
h2,
h3,
li,
span,
strong,
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text);
  border: 0;
  font-size: 24px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.account button,
.account a,
.ghost,
.inline-form button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
  text-decoration: none;
}

.account .account-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 800;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

main {
  padding: 0 clamp(12px, 3vw, 36px) 32px;
}

.auth-view {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 5vw, 56px);
  align-items: center;
  max-width: 1360px;
  margin: 0 auto;
  min-width: 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(420px, 1.3fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfaf6 100%);
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-panel > .hero-search,
.hero-panel > .search-results,
.hero-panel > .home-function-center,
.hero-panel > .home-actions,
.hero-panel > .home-tags,
.hero-panel > .home-stats,
.hero-panel > .public-submit-panel {
  grid-column: 1 / -1;
}

.hero-panel > .search-results {
  width: min(100%, 960px);
  margin: 0 auto;
}

.hero-copy h2 {
  margin: 6px 0 18px;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-copy {
  text-align: center;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.hero-image {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-search,
.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.hero-search {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  width: min(100%, 960px);
  max-width: 960px;
  min-width: 0;
  margin: 22px auto 0;
  padding: 8px;
  border: 2px solid rgba(0, 168, 137, 0.22);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(0, 63, 54, 0.13);
}

.hero-search input {
  height: 54px;
  min-height: 54px;
  min-width: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #f7fbfa;
  font-size: 17px;
  font-weight: 700;
}

.hero-search button {
  height: 54px;
  min-height: 54px;
  padding: 0 24px;
  font-size: 16px;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 14px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 23, 20, 0.46);
  backdrop-filter: blur(3px);
}

body.modal-open {
  overflow: hidden;
}

.auth-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.auth-title h2 {
  margin: 0;
  font-size: 24px;
}

.auth-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
}

.auth-title p,
.auth-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.auth-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 8px;
}

.auth-tabs .tab {
  border-radius: 6px;
  min-width: 0;
  padding: 0 8px;
  white-space: nowrap;
}

.tab {
  min-height: 38px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  min-height: 38px;
  padding: 9px 10px;
  outline: none;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.primary {
  min-height: 42px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  border: 0;
  box-shadow: none;
  font-weight: 700;
}

.primary:hover {
  background: var(--primary-strong);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-status.success {
  color: #087f5b;
  font-weight: 700;
}

.form-status.waiting {
  color: #9a6700;
  font-weight: 700;
}

.form-status.failure {
  color: var(--accent);
  font-weight: 700;
}

.home-function-center {
  width: min(100%, 960px);
  margin: 16px auto 0;
  display: grid;
  gap: 10px;
}

.home-action-bar,
.home-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.home-action-bar {
  margin-top: 0;
}

.home-action-bar button,
.home-actions button {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.home-action-bar button:hover,
.home-actions button:hover,
.home-action-bar button.active,
.home-actions button.active {
  border-color: var(--primary);
  background: #edf8f5;
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 10px 22px rgba(0, 168, 137, 0.1);
}

.home-submit-toggle {
  position: relative;
  border-color: var(--primary) !important;
  background: #00a889 !important;
  color: #fff !important;
  padding-right: 54px !important;
  text-align: left;
}

.home-submit-toggle::after {
  content: "点击";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.home-submit-toggle span {
  color: rgba(255, 255, 255, 0.86) !important;
}

.home-submit-toggle.active {
  background: #008d76 !important;
}

.home-action-bar strong,
.home-actions strong {
  font-size: 14px;
}

.home-action-bar span,
.home-actions span {
  color: var(--muted);
  font-size: 13px;
}

.home-collapsible {
  display: grid;
  gap: 8px;
}

.home-collapsible summary {
  width: max-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.home-collapsible summary::-webkit-details-marker {
  display: none;
}

.home-collapsible summary::after {
  content: "展开";
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-collapsible[open] summary::after {
  content: "收起";
}

.home-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.home-tags button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.home-tags button:hover {
  color: var(--primary-strong);
  border-color: var(--primary);
}

.home-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, auto 1fr);
  gap: 6px 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}

.home-stats strong {
  color: var(--primary-strong);
  font-size: 18px;
}

.public-submit-panel {
  margin-top: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.public-submit-panel.submit-pop {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 168, 137, 0.12), var(--shadow);
  animation: submitPulse 0.9s ease;
}

@keyframes submitPulse {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

.submit-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 14px;
}

.submit-head h3 {
  margin: 0;
  font-size: 18px;
}

.submit-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.submit-tabs {
  width: 100%;
}

.public-submit-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.public-submit-form .field-action,
.public-submit-form .inline-results,
.public-submit-form .form-error,
.public-submit-form .form-status,
.public-submit-form .primary {
  grid-column: 1 / -1;
}

.inline-results {
  display: grid;
  gap: 8px;
}

.inline-results:empty {
  display: none;
}

.hospital-choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-color: var(--line);
}

.hospital-choice-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 168, 137, 0.12);
}

.hospital-choice-guide {
  padding: 10px 12px;
  border: 1px solid #f0d47a;
  border-radius: 8px;
  background: var(--warning-bg);
  color: #8a5b00;
  font-size: 13px;
  font-weight: 900;
}

.hospital-choice-card strong,
.hospital-choice-card span {
  display: block;
  overflow-wrap: anywhere;
}

.hospital-choice-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.selected-hospital-confirm {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #bde9dc;
  border-radius: 8px;
  background: #e9fbf6;
}

.selected-hospital-confirm strong {
  color: #006b59;
  font-size: 14px;
}

.selected-hospital-confirm span,
.selected-hospital-confirm em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.selected-hospital-confirm button {
  justify-self: start;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.auth-page-main {
  min-height: calc(100vh - 76px);
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(12px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(24px, 6vw, 64px);
  align-items: center;
}

.auth-page-copy h2 {
  margin: 8px 0 14px;
  max-width: 620px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.06;
}

.auth-page-copy p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-page-panel {
  width: 100%;
}

.agreement {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.agreement input {
  width: 16px;
  min-height: 16px;
  margin-top: 1px;
}

.workspace {
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crumb {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.crumb span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.crumb.active {
  border-color: #9bc7c1;
  color: var(--primary);
  background: #eef8f6;
}

.crumb.active span {
  background: var(--primary);
  color: #fff;
}

.browser {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(210px, 1.2fr) minmax(180px, 0.95fr) minmax(220px, 1.2fr);
  gap: 12px;
}

.column,
.detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.column {
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.column-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.column-head h2,
.detail h2,
.review-form h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.column-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.column-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.column-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.step-sheet-back,
.detail-sheet-back {
  display: none;
}

body.step-sheet-open {
  overflow: hidden;
}

.browser.step-sheet-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(12, 23, 20, 0.42);
  backdrop-filter: blur(2px);
}

.step-sheet-back,
.detail-sheet-back {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
  font-weight: 900;
}

.column.step-sheet-active {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 120;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(calc(100vw - 44px), 1040px);
  height: min(calc(100dvh - 44px), 820px);
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(23, 33, 31, 0.22);
}

.column.step-sheet-active .column-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
}

.column.step-sheet-active .column-actions {
  width: 100%;
  justify-content: flex-end;
}

.column.step-sheet-active .step-sheet-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.column.step-sheet-active .list {
  min-height: 0;
  max-height: none;
}

.column.step-sheet-active .inline-form {
  max-height: 42vh;
  overflow: auto;
}

.detail {
  display: none;
}

.detail.step-sheet-active {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 130;
  display: block;
  width: min(calc(100vw - 44px), 1120px);
  height: min(calc(100dvh - 44px), 860px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(23, 33, 31, 0.22);
}

.detail.step-sheet-active .detail-sheet-back {
  position: sticky;
  top: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  background: #fff;
}

.column-head input {
  max-width: 180px;
}

.list {
  min-height: 160px;
  overflow: auto;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.list-guide {
  padding: 9px 10px;
  border: 1px solid #d5ece7;
  border-radius: 8px;
  background: #f1fbf8;
  color: #16665a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.region-picker {
  display: grid;
  gap: 12px;
}

.region-stage {
  display: grid;
  gap: 7px;
}

.region-stage h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.region-options {
  display: grid;
  gap: 7px;
}

.region-options.compact-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.region-chip {
  min-height: 36px;
  padding: 8px 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.region-chip:hover {
  border-color: #9bc7c1;
}

.region-chip.selected {
  border-color: var(--primary);
  background: #edf8f6;
}

.region-chip small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.item {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  color: var(--text);
}

.item:hover {
  border-color: #9bc7c1;
}

.item-selectable {
  position: relative;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.item-selectable:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 168, 137, 0.12);
  transform: translateY(-1px);
}

.item.selected {
  border-color: var(--primary);
  background: #edf8f6;
  box-shadow: inset 4px 0 0 var(--primary);
}

.item-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.item-meta,
.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.item-footer .item-stats {
  min-width: 0;
}

.item-action {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #bde9dc;
  border-radius: 999px;
  background: #f2fbf8;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.item-selectable:hover .item-action,
.item.selected .item-action {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.badge {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 2px 7px;
  background: #edf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.rating-badge {
  background: #fff3cd;
  color: var(--gold);
}

.inline-form {
  padding: 10px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.inline-form[hidden] {
  display: none;
}

.inline-form button {
  justify-self: start;
}

.department-group {
  display: grid;
  gap: 7px;
}

.department-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 5px 7px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail {
  min-height: 330px;
  padding: 18px;
}

.empty-detail {
  min-height: 220px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
}

.empty-detail strong {
  color: var(--text);
  font-size: 18px;
}

.doctor-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.doctor-summary h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

.score-box {
  width: 116px;
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  text-align: center;
}

.score-box strong {
  font-size: 34px;
  line-height: 1;
}

.metric-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.review-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fffc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.star-field {
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.star-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.star-head strong {
  color: var(--text);
  font-size: 13px;
}

.star-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.star-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #e2dac2;
  border-radius: 8px;
  background: #f3f6f5;
  color: #c6a34a;
  font-size: 23px;
  line-height: 1;
}

.star-button:hover,
.star-button.active {
  border-color: #f2cc54;
  background: #fff7da;
  color: #f2b600;
}

.review-form textarea {
  min-height: 118px;
  background: #fbfdfc;
}

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
}

.reviews {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.review {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.review strong {
  color: var(--text);
}

.review p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.review-actions button[data-review-action="delete"] {
  color: #fff;
  border-color: #d64545;
  background: #d64545;
}

.review-actions button[data-review-action="report"] {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-list {
  min-height: 100px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
}

.hero-search button,
.quick-search button,
.field-action button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  border: 0;
  box-shadow: none;
  font-weight: 800;
}

.hero-search input,
.hero-search button {
  height: 54px;
  min-height: 54px;
}

.hero-search button {
  padding: 0 24px;
}

.field-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.location-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.location-field span {
  min-height: 38px;
  min-width: 64px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.captcha-field {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 8px;
  align-items: center;
}

.captcha-field img {
  width: 132px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.captcha-field button {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}

.quick-search,
.admin-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 3px solid var(--text);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(0, 194, 168, 0.35);
}

.quick-search h2,
.admin-panel h2 {
  margin: 0;
  font-size: 22px;
}

.quick-search p,
.admin-panel p,
.review-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-results {
  display: grid;
  gap: 10px;
}

.result-group {
  display: grid;
  gap: 8px;
}

.result-group b {
  font-size: 13px;
}

.no-result-submit {
  gap: 10px;
}

.no-result-submit button {
  min-height: 36px;
  justify-self: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text);
  font-weight: 900;
}

.search-item {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.search-item:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 168, 137, 0.12);
  text-decoration: none;
}

.search-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.search-item span,
.pending-item span {
  color: var(--muted);
  font-size: 13px;
}

.public-doctor-detail {
  margin-top: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
}

.public-doctor-detail .reviews {
  padding-top: 0;
}

.login-nudge {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfc;
  font-size: 13px;
}

.admin-chip {
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--text);
  background: var(--gold);
  border: 2px solid var(--text);
  font-size: 12px;
  font-weight: 800;
}

.admin-head,
.pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
}

.metric-card {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px;
  border: 2px solid var(--text);
  border-radius: 8px;
  background: #fbfcfc;
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.metric-card strong {
  font-size: 23px;
  line-height: 1;
}

.admin-doctor-rank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-doctor-rank > div {
  border: 2px solid var(--text);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-doctor-rank h3,
.admin-subtitle {
  margin: 0 0 8px;
  font-size: 15px;
}

.admin-doctor-rank p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-data-head {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  gap: 10px;
  align-items: center;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tabs button,
.admin-data-head button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 2px solid var(--text);
  background: #fff;
  color: var(--text);
}

.admin-tabs button.active {
  background: var(--gold);
}

.admin-data-head form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.admin-table {
  overflow: auto;
  max-height: 420px;
  border: 2px solid var(--text);
  border-radius: 8px;
  background: #fff;
}

.admin-table table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 8px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-table td:nth-child(12),
.admin-table td:nth-child(13),
.admin-table td:nth-child(14) {
  white-space: normal;
  min-width: 160px;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.pending-item {
  padding: 12px;
  border: 2px solid var(--text);
  border-radius: 8px;
  background: #fff;
}

.pending-item div:first-child {
  display: grid;
  gap: 4px;
}

.pending-actions {
  display: flex;
  gap: 8px;
}

.pending-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--gold);
  border: 2px solid var(--text);
  color: var(--text);
}

.compact {
  min-height: 52px;
}

@media (max-width: 1180px) {
  .browser {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-view,
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.mobile-step-sheet-open {
    overflow: hidden;
  }

  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding-inline: clamp(12px, 3vw, 36px);
  }

  .brand {
    width: 100%;
  }

  .captcha-field {
    grid-template-columns: 132px 1fr;
  }

  .captcha-field button {
    grid-column: 1 / -1;
  }

  .auth-view {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .hero-copy h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .auth-art {
    min-height: 210px;
  }

  .quick-search form,
  .home-action-bar,
  .home-actions,
  .home-stats,
  .submit-head,
  .public-submit-form,
  .hospital-choice-card,
  .search-item,
  .auth-page-main,
  .field-action,
  .admin-data-head,
  .admin-doctor-rank,
  .admin-head,
  .pending-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search {
    grid-template-columns: minmax(0, 1fr) 88px;
    width: 100%;
    padding: 6px;
  }

  .hero-search input,
  .hero-search button {
    height: 48px;
    min-height: 48px;
  }

  .hero-search input {
    padding-inline: 16px;
    font-size: 15px;
  }

  .hero-search button {
    padding-inline: 16px;
  }

  .home-action-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-submit-toggle {
    grid-column: 1 / -1;
  }

  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser,
  .admin-metrics,
  .rating-row,
  .metric-grid,
  .doctor-summary {
    grid-template-columns: 1fr;
  }

  #hospitalColumn,
  #departmentColumn,
  #doctorColumn,
  .detail {
    display: none;
  }

  #hospitalColumn.step-sheet-active,
  #departmentColumn.step-sheet-active,
  #doctorColumn.step-sheet-active {
    display: grid;
  }

  .step-sheet-back,
  .detail-sheet-back {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-strong);
    font-weight: 900;
  }

  .column.step-sheet-active {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    transform: none;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
  }

  .column.step-sheet-active .column-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    background: var(--surface);
  }

  .column.step-sheet-active .column-actions {
    width: 100%;
    justify-content: space-between;
  }

  .column.step-sheet-active .step-sheet-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .column.step-sheet-active .list {
    min-height: 0;
    max-height: none;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .column.step-sheet-active .inline-form {
    max-height: 42vh;
    overflow: auto;
  }

  .detail.step-sheet-active {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: block;
    width: 100%;
    height: 100dvh;
    overflow: auto;
    transform: none;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
  }

  .detail.step-sheet-active .detail-sheet-back {
    position: sticky;
    top: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    background: #fff;
  }

  .star-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .star-button {
    width: 100%;
    min-height: 44px;
  }

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

  .column-head input {
    max-width: none;
  }

.score-box {
  width: 100%;
}
}

.site-footer {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 36px) calc(24px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--primary-strong);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
