/* Royal Fairytale — a pink-and-lavender sky, a storybook castle, a gold ribbon, a crowned crest, gilded cards. */
[data-trip-theme="royal-fairytale"] {
  --rf-plum: #5A1E5C;
  --rf-plum-ink: #3B1642;
  --rf-rose: #A0306E;
  --rf-navy: #22396E;
  --rf-gold: #E2B451;
  --rf-gold-deep: #8A5A12;
  --rf-cream: #FFF8EE;
  --rf-img: "/img/themes/royal-fairytale";

  --t-bg: #E9C6E4;
  --t-ink: var(--rf-plum-ink);
  --t-muted: #6A4470;
  --t-surface: var(--rf-cream);
  --t-surface-2: #F9E6F0;
  --t-border: #D9B15A;
  --t-border-w: 2px;
  --t-primary: #6B2D6B;   --t-on-primary: #FFF6E0;
  --t-secondary: var(--rf-navy); --t-on-secondary: #FFF6E0;
  --t-accent: #F0C75E;    --t-on-accent: var(--rf-plum-ink);
  --t-btn-border: var(--rf-gold);
  --t-link: #7A2E6E;
  --t-focus: #8E2DB0;
  --t-warn-bg: #FFE7A8;   --t-warn-ink: #5C3200;
  --t-shadow: none;
  --t-shadow-btn: 0 4px 0 rgba(90, 30, 92, .35), 0 8px 18px rgba(90, 30, 92, .25);
  --t-radius-card: 16px;
  --t-radius-btn: 999px;
  --t-font-display: "Playball", "Cinzel", Georgia, serif;
  --t-font-body: "Nunito Sans", system-ui, -apple-system, sans-serif;
  --t-font-num: "Cinzel", Georgia, serif;
  --t-title-size: clamp(2.5rem, 4.4vw + .9rem, 4.6rem);
  --t-title-weight: 400;
  --t-title-ink: var(--rf-plum);
  --t-title-shadow: 0 0 2px #FFFFFF, 0 2px 0 #FFFFFF, 0 4px 0 #EFC25A, 0 8px 18px rgba(90, 30, 92, .35);
  --t-hero-bg: transparent;
  --t-hero-ink: var(--rf-plum-ink);
  --t-hero-muted: var(--rf-plum-ink);
  --t-hero-border: transparent;
  --t-eyebrow-ink: var(--rf-gold-deep);
  --t-card-bg: var(--rf-cream);
  --t-card-ink: var(--rf-plum-ink);
  --t-card-muted: #6A4470;
  --t-card-border: #D9B15A;
  --t-card-head-bg: transparent;
  --t-card-head-ink: var(--rf-rose);
  --t-home-bg: var(--rf-cream);
  --t-page-ink: #4A1A50;
  --t-page-muted: #5E2F63;
  --t-sheet-bg: var(--rf-cream);
  --choice-on-bg: #FBE3EF;
  --choice-on-border: #6B2D6B;
  --field-border: #D9B15A;
}

