:root {
  --pink-50: #fff0f3;
  --pink-100: #ffdde4;
  --pink-200: #ffc1cd;
  --pink-300: #ff97ad;
  --pink-400: #ff6b8a;
  --pink-500: #fa4670;
  --pink-600: #e12e5b;
  --pink-700: #bc1e46;
  --rose-dark: #881337;
  --cream: #fffafc;
  --shadow-pink: rgba(250, 70, 112, 0.15);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  margin: 0; padding: 0; box-sizing: border-box;
}

html, body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--cream) 0%, var(--pink-50) 100%);
  color: var(--rose-dark);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.app {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 90px;
}

.header {
  background: linear-gradient(135deg, var(--pink-300) 0%, var(--pink-500) 100%);
  color: #fff;
  padding: 28px 20px 34px;
  border-radius: 0 0 var(--radius) var(--radius);
  text-align: center;
  box-shadow: 0 10px 30px var(--shadow-pink);
  position: relative;
}

.header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.header h1 i {
  margin-right: 8px;
  animation: pulse-heart 1.2s ease-in-out infinite;
}

.header p {
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.95;
}

.music-btn {
  margin-top: 16px;
  padding: 10px 18px;
  border: none;
  border-radius: 30px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .2s, background .2s;
}

.music-btn:hover, .music-btn:active {
  background: rgba(255,255,255,0.35);
  transform: scale(1.02);
}

.music-btn.playing {
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 12px rgba(255,255,255,0.35);
}

.music-hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.85;
  font-weight: 600;
}

.content {
  padding: 22px 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 18px;
  color: var(--pink-600);
}

.tab-panel {
  display: none;
  animation: fadeIn .35s ease;
}

.tab-panel.active {
  display: block;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 34px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, var(--pink-300), var(--pink-500));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pink-400);
  color: var(--pink-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 3px 10px var(--shadow-pink);
}

.timeline-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 4px 14px var(--shadow-pink);
  cursor: pointer;
  transition: transform .15s;
}

.timeline-card:active {
  transform: scale(0.995);
}

.timeline-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--pink-600);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-card .tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--pink-100);
  color: var(--pink-700);
  border-radius: 20px;
}

.timeline-card .summary {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #6b3a45;
}

.timeline-card .detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--pink-200);
  display: none;
  font-size: 14px;
  line-height: 1.6;
  color: #5a3a3a;
}

.timeline-item.open .detail {
  display: block;
}

.timeline-card .detail ul {
  padding-left: 18px;
}

.timeline-card .detail li + li {
  margin-top: 6px;
}

/* Notes */
.note-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px var(--shadow-pink);
}

.note-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink-300), var(--pink-500));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.note-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--pink-600);
  margin-bottom: 8px;
}

.note-card ul {
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #5a3a3a;
}

.note-card li + li {
  margin-top: 6px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px var(--shadow-pink);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--pink-600);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.faq-question i {
  color: var(--pink-400);
  transition: transform .25s;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #5a3a3a;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 16px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 10px 0 22px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 100;
  border-radius: 16px 16px 0 0;
}

.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  color: #bfa3a8;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color .2s, transform .15s;
}

.nav-item i {
  font-size: 20px;
}

.nav-item.active {
  color: var(--pink-500);
}

.nav-item:active {
  transform: scale(0.95);
}

/* Day Grid inside timeline detail */
.day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--pink-200);
}

.day-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 6px;
  border: none;
  border-radius: 10px;
  background: var(--pink-50);
  color: var(--rose-dark);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, background .2s, box-shadow .2s;
  text-align: left;
  min-height: 52px;
}

.day-btn:active {
  transform: scale(0.97);
}

.day-btn:hover,
.day-btn:focus {
  background: var(--pink-100);
  box-shadow: 0 2px 8px var(--shadow-pink);
}

.day-btn .day-num {
  font-size: 10px;
  font-weight: 800;
  color: var(--pink-500);
  text-transform: uppercase;
}

