/* Japan Honeymoon Planner 2027 — Pastel theme matching docs/style.css */

:root {
  --bg: #fffafc;
  --bg-soft: #f7f3ff;
  --panel: rgba(255, 255, 255, 0.84);
  --border: rgba(199, 185, 231, 0.5);
  --text: #43385d;
  --muted: #7f7497;
  --accent: #7cb9f4;
  --accent-2: #b798e5;
  --accent-3: #7fcfb0;
  --accent-4: #f4b7d2;
  --success: #57b592;
  --danger: #e57a7a;
  --tag-pink: #f4b7d2;
  --tag-mint: #b7e8d1;
  --shadow: 0 20px 48px rgba(198, 186, 224, 0.24);
  --glow: 0 0 0 1px rgba(255,255,255,0.55), 0 14px 38px rgba(177, 205, 255, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
}

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

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 8% 8%, rgba(244, 183, 210, 0.28), transparent 20%),
    radial-gradient(circle at 90% 8%, rgba(124, 185, 244, 0.22), transparent 22%),
    radial-gradient(circle at 80% 90%, rgba(183, 232, 209, 0.18), transparent 18%),
    linear-gradient(180deg, #fffafc 0%, #f9f6ff 45%, #f6fbff 100%);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: transparent;
  line-height: 1.6;
}

/* ── Hero ── */

.hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 243, 255, 0.94)),
    radial-gradient(circle at top right, rgba(124, 185, 244, 0.2), transparent 34%);
  border-bottom: 1px solid var(--border);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto auto -40px -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(183, 152, 229, 0.18), transparent 62%);
}

.hero::after {
  content: "🗾";
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(3rem, 9vw, 6rem);
  opacity: 0.12;
}

.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(124, 185, 244, 0.28);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: var(--accent-2);
  background: rgba(255,255,255,0.45);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: 0.75rem 0 0.5rem;
  color: #4f4368;
  font-weight: 700;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 50ch;
}

/* ── Container ── */

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

/* ── Sakura planning ── */

.sakura-section {
  margin-bottom: 1.5rem;
}

.sakura-header {
  align-items: flex-start;
  gap: 1rem;
}

.section-sub {
  margin-top: 0.35rem;
  color: var(--muted);
  max-width: 62ch;
}

.sakura-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(244, 183, 210, 0.18);
  border: 1px solid rgba(244, 183, 210, 0.35);
  color: #9b5f7f;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.sakura-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.sakura-callout {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 185, 231, 0.24);
  background: rgba(247, 243, 255, 0.55);
}

.sakura-callout.primary {
  background: linear-gradient(135deg, rgba(244, 183, 210, 0.18), rgba(183, 152, 229, 0.14));
  border-color: rgba(244, 183, 210, 0.35);
}

.callout-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.callout-value {
  font-size: 1.3rem;
  line-height: 1.15;
  font-weight: 800;
  color: #4f4368;
  margin-bottom: 0.45rem;
}

.sakura-callout p {
  font-size: 0.92rem;
  color: var(--text);
}

.sakura-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.sakura-city-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 185, 231, 0.24);
  background: rgba(255, 255, 255, 0.72);
}

.sakura-city-topline {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.sakura-city-card h3 {
  font-size: 1.02rem;
  color: #3a3150;
  margin-bottom: 0.35rem;
}

.sakura-window {
  font-size: 1rem;
  font-weight: 800;
  color: #9b5f7f;
  margin-bottom: 0.2rem;
}

.sakura-odds {
  font-size: 0.84rem;
  color: #4d7db2;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.sakura-city-card p {
  font-size: 0.9rem;
  color: var(--text);
}

.sakura-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sakura-note-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(199, 185, 231, 0.24);
  background: rgba(247, 243, 255, 0.48);
}

.sakura-note-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: #3a3150;
}

.sakura-list {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.55rem;
  color: var(--text);
}

.sakura-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.sakura-figure {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(199, 185, 231, 0.24);
  background: rgba(255,255,255,0.8);
}

.sakura-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.sakura-figure figcaption {
  padding: 0.8rem 0.9rem 0.9rem;
  display: grid;
  gap: 0.2rem;
}

.sakura-figure strong {
  color: #3a3150;
}

.sakura-figure span {
  color: var(--muted);
  font-size: 0.88rem;
}

