:root {
      --bg: #eefcf8;
      --card: #ffffff;
      --text: #0f172a;
      --muted: #64748b;
      --line: #dbe7ef;
      --main: #0f766e;
      --main2: #14b8a6;
      --blue: #2563eb;
      --red: #dc2626;
      --shadow: 0 18px 45px rgba(15, 118, 110, .12);
      --radius: 24px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
      line-height: 1.58;
      background:
        radial-gradient(circle at top left, rgba(20,184,166,.2), transparent 32%),
        radial-gradient(circle at 94% 6%, rgba(37,99,235,.12), transparent 28%),
        linear-gradient(180deg, var(--bg), #fff 46%, #f8fafc);
      min-height: 100vh;
    }

    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; }

    .page {
      width: min(1120px, calc(100% - 28px));
      margin: 0 auto;
      padding: 18px 0 54px;
    }

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

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-size: 23px;
      font-weight: 950;
      letter-spacing: -.04em;
    }

    .brand-mark {
      width: 40px;
      height: 40px;
      display: grid;
      place-items: center;
      border-radius: 15px;
      background: linear-gradient(135deg, var(--main), var(--main2));
      color: #fff;
      box-shadow: 0 12px 28px rgba(20,184,166,.25);
    }

    .home-link {
      display: inline-flex;
      align-items: center;
      min-height: 40px;
      padding: 0 14px;
      border: 1px solid rgba(15,118,110,.2);
      border-radius: 999px;
      background: rgba(255,255,255,.78);
      color: var(--main);
      font-size: 14px;
      font-weight: 850;
      white-space: nowrap;
    }

    .hero {
      overflow: hidden;
      border-radius: 32px;
      padding: 38px;
      color: #fff;
      background:
        linear-gradient(135deg, rgba(15,118,110,.98), rgba(37,99,235,.88)),
        radial-gradient(circle at right bottom, rgba(255,255,255,.22), transparent 34%);
      box-shadow: var(--shadow);
    }

    .eyebrow {
      display: inline-flex;
      padding: 7px 11px;
      border-radius: 999px;
      background: rgba(255,255,255,.16);
      border: 1px solid rgba(255,255,255,.24);
      font-size: 14px;
      font-weight: 900;
      margin-bottom: 15px;
    }

    h1 {
      margin: 0;
      font-size: clamp(40px, 7vw, 66px);
      line-height: 1.03;
      letter-spacing: -.07em;
    }

    .hero p {
      max-width: 780px;
      margin: 16px 0 0;
      color: rgba(255,255,255,.9);
      font-size: 18px;
      font-weight: 700;
      word-break: keep-all;
    }

    .warning {
      margin-top: 14px;
      padding: 13px 15px;
      border-radius: 18px;
      background: rgba(255,255,255,.13);
      border: 1px solid rgba(255,255,255,.22);
      color: rgba(255,255,255,.94);
      font-size: 14px;
      font-weight: 750;
      word-break: keep-all;
    }

    .layout {
      display: grid;
      grid-template-columns: 1.05fr .95fr;
      gap: 22px;
      align-items: start;
      margin-top: 22px;
    }

    .panel {
      border: 1px solid rgba(15,118,110,.14);
      border-radius: var(--radius);
      background: rgba(255,255,255,.93);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      padding: 18px 20px;
      border-bottom: 1px solid var(--line);
      background: rgba(248,250,252,.78);
    }

    .panel-head h2 {
      margin: 0;
      font-size: 21px;
      letter-spacing: -.04em;
    }

    .panel-head p {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
      word-break: keep-all;
    }

    .panel-body { padding: 20px; }

    .question {
      padding-bottom: 22px;
      margin-bottom: 22px;
      border-bottom: 1px solid #e2e8f0;
      scroll-margin-top: 18px;
    }

    .question:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: 0;
    }

    .q-title {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 8px;
      font-size: 17px;
      font-weight: 950;
      letter-spacing: -.035em;
    }

    .q-help {
      margin: 0 0 12px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
      word-break: keep-all;
    }

    .q-no {
      width: 26px;
      height: 26px;
      display: grid;
      place-items: center;
      border-radius: 10px;
      background: var(--main);
      color: #fff;
      font-size: 13px;
      flex: 0 0 auto;
    }

    .chips {
      display: flex;
      flex-wrap: wrap;
      gap: 9px;
    }

    .chip {
      appearance: none;
      border: 1px solid #cbd5e1;
      border-radius: 999px;
      padding: 10px 13px;
      background: #fff;
      color: #334155;
      font-weight: 850;
      font-size: 14px;
      cursor: pointer;
      transition: .15s ease;
    }

    .chip:hover {
      border-color: var(--main2);
      transform: translateY(-1px);
    }

    .chip.active {
      color: #fff;
      border-color: transparent;
      background: linear-gradient(135deg, var(--main), var(--main2));
      box-shadow: 0 8px 20px rgba(20,184,166,.23);
    }

    .chip.danger.active {
      background: linear-gradient(135deg, #dc2626, #fb7185);
    }

    .input-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      margin-top: 12px;
    }

    .input-row[hidden] { display: none; }

    .input-row input {
      width: 100%;
      min-height: 46px;
      border: 1px solid #cbd5e1;
      border-radius: 16px;
      padding: 0 14px;
      background: #fff;
      color: var(--text);
      font-size: 15px;
      font-weight: 750;
      outline: none;
    }

    .mini-btn {
      appearance: none;
      border: 0;
      border-radius: 16px;
      padding: 0 15px;
      min-height: 46px;
      background: #0f172a;
      color: #fff;
      font-weight: 950;
      cursor: pointer;
      white-space: nowrap;
    }

    .result-panel {
      position: sticky;
      top: 18px;
    }

    .result-body { padding: 20px; }

    .status {
      display: inline-flex;
      align-items: center;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 999px;
      background: #ecfdf5;
      color: #047857;
      font-size: 13px;
      font-weight: 950;
      margin-bottom: 13px;
    }

    .status.emergency {
      background: #fef2f2;
      color: #b91c1c;
    }

    .result-title {
      margin: 0 0 12px;
      font-size: 27px;
      line-height: 1.23;
      letter-spacing: -.055em;
      word-break: keep-all;
    }

    .choice-hero {
      padding: 16px;
      border-radius: 20px;
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      margin-bottom: 18px;
      scroll-margin-top: 18px;
    }

    .choice-hero.flash {
      animation: choiceFlash .95s ease;
      border-color: rgba(20,184,166,.72);
      box-shadow: 0 0 0 4px rgba(20,184,166,.14);
    }

    @keyframes choiceFlash {
      0% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(20,184,166,.0); }
      28% { transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(20,184,166,.16); }
      100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(20,184,166,.0); }
    }

    .choice-label {
      margin: 0 0 8px;
      color: #1e40af;
      font-size: 13px;
      font-weight: 950;
    }

    .choice-summary {
      margin: 0 0 12px;
      color: #0f172a;
      font-size: 22px;
      line-height: 1.35;
      font-weight: 950;
      letter-spacing: -.045em;
      word-break: keep-all;
    }

    .choice-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .choice-actions .btn-link {
      min-height: 46px;
      border-radius: 16px;
      font-size: 15px;
    }

    .result-section { margin-top: 18px; }

    .result-section h3 {
      margin: 0 0 10px;
      font-size: 17px;
      letter-spacing: -.04em;
    }

    .dept-list, .hospital-list { display: grid; gap: 10px; }

    .dept-card {
      display: grid;
      grid-template-columns: 1fr auto auto;
      align-items: center;
      gap: 8px;
      padding: 13px 14px;
      border-radius: 18px;
      border: 1px solid #d7e6ef;
      background: #fff;
    }

    .dept-card strong {
      font-size: 17px;
      letter-spacing: -.04em;
      word-break: keep-all;
    }

    .btn-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
      border-radius: 13px;
      padding: 0 11px;
      font-size: 13px;
      font-weight: 950;
      background: #eff6ff;
      color: #1d4ed8;
      white-space: nowrap;
      cursor: pointer;
      border: 0;
    }

    .btn-link.google {
      background: #eff6ff;
      color: #1d4ed8;
    }

    .btn-link.primary-action {
      background: linear-gradient(135deg, #2563eb, #60a5fa);
      color: #fff;
      border: 0;
      box-shadow: 0 10px 22px rgba(37,99,235,.18);
    }

    .btn-link.naver {
      background: #ecfdf5;
      color: #047857;
    }

    .btn-link.reset {
      background: #fff;
      color: #334155;
      border: 1px solid #cbd5e1;
    }

    .hospital-card {
      padding: 14px;
      border: 1px solid #e2e8f0;
      border-radius: 17px;
      background: #fff;
    }

    .hospital-card strong {
      display: block;
      font-size: 16px;
      letter-spacing: -.035em;
      margin-bottom: 3px;
    }

    .hospital-card p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
      word-break: keep-all;
    }

    .hospital-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 12px;
    }

    .empty {
      padding: 16px;
      border: 1px dashed #cbd5e1;
      border-radius: 18px;
      background: #f8fafc;
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
      text-align: center;
      word-break: keep-all;
    }

    .footnote {
      margin-top: 22px;
      padding: 16px;
      border: 1px solid #fde68a;
      border-radius: 18px;
      background: #fffbeb;
      color: #92400e;
      font-size: 13px;
      font-weight: 760;
      word-break: keep-all;
    }

    .footer {
      margin-top: 30px;
      padding: 24px 0 8px;
      border-top: 1px solid #dbe7ef;
      color: var(--muted);
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 13px;
      font-weight: 750;
    }

    .footer a {
      color: var(--main);
      font-weight: 950;
    }

    @media (max-width: 900px) {
      .page { width: min(760px, calc(100% - 22px)); padding-top: 14px; }
      .layout { grid-template-columns: 1fr; }
      .result-panel { position: static; }
      .hero { padding: 30px 24px; border-radius: 28px; }
      .footer { display: block; }
      .footer a { display: inline-block; margin-top: 8px; }
    }

    @media (max-width: 560px) {
      .brand { font-size: 20px; }
      .home-link { font-size: 13px; padding: 0 11px; }
      .hero h1 { font-size: 43px; }
      .hero p { font-size: 16px; }
      .panel-body, .result-body { padding: 16px; }
      .input-row, .choice-actions, .hospital-actions { grid-template-columns: 1fr; }
      .dept-card { grid-template-columns: 1fr; }
      .mini-btn { min-height: 44px; }
    }