/* ---------- sky ---------- */
[data-trip-theme="royal-fairytale"] .ts-backdrop {
  background:
    url("/img/themes/royal-fairytale/sky.svg") center top / max(1600px, 100%) auto no-repeat,
    url("/img/themes/royal-fairytale/sparkles.svg") 0 0 / 340px 340px repeat,
    linear-gradient(180deg, #B7A3EE 0, #D7B1E8 240px, #F2C1DB 540px, #FBD6CF 860px, #FCE3E0 1200px, #F6E2F1 100%);
}

/* ---------- castle + title ---------- */
[data-trip-theme="royal-fairytale"] .ts-hero { align-items: center; margin-bottom: 34px; }
[data-trip-theme="royal-fairytale"] .ts-masthead {
  display: flex;
  align-items: center;
  min-height: 300px;
  padding-left: 268px;
}
[data-trip-theme="royal-fairytale"] .ts-deco-1 {
  display: block;
  position: absolute;
  left: -20px;
  bottom: -46px;
  width: 290px;
  height: 354px;
  background: url("/img/themes/royal-fairytale/castle.svg") left bottom / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(90, 30, 92, .2));
}
[data-trip-theme="royal-fairytale"] .ts-deco-2 {
  display: block;
  position: absolute;
  right: 4%;
  top: -6px;
  width: 120px;
  height: 70px;
  background:
    radial-gradient(circle, #FFF6C9 0 2px, transparent 3px) 10px 44px / 14px 14px no-repeat,
    radial-gradient(circle, #FFE79A 0 3px, transparent 4px) 40px 26px / 16px 16px no-repeat,
    radial-gradient(circle, #FFF6C9 0 2px, transparent 3px) 74px 14px / 14px 14px no-repeat,
    radial-gradient(circle, #FFE79A 0 4px, transparent 5px) 100px 2px / 18px 18px no-repeat;
  animation: rf-twinkle 3.2s ease-in-out infinite;
}
[data-trip-theme="royal-fairytale"] .ts-frame {
  flex: 1;
  padding: 14px 8px 6px;
  background: radial-gradient(closest-side, rgba(255, 250, 253, .72), rgba(255, 250, 253, 0));
  border: 0;
}
[data-trip-theme="royal-fairytale"] .ts-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
  font-family: "Cinzel", Georgia, serif;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .2em;
}
[data-trip-theme="royal-fairytale"] .ts-eyebrow::before,
[data-trip-theme="royal-fairytale"] .ts-eyebrow::after {
  content: "";
  width: 46px;
  height: 10px;
  background:
    radial-gradient(circle, var(--rf-gold) 0 3px, transparent 3.5px) center / 10px 10px no-repeat,
    linear-gradient(var(--rf-gold), var(--rf-gold)) center / 100% 1.5px no-repeat;
}
[data-trip-theme="royal-fairytale"] .ts-title { line-height: 1.12; padding: 0 6px; transform: rotate(-2deg); }
[data-trip-theme="royal-fairytale"] .ts-dates {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 58px 13px;
  font-family: "Cinzel", Georgia, serif;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--rf-plum-ink);
  border: 0 solid transparent;
  border-image: url("/img/themes/royal-fairytale/ribbon.svg") 0 70 fill / 0 50px / 0 stretch;
  filter: drop-shadow(0 4px 6px rgba(138, 90, 18, .3));
}
[data-trip-theme="royal-fairytale"] .ts-dot { color: var(--rf-rose); }

/* ---------- crowned crest countdown ---------- */
[data-trip-theme="royal-fairytale"] .ts-side { gap: 12px; }
[data-trip-theme="royal-fairytale"] .ts-count {
  align-self: center;
  width: 188px;
  min-height: 224px;
  padding: 66px 18px 22px;
  color: #FFF4D6;
  background: url("/img/themes/royal-fairytale/crest.svg") center / contain no-repeat;
  border: 0;
  filter: drop-shadow(0 10px 14px rgba(90, 30, 92, .3));
}
[data-trip-theme="royal-fairytale"] .ts-count-n {
  font-size: 3.6rem;
  font-weight: 700;
  color: #FFF4D6;
  text-shadow: 0 2px 0 #3E0F48, 0 0 14px rgba(255, 220, 140, .55);
}
[data-trip-theme="royal-fairytale"] .ts-count-l {
  font-family: "Cinzel", Georgia, serif;
  font-size: .8rem;
  letter-spacing: .12em;
  color: #FBE3A6;
}

/* gilded pills */
[data-trip-theme="royal-fairytale"] .ts-btn {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: .04em;
  border-width: 3px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 55%);
  box-shadow: var(--t-shadow-btn), inset 0 0 0 2px rgba(255, 236, 180, .25);
}
[data-trip-theme="royal-fairytale"] .ts-btn-1 { background-color: #6B2D6B; }
[data-trip-theme="royal-fairytale"] .ts-btn-2 { background-color: var(--rf-navy); }
[data-trip-theme="royal-fairytale"] .ts-btn-3 { background-color: #2E3F86; color: #FFF6E0; }
[data-trip-theme="royal-fairytale"] .ts-actions .ts-btn > span[aria-hidden] { filter: sepia(1) saturate(3) hue-rotate(-10deg) brightness(1.15); }

/* ---------- gilded day cards ---------- */
[data-trip-theme="royal-fairytale"] .ts-day-grid { gap: 14px; }
[data-trip-theme="royal-fairytale"] .day-card {
  min-height: 228px;
  background: transparent;
  border: 0 solid transparent;
  border-radius: 0;
  border-image: url("/img/themes/royal-fairytale/frame.svg") 36 fill / 26px / 0 stretch;
  overflow: visible;
  filter: drop-shadow(0 8px 12px rgba(90, 30, 92, .2));
}
[data-trip-theme="royal-fairytale"] .day-card:hover { transform: translateY(-4px); filter: drop-shadow(0 12px 18px rgba(90, 30, 92, .28)); }
[data-trip-theme="royal-fairytale"] .dc-head { padding: 16px 6px 2px; gap: 0; }
[data-trip-theme="royal-fairytale"] .dc-dow { font-family: "Cinzel", Georgia, serif; font-size: .82rem; letter-spacing: .08em; color: var(--rf-plum); }
[data-trip-theme="royal-fairytale"] .dc-date { font-family: var(--t-font-body); font-size: 1rem; font-weight: 800; color: var(--rf-rose); }
[data-trip-theme="royal-fairytale"] .dc-head::after {
  content: "";
  width: 46px;
  height: 9px;
  margin-top: 5px;
  background:
    linear-gradient(45deg, transparent 30%, var(--accent) 31% 69%, transparent 70%) center / 9px 9px no-repeat,
    linear-gradient(var(--rf-gold), var(--rf-gold)) center / 100% 1.5px no-repeat;
}
[data-trip-theme="royal-fairytale"] .dc-body { padding: 8px 10px 4px; }
[data-trip-theme="royal-fairytale"] .dc-icon { font-size: 2.9rem; filter: drop-shadow(0 4px 4px rgba(90, 30, 92, .22)); }
[data-trip-theme="royal-fairytale"] .dc-title { font-family: "Cinzel", Georgia, serif; font-size: .95rem; font-weight: 700; color: var(--rf-plum-ink); }
[data-trip-theme="royal-fairytale"] .dc-sub { color: #6A4470; }
[data-trip-theme="royal-fairytale"] .dc-foot { padding-bottom: 16px; }
[data-trip-theme="royal-fairytale"] .wx { background: #F9E6F0; border: 1px solid #EBC8DD; }
[data-trip-theme="royal-fairytale"] .dc-warn { border: 1px solid #E2B451; }

/* ---------- info cards ---------- */
[data-trip-theme="royal-fairytale"] .info-card {
  background: transparent;
  border: 0 solid transparent;
  border-radius: 0;
  border-image: url("/img/themes/royal-fairytale/frame.svg") 36 fill / 30px / 0 stretch;
  padding: 26px 30px;
  filter: drop-shadow(0 8px 14px rgba(90, 30, 92, .18));
}
[data-trip-theme="royal-fairytale"] .home-card { border-image-width: 40px; padding: 30px 36px; }
[data-trip-theme="royal-fairytale"] .ic-art {
  width: 200px;
  height: 144px;
  font-size: 0;
  background: url("/img/themes/royal-fairytale/manor.svg") center / contain no-repeat;
  border-radius: 0;
}
[data-trip-theme="royal-fairytale"] .ic-kicker { font-family: "Cinzel", Georgia, serif; color: var(--rf-gold-deep); opacity: 1; }
[data-trip-theme="royal-fairytale"] .ic-title { font-family: var(--t-font-display); font-weight: 400; font-size: 1.6rem; color: var(--rf-plum); }
[data-trip-theme="royal-fairytale"] .home-card .ic-title { font-size: 2.1rem; }
[data-trip-theme="royal-fairytale"] .ic-links .ts-btn {
  min-width: 190px;
  justify-content: flex-start;
  color: var(--rf-plum-ink);
  background: linear-gradient(180deg, #FFFFFF, #FFF1DC);
  box-shadow: 0 3px 0 rgba(138, 90, 18, .3), 0 6px 12px rgba(90, 30, 92, .15);
}
[data-trip-theme="royal-fairytale"] .pc-chip { background: #FFFFFF; border: 1.5px solid #E8C77A; }
[data-trip-theme="royal-fairytale"] .pc-emoji { background: #F9E6F0; }
[data-trip-theme="royal-fairytale"] .leg + .leg { border-top-color: #E2B451; }
[data-trip-theme="royal-fairytale"] .ts-nudge { background: rgba(255, 248, 238, .94); border: 2px dashed var(--rf-gold); }
[data-trip-theme="royal-fairytale"] .ts-banner { border: 2px solid var(--rf-gold); }
[data-trip-theme="royal-fairytale"] .ts-footer a { color: var(--rf-plum); }

/* ---------- themed dialogs ---------- */
[data-trip-theme="royal-fairytale"] .sheet-inner { border: 3px solid var(--rf-gold); }
[data-trip-theme="royal-fairytale"] .sheet-head {
  background: linear-gradient(180deg, #6B2D6B, #4A1A55);
  border-bottom: 3px solid var(--rf-gold);
}
[data-trip-theme="royal-fairytale"] .sheet-title { font-weight: 400; font-size: 1.7rem; color: #FFF4D6; }
[data-trip-theme="royal-fairytale"] .sheet-head .sheet-x { color: #FFF4D6; }
[data-trip-theme="royal-fairytale"] .tl-item { background: #FFFFFF; border-top-color: #EBD3A0; border-right-color: #EBD3A0; border-bottom-color: #EBD3A0; }
[data-trip-theme="royal-fairytale"] .ds-add-btn { background: #FBEAF2; border-color: #EBC8DD; }

/* ---------- tablet ---------- */
@container trip (max-width: 899px) {
  [data-trip-theme="royal-fairytale"] .ts-masthead { min-height: 250px; padding-left: 196px; }
  [data-trip-theme="royal-fairytale"] .ts-deco-1 { left: -14px; bottom: -20px; width: 214px; height: 262px; }
  [data-trip-theme="royal-fairytale"] .ts-side { gap: 14px 18px; }
  [data-trip-theme="royal-fairytale"] .ts-count { width: 150px; min-height: 178px; padding: 52px 14px 16px; }
  [data-trip-theme="royal-fairytale"] .ts-count-n { font-size: 2.8rem; }
}

/* ---------- phone ---------- */
@container trip (max-width: 599px) {
  [data-trip-theme="royal-fairytale"] .ts-backdrop {
    background-size: 1100px auto, 280px 280px, auto;
  }
  [data-trip-theme="royal-fairytale"] .ts-masthead { display: block; min-height: 0; padding: 190px 0 0; }
  [data-trip-theme="royal-fairytale"] .ts-deco-1 { left: 50%; top: -8px; bottom: auto; width: 180px; height: 190px; margin-left: -96px; background-position: center bottom; }
  [data-trip-theme="royal-fairytale"] .ts-deco-2 { right: 0; top: 10px; }
  [data-trip-theme="royal-fairytale"] .ts-frame { padding: 0 0 4px; }
  [data-trip-theme="royal-fairytale"] .ts-eyebrow { font-size: .74rem; }
  [data-trip-theme="royal-fairytale"] .ts-eyebrow::before, [data-trip-theme="royal-fairytale"] .ts-eyebrow::after { width: 28px; }
  [data-trip-theme="royal-fairytale"] .ts-dates { padding: 8px 44px 12px; font-size: .78rem; border-image-width: 0 38px; }
  [data-trip-theme="royal-fairytale"] .ts-count { flex-direction: column; gap: 0; width: 130px; min-height: 156px; padding: 46px 12px 14px; }
  [data-trip-theme="royal-fairytale"] .ts-count-n { font-size: 2.5rem; }
  [data-trip-theme="royal-fairytale"] .ts-count-l { font-size: .66rem; }
  [data-trip-theme="royal-fairytale"] .ts-actions { flex: 1 1 100%; }
  [data-trip-theme="royal-fairytale"] .day-card { min-height: 92px; border-image-width: 20px; }
  [data-trip-theme="royal-fairytale"] .dc-head { width: 84px; padding: 10px 2px 10px 12px; border-right: 1.5px solid #EBCB84; }
  [data-trip-theme="royal-fairytale"] .dc-head::after { width: 30px; }
  [data-trip-theme="royal-fairytale"] .dc-body { padding: 12px 6px 12px 10px; }
  [data-trip-theme="royal-fairytale"] .dc-icon { font-size: 2.2rem; }
  [data-trip-theme="royal-fairytale"] .dc-foot { padding: 10px 14px 10px 0; }
  [data-trip-theme="royal-fairytale"] .info-card { border-image-width: 24px; padding: 22px 20px; }
  [data-trip-theme="royal-fairytale"] .home-card { border-image-width: 28px; padding: 24px 22px; }
  [data-trip-theme="royal-fairytale"] .ic-art { width: 96px; height: 70px; }
  [data-trip-theme="royal-fairytale"] .home-card .ic-title { font-size: 1.6rem; }
  [data-trip-theme="royal-fairytale"] .ic-links .ts-btn { min-width: 0; justify-content: center; font-size: .8rem; letter-spacing: 0; }
}

@keyframes rf-twinkle { 50% { opacity: .45; transform: scale(.94); } }

/* ---------- resort postcard frame: gold with a cream mat ---------- */
[data-trip-theme="royal-fairytale"] .home-card {
  --resort-frame: 3px solid var(--rf-gold);
  --resort-shadow: 0 0 0 3px var(--rf-cream), 0 0 0 5px var(--rf-gold-deep), 0 10px 22px rgba(90, 30, 92, .22);
  --resort-radius: 14px;
}
