:root {
  --ink: #0f172a; --ink-soft: #333;
  --paper: #f8fafc; --paper-2: #f1f5f9;
  --gold: #c79a3e; --gold-deep: #9a7322;
  --royal: #6ab3f8; --royal-deep: #1557b0;
  --rose: #b23a6b; --mint: #2f7d63;
  --line: #e2e8f0;
  --shadow: 0 18px 48px -22px rgba(15,23,42,0.30);
  --shadow-sm: 0 4px 16px -8px rgba(15,23,42,0.20);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* When embedded in an iframe, let the body grow to content height so
   the ResizeObserver can measure #root correctly for iframe auto-resize. */
html.embedded, html.embedded body { height: auto; min-height: 100%; }
body {
  font-family: 'Segoe UI', -apple-system, sans-serif;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: #fff; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 5px 30px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; max-width: 1080px; margin: 0 auto; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold) 0%, var(--gold-deep) 70%);
  display: grid; place-items: center; color: #fff;
  font-weight: 900; font-size: 20px; box-shadow: var(--shadow-sm); }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.acct-pill { font-size: 12px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); display: flex; align-items: center; gap: 7px; box-shadow: var(--shadow-sm); }
.acct-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }

.hero { text-align: center; padding: 26px 0 8px; }
.hero-kicker { font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.hero h1 { font-weight: 900; font-size: clamp(30px, 6vw, 40px); line-height: 1.02; letter-spacing: -0.02em; margin: 12px 0 10px; }
.hero h1 em { font-style: italic; color: var(--royal); }
.hero p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; font-size: 15px; }

