:root {
  --color-primary: #0891B2;
  --color-on-primary: #FFFFFF;
  --color-secondary: #22D3EE;
  --color-accent: #059669;
  --color-background: #ECFEFF;
  --color-foreground: #164E63;
  --color-muted: #E8F1F6;
  --color-border: #A5F3FC;
  --color-ring: #0891B2;
  --shadow: 0 16px 40px rgba(8, 145, 178, 0.12);
  --radius: 20px;
  --topbar-height: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "Figtree", sans-serif;
  color: var(--color-foreground);
  background:
    radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.28), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(5, 150, 105, 0.16), transparent 28%),
    var(--color-background);
  display: flex;
  justify-content: center;
  padding: 24px;
}

body.has-topbar {
  padding-top: calc(var(--topbar-height) + 16px);
}

.page {
  width: min(720px, 100%);
  align-self: flex-start;
}

body.is-home .page {
  align-self: center;
}

.card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px 32px;
}

/* 固定顶部返回栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-height);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  background: rgba(236, 254, 255, 0.92);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar-inner {
  width: min(720px, 100%);
  display: flex;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-muted);
  color: var(--color-primary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

h1 {
  margin: 18px 0 8px;
  font-family: "Figtree", "Noto Sans SC", sans-serif;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.2;
}

.lead {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.7;
  color: #3A7184;
}

.entry-btn,
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

body.is-home {
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
}

.entry-list {
  display: grid;
  gap: 12px;
}

.feedback-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 24px rgba(8, 145, 178, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feedback-bar-inner {
  position: relative;
  width: min(720px, 100%);
  margin: 0;
  padding-right: 36px;
  text-align: left;
}

.feedback-close {
  position: absolute;
  top: -2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5B7C88;
  cursor: pointer;
}

.feedback-close svg {
  width: 18px;
  height: 18px;
}

.feedback-close:hover {
  background: rgba(8, 145, 178, 0.1);
  color: var(--color-foreground);
}

.feedback-close:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
}

.feedback-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-foreground);
  text-align: left;
}

.feedback-choices {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.feedback-chip {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.feedback-chip.primary {
  background: var(--color-accent);
}

.feedback-chip.muted {
  background: var(--color-muted);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.feedback-chip:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.feedback-chip:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
}

.feedback-msg {
  margin: 6px 0 0;
  min-height: 1.2em;
  font-size: 13px;
  line-height: 1.4;
  color: #3A7184;
  text-align: left;
}

.entry-btn {
  background: var(--color-accent);
  color: var(--color-on-primary);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.22);
  width: 100%;
}

.entry-btn:hover {
  background: #047857;
  transform: translateY(-1px);
}

.entry-btn.secondary {
  background: var(--color-primary);
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.22);
}

.entry-btn.secondary:hover {
  background: #0e7490;
}

.back-btn {
  background: var(--color-muted);
  color: var(--color-primary);
  font-size: 16px;
}

.back-btn:hover {
  background: #d7eaf1;
}

.entry-btn:focus-visible,
.back-btn:focus-visible {
  outline: 4px solid var(--color-ring);
  outline-offset: 3px;
}

.entry-btn svg,
.back-btn svg {
  width: 20px;
  height: 20px;
}

.article-header h1 {
  margin-top: 0;
  margin-bottom: 10px;
}

.hospital,
.subtitle {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: #3A7184;
}

.guide,
.article-body > ol,
.article-body > ul {
  margin: 0;
  padding-left: 1.35em;
  display: grid;
  gap: 18px;
}

.guide > li,
.article-body > ol > li,
.article-body > ul > li {
  font-size: 16px;
  line-height: 1.85;
}

.guide strong,
.article-body strong {
  font-weight: 700;
  color: #0E4F63;
}

.article-body h2 {
  margin: 28px 0 12px;
  font-size: 20px;
  line-height: 1.4;
  color: #0E4F63;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.85;
}

.article-body ol + h2,
.article-body ul + h2,
.article-body p + h2 {
  margin-top: 28px;
}

.subblock {
  margin: 10px 0 0;
  padding: 14px 16px;
  background: var(--color-muted);
  border-radius: 12px;
}

.subblock p {
  margin: 0 0 10px;
}

.subblock p:last-child {
  margin-bottom: 0;
}

.tips {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.tips li {
  margin: 6px 0;
}

.doc-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  color: #3A7184;
  font-size: 13px;
  line-height: 1.5;
}

.doc-footer div + div {
  margin-top: 4px;
}

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  body.is-home {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  }

  body.has-topbar {
    padding-top: calc(var(--topbar-height) + 8px);
  }

  .card {
    padding: 28px 20px 24px;
  }

  .feedback-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .feedback-chip {
    font-size: 14px;
    min-height: 42px;
    padding: 8px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-btn,
  .back-btn,
  .feedback-chip {
    transition: none;
  }

  .entry-btn:hover,
  .back-btn:hover,
  .feedback-chip:hover {
    transform: none;
  }
}
