* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #f4f6fb 0%, #eef2ff 100%);
  color: #24324a;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  padding: 8px 0 16px 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f63d8;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: #1f2a44;
}

.subtitle {
  margin: 10px 0 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #5e6b85;
}

h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #1f2a44;
}

.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  margin-top: 18px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.card p {
  margin: 0 0 14px 0;
  line-height: 1.6;
}

.card p:last-child {
  margin-bottom: 0;
}

.warning-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.warning-card h2 {
  color: #9a3412;
}

.collapsible-card summary {
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  color: #1f2a44;
}

.collapsible-card summary::-webkit-details-marker {
  display: none;
}

.collapsible-card summary::after {
  content: "▼";
  float: right;
  font-size: 14px;
  color: #6f63d8;
}

.collapsible-card[open] summary::after {
  content: "▲";
}

.collapsible-card[open] summary {
  margin-bottom: 14px;
}

.progress-wrap {
  margin-bottom: 16px;
}

.progress-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #5b6480;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #e6eaf5;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 14%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f63d8 0%, #9288ea 100%);
  transition: width 0.25s ease;
}

.day-grid,
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.day-btn,
.symptom-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: #eef2ff;
  color: #2f3f66;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.day-btn.active,
.symptom-btn.active {
  background: #6f63d8;
  color: white;
}

.day-btn:active,
.symptom-btn:active {
  transform: scale(0.98);
}

.plan-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
}

.plan-label {
  margin: 14px 0 6px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.plan-value {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2a44;
}

.dose-layout {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dose-item {
  background: #eef2ff;
  padding: 14px;
  border-radius: 12px;
}

.total-dose {
  background: #e9f9ee;
}

.dose-title {
  margin: 0 0 6px 0;
  font-size: 14px;
  font-weight: 700;
  color: #5b6480;
}

.dose-value {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2a44;
}

.plan-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
}

#doseInstructions {
  margin: 0;
  line-height: 1.5;
}

.encouragement-text {
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 4px solid #6f63d8;
  font-size: 16px;
  line-height: 1.6;
  color: #384462;
}

.helper-text {
  margin: 0;
  font-size: 14px;
  color: #5e6b85;
  line-height: 1.5;
}

.instruction-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.instruction-text {
  margin: 0;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.timeline-row {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5edf5;
}

.timeline-row strong {
  font-size: 16px;
  color: #1f2a44;
}

.timeline-row span {
  margin-top: 2px;
  font-size: 14px;
  color: #5e6b85;
}

.cut-guide {
  display: grid;
  gap: 14px;
}

.cut-step {
  background: #faf8ff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #ece8ff;
}

.cut-label {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: #5b6480;
  text-align: center;
}

.cut-arrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f63d8;
  font-weight: 700;
  font-size: 14px;
}

.arrow-line {
  flex: 1;
  height: 2px;
  background: #d7d2ff;
  border-radius: 999px;
}

.arrow-text {
  white-space: nowrap;
}

.strip-row {
  display: flex;
  gap: 8px;
}

.strip-row.single {
  justify-content: center;
}

.strip {
  flex: 1;
  text-align: center;
  padding: 14px 10px;
  border-radius: 10px;
  font-weight: 700;
  color: #1f2a44;
  border: 1px solid #d8d4fe;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.5);
}

.strip.whole {
  max-width: 180px;
  background: linear-gradient(180deg, #d8ccff 0%, #c9bbff 100%);
}

.strip.half {
  background: linear-gradient(180deg, #e1dbff 0%, #d4ccff 100%);
}

.strip.quarter {
  background: linear-gradient(180deg, #efebff 0%, #e5dfff 100%);
  font-size: 14px;
}

.quarter-row .strip.quarter {
  min-width: 0;
}

.symptom-card {
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  margin-top: 10px;
  line-height: 1.6;
  border: 1px solid #e5edf5;
}

@media (max-width: 380px) {
  h1 {
    font-size: 26px;
  }

  .day-grid,
  .symptom-grid {
    grid-template-columns: 1fr;
  }

  .strip-row {
    flex-wrap: wrap;
  }

  .strip.quarter {
    min-width: calc(50% - 4px);
  }

  .cut-arrow {
    flex-direction: column;
  }

  .arrow-line {
    width: 100%;
  }
}