.stepper { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 26px auto 6px; max-width: 760px; }
.step-chip { font-size: 13.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; font-weight: 600; }
.step-chip.active { background: var(--royal); color: #fff; border-color: var(--royal); box-shadow: var(--shadow-sm); }
.step-chip.done { background: var(--paper-2); color: var(--gold-deep); border-color: var(--line); }
.step-num { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: rgba(255,255,255,0.25); }
.step-chip.done .step-num { background: var(--gold); color: #fff; }
.step-chip:not(.active):not(.done) .step-num { background: var(--paper-2); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); margin-top: 22px; }
.card-head { margin-bottom: 22px; }
.card-head h2 { font-weight: 700; font-size: 25px; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; }

.card-head h2 .ord { font-size: 13px; color: var(--gold-deep); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }

.card-head p { 
  background: #f0f7ff;
  border: 1px solid #c4d6f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;}

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.input, select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 14.5px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.input:focus, select:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(106,179,248,0.25); background: #fff; }
input[type="date"].input { min-height: 48px; cursor: pointer; text-align: left; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }
.row { display: grid; gap: 14px; }
@media (min-width: 620px) { .row.two { grid-template-columns: 1fr 1fr; } }

.day-row { display: grid; gap: 14px; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 10px; grid-template-columns: 88px 1.8fr 1fr; align-items: center; }
.day-row:hover { border-color: #c7d2e8; background: var(--paper); }
@media (max-width: 700px) { .day-row { grid-template-columns: 1fr; } .card { padding: 20px;} div#root { padding: 7px;} }
@media (max-width: 520px) {
  .topbar { padding: 10px 12px; gap: 6px; }
  .topbar-sub { display: none; }
  .acct-email { display: none; }
  .acct-pill { padding: 7px 10px; }
  .btn-ghost { font-size: 13px !important; padding: 9px 14px !important; }
  .plan-card { flex-wrap: wrap; align-items: flex-start !important; }
  .plan-parks { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .plan-actions { flex-basis: 100%; justify-content: flex-end; margin-top: 4px; }
  .nav-row { flex-direction: column; gap: 8px; }
  .nav-row > button { width: 100%; }
  .nav-row > div { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .nav-row > div > button { width: 100%; }
  /* Larger base font sizes for mobile readability */
  body { font-size: 16px; }
  .input, select { font-size: 16px; }
  .field label { font-size: 13px; }
  .btn { font-size: 15px; padding: 13px 22px; }
  .step-chip { font-size: 13px; padding: 9px 14px; }
  .hero p { font-size: 15px; }
  .att-name { font-size: 14px; }
  .att-meta { font-size: 12px; }
  .ll-pill { font-size: 13px; padding: 9px 15px; }
  .booking-name { font-size: 15px; }
  .booking-detail { font-size: 13px; }
  .notice { font-size: 14px; }
  .footer-note { font-size: 13px; }
  .day-label { font-size: 15px; }
  .toggle-label strong { font-size: 15px; }
  .toggle-label span { font-size: 13.5px; }
  input[type="date"].input { text-align: left !important; }
  input[type="date"].input::-webkit-date-and-time-value { text-align: left !important; }
  .card { padding: 19px 12px !important; }
}
.day-label { font-weight: 700; font-size: 16px; color: #2B7DC9; line-height: 1.3; }
.ll-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.ll-pill { font-size: 11.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-soft); transition: all .12s; }
.ll-pill.on { background: var(--royal); color: #fff; border-color: var(--royal); }
.ll-pill.on.sp { background: var(--rose); border-color: var(--rose); }
.ll-pill:disabled { opacity: 0.35; cursor: not-allowed; }

.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.toggle-row:last-child { border-bottom: none; }
.toggle-label strong { font-weight: 600; font-size: 14.5px; }
.toggle-label span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; transition: .18s; }
.slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,0.20); }
.switch input:checked + .slider { background: var(--royal); border-color: var(--royal); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.att-section-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin: 18px 0 9px; display: flex; align-items: center; gap: 8px; }
.att-section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.att-grid { display: grid; gap: 8px; }
@media (min-width: 620px) { .att-grid { grid-template-columns: 1fr 1fr; } .card { padding: 20px;} }
.att { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; transition: border-color .13s, background .13s; }
.att:hover:not(.disabled) { border-color: var(--royal); background: var(--paper); }
.att.sel { border-color: var(--royal); background: #eef2fd; box-shadow: var(--shadow-sm); }
.att.disabled { opacity: 0.40; cursor: not-allowed; background: var(--paper-2); }
.att-check { width: 19px; height: 19px; border-radius: 6px; border: 2px solid var(--line); flex: 0 0 auto; display: grid; place-items: center; color: #fff; font-size: 12px; }
.att.sel .att-check { background: var(--royal); border-color: var(--royal); }
.att-body { flex: 1; min-width: 0; }
.att-name { font-size: 15px; font-weight: 600; line-height: 1.3; word-break: break-word; color: var(--ink); }
.att-meta { font-size: 12px; color: #6b7887; line-height: 1.4; margin-top: 2px; }
.badge { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.badge.mp { background: rgba(106,179,248,0.18); color: var(--royal); }
.badge.sp { background: rgba(178,58,107,0.12); color: var(--rose); }
.badge.t1 { background: rgba(199,154,62,0.16); color: var(--gold-deep); }
.badge.show { background: rgba(47,125,99,0.13); color: var(--mint); }
.badge.height { background: rgba(178,58,107,0.08); color: var(--rose); }

.sheet { border: 1.5px solid var(--line); border-radius: 16px; padding: 22px; background: #fff; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sheet-title { font-weight: 700; font-size: 20px; }
.sheet-date { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.sheet-section { margin-top: 14px; }
.sheet-section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; }
.booking-row { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 7px; background: #fff; }
.booking-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--royal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.booking-rank.sp { background: var(--rose); }
.booking-rank.t1 { background: var(--gold-deep); }
.booking-info { flex: 1; min-width: 0; }
.booking-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.booking-detail { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.booking-empty { padding: 12px; color: var(--ink-soft); font-size: 13px; font-style: italic; background: var(--paper); border-radius: 10px; text-align: center; }

.nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.btn { font-weight: 600; font-size: 14px; padding: 12px 26px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--royal-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #0f4a96; }
.btn-primary:disabled { opacity: 0.65; cursor: default; box-shadow: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--paper); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-deep); }
.btn-autofill { background: var(--gold); color: #fff; border: none; padding: 9px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
.btn-autofill:hover { background: var(--gold-deep); }

.notice { border-radius: 12px; padding: 13px 15px; font-size: 12.5px; line-height: 1.5; margin-bottom: 14px; border: 1px solid; }
.notice.warn { background: #fdf3f1; border-color: #f0c9bf; color: #8a3322; }
.notice.info { background: #eef2fd; border-color: #c9d4f3; color: var(--royal-deep); }
.notice.gold { background: #fefce8; border-color: #fde68a; color: #854d0e; }

.gate { max-width: 565px; margin: 40px auto 0; }
.gate .card { text-align: center; }

.pill-stat { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink-soft); margin: 3px 4px 0 0; }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-soft); font-size: 14px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--paper); }
.footer-note { text-align: center; font-size: 11.5px; color: var(--ink-soft); margin-top: 30px; line-height: 1.6; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loader-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; gap: 18px; }
.loader-spinner { width: 52px; height: 52px; border: 4px solid #e0e8f4; border-top-color: var(--royal); border-radius: 50%; animation: pp-spin 0.8s linear infinite; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.loader-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.loader-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.loader-subtitle { font-size: 0.88rem; color: var(--muted); }

/* ── Custom Date Picker ─────────────────────────────── */
.dp-input { cursor: pointer; user-select: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; }
.dp-popup { position: absolute; top: calc(100% + 6px); left: 0; z-index: 1000; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 14px 12px; width: 272px; }
.dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-month-label { font-weight: 700; font-size: 15px; color: var(--ink); }
.dp-nav { display: flex; flex-direction: row; gap: 4px; }
.dp-nav-btn { width: 28px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: grid; place-items: center; font-size: 12px; color: var(--ink-soft); transition: background .12s; line-height: 1; }
.dp-nav-btn:hover { background: var(--paper-2); color: var(--ink); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dp-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-soft); padding: 4px 0 8px; letter-spacing: 0.04em; }
.dp-day { width: 34px; height: 34px; border-radius: 50%; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--ink); display: grid; place-items: center; margin: 1px auto; transition: background .1s; }
.dp-day:hover:not(.dp-disabled):not(.dp-selected) { background: var(--paper-2); }
.dp-today { color: var(--royal); font-weight: 700; }
.dp-selected { background: var(--royal) !important; color: #fff !important; border-radius: 50%; }
.dp-disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.dp-footer { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-action { background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 5px 10px; border-radius: 8px; transition: background .1s; }
.dp-action:hover { background: var(--paper-2); }
.dp-today-btn { color: var(--royal); }
/* ── End Date Picker ─────────────────────────────────── */

.day-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; padding: 6px; background: var(--paper); border-radius: 12px; }
.day-tab { padding: 9px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--ink-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.2; }
.day-tab .dtl { font-size: 10px; font-weight: 500; opacity: 0.8; }
.day-tab.active { background: #fff; color: var(--royal); box-shadow: var(--shadow-sm); }
.day-tab.done { color: var(--mint); }