.sakura-footnote {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ── Summary cards ── */

.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 255, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.summary-card:hover { transform: translateY(-2px); }

.summary-icon { font-size: 1.5rem; margin-bottom: 0.35rem; }
.summary-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.summary-value { font-size: 1.4rem; font-weight: 700; color: #4f4368; margin: 0.25rem 0 0.1rem; }
.summary-sub { font-size: 0.8rem; color: var(--muted); }

/* ── Planner grid ── */

.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.planner-col { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Card ── */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 255, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
  padding: 1.5rem;
}

.card-compact { padding: 1.25rem; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header h2 {
  font-size: 1.2rem;
  color: #3a3150;
  font-weight: 700;
  margin: 0;
}

/* ── Rate badge ── */

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124, 185, 244, 0.12);
  border: 1px solid rgba(124, 185, 244, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: #4d7db2;
  font-weight: 600;
}

.rate-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.rate-dot.offline { background: var(--danger); }

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 185, 244, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(124, 185, 244, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(183, 152, 229, 0.1);
  color: var(--accent-2);
  border: 1px solid rgba(183, 152, 229, 0.25);
}
.btn-ghost:hover {
  background: rgba(183, 152, 229, 0.2);
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-danger {
  background: rgba(229, 122, 122, 0.1);
  color: var(--danger);
  border: 1px solid rgba(229, 122, 122, 0.2);
}
.btn-danger:hover { background: rgba(229, 122, 122, 0.2); }

/* ── Form inputs ── */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.input-group label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 185, 244, 0.15);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

/* ── Expense form ── */

.expense-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.error-msg {
  color: var(--danger);
  font-size: 0.84rem;
  margin-top: 0.5rem;
}

/* ── Expense list ── */

.expense-list {
  list-style: none;
  margin: 1rem 0 0;
}

.expense-list:empty { margin: 0; }

.expense-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(247, 243, 255, 0.6);
  border: 1px solid rgba(199, 185, 231, 0.25);
  margin-bottom: 0.5rem;
  transition: background 0.15s;
}

.expense-item:hover { background: rgba(247, 243, 255, 0.9); }

.expense-name {
  flex: 1;
  font-weight: 500;
}

.expense-jpy {
  font-weight: 700;
  color: #4f4368;
  white-space: nowrap;
}

.expense-usd {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.expense-item .btn { flex-shrink: 0; }

/* ── Budget totals ── */

.budget-totals {
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.95rem;
}

.total-usd { color: var(--muted); font-size: 0.88rem; }

/* ── Itinerary ── */

.itinerary-add {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.itinerary-list {
  list-style: none;
  counter-reset: itinerary;
}

.itinerary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(247, 243, 255, 0.5);
  border: 1px solid rgba(199, 185, 231, 0.2);
  margin-bottom: 0.5rem;
  transition: background 0.15s, box-shadow 0.15s;
  counter-increment: itinerary;
}

.itinerary-item:hover {
  background: rgba(247, 243, 255, 0.85);
  box-shadow: 0 2px 8px rgba(198, 186, 224, 0.15);
}

.itinerary-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-4), var(--accent-2));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.itinerary-text { flex: 1; color: var(--text); }

.itinerary-controls {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* ── Quick Reference ── */

.ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.ref-item {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(247, 243, 255, 0.5);
  border: 1px solid rgba(199, 185, 231, 0.2);
}

.ref-label {
  font-size: 0.72rem;
  color: #5a4f72;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.ref-value {
  font-size: 0.88rem;
  color: #3a3150;
  font-weight: 500;
}

/* ── Converter ── */

.converter-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.converter-row:last-child { margin-bottom: 0; }

.converter-arrow {
  color: var(--accent-2);
  font-size: 1.2rem;
  font-weight: 700;
  padding-bottom: 0.4rem;
}

.converter-result {
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: rgba(183, 232, 209, 0.15);
  border: 1px solid rgba(183, 232, 209, 0.3);
  font-weight: 600;
  color: #3d7a5f;
  font-size: 0.95rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

/* ── Save indicator ── */

.save-indicator {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.save-indicator.saving { color: var(--accent); }
.save-indicator.error { color: var(--danger); }

/* ── Footer ── */

.site-footer {
  text-align: center;
  padding: 1rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Animations ── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card, .summary-card {
  animation: fadeInUp 0.5s ease both;
}

.summary-card:nth-child(2) { animation-delay: 0.06s; }
.summary-card:nth-child(3) { animation-delay: 0.12s; }
.summary-card:nth-child(4) { animation-delay: 0.18s; }

.planner-col:nth-child(2) .card { animation-delay: 0.1s; }

/* ── Responsive ── */

@media (max-width: 820px) {
  .planner-grid { grid-template-columns: 1fr; }
  .sakura-hero-grid,
  .sakura-notes-grid,
  .sakura-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1rem, 1200px); }
  .hero { padding: 1.5rem 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero::after { display: none; }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .sakura-header { flex-direction: column; }
  .expense-form { flex-direction: column; }
  .expense-form .btn { width: 100%; }
  .ref-grid { grid-template-columns: 1fr; }
  .converter-row { flex-direction: column; align-items: stretch; }
  .converter-arrow { text-align: center; padding: 0; }
}
