:root { --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --border: #cbd5e1; --accent: #0891b2; --accent2: #2563eb; --warn: #dc2626; --ok: #16a34a; --text: #000000; --text-muted: #333333; --text-dim: #4b5563; --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Arial, sans-serif;  --sidebar-bg: #1e293b; --sidebar-w: 70px;}* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }html, body { background: var(--bg); color: var(--text); font-family: var(--sans); min-height: 100vh; }header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 18px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; }.header-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }header h1 { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }header p { font-size: 11px; color: var(--text-muted); margin-top: 1px; font-family: var(--mono); }.header-time { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }.main { display: flex; flex-direction: column; gap: 0; }.output-panel { background: var(--bg); padding: 16px 16px 0 16px; }#output-text { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-family: var(--sans); font-size: 14px; line-height: 1.8; color: var(--text); white-space: pre-wrap; min-height: 90px; }#output-text.empty { color: var(--text-dim); font-style: italic; font-size: 13px; }.btn-row { display: flex; gap: 8px; padding: 10px 16px 14px; background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; }.btn { flex: 1 1 calc(50% - 6px); padding: 11px 8px; border-radius: 8px; border: none; cursor: pointer; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 5px; -webkit-tap-highlight-color: transparent; min-width: 0; }.btn-secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); }.btn-secondary:active { background: var(--border); }.btn-copy { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); }.btn-copy:active { background: var(--border); }.btn-copy.copied { background: rgba(104,211,145,0.1); border-color: var(--ok); color: var(--ok); }.pat-count { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 10px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; margin-left: 2px; }.btn-qr { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); }.sections { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }.section { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }.section-header { padding: 13px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; background: rgba(8,145,178,0.05); transition: background 0.15s; }.section-header:active { background: rgba(8,145,178,0.12); }.section-header > span:first-child { font-size: 20px; line-height: 1; }.section-header-text { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); flex: 1; }.section-chevron { color: var(--text-dim); font-size: 13px; transition: transform 0.25s; flex-shrink: 0; }.section.open .section-chevron { transform: rotate(180deg); }.section-body { display: none; padding: 14px 16px; border-top: 1px solid var(--border); flex-direction: column; gap: 10px; }.section.open .section-body { display: flex; }.group-label { font-size: 11px; color: var(--text-muted); font-family: var(--mono); letter-spacing: 0.05em; }.row-flex { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; flex-wrap: wrap; }.row-label { font-size: 13.5px; color: var(--text); flex: 1; min-width: 0; }.alpha-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }.bed-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }.alpha-btn { aspect-ratio: 1; border: 1.5px solid var(--border); border-radius: 6px; background: transparent; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: all 0.12s; }.alpha-btn:active { opacity: 0.7; }.alpha-btn.active { background: var(--accent2); border-color: var(--accent2); color: #ffffff; }.toggle-group { display: flex; flex-wrap: wrap; gap: 7px; }.toggle-btn { padding: 7px 14px; border-radius: 22px; border: 1.5px solid var(--border); font-size: 13px; cursor: pointer; font-family: var(--sans); font-weight: 500; color: var(--text-muted); background: transparent; transition: all 0.12s; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }.toggle-btn:active { opacity: 0.7; }.toggle-btn.active { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 600; }.toggle-btn.active-warn { background: var(--warn); border-color: var(--warn); color: #ffffff; font-weight: 600; }.radio-group { display: flex; flex-wrap: wrap; gap: 7px; }.radio-btn { padding: 7px 14px; border-radius: 22px; border: 1.5px solid var(--border); font-size: 13px; cursor: pointer; font-family: var(--sans); font-weight: 500; color: var(--text-muted); background: transparent; transition: all 0.12s; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }.radio-btn:active { opacity: 0.7; }.radio-btn.active { background: var(--accent2); border-color: var(--accent2); color: #ffffff; font-weight: 600; }.radio-btn.active-warn { background: var(--warn); border-color: var(--warn); color: #ffffff; font-weight: 600; }.check-item { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 8px; border-radius: 8px; transition: background 0.12s; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }.check-item:active { background: rgba(255,255,255,0.06); }.check-item input[type="checkbox"] { display: none; }.checkmark { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid var(--text-dim); border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.12s; font-size: 13px; color: transparent; }.check-item input:checked ~ .checkmark { background: var(--accent); border-color: var(--accent); color: #ffffff; }.check-label { font-size: 14px; color: var(--text); line-height: 1.3; }.check-item input:checked ~ .check-label { color: var(--text); font-weight: 600; }.input-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }.input-row label { font-size: 13px; color: var(--text-muted); font-family: var(--mono); white-space: nowrap; min-width: 60px; }.input-row input { background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--mono); font-size: 15px; padding: 9px 12px; outline: none; transition: border-color 0.15s; width: 90px; -webkit-appearance: none; }.input-row input:focus { border-color: var(--accent); }.input-row input::placeholder { color: var(--text-dim); }.input-row span { font-size: 13px; color: var(--text-dim); font-family: var(--mono); }.textarea-group { display: flex; flex-direction: column; gap: 5px; }.textarea-group label { font-size: 11px; color: var(--text-muted); font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }.textarea-group textarea { background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--sans); font-size: 14px; padding: 10px 12px; outline: none; transition: border-color 0.15s; resize: vertical; -webkit-appearance: none; }.textarea-group textarea:focus { border-color: var(--accent); }.textarea-group textarea::placeholder { color: var(--text-dim); }.divider { height: 1px; background: var(--border); }.indent-block { margin-left: 12px; padding-left: 10px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

  @media (min-width: 600px) and (max-width: 1023px) {.sections { padding: 16px 24px; max-width: 720px; margin: 0 auto; width: 100%; }.output-panel { padding: 18px 24px 0; max-width: 720px; margin: 0 auto; width: 100%; }.btn-row { padding: 10px 24px 16px; max-width: 720px; margin: 0 auto; width: 100%; }header { padding: 16px 24px; }.alpha-grid { grid-template-columns: repeat(13, 1fr); }.bed-grid { grid-template-columns: repeat(10, 1fr); }.check-label, .toggle-btn, .radio-btn { font-size: 14px; }#output-text { font-size: 15px; }
  }

  @media (min-width: 1024px) {body { padding-left: 66px; }.main { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }.output-panel { grid-column: 2; grid-row: 1; padding: 22px 28px 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }#output-text { flex: 1; overflow-y: auto; font-size: 15px; }.btn-row { grid-column: 2; border: none; padding: 12px 28px 22px; background: var(--bg); }.sections { grid-column: 1; grid-row: 1 / 3; overflow-y: auto; height: 100vh; padding: 18px 28px; }.section-header:hover { background: rgba(8,145,178,0.08); }.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }.radio-btn:hover { border-color: var(--accent2); color: var(--accent2); }.alpha-btn:hover { border-color: var(--accent2); color: var(--accent2); }header { grid-column: 1 / -1; }
  }

  @media (min-width: 1440px) {.sections, .output-panel { max-width: none; }.alpha-grid { grid-template-columns: repeat(13, 1fr); }
  }.header-menu-wrap { position: relative; flex-shrink: 0; }.header-menu-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text-muted); font-family: var(--mono); font-size: 22px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; }.header-menu-btn:active { background: var(--border); }.header-menu { position: absolute; right: 0; top: 44px; min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,0.16); padding: 6px; display: none; z-index: 500; }.header-menu.open { display: flex; flex-direction: column; }.header-menu button { width: 100%; border: none; background: transparent; color: var(--text); font-family: var(--mono); font-size: 12px; font-weight: 600; text-align: left; padding: 11px 12px; border-radius: 8px; cursor: pointer; }.header-menu button:hover, .header-menu button:active { background: rgba(8,145,178,0.08); color: var(--accent); }.btn-row { display: none !important; }
  @media (min-width: 1024px) {body { padding-left: 210px; } }.section { box-shadow: 0 1px 3px rgba(15,23,42,0.03); }.section-body { gap: 12px; }.group-label { margin-top: 2px; text-transform: none; }.med-dose-block { margin-top: 2px; margin-bottom: 2px; padding-top: 2px; gap: 8px; }.med-dose-row { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; width: fit-content; max-width: 100%; }.med-dose-row label { min-width: 88px; }.med-dose-row input { width: 82px; }.gcs-row { display: grid; grid-template-columns: 22px minmax(58px, 1fr) 22px minmax(58px, 1fr) 22px minmax(58px, 1fr); gap: 8px 10px; align-items: center; }.gcs-row label { min-width: 0; }.gcs-row input { width: 100%; }
  @media (max-width: 700px) {header { padding: 10px 12px; gap: 10px; }.header-icon { width: 30px; height: 30px; font-size: 15px; }header h1 { font-size: 12px; letter-spacing: 0.07em; }header p { font-size: 10.5px; }.header-time { font-size: 10.5px; }.header-menu-btn { width: 34px; height: 34px; border-radius: 10px; font-size: 20px; }.output-panel { padding: 12px 12px 0; }#output-text { max-height: 170px; overflow-y: auto; font-size: 13px; line-height: 1.55; padding: 12px; }.section { border-radius: 14px; }.section-header { padding: 12px 14px; gap: 9px; }.section-header > span:first-child { font-size: 22px; }.section-header-text { font-size: 11px; letter-spacing: 0.11em; }.section-body { padding: 12px; gap: 11px; }.divider { margin: 2px -12px 0; }.toggle-group, .radio-group { gap: 8px; }.toggle-btn, .radio-btn { min-height: 40px; padding: 8px 13px; border-radius: 999px; font-size: 14px; }.input-row { gap: 8px; }.input-row label { min-width: 44px; font-size: 12.5px; }.input-row input { height: 42px; width: 88px; font-size: 15px; padding: 8px 10px; }.gcs-row { grid-template-columns: 18px 1fr 18px 1fr 18px 1fr; gap: 8px; }.gcs-row input { width: 100%; }.med-dose-block { margin-left: 6px; padding-left: 10px; gap: 7px; }.med-dose-row { display: flex; flex-wrap: nowrap; align-items: center; width: 100%; padding: 8px 10px; }.med-dose-row label { min-width: 96px; flex: 0 0 96px; }.med-dose-row input { width: 78px; flex: 0 0 78px; }.med-dose-row span { white-space: nowrap; }.textarea-group textarea { min-height: 86px; font-size: 14px; }
  }
  @media (max-width: 380px) {.toggle-btn, .radio-btn { font-size: 13px; padding: 8px 12px; }.gcs-row { grid-template-columns: 18px 1fr 18px 1fr; }
  }.sidebar { position: fixed; top: 61px; left: 0; bottom: 0; width: var(--sidebar-w); background: var(--sidebar-bg); display: flex; flex-direction: column; align-items: center; padding: 15px 0; gap: 12px; overflow-y: auto; z-index: 45; border-right: none; box-shadow: none; }.sidebar::-webkit-scrollbar { width: 0; }.nav-btn { width: 44px; height: 44px; border-radius: 12px; border: none; background: rgba(255,255,255,0.05); color: white; font-size: 20px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }.nav-btn:hover { background: rgba(255,255,255,0.15); }.nav-btn.active { background: var(--accent); box-shadow: 0 0 12px rgba(8,145,178,0.5); }
