/* ===== CSS Custom Properties ===== */
:root {
  --purple: #6A2C8C;
  --purple-dark: #3D1A52;
  --purple-deeper: #2A0E3A;
  --purple-light: #F5EDFA;
  --purple-soft: #E8D6F5;
  --purple-mid: #9B5FC0;
  --accent: #C89B3C;
  --gold-light: #FFF8EC;
  --ink: #1a1a2e;
  --ink-light: #3a3a5c;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --orange: #f59e0b;
  --orange-soft: #fffbeb;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --blue: #3b82f6;
  --blue-soft: #eff6ff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #faf7fc 0%, #f3f0f6 100%);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--purple-deeper) 0%, var(--purple-dark) 40%, var(--purple) 100%);
  color: var(--white);
  padding: 36px 24px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60%; left: -30%;
  width: 160%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(155,95,192,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(200,155,60,.12) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 2rem; font-weight: 700; letter-spacing: .02em; margin-bottom: 4px; }
.hero h1 span { color: var(--purple-soft); }
.hero .subtitle { font-size: .95rem; opacity: .85; margin-bottom: 6px; }
.hero .indication { display: inline-block; font-size: .78rem; background: rgba(255,255,255,.12); padding: 3px 14px; border-radius: 20px; margin-top: 6px; }
.hero .brand-en { font-size: .72rem; opacity: .55; margin-top: 4px; }
/* ===== Container ===== */
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ===== Section Titles ===== */
.section-title {
  font-size: 1.15rem; font-weight: 700; color: var(--purple-dark);
  margin: 28px 0 14px; padding-left: 12px; border-left: 3px solid var(--purple);
  display: flex; align-items: center; gap: 8px;
}

/* ===== Tab Bar ===== */
.tab-bar {
  display: flex; gap: 0; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
  border: 1px solid var(--line); position: sticky; top: 0; z-index: 100;
}
.tab-btn {
  flex: 1; padding: 12px 16px; font-size: .88rem; font-weight: 600; font-family: var(--font);
  border: none; background: var(--white); color: var(--muted); cursor: pointer;
  transition: all .2s; text-align: center; border-bottom: 3px solid transparent;
}
.tab-btn:hover { color: var(--purple); background: var(--purple-light); }
.tab-btn.active { color: var(--purple); border-bottom-color: var(--purple); background: #faf7fc; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Panel ===== */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}

/* ===== Calculator Inputs ===== */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 600px) { .calc-grid { grid-template-columns: 1fr 1fr; } .calc-grid .btn-row { grid-column: span 2; } }
.input-group { display: flex; flex-direction: column; gap: 4px; }
.input-group label { font-size: .8rem; font-weight: 600; color: var(--ink-light); }
.input-group input, .input-group select {
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  font-size: .95rem;
  font-family: var(--font);
  background: var(--soft);
  transition: border-color .15s;
}
.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(106,44,140,.08);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 7px; font-size: .9rem; font-weight: 600;
  border: none; cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { background: var(--white); color: var(--purple); border: 1.5px solid var(--purple); }
.btn-secondary:hover { background: var(--purple-light); }
.btn-print { background: var(--purple-dark); color: #fff; }
.btn-print:hover { background: var(--purple-deeper); }
.btn-sm { padding: 5px 12px; font-size: .78rem; }

/* ===== Alert ===== */
.alert {
  padding: 14px 18px; border-radius: 8px; font-size: .85rem;
  margin-bottom: 14px;
}
.alert-warn { background: var(--orange-soft); border: 1px solid #fcd34d; color: #92400e; }
.alert-info { background: var(--blue-soft); border: 1px solid #bfdbfe; color: #1e40af; }
.alert-danger { background: var(--red-soft); border: 1px solid #fecaca; color: #991b1b; }

/* ===== Regimen Cards ===== */
.regimen-cards { display: grid; gap: 14px; margin-top: 16px; }
.regimen-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s;
}
.regimen-card:hover { box-shadow: var(--shadow-md); }
.regimen-card.iv { border-left: 4px solid #6366f1; }
.regimen-card.cap100 { border-left: 4px solid var(--green); }
.regimen-card.cap40 { border-left: 4px solid var(--orange); }
.regimen-card-header {
  padding: 12px 18px;
  font-weight: 700; font-size: .92rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.regimen-card.iv .regimen-card-header { background: #eef2ff; color: #4338ca; }
.regimen-card.cap100 .regimen-card-header { background: var(--green-soft); color: #065f46; }
.regimen-card.cap40 .regimen-card-header { background: var(--orange-soft); color: #92400e; }
.regimen-card-body { padding: 14px 18px; }
.regimen-card-body .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .85rem; }
.regimen-card-body .row .label { color: var(--muted); }
.regimen-card-body .row .value { font-weight: 600; }
.regimen-cost {
  margin-top: 8px; padding: 6px 12px;
  border-radius: 6px; font-weight: 500; font-size: .82rem;
}
.regimen-cost.available { background: var(--green-soft); color: #065f46; }
.regimen-cost.pending { background: var(--orange-soft); color: #92400e; }
.tag {
  display: inline-block; font-size: .68rem; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; letter-spacing: .02em;
}
.tag-iv { background: #e0e7ff; color: #4338ca; }
.tag-oral { background: #d1fae5; color: #065f46; }
.tag-pending { background: #fef3c7; color: #92400e; }
.tag-na { background: #fee2e2; color: #991b1b; }

/* ===== Patient Profile Section ===== */
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.profile-item {
  padding: 12px 16px;
  background: var(--purple-light);
  border-radius: 8px;
  font-size: .85rem;
  border-left: 3px solid var(--purple-mid);
  line-height: 1.5;
}
.profile-item strong { color: var(--purple-dark); }
.advantage-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.advantage-claim { color: var(--ink); }
.evidence-citations { display: inline-flex; gap: 2px; margin-left: 4px; white-space: nowrap; }
.evidence-citation,
.evidence-short-link,
.evidence-full-link {
  color: var(--purple);
  text-decoration: none;
  text-underline-offset: 2px;
}
.evidence-citation { font-size: .74rem; font-weight: 800; }
.evidence-citation:hover,
.evidence-short-link:hover,
.evidence-full-link:hover { text-decoration: underline; }
.advantage-source {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(106,44,140,.12);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.advantage-source > span:first-child { font-weight: 700; }
.evidence-short-link { color: var(--ink-light); }
.evidence-separator { color: var(--muted); }
.evidence-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.55;
}
.evidence-note strong { color: var(--ink-light); }
.evidence-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.evidence-details summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--purple-dark);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}
.evidence-details summary span { color: var(--muted); font-size: .72rem; font-weight: 600; }
.evidence-list {
  margin: 4px 0 0 22px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.evidence-list li {
  margin-bottom: 10px;
  padding-left: 3px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.evidence-full-link { color: var(--ink-light); }
.evidence-context { margin-top: 2px; color: var(--muted); }
.evidence-reference-items {
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
}
.evidence-reference-items summary {
  cursor: pointer;
  color: var(--purple-dark);
  font-weight: 700;
}
.evidence-reference-items ol { margin: 7px 0 0 20px; padding: 0; }
.evidence-reference-items li { margin-bottom: 5px; }
.evidence-reference-link { color: var(--purple); }
.ifd-node { display: grid; gap: 12px; }
.ifd-trigger {
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff 0%, var(--purple-light) 100%);
  border: 1px solid var(--purple-soft);
  border-left: 4px solid var(--purple);
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.55;
}
.ifd-trigger strong { color: var(--purple-dark); }
.ifd-trigger-note { margin-top: 4px; color: var(--ink-light); }
.ifd-focus-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--purple-dark);
  font-size: .9rem;
  font-weight: 800;
}
.ifd-focus-title span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.ifd-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ifd-focus-card {
  padding: 12px 14px;
  background: var(--purple-light);
  border-left: 3px solid var(--purple-mid);
  border-radius: 8px;
  font-size: .83rem;
  line-height: 1.5;
}
.ifd-focus-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--purple-dark);
  font-weight: 800;
}
.ifd-chip {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex: 0 0 auto;
}

/* ===== DDI Quick Lookup ===== */
.ddi-l0 { background: #faf7fc; color: #6a2c8c; border-color: #eadcf3 !important; }
.ddi-l1 { background: #e8d6f5; color: #3d1a52; border-color: #d6b9e8 !important; }
.ddi-l2 { background: #9b5fc0; color: #fff; border-color: #7d3fa4 !important; }
.ddi-l3 { background: #3d1a52; color: #fff; border-color: #2a0e3a !important; }
.ddi-l2 .ddi-detail, .ddi-l3 .ddi-detail { color: #fff; }
.ddi-search-panel { display: grid; gap: 12px; }
.ddi-search-box {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 16px;
  font-family: var(--font);
}
.ddi-search-box:focus {
  outline: none;
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(106,44,140,.08);
}
.ddi-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ddi-search-hint {
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.5;
}
.ddi-chip-btn {
  border: 1px solid var(--purple-soft);
  background: #faf7fc;
  color: var(--purple-dark);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.ddi-chip-btn:hover, .ddi-chip-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.ddi-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-light);
  font-size: .82rem;
  font-weight: 700;
}
.ddi-suggestions {
  display: grid;
  gap: 6px;
}
.ddi-suggestion {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  cursor: pointer;
  font-size: .82rem;
}
.ddi-suggestion:hover {
  border-color: var(--purple-soft);
  background: #faf7fc;
}
.ddi-suggestion strong { color: var(--purple-dark); }
.ddi-suggestion span { color: var(--muted); font-size: .74rem; }
.ddi-result {
  border: 1px solid var(--purple-soft);
  background: linear-gradient(180deg, #fff 0%, #faf7fc 100%);
  border-radius: 8px;
  padding: 14px;
}
.ddi-result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.ddi-result-drug {
  color: var(--purple-dark);
  font-weight: 800;
  font-size: 1rem;
}
.ddi-result-category {
  color: var(--muted);
  font-size: .76rem;
}
.ddi-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
.ddi-drug-card {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ddi-drug-card.isavu {
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(106,44,140,.06);
}
.ddi-drug-name {
  padding: 9px 10px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--purple-dark);
  border-bottom: 1px solid var(--line);
  background: #faf7fc;
}
.ddi-cell-body {
  padding: 10px;
  flex: 1 1 auto;
}
.ddi-risk-chip {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 3px 8px;
  font-size: .7rem;
  font-weight: 800;
  margin-bottom: 7px;
}
.ddi-detail {
  color: var(--ink);
  font-size: .8rem;
  line-height: 1.55;
}
.ddi-refs {
  color: var(--muted);
  font-size: .68rem;
  margin-top: 7px;
}
.ddi-conclusion {
  margin-top: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f5edfa;
  color: var(--purple-dark);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.55;
}
.ddi-accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #fff;
}
.ddi-accordion.flash {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(106,44,140,.12);
}
.ddi-acc-header {
  width: 100%;
  border: none;
  background: #faf7fc;
  color: var(--purple-dark);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}
.ddi-acc-header strong { font-size: .88rem; }
.ddi-acc-header span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.ddi-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.ddi-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: .78rem;
}
.ddi-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
}
.ddi-table td {
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  height: 1px;
}
.ddi-table tr:last-child td { border-bottom: none; }
.ddi-table .ddi-name-col {
  width: 126px;
  font-weight: 800;
  color: var(--purple-dark);
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
}
.ddi-table th.ddi-name-col {
  z-index: 3;
  background: #fff;
}
.ddi-table .isavu-col {
  box-shadow: inset 3px 0 0 rgba(106,44,140,.28);
}
.ddi-table-cell {
  border-radius: 7px;
  border: 1px solid;
  padding: 8px;
  min-height: 82px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ddi-cell-label {
  font-weight: 800;
  font-size: .73rem;
  margin-bottom: 4px;
}
.ddi-empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
  font-size: .84rem;
}

/* ===== Card Overlay ===== */
.print-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55); justify-content: flex-start; align-items: center;
  flex-direction: column; padding: 30px 20px; overflow-y: auto; gap: 20px;
}
.print-overlay.active { display: flex; }
.print-card {
  background: #fff; width: 100%; max-width: 680px; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.20); overflow: hidden; flex-shrink: 0;
}
.pc-header {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff; padding: 20px 24px; text-align: center;
}
.pc-header h2 { font-size: 1.2rem; margin-bottom: 2px; }
.pc-header .pc-sub { font-size: .75rem; opacity: .8; }
.pc-actions {
  display: flex; gap: 10px; padding: 14px 20px; background: #faf7fc;
  border-bottom: 1px solid var(--line); justify-content: center;
}
.pc-actions .btn { font-size: .9rem; padding: 10px 20px; }
.pc-body { padding: 20px 24px; }
.pc-body h3 { font-size: .88rem; color: var(--purple-dark); margin-bottom: 8px; border-bottom: 1px solid var(--purple-soft); padding-bottom: 4px; }
.pc-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: .83rem; }
.pc-row .pc-label { color: var(--muted); }
.pc-row .pc-value { font-weight: 600; }

/* Dosing mini-table inside card */
.dosing-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 6px 0 0; padding: 10px 14px; background: var(--soft); border-radius: 8px; }
.dosing-phase { grid-column: 1 / -1; font-size: .78rem; font-weight: 700; color: var(--purple); padding-top: 6px; }
.dosing-phase:first-child { padding-top: 0; }
.dg-label { text-align: right; color: var(--muted); font-size: .78rem; white-space: nowrap; padding: 2px 0; }
.dg-value { font-weight: 600; font-size: .82rem; padding: 2px 0; word-break: break-all; }
.pc-advantages { margin: 10px 0; }
.pc-advantages li { font-size: .8rem; margin-bottom: 4px; color: var(--ink-light); }
.pc-citation { color: var(--purple); font-size: .7rem; font-weight: 800; margin-left: 3px; white-space: nowrap; }
.pc-source-summary {
  margin: 7px 0 12px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}
.pc-source-summary strong { color: var(--ink-light); }
.pc-cost {
  padding: 6px 12px;
  margin: 0 0 12px 0;
  background: var(--purple-light);
  border-radius: 6px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pc-cost .main { font-size: .92rem; font-weight: 700; color: var(--purple-dark); }
.pc-cost .label { font-size: .75rem; color: var(--ink-light); }
.pc-cost .sub { font-size: .72rem; color: var(--muted); }
.pc-footer { padding: 12px 24px; background: var(--soft); border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); text-align: center; }
.pc-footer p { margin-bottom: 2px; }

/* ===== Feedback QR ===== */
.feedback-trigger {
  position: fixed;
  right: 0;
  top: 68%;
  z-index: 180;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(255,255,255,.34);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background: rgba(61,26,82,.94);
  color: #fff;
  box-shadow: 0 4px 16px rgba(42,14,58,.22);
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.feedback-trigger:hover {
  transform: translateX(-3px);
  background: var(--purple);
  box-shadow: 0 6px 20px rgba(42,14,58,.28);
}
.feedback-trigger:focus-visible,
.feedback-close:focus-visible {
  outline: 3px solid rgba(200,155,60,.65);
  outline-offset: 2px;
}
.feedback-trigger-icon { color: #ead8f4; font-size: .85rem; }
.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10010;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24,10,32,.68);
  backdrop-filter: blur(4px);
}
.feedback-overlay.active { display: flex; }
.feedback-dialog {
  position: relative;
  width: min(92vw, 430px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(106,44,140,.15);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(24,10,32,.32);
  text-align: center;
}
.feedback-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--purple-dark);
  box-shadow: var(--shadow);
  font-family: var(--font);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.feedback-heading { padding: 0 34px 14px; }
.feedback-heading h2 { color: var(--purple-dark); font-size: 1.15rem; }
.feedback-heading p { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.feedback-qr-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 10px;
}
.feedback-mobile-hint {
  display: none;
  margin-top: 10px;
  color: var(--purple-dark);
  font-size: .76rem;
  font-weight: 700;
}
body.feedback-open { overflow: hidden; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 20px;
  font-size: .85rem; z-index: 10000; opacity: 0; transition: opacity .3s, bottom .3s;
}
.toast.show { opacity: 1; bottom: 40px; }

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .hero h1 { font-size: 1.4rem; }
  .panel { padding: 16px 14px; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid .btn-row { grid-column: span 2; }
  .ifd-focus-grid { grid-template-columns: 1fr; }
  .ddi-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 24px 12px 32px; }
  .hero h1 { font-size: 1.15rem; }
  .hero .subtitle { font-size: .78rem; }
  .hero .brand-en { font-size: .65rem; }
  .hero .indication { font-size: .7rem; padding: 3px 10px; }
  .container { padding: 0 10px; }
  .panel { padding: 12px 10px; border-radius: 8px; }
  .section-title { font-size: 1rem; margin: 20px 0 10px; }
  .profile-item { padding: 11px 12px; }
  .advantage-source { font-size: .68rem; }
  .evidence-note { font-size: .7rem; }
  .evidence-details summary { font-size: .78rem; }
  .evidence-list { margin-left: 18px; }
  .evidence-list li { font-size: .69rem; }

  .tab-btn { font-size: .75rem; padding: 10px 4px; line-height: 1.3; }
  .calc-grid { grid-template-columns: 1fr; gap: 8px; }
  .calc-grid .btn-row { grid-column: span 1; }
  .calc-grid .btn-row .btn { width: 100%; justify-content: center; }

  .regimen-card-body .row { flex-direction: column; gap: 2px; padding: 6px 0; }
  .regimen-card-body .row .label { font-size: .78rem; }
  .regimen-card-header { font-size: .82rem; padding: 10px 14px; }
  .regimen-card-body { padding: 10px 14px; }
  .regimen-cost { font-size: .85rem; padding: 8px 10px; }

  .input-group input, .input-group select { min-height: 44px; font-size: 16px; }

  .btn { min-height: 44px; font-size: .85rem; }
  .btn-sm { min-height: auto; }

  .ddi-search-box { min-height: 44px; }
  .ddi-chip-btn { min-height: 40px; }
  .ddi-result { padding: 12px 10px; }
  .ddi-result-head { flex-direction: column; }
  .ddi-table { min-width: 720px; font-size: .72rem; }
  .ddi-table td, .ddi-table th { padding: 7px 8px; }
  .ddi-table-cell { min-height: 76px; }

  .print-overlay { padding: 10px; gap: 14px; }
  .print-card { max-width: 100%; border-radius: 10px; }
  .pc-header { padding: 16px 16px; }
  .pc-header h2 { font-size: 1rem; }
  .pc-body { padding: 14px 16px; }
  .pc-body h3 { font-size: .82rem; }
  .pc-actions { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .pc-actions .btn { flex: 1 1 auto; min-width: 70px; font-size: .82rem; padding: 10px 12px; }
  .pc-advantages li { font-size: .73rem; }
  .pc-source-summary { font-size: .68rem; }
  .pc-cost .main { font-size: .85rem; }
  .pc-row { font-size: .78rem; }
  .dosing-grid { gap: 1px 8px; padding: 8px 10px; }
  .dg-label { font-size: .72rem; }
  .dg-value { font-size: .76rem; }

  #cardImageWrap { margin-top: 0; }
  #cardImageWrap img { max-width: 100%; border-radius: 6px; }

  .toast { left: 10px; right: 10px; transform: none; text-align: center; font-size: .8rem; }

  .feedback-trigger {
    top: auto;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    padding: 10px 13px;
    border-right: 1px solid rgba(255,255,255,.34);
    border-radius: 20px;
    box-shadow: 0 5px 18px rgba(42,14,58,.25);
  }
  .feedback-trigger:hover { transform: none; }
  .feedback-overlay { padding: 12px; }
  .feedback-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 14px;
    border-radius: 14px;
  }
  .feedback-heading { padding: 3px 34px 10px; }
  .feedback-heading h2 { font-size: 1rem; }
  .feedback-heading p { font-size: .74rem; }
  .feedback-qr-image { max-height: calc(100vh - 154px); }
  .feedback-mobile-hint { display: block; }
}

/* touch-friendly for all screens */
.btn { cursor: pointer; }
.input-group input, .input-group select { min-height: 40px; }