.day-btn .day-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Day Modal */
.day-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.day-modal-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  padding-bottom: 56px;
}

.day-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.day-modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  transform: translateY(16px) scale(0.98);
  transition: transform .25s ease;
}

.day-modal-nav-row {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 36px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 220;
}

.day-modal-nav {
  min-width: 132px;
  height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  color: var(--pink-700);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  pointer-events: auto;
  font-size: 15px;
  font-weight: 800;
}

.day-modal-nav .nav-label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.day-modal-nav:active {
  transform: scale(0.95);
}

.day-modal-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.day-modal-nav i {
  font-size: 16px;
}

.day-modal-overlay.active .day-modal {
  transform: translateY(0) scale(1);
}

.day-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--pink-100);
  color: var(--pink-700);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.day-modal-close:active {
  background: var(--pink-200);
  transform: scale(0.95);
}

.day-modal-header {
  padding: 18px 18px 10px;
  background: linear-gradient(135deg, var(--pink-300) 0%, var(--pink-500) 100%);
  color: #fff;
  position: relative;
}

.day-modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  margin-bottom: 6px;
}

.day-modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.day-modal-body {
  padding: 16px 18px 22px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #5a3a3a;
}

.day-modal-body p + p {
  margin-top: 10px;
}

.content-subheading {
  font-size: 15px;
  font-weight: 800;
  color: var(--pink-700);
  margin: 16px 0 8px;
  letter-spacing: 0.2px;
}

.content-list {
  margin: 8px 0 14px;
  padding-left: 20px;
}

.content-list li + li {
  margin-top: 8px;
}

.step-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}

.step-item {
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: #fff8fb;
  border: 1px solid var(--pink-100);
}

.step-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--pink-700);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.step-text {
  font-size: 14px;
  line-height: 1.65;
  color: #5a3a3a;
}

.profile-line {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8fb;
  border: 1px solid var(--pink-100);
  line-height: 1.7;
}

.profile-line strong {
  color: var(--pink-700);
}

.recipe-card {
  margin: 12px 0 16px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff9fb 0%, #fff2f6 100%);
  border: 1px solid var(--pink-100);
  box-shadow: 0 10px 24px rgba(226, 112, 145, 0.08);
}

.recipe-title {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 900;
  color: var(--pink-700);
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.recipe-section + .recipe-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(226, 112, 145, 0.25);
}

.recipe-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d95f8d;
  margin-bottom: 4px;
}

.recipe-section p {
  margin: 0;
}

.prose-author {
  margin: -2px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #c45d87;
}

.table-like {
  margin: 10px 0 16px;
  border: 1px solid var(--pink-100);
  border-radius: 14px;
  overflow: hidden;
  background: #fff9fb;
}

.table-like-row {
  display: grid;
  grid-template-columns: 0.95fr 1.45fr;
}

.table-like-row > div {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #5a3a3a;
}

.table-like-row > div + div {
  border-left: 1px solid var(--pink-100);
}

.table-like-row + .table-like-row {
  border-top: 1px solid rgba(226, 112, 145, 0.18);
}

.table-like-head {
  background: #fff1f6;
}

.table-like-head > div {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--pink-700);
}

.poem-block {
  margin: 8px 0 16px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, #fff7fa 0%, #fff 100%);
  border: 1px solid var(--pink-100);
  border-radius: 14px;
}

.poem-block-translation {
  background: linear-gradient(180deg, #fff 0%, #fff5f8 100%);
}

.poem-label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pink-100);
  color: var(--pink-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.poem-line {
  font-size: 15px;
  line-height: 1.75;
  color: var(--rose-dark);
  white-space: pre-wrap;
}

.poem-line + .poem-line {
  margin-top: 2px;
}

@media (max-width: 360px) {
  .day-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-modal-overlay {
    padding: 10px;
  }

  .day-modal-nav-row {
    width: calc(100vw - 20px);
    bottom: 28px;
  }

  .day-modal-nav {
    min-width: 112px;
    height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 14px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