@media (min-width: 1024px) {body { padding-left: var(--sidebar-w); }
  }

  @media (max-width: 1023px) {body { padding-left: 50px; }.sidebar { top: 61px; width: 50px; padding: 10px 0; gap: 10px; border-bottom: none; overflow-x: hidden; }.nav-btn { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
}.section-form-layout .section-body,
  .respiratory-style-body { display: none; padding: 14px 16px; border-top: 1px solid var(--border); flex-direction: column; gap: 10px; }.section-form-layout.open .section-body { display: flex; }.section-form-layout .group-label { margin-top: 0; }.section-form-layout .divider { margin: 2px 0; }.section-form-layout .radio-group,
  .section-form-layout .toggle-group { align-items: center; }.gcs-row { display: grid; grid-template-columns: auto minmax(76px, 1fr) auto minmax(76px, 1fr) auto minmax(76px, 1fr); align-items: center; gap: 8px; }.gcs-row label { min-width: 0; width: auto; }.gcs-row input { width: 100%; min-width: 0; }.med-dose-block { margin-top: -2px; margin-bottom: 2px; }.med-dose-row { display: flex; align-items: center; gap: 10px; padding: 2px 0; }.med-dose-row label { min-width: 92px; }.med-dose-row input { width: 110px; }

  @media (max-width: 600px) {.section-form-layout .section-body,
    .respiratory-style-body { padding: 12px 14px; gap: 9px; }.gcs-row { grid-template-columns: auto 1fr; gap: 8px 10px; }.med-dose-row label { min-width: 86px; }.med-dose-row input { width: 96px; }#sec-patient .alpha-grid { grid-template-columns: repeat(7, 1fr); }#sec-patient .bed-grid { grid-template-columns: repeat(5, 1fr); }
  }.pmh-sub-block { margin-top: 0; }.compact-input-row input[type="text"] { width: 180px; }#imaging-sub, #ct-sub { flex-direction: column; gap: 8px; }
  @media (max-width: 600px) {.compact-input-row input[type="text"] { width: 150px; }
  }#abx-sub input[type="text"], #microSite, #microDate { width: 190px; }.app-version { color: var(--text-dim); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; margin-left: 6px; }.resp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; align-items: center; }.resp-grid-small { grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); }.resp-field { display: grid; grid-template-columns: 86px minmax(78px, 1fr) 58px; align-items: center; gap: 8px; min-width: 0; }.resp-field label { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }.resp-field input { width: 100%; min-width: 0; }.resp-field span { font-family: var(--mono); font-size: 13px; color: var(--text-dim); white-space: nowrap; }

  @media (max-width: 600px) {.resp-grid,
    .resp-grid-small { grid-template-columns: 1fr; }.resp-field { grid-template-columns: 92px minmax(72px, 1fr) 54px; }
  }#sec-resp .resp-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 420px)); gap: 12px 20px; align-items: center; }#sec-resp .resp-grid-small { grid-template-columns: repeat(2, minmax(300px, 360px)); }#sec-resp .resp-field { display: grid; grid-template-columns: 112px 110px 70px; align-items: center; gap: 8px; min-width: 0; max-width: 420px; }#sec-resp .resp-field label { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }#sec-resp .resp-field input { width: 110px !important; min-width: 0; max-width: 110px; }#sec-resp .resp-field span { font-family: var(--mono); font-size: 13px; color: var(--text-dim); white-space: nowrap; }

  @media (max-width: 780px) {#sec-resp .resp-grid,
    #sec-resp .resp-grid-small { grid-template-columns: 1fr; }#sec-resp .resp-field { grid-template-columns: 112px 110px 68px; max-width: 100%; }
  }

  @media (max-width: 430px) {#sec-resp .resp-field { grid-template-columns: 96px 96px 54px; gap: 7px; }#sec-resp .resp-field input { width: 96px !important; max-width: 96px; }
  }#planAbxOther { width: 190px; }input:out-of-range { border-color: var(--warn) !important; box-shadow: 0 0 0 2px rgba(220,38,38,0.12); }.unit-day-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }.icu-day-inline { margin-left: auto; }.icu-day-inline label { min-width: auto; }.icu-day-inline input { width: 76px; }.gender-btn { min-width: 54px; font-size: 22px; line-height: 1; padding: 8px 14px; }

  @media (max-width: 600px) {.unit-day-row { align-items: flex-start; flex-direction: column; }.icu-day-inline { margin-left: 0; }
  }.suboption-open-btn { width: 100%; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px 14px; font-family: var(--sans); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }.suboption-open-btn:active { opacity: 0.78; }.suboption-count { font-family: var(--mono); color: var(--text-dim); font-size: 11px; font-weight: 600; white-space: nowrap; }.suboption-summary { font-size: 13px; color: var(--text); background: rgba(8,145,178,0.06); border: 1px solid rgba(8,145,178,0.14); border-radius: 10px; padding: 9px 11px; line-height: 1.45; }.suboption-summary.empty { color: var(--text-dim); background: transparent; border-color: var(--border); font-style: italic; }.bottom-sheet-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.58); z-index: 300; display: none; align-items: flex-end; justify-content: center; padding: 0 12px 12px; }.bottom-sheet-backdrop.open { display: flex; }.bottom-sheet { width: 100%; max-width: 620px; max-height: 82vh; background: var(--surface); border-radius: 18px 18px 14px 14px; box-shadow: 0 -10px 40px rgba(15,23,42,0.28); display: flex; flex-direction: column; overflow: hidden; animation: sheetUp 0.18s ease-out; }

  @keyframes sheetUp {from { transform: translateY(20px); opacity: 0.88; }to { transform: translateY(0); opacity: 1; }
  }.bottom-sheet-handle { width: 42px; height: 4px; border-radius: 99px; background: var(--border); margin: 10px auto 4px; }.bottom-sheet-header { padding: 12px 18px 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }.bottom-sheet-title { font-family: var(--mono); color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }.bottom-sheet-subtitle { color: var(--text-dim); font-size: 12px; margin-top: 3px; }.bottom-sheet-close { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }.bottom-sheet-body { padding: 16px 18px; overflow-y: auto; }.sheet-toggle-group { gap: 9px; }.bottom-sheet-footer { border-top: 1px solid var(--border); padding: 12px 18px 16px; display: flex; gap: 10px; }.sheet-primary-btn,
  .sheet-secondary-btn { flex: 1; border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 12px; font-weight: 700; cursor: pointer; }.sheet-primary-btn { background: var(--accent); border: 1px solid var(--accent); color: #fff; }.sheet-secondary-btn { background: var(--surface); border: 1.5px solid var(--border); color: var(--text); }.nav-separator { width: 34px; height: 1px; background: rgba(255,255,255,0.22); margin: 2px 0 4px; flex-shrink: 0; }.preview-nav-btn { background: rgba(255,255,255,0.12); }.output-panel.preview-hidden { display: none; }#pmh-known-sub { width: 100%; }.print-modal { position: fixed; inset: 0; z-index: 260; background: rgba(15,23,42,0.62); padding: 16px; overflow: auto; }.print-modal-card { max-width: 820px; margin: 0 auto; background: #fff; color: #000; border-radius: 16px; box-shadow: 0 10px 45px rgba(0,0,0,0.35); overflow: hidden; }.print-modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #dde3ea; background: #f8fafc; }.print-modal-title { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }.print-modal-subtitle { font-size: 12px; color: #475569; margin-top: 4px; }.print-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }.print-area { padding: 22px 24px 28px; font-family: Arial, sans-serif; color: #000; line-height: 1.45; }.print-area h1 { font-size: 18px; margin: 0 0 10px 0; }.print-meta { font-size: 11px; color: #555; margin-bottom: 16px; }.print-patient-entry { page-break-inside: avoid; break-inside: avoid; border-top: 1px solid #999; padding-top: 10px; margin-top: 14px; }.print-patient-entry h2 { font-size: 13px; margin: 0 0 8px 0; }.print-patient-entry pre { white-space: pre-wrap; font-family: Arial, sans-serif; font-size: 11px; margin: 0; }

  @media (max-width: 600px) {.print-modal-toolbar { align-items: stretch; flex-direction: column; }.print-modal-actions button { width: 100%; }
  }

  @media print {@page { margin: 16mm; }body * { visibility: hidden !important; }#print-modal,
    #print-modal *,
    #print-area,
    #print-area * { visibility: visible !important; }#print-modal { position: static !important; display: block !important; inset: auto !important; padding: 0 !important; background: #fff !important; overflow: visible !important; }.print-modal-card { max-width: none !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; }.print-modal-toolbar { display: none !important; }#print-area { position: static !important; padding: 0 !important; width: 100% !important; }
  }.print-ios-note { padding: 10px 16px; background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; font-size: 12px; line-height: 1.45; }.print-fullscreen { position: fixed; inset: 0; z-index: 500; background: #fff; color: #000; overflow: auto; }.print-fullscreen-toolbar { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; padding: 10px; background: #f8fafc; border-bottom: 1px solid #dde3ea; }.print-fullscreen-toolbar button { flex: 1; }.print-fullscreen-note { padding: 10px 14px; background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; font-size: 12px; line-height: 1.45; }

  @media print {.print-fullscreen-toolbar,
    .print-fullscreen-note { display: none !important; }#print-fullscreen,
    #print-fullscreen * { visibility: visible !important; }#print-fullscreen { position: static !important; display: block !important; overflow: visible !important; }
  }.manual-copy-box { padding: 12px 14px 18px; border-top: 1px solid #dde3ea; background: #f8fafc; }.manual-copy-title { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }.manual-copy-hint { font-size: 12px; color: #475569; margin-bottom: 8px; }#manual-copy-text { width: 100%; min-height: 260px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px; font-family: Arial, sans-serif; font-size: 13px; line-height: 1.5; color: #000; background: #fff; white-space: pre-wrap; }.clean-print-mode .print-fullscreen-toolbar,
  .clean-print-mode .print-fullscreen-note,
  .clean-print-mode .manual-copy-box { display: none !important; }.clean-print-mode #print-fullscreen-area { padding-top: 12px; }.section { scroll-margin-top: 92px; }.preview-modal { position: fixed; inset: 0; z-index: 420; background: rgba(15,23,42,0.58); align-items: center; justify-content: center; padding: 16px; }.preview-modal-card { width: min(760px, 100%); max-height: 88vh; background: var(--surface); color: var(--text); border-radius: 16px; box-shadow: 0 10px 45px rgba(0,0,0,0.32); display: flex; flex-direction: column; overflow: hidden; }.preview-modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface2); }.preview-modal-title { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }.preview-modal-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 3px; }.preview-modal-text { margin: 0; padding: 16px; overflow: auto; white-space: pre-wrap; font-family: var(--sans); font-size: 14px; line-height: 1.65; color: var(--text); }.header-menu .menu-hidden { display: none !important; }.tenderness-grid { display: grid; grid-template-columns: repeat(4, minmax(58px, 1fr)); gap: 8px; }.tenderness-grid .radio-btn { justify-content: center; }.tenderness-spacer { min-height: 1px; }

  @media (max-width: 430px) {.tenderness-grid { grid-template-columns: repeat(4, minmax(52px, 1fr)); gap: 7px; }
  }html,
  body,
  .main,
  .sections { background: #ffffff !important; }.section,
  .output-panel { background: #ffffff !important; border: 1.5px solid #cbd5e1 !important; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }.section-header { background: #ffffff !important; border-bottom-color: #cbd5e1 !important; }.input-row,
  .resp-field,
  .textarea-group textarea,
  input,
  textarea { background: #ffffff !important; border-color: #cbd5e1; }.radio-btn,
  .toggle-btn,
  .alpha-btn,
  .suboption-open-btn { background: #ffffff; border-color: #cbd5e1; }.group-label,
  .input-row label,
  .resp-field label { color: #334155; }.header-menu { min-width: 300px !important; top: 52px !important; padding: 12px !important; border-radius: 18px !important; }.header-menu button { font-size: 17px !important; line-height: 1.25 !important; padding: 17px 16px !important; border-radius: 14px !important; font-weight: 650 !important; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important; }.header-submenu { margin: 2px 0 8px 16px; padding-left: 10px; border-left: 2px solid #cbd5e1; display: flex; flex-direction: column; gap: 2px; }.header-submenu button { font-size: 15px !important; padding: 13px 14px !important; color: #334155 !important; }.danger-menu-item { color: #dc2626 !important; }

  @media (max-width: 430px) {.header-menu { min-width: 310px !important; right: -4px !important; }
  }body > header { background: var(--surface) !important; border-bottom: 1px solid var(--border) !important; padding: 14px 18px !important; display: flex !important; align-items: center !important; gap: 12px !important; position: sticky !important; top: 0 !important; z-index: 10 !important; }body > header .header-icon { background: transparent !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; width: auto !important; height: auto !important; padding: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; font-size: 28px !important; line-height: 1 !important; flex-shrink: 0 !important; }body > header h1,
  body > header h1 * { text-transform: none !important; }body > header h1 { display: flex !important; align-items: baseline !important; flex-wrap: nowrap !important; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important; font-size: 20px !important; line-height: 1.2 !important; font-weight: 700 !important; letter-spacing: -0.01em !important; color: #000 !important; margin: 0 !important; white-space: nowrap !important; }body > header .header-name { color: #000 !important; font-weight: 700 !important; font-style: normal !important; }body > header .header-gap { display: inline-block !important; width: 10px !important; flex: 0 0 10px !important; }body > header .header-title-blue { color: #0891b2 !important; }body > header .header-title-italic { font-style: italic !important; font-weight: 700 !important; }body > header .header-title-blue.header-title-italic { font-size: calc(1em - 2px) !important; }body > header .app-version { font-family: var(--mono) !important; font-size: 12px !important; font-weight: 700 !important; color: var(--text-dim) !important; margin-left: 6px !important; letter-spacing: 0 !important; vertical-align: baseline !important; }

  @media (max-width: 430px) {body > header { padding: 10px 12px !important; gap: 10px !important; }body > header h1 { font-size: 20px !important; }body > header .header-icon { font-size: 28px !important; }body > header .header-gap { width: 8px !important; flex-basis: 8px !important; }
  }body > header .header-time { display: none !important; }body > header .header-menu-wrap { margin-left: auto !important; margin-right: 10px !important; }

  @media (max-width: 430px) {body > header .header-menu-wrap { margin-right: 8px !important; }
  }

/* Real formatting for generated plain-text section headers (no Unicode bold letters). */
.generated-header-line,
.preview-modal-text .generated-header-line {
  font-weight: 700;
}

/* External stomach icon for GI / Nutrition. */
.nav-icon-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.section-icon-img { width: 28px; height: 28px; object-fit: contain; display: block; flex-shrink: 0; }
@media (max-width: 700px) { .nav-icon-img { width: 26px; height: 26px; } }

/* Desktop browser layout: keep the iPad-style workflow, but remove the old split-screen grid. */
@media (min-width: 1024px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-left: var(--sidebar-w) !important;
  }

  body > header {
    min-height: 61px;
  }

  .sidebar {
    top: 61px !important;
    width: var(--sidebar-w) !important;
  }

  .main {
    display: block !important;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 28px 42px;
  }

  .sections {
    width: 100%;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 18px 0 42px !important;
  }

  .section {
    width: 100%;
  }

  .output-panel {
    position: static !important;
    height: auto !important;
    min-height: 0;
    padding: 18px 0 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .output-panel.preview-hidden {
    display: none !important;
  }

  #output-text {
    max-height: 42vh;
    overflow-y: auto;
  }

  .header-menu {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .bottom-sheet-backdrop {
    align-items: center;
    padding: 24px;
  }

  .bottom-sheet {
    border-radius: 18px;
  }
}

@media (min-width: 1280px) {
  .main {
    max-width: 1040px;
  }
}

.abg-unit-spacer {
  visibility: hidden;
}

.generated-header-line {
  font-weight: 700;
}

.preview-modal-title {
  font-family: var(--sans) !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
