/* Hive prototype – styled after Google Material Design (Material 3 tokens) */
:root {
  --md-primary: #1a73e8;
  --md-on-primary: #ffffff;
  --md-surface: #ffffff;
  --md-on-surface: #1c1b1f;
  --md-inverse-surface: #313033;
  --md-inverse-on-surface: #f4eff4;
  --md-shape-full: 999px;
  --md-shape-xs: 4px;
  --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-3: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15);
  --md-motion-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--md-font); color: var(--md-on-surface); background: var(--md-surface); -webkit-font-smoothing: antialiased; }

/* ---------- Views ---------- */
.view { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; }
.view[hidden] { display: none; }
.view__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.view__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.66) 55%, rgba(0, 0, 0, 0.42) 100%); }

/* ---------- Intro ---------- */
.intro { position: relative; z-index: 1; width: 100%; max-width: 760px; padding: 64px clamp(24px, 6vw, 96px); color: #ffffff; }
.intro .md-button { margin-top: 16px; }

/* ---------- Typography (Material type scale) ---------- */
.md-display { margin: 0 0 24px; font-weight: 400; font-size: clamp(2.75rem, 8vw, 4.5rem); line-height: 1.12; letter-spacing: -0.25px; }
.md-body-large { margin: 0 0 20px; font-size: 1.125rem; line-height: 1.6; letter-spacing: 0.15px; color: rgba(255, 255, 255, 0.92); }
.md-body-large b { font-weight: 500; color: #ffffff; }

/* ---------- Buttons ---------- */
.md-button {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 32px; border: 0; border-radius: var(--md-shape-full);
  font: 500 1rem/1 var(--md-font); letter-spacing: 0.1px; cursor: pointer;
  transition: box-shadow 0.2s var(--md-motion-standard);
}
.md-button::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity 0.2s var(--md-motion-standard); }
.md-button:hover::before { opacity: 0.08; }
.md-button:focus-visible::before, .md-button:active::before { opacity: 0.12; }
.md-button:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.85); outline-offset: 3px; }
.md-button--filled { background: var(--md-primary); color: var(--md-on-primary); }
.md-button--filled:hover { box-shadow: var(--md-elevation-1); }
.md-ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: 0.2; transform: scale(0); pointer-events: none; animation: md-ripple 0.6s var(--md-motion-standard) forwards; }
@keyframes md-ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Snackbar ---------- */
.md-snackbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 10; min-width: 288px; max-width: calc(100vw - 32px);
  padding: 14px 16px; border-radius: var(--md-shape-xs); background: var(--md-inverse-surface); color: var(--md-inverse-on-surface);
  box-shadow: var(--md-elevation-3); font-size: 0.875rem; line-height: 1.43; letter-spacing: 0.25px;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform 0.25s var(--md-motion-standard), opacity 0.25s var(--md-motion-standard);
}
.md-snackbar.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .md-button, .md-button::before, .md-snackbar { transition: none; }
  .md-ripple { animation: none; opacity: 0; }
}
@media (max-width: 600px) {
  .md-body-large { font-size: 1rem; }
  .view__scrim { background: rgba(0, 0, 0, 0.72); }
}

/* ---------- Icons ---------- */
.md-icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* ---------- Text & contained buttons (Material 2 style, as in the Hive product) ---------- */
.md-button--text { height: 36px; padding: 0 8px; border-radius: var(--md-shape-xs); background: transparent; color: var(--md-link); font-size: 0.8125rem; letter-spacing: 1.25px; text-transform: uppercase; }
.md-button--text:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }
.md-button--contained { height: 44px; padding: 0 24px; gap: 10px; width: 100%; border-radius: var(--md-shape-xs); background: var(--md-link); color: #ffffff; font-size: 0.875rem; letter-spacing: 1.25px; text-transform: uppercase; box-shadow: var(--md-elevation-1); }
.md-button--contained:hover { box-shadow: var(--md-elevation-3); }
.md-button--contained .md-icon { width: 20px; height: 20px; }
.md-button--contained:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }

/* ---------- Campaign view ---------- */
:root { --md-link: #4285f4; --md-outline: #dadce0; --md-muted: #6b6f76; --md-bg: #f8f9fa; }
.view--campaign { display: block; background: var(--md-bg); overflow: visible; }
.campaign-title { background: #ffffff; padding: 18px clamp(20px, 3vw, 40px); border-bottom: 1px solid var(--md-outline); }
.campaign-title h1 { margin: 0; font-size: 1.5rem; font-weight: 500; line-height: 1.3; }
.campaign { display: flex; flex-direction: column; gap: 0; align-items: center; padding: 32px clamp(16px, 3vw, 40px) 64px; }
.md-card { background: var(--md-surface); border: 1px solid var(--md-outline); border-radius: var(--md-shape-xs); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px 1px rgba(0, 0, 0, 0.04); overflow: clip; }
.md-card__details { padding: 16px 16px 8px; }
.md-title { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 1rem; font-weight: 500; letter-spacing: 0.15px; }
.md-title .md-icon { color: #5f6368; }
.details { display: grid; grid-template-columns: 100px 1fr; gap: 8px 16px; margin: 0; font-size: 0.875rem; line-height: 1.4; }
.details dt { color: var(--md-muted); }
.details dd { margin: 0; }
.details b { font-weight: 500; }
.md-card__actions { display: flex; justify-content: flex-end; margin: 4px -4px 0 0; }
.campaign__body { border-top: 1px solid var(--md-outline); background: #ffffff; } /* email body left blank for now */

.campaign__summary { display: flex; flex-direction: column; gap: 24px; }
.summary-item { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.summary-item p { align-self: stretch; margin: 0 0 0 36px; font-size: 0.875rem; line-height: 1.45; color: var(--md-muted); }
.summary-item__title { align-self: stretch; display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.4; }
.summary-item__title .md-icon { color: #5f6368; margin-top: 0; }
.summary-item__title--time { font-weight: 400; margin-bottom: 4px; }
.summary-item__title--time b { font-weight: 500; }
.summary-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }

@media (max-width: 960px) {
  .campaign__content, .campaign__content:has(.campaign__sms) { grid-template-columns: minmax(0, 1fr); }
  .campaign__summary { order: -1; }
}
.campaign__heading { grid-column: 1 / -1; margin: 0 0 -8px; font-size: 1.25rem; font-weight: 500; line-height: 1.3; letter-spacing: 0.15px; }
.campaign-title h1 { display: flex; align-items: center; gap: 12px; }
.campaign-title__icon { width: 30px; height: 30px; color: #f57c00; }
.campaign-title__icon .inner { fill: #ffb74d; }

/* ---------- Dialog & outlined text fields ---------- */
.md-dialog { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 28px; background: #ffffff; color: var(--md-on-surface); box-shadow: var(--md-elevation-3); }
.md-dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
.md-dialog[open] { animation: md-dialog-in 0.2s var(--md-motion-standard); }
@keyframes md-dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.md-dialog__form { padding: 24px 24px 16px; }
.md-dialog__title { margin: 0 0 20px; font-size: 1.5rem; font-weight: 400; line-height: 1.33; }
.md-dialog__content { display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.md-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.md-dialog__actions .md-button--text { height: 40px; padding: 0 12px; }

.md-field { position: relative; display: block; }
.md-field input { width: 100%; height: 56px; padding: 0 16px; border: 1px solid #79747e; border-radius: var(--md-shape-xs); background: transparent; font: 400 1rem/1.5 var(--md-font); letter-spacing: 0.5px; color: var(--md-on-surface); outline: none; transition: border-color 0.15s; }
.md-field input:hover { border-color: var(--md-on-surface); }
.md-field input:focus { border: 2px solid var(--md-link); padding: 0 15px; }
.md-field__label { position: absolute; left: 12px; top: 28px; transform: translateY(-50%); padding: 0 4px; background: #ffffff; color: #49454f; font-size: 1rem; line-height: 1; pointer-events: none; transition: top 0.15s var(--md-motion-standard), font-size 0.15s var(--md-motion-standard), color 0.15s; }
.md-field input:focus + .md-field__label, .md-field input:not(:placeholder-shown) + .md-field__label { top: 0; font-size: 0.75rem; }
.md-field input:focus + .md-field__label { color: var(--md-link); }

/* ---------- Email body (The Silver Dollar Room) ---------- */
.email { background: #fbf5e9; color: #2b2118; font-family: Georgia, "Times New Roman", serif; }
.email p { margin: 0 0 14px; font-size: 1rem; line-height: 1.6; }
.email a { color: #b5361f; }
.email__banner { background: #000000; text-align: center; padding: 12px 0; }
.email__banner img { display: inline-block; height: 128px; width: auto; }
.email__hero { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 12%; }
.email__feature { padding: 32px 36px 36px; }
.email__kicker { margin: 0 0 8px; font: 700 0.8125rem/1.2 var(--md-font); letter-spacing: 2px; text-transform: uppercase; color: #b5361f; }
.email__headline, .email__section-title { margin: 0 0 16px; font-family: "Roboto Slab", Georgia, serif; font-weight: 800; line-height: 1.15; color: #1a1209; }
.email__headline { font-size: 2rem; }
.email__cta-box { margin-top: 24px; padding: 22px 24px 26px; text-align: center; background: #ffffff; border: 2px dashed #b5361f; border-radius: 6px; }
.email__cta-lead { font: 800 1.25rem/1.3 "Roboto Slab", Georgia, serif !important; margin-bottom: 8px !important; }
.email a.email__button { display: inline-block; margin-top: 6px; padding: 14px 28px; border-radius: 4px; background: #b5361f; color: #ffffff; font: 700 0.9375rem/1 var(--md-font); letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; }
.email a.email__button:hover { background: #962b19; }
.email__weekend { padding: 32px 36px 28px; background: #1a1209; color: #f5ead3; }
.email__section-title { font-size: 1.5rem; text-align: center; color: #f5ead3; margin-bottom: 24px; }
.email__show { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center; margin-bottom: 22px; }
.email__show img { width: 200px; height: 150px; object-fit: cover; border-radius: 4px; display: block; }
.email__show h3 { margin: 0 0 6px; font: 800 1.25rem/1.2 "Roboto Slab", Georgia, serif; }
.email__show p { margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.email .email__when { margin-bottom: 4px; font: 700 0.75rem/1.3 var(--md-font); letter-spacing: 1.5px; text-transform: uppercase; color: #f2b45a; }
.email__footer { padding: 28px 36px 32px; text-align: center; background: #000000; color: #cfc6b4; }
.email__footer p { font-size: 0.875rem; line-height: 1.6; }
.email__footer a { color: #f2b45a; }
.email__footer-logo { height: 72px; width: auto; margin-bottom: 14px; }
.email .email__fine { margin: 18px 0 0; font-size: 0.75rem; color: #8f8776; }

@media (max-width: 560px) {
  .email__feature, .email__weekend, .email__footer { padding-left: 20px; padding-right: 20px; }
  .email__headline { font-size: 1.625rem; }
  .email__show { grid-template-columns: 1fr; }
  .email__show img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}
.email a.email__button--small { margin-top: 12px; padding: 10px 18px; font-size: 0.75rem; letter-spacing: 1.25px; background: #f2b45a; color: #1a1209; }
.email a.email__button--small:hover { background: #e9a23f; }

/* ---------- Sticky header and summary column ---------- */
.campaign-title { position: sticky; top: 0; z-index: 5; }

/* ---------- SMS preview ---------- */
.campaign__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.campaign__sms { width: 100%; max-width: 380px; align-self: center; }
.sms__header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #ffffff; border-bottom: 1px solid var(--md-outline); font-size: 0.8125rem; font-weight: 500; }
.sms__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #000; }
.sms__thread { padding: 16px 20px 24px; }
.sms__time { margin: 0 0 16px; text-align: center; font-size: 0.6875rem; color: #8e8e93; }
.sms__time b { font-weight: 700; }
.sms__image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 15%; border-radius: 20px; margin: 0 0 12px; }
.sms__bubble { position: relative; margin: 0; padding: 12px 16px; border-radius: 20px; background: #e9e9eb; font-size: 1rem; line-height: 1.4; color: #000; overflow-wrap: anywhere; }
.sms__bubble::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 20px; height: 20px; background: #e9e9eb; border-bottom-right-radius: 16px 14px; }
.sms__bubble::after { content: ""; position: absolute; left: -26px; bottom: 0; width: 26px; height: 20px; background: #ffffff; border-bottom-right-radius: 10px; }
.sms__bubble a { color: #0a6cff; }

/* ---------- Message + summary rows ---------- */
.campaign__row { width: 100%; max-width: 1012px; }
.campaign__content { display: grid; grid-template-columns: minmax(0, 700px) 280px; gap: 32px; align-items: start; }
.campaign__main { display: contents; }
.campaign__sms { justify-self: start; align-self: start; min-height: 680px; display: flex; flex-direction: column; }
.campaign__sms .sms__thread { flex: 1; }
.campaign__content:has(.campaign__sms) { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.md-icon--stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.summary-item__title--plain { font-weight: 400; }
.summary-item__title--plain b { font-weight: 500; }
.summary-item__title--plain > span { flex: 1; min-width: 0; }
.summary-heading { display: flex; align-items: center; gap: 12px; margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--md-outline); font-size: 1.125rem; font-weight: 500; line-height: 1.3; letter-spacing: 0.15px; }
.summary-heading .md-icon { color: #5f6368; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; transition: margin 0.3s var(--md-motion-standard); }
.row-heading { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.375rem; font-weight: 500; line-height: 1.25; }
.row-heading__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #f57c00; color: #ffffff; }
.row-heading__icon svg { width: 20px; height: 20px; }

/* ---------- Material switch & excluded state ---------- */
.md-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.1px; color: var(--md-on-surface); user-select: none; }
.md-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.md-switch__track { position: relative; flex: none; width: 52px; height: 32px; border-radius: 16px; border: 2px solid #79747e; background: #e6e0e9; box-sizing: border-box; transition: background 0.2s var(--md-motion-standard), border-color 0.2s var(--md-motion-standard); }
.md-switch__thumb { position: absolute; top: 50%; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: #79747e; transform: translateY(-50%); transition: left 0.2s var(--md-motion-standard), width 0.2s var(--md-motion-standard), height 0.2s var(--md-motion-standard), background 0.2s var(--md-motion-standard); }
.md-switch input:checked ~ .md-switch__track { background: var(--md-link); border-color: var(--md-link); }
.md-switch input:checked ~ .md-switch__track .md-switch__thumb { left: 24px; width: 24px; height: 24px; background: #ffffff; }
.md-switch input:focus-visible ~ .md-switch__track { outline: 3px solid rgba(66, 133, 244, 0.45); outline-offset: 2px; }

/* ---------- Pre-sale closing email ---------- */
.email__deadline { padding: 12px 20px; background: #b5361f; color: #ffffff; text-align: center; font: 700 0.875rem/1.2 var(--md-font); letter-spacing: 2px; text-transform: uppercase; }
.email__price { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 0; }
.email__price-col { padding: 16px; text-align: center; background: #ffffff; border: 1px solid #e3d8c0; border-radius: 6px; }
.email__price-col span { display: block; font: 700 0.75rem/1.3 var(--md-font); letter-spacing: 1.5px; text-transform: uppercase; color: #6b5d48; }
.email__price-col b { display: block; margin: 4px 0; font: 800 2.25rem/1.1 "Roboto Slab", Georgia, serif; color: #1a1209; }
.email__price-col small { font: 400 0.8125rem/1.3 var(--md-font); color: #6b5d48; }
.email__price-col--pre { background: #1a1209; border-color: #1a1209; }
.email__price-col--pre span, .email__price-col--pre small { color: #f2b45a; }
.email__price-col--pre b { color: #ffffff; }
.email__strike { text-decoration: line-through; text-decoration-thickness: 2px; color: #8f8776 !important; }

/* ---------- Dividers and roll-up ---------- */
.campaign__row + .campaign__row { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--md-outline); }
.campaign__collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.3s var(--md-motion-standard); }
.campaign__content { min-height: 0; overflow: clip; padding: 4px; margin: -4px; transition: opacity 0.2s, visibility 0s 0s; }
.campaign__row.is-off .campaign__collapse { grid-template-rows: 0fr; }
.campaign__row.is-off .campaign__content { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.3s; }
.campaign__row.is-off .row-head { margin-bottom: 0; }
.row-heading { transition: opacity 0.2s, filter 0.2s; }
.campaign__row.is-off .row-heading { opacity: 0.45; filter: grayscale(1); }

/* ---------- Header: title / targeting / cost ---------- */
.campaign-title { display: flex; align-items: stretch; padding: 14px clamp(20px, 3vw, 40px); }
.ct-section { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 28px; }
.ct-section--title { flex: 1; min-width: 0; padding-left: 0; }
.ct-section--targeting, .ct-section--cost { border-left: 1px solid var(--md-outline); }
.ct-section--cost { padding-right: 0; }
.ct-sirtitle { display: flex; align-items: center; gap: 6px; margin: 0; font: 500 0.75rem/1.2 var(--md-font); letter-spacing: 1px; text-transform: uppercase; color: var(--md-muted); }
.ct-icon { width: 18px; height: 18px; color: #5f6368; }
.ct-icon--fire { color: #f57c00; }
.ct-heading { margin: 0; font: 500 1.375rem/1.3 var(--md-font); color: var(--md-on-surface); }
.ct-cost span { font-size: 0.875rem; font-weight: 400; color: var(--md-muted); }
.ct-row { display: flex; align-items: center; gap: 16px; }
.md-button--outlined { height: 36px; padding: 0 14px; border: 1px solid #dadce0; border-radius: var(--md-shape-xs); background: transparent; color: var(--md-link); font-size: 0.8125rem; letter-spacing: 1.25px; text-transform: uppercase; }
.md-button--outlined:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }

.md-select { position: relative; }
.md-select__button { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 0; border: 0; border-radius: var(--md-shape-xs); background: transparent; cursor: pointer; }
.md-select__button:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }
.md-select__chevron { width: 24px; height: 24px; color: #5f6368; transition: transform 0.2s var(--md-motion-standard); }
.md-select__button[aria-expanded="true"] .md-select__chevron { transform: rotate(180deg); }
.md-menu { position: absolute; top: calc(100% + 4px); left: -8px; z-index: 20; min-width: 160px; margin: 0; padding: 8px 0; list-style: none; background: #ffffff; border-radius: 4px; box-shadow: var(--md-elevation-3); }
.md-menu[hidden] { display: none; }
.md-menu li { padding: 12px 16px; font-size: 1rem; line-height: 1.2; cursor: pointer; outline: none; }
.md-menu li:hover, .md-menu li:focus { background: rgba(0, 0, 0, 0.06); }
.md-menu li[aria-selected="true"] { color: var(--md-link); font-weight: 500; }

@media (max-width: 860px) {
  .campaign-title { flex-direction: column; gap: 12px; }
  .ct-section { padding: 0; }
  .ct-section--targeting, .ct-section--cost { border-left: 0; border-top: 1px solid var(--md-outline); padding-top: 12px; }
}
.ct-section--title { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
.ct-title-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-fire-big { flex: none; width: 48px; height: 48px; fill: #f57c00; }
.ct-fire-big .inner { fill: #ffb74d; }

/* ---------- Ghost edit button (in the white card headers) ---------- */
.md-button--ghost { width: 32px; height: 32px; padding: 0; gap: 0; border: 1px solid rgba(66, 133, 244, 0.55); border-radius: var(--md-shape-xs); background: transparent; color: var(--md-link); font-size: 0.8125rem; letter-spacing: 1.25px; text-transform: uppercase; }
.md-button--ghost .md-icon { width: 18px; height: 18px; }
.md-button--ghost:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }
.sms__header .md-button--ghost { margin-left: auto; }
.md-card__details { position: relative; }
.md-card__details > .md-button--ghost { position: absolute; top: 12px; right: 16px; }
.md-card__details .details { padding-right: 96px; }
.ct-section--cost { padding-right: 28px; }
.ct-section--send { padding-right: 0; border-left: 1px solid var(--md-outline); }
.md-button--contained.ct-send { width: auto; height: 40px; padding: 0 20px; white-space: nowrap; }
@media (max-width: 860px) {
  .ct-section--cost { padding-right: 0; }
  .ct-section--send { border-left: 0; border-top: 1px solid var(--md-outline); padding-top: 12px; }
  .md-button--contained.ct-send { width: 100%; }
}
.md-menu { min-width: 300px; }
.md-menu li { display: flex; flex-direction: column; gap: 4px; }
.md-menu__label { font-size: 1rem; line-height: 1.2; }
.md-menu__desc { font-size: 0.8125rem; line-height: 1.35; color: var(--md-muted); font-weight: 400; }
.md-menu li[aria-selected="true"] .md-menu__desc { color: var(--md-muted); }

/* ---------- Smaller targeting/cost headings, floating primary button ---------- */
.ct-section--targeting .ct-heading, .ct-section--cost .ct-heading { font-size: 1.125rem; }
.ct-section--cost { padding-right: 0; }
.md-button--contained.md-fab-extended { position: fixed; right: 32px; bottom: 32px; z-index: 15; width: auto; height: 64px; padding: 0 40px; border-radius: 8px; font-size: 1.0625rem; letter-spacing: 1.5px; white-space: nowrap; box-shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12); }
.md-button--contained.md-fab-extended:hover { box-shadow: 0 5px 8px -1px rgba(0,0,0,0.25), 0 8px 14px 0 rgba(0,0,0,0.16), 0 2px 20px 0 rgba(0,0,0,0.12); }
.campaign { padding-bottom: 140px; }
@media (max-width: 700px) {
  .md-button--contained.md-fab-extended { right: 16px; bottom: 16px; height: 56px; padding: 0 28px; }
  .md-snackbar { bottom: 88px; }
}
.md-select__button { width: 144px; justify-content: space-between; }
.md-button--contained.md-fab-extended { transition: opacity 0.2s var(--md-motion-standard), transform 0.2s var(--md-motion-standard), visibility 0s 0s, box-shadow 0.2s; }
.md-button--contained.md-fab-extended.is-hidden { opacity: 0; transform: translateY(16px) scale(0.95); visibility: hidden; pointer-events: none; transition: opacity 0.2s var(--md-motion-standard), transform 0.2s var(--md-motion-standard), visibility 0s 0.2s; }
.md-card__details { padding-bottom: 28px; }

/* ---------- Recipients updating banner ---------- */
.recipients-banner { display: none; align-items: center; justify-content: center; gap: 14px; align-self: stretch; min-height: 56px; padding: 16px; border-radius: var(--md-shape-xs); background: var(--md-link); color: #ffffff; font-size: 1rem; font-weight: 500; letter-spacing: 0.15px; }
.summary-item.is-updating > :not(.recipients-banner) { display: none; }
.summary-item.is-updating > .recipients-banner { display: flex; }
.md-spinner { flex: none; width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #ffffff; border-radius: 50%; animation: md-spin 0.8s linear infinite; }
@keyframes md-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .md-spinner { animation-duration: 2.4s; } }
.recipients-banner { background: #e8f0fe; color: #1a56c4; }
.md-spinner { border-color: rgba(66, 133, 244, 0.25); border-top-color: #4285f4; }

/* ---------- SMS costs dialog ---------- */
.md-dialog { max-height: calc(100vh - 32px); }
.md-dialog--cost { width: min(600px, calc(100vw - 32px)); }
.md-dialog--cost .md-dialog__form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.md-dialog--cost .md-dialog__content { overflow: auto; gap: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.info-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: #e8f0fe; color: #1a3d7c; }
.info-box .md-icon { color: #1a73e8; margin-top: 1px; }
.info-box p { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.cost-options { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; padding: 0; border: 0; min-width: 0; }
.cost-option { border: 1px solid #cfd3d8; border-radius: 8px; transition: border-color 0.15s, background 0.15s; }
.cost-option:has(input[type="radio"]:checked) { border-color: var(--md-link); background: #f4f8ff; box-shadow: inset 0 0 0 1px var(--md-link); }
.cost-option > label { display: flex; align-items: flex-start; gap: 14px; padding: 16px; cursor: pointer; }
.cost-option input[type="radio"] { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--md-link); cursor: pointer; }
.cost-option__text { display: flex; flex-direction: column; gap: 4px; }
.cost-option__text b { font-size: 1rem; font-weight: 500; }
.cost-option__text small { font-size: 0.875rem; line-height: 1.4; color: var(--md-muted); }
.cost-budget { padding: 0 16px 16px 50px; }
.cost-budget[hidden] { display: none; }
.md-field--prefix .md-field__prefix { position: absolute; left: 16px; top: 28px; transform: translateY(-50%); font-size: 1rem; color: #49454f; pointer-events: none; }
.md-field--prefix input { padding-left: 30px; }
.md-field--prefix input:focus { padding-left: 29px; }
.md-field--prefix .md-field__label { background: #f4f8ff; }
.cost-intro { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--md-on-surface); }
.cost-option:has(input[type="radio"]:checked) { border-color: #cfd3d8; background: transparent; box-shadow: none; }
.md-field--prefix .md-field__label { background: #ffffff; }
.cost-option__text--inline { font-size: 1rem; line-height: 1.3; }
.cost-option__text--inline b { font-weight: 500; }
.md-switch input:disabled ~ .md-switch__track { opacity: 0.45; cursor: not-allowed; }
.md-switch:has(input:disabled) { cursor: not-allowed; color: var(--md-muted); }

/* ---------- Customize recipients ---------- */
.campaign, .customize { transition: opacity 0.3s var(--md-motion-standard); }
.campaign.is-fading, .customize.is-fading { opacity: 0; }
.customize[hidden], .campaign[hidden] { display: none; }
.customize { padding: 32px clamp(16px, 3vw, 40px) 64px; }
.rec-card { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--md-outline); border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px 1px rgba(0,0,0,.04); padding: 16px; }
.rec-card__head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.rec-card__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.3; }
.rec-card__head p { margin: 2px 0 0; font-size: 0.875rem; color: var(--md-muted); }
.rec-spark { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: #34c27a; }
.rec-card__close { margin-left: auto; flex: none; width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; cursor: pointer; color: #3c4043; display: grid; place-items: center; }
.rec-card__close:hover { background: rgba(0,0,0,.06); }
.rec-card__close svg, .rec-chip__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rec-chips { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: center; }
.rec-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 8px 0 8px; border: 1px solid #c7cbd1; border-radius: 4px; font-size: 0.8125rem; color: #202124; background: #fff; }
.rec-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-chip__x { flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: #5f6368; cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.rec-chip__x:hover { background: rgba(0,0,0,.08); }
.rec-chip__x svg { width: 14px; height: 14px; }
.rec-add .md-button { text-transform: uppercase; font-size: 0.8125rem; letter-spacing: 0.8px; font-weight: 500; }
.rec-note { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 0.875rem; color: #5f6368; }
.rec-note:last-child { margin-bottom: 4px; }
.rec-note svg { flex: none; width: 18px; height: 18px; fill: #5f6368; stroke: #5f6368; stroke-width: 2; stroke-linecap: round; }
.rec-note a { color: var(--md-link); text-decoration: none; }
.rec-note a:hover { text-decoration: underline; }
@media (max-width: 900px) { .rec-chips { grid-template-columns: repeat(2, 1fr); } }

.rec-card { max-width: 1012px; width: 100%; background: none; border: 0; box-shadow: none; padding: 0; }
.rec-intro { margin: 2px 0 0; font-size: 0.9375rem; color: var(--md-muted); }
.rec-card__head { align-items: center; }
.rec-done { margin-top: 20px; }
.view--campaign.is-customizing .ct-section--targeting, .view--campaign.is-customizing .ct-section--cost { display: none; }
body.is-customizing .md-fab-extended:not(.fab-update) { display: none !important; }
.rec-card__head { margin-bottom: 12px; }

.cust-top { max-width: 1012px; margin: 0 auto 28px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cust-heading { margin: 0 0 6px; font: 500 1.5rem/1.3 var(--md-font); }
.cust-sub { margin: 0; max-width: 560px; font-size: 0.9375rem; line-height: 1.5; color: var(--md-muted); }
.cust-box { flex: none; display: flex; flex-direction: column; gap: 6px; min-width: 240px; padding: 16px 20px; background: #fff; border: 1px solid var(--md-outline); border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px 1px rgba(0,0,0,.04); }
@media (max-width: 760px) { .cust-top { flex-direction: column; align-items: stretch; gap: 16px; } }
.cust-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -4px; font-size: 0.875rem; font-weight: 500; color: var(--md-link); text-decoration: none; }
.cust-back:hover { text-decoration: underline; }
.cust-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.md-menu li { display: grid; grid-template-columns: 24px 1fr; column-gap: 14px; align-items: start; }
.md-menu__text { display: flex; flex-direction: column; gap: 4px; }
.md-menu__icon, .md-select__icon { fill: none; stroke: currentColor; stroke-width: 1.8; color: #5f6368; flex: none; }
.md-menu__icon { width: 24px; height: 24px; margin-top: -2px; }
.md-menu li[aria-selected="true"] .md-menu__icon { color: var(--md-link); }
.md-select__icon { width: 22px; height: 22px; margin-right: 10px; }
.md-select__value { margin-right: auto; }
.md-select__button { width: 184px; }
.md-menu__icon, .md-select__icon { fill: currentColor; stroke: none; }

/* ---------- Targeting tiers (Customize) ---------- */
.tiers { max-width: 1012px; margin: 0 auto; }
.tier + .tier { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--md-outline); }
.tier__collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.3s var(--md-motion-standard); }
.tier__content { min-height: 0; overflow: clip; padding: 4px; margin: -4px; transition: opacity 0.2s, visibility 0s 0s; }
.tier.is-off .tier__collapse { grid-template-rows: 0fr; }
.tier.is-off .tier__content { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.3s; }
.tier.is-off .row-head { margin-bottom: 0; }
.tier .row-heading { transition: opacity 0.2s, filter 0.2s; }
.tier.is-off .row-heading { opacity: 0.45; filter: grayscale(1); }
.artists { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.artist { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; text-align: left; font-family: inherit; background: #fff; border: 1px solid #c7cbd1; border-radius: 4px; color: #202124; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.artist:hover { border-color: #9aa0a6; }
.artist:focus-visible { outline: 2px solid var(--md-link); outline-offset: 2px; }
.artist__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 500; }
.artist__subs { font-size: 0.75rem; color: var(--md-muted); }
.artist[aria-pressed="false"] { background: #eceff1; border-color: #e0e3e6; color: #9aa0a6; }
.artist[aria-pressed="false"] .artist__subs { color: #b0b5ba; }
.tiers-foot { max-width: 1012px; margin: 36px auto 0; }
@media (max-width: 900px) { .artists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.artist { position: relative; padding-right: 34px; }
.artist__x { position: absolute; top: 50%; right: 10px; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; color: #5f6368; transition: transform 0.15s; }
.artist:hover .artist__x { color: #202124; }
.artist[aria-pressed="false"] .artist__x { transform: rotate(45deg); color: #9aa0a6; }

/* Artist cards with photos */
.artist { padding: 0; overflow: clip; gap: 0; }
.artist__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: #dfe3e8; }
.artist__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: filter 0.15s, opacity 0.15s; }
.artist__body { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 12px 12px; min-width: 0; }
.artist .artist__x { top: 8px; right: 8px; margin: 0; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(255,255,255,0.94); box-shadow: 0 1px 3px rgba(0,0,0,.3); color: #3c4043; }
.artist[aria-pressed="false"] .artist__img { filter: grayscale(1); opacity: 0.45; }
.artist[aria-pressed="false"] .artist__media { background: #eceff1; }
.artist[aria-pressed="false"] .artist__x { color: #5f6368; }
.artist__img { position: absolute; inset: 0; }
.artist { align-self: start; }

/* Customize: merged header */
.ct-back { display: none; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #f1f3f4; color: #3c4043; cursor: pointer; place-items: center; transition: background 0.15s; }
.ct-back:hover { background: #e3e6e8; }
.ct-back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ct-h-custom, .ct-section--current { display: none; }
.view--campaign.is-customizing .ct-back { display: grid; }
.view--campaign.is-customizing .ct-fire-big, .view--campaign.is-customizing .ct-h-campaign { display: none; }
.view--campaign.is-customizing .ct-h-custom { display: inline; }
.view--campaign.is-customizing .ct-section--current { display: flex; border-left: 1px solid var(--md-outline); padding-right: 0; }
.ct-section--current .ct-heading { font-size: 1.125rem; }
@media (max-width: 860px) { .view--campaign.is-customizing .ct-section--current { border-left: 0; border-top: 1px solid var(--md-outline); padding-top: 12px; } }
.how { max-width: 1012px; margin: 0 auto 32px; display: flex; align-items: flex-start; gap: 12px; }
.how__spark { flex: none; width: 24px; height: 24px; margin-top: 1px; fill: #34c27a; }
.how__heading { margin: 0 0 4px; font: 500 1.0625rem/1.3 var(--md-font); }
.how__text { margin: 0; max-width: 640px; font-size: 0.9375rem; line-height: 1.5; color: var(--md-muted); }
.customize { padding-top: 28px; }
.how { gap: 14px; }
.how__spark { width: 34px; height: 34px; margin-top: 0; }
.how__heading { font-size: 1.5rem; margin-bottom: 6px; }
.tier .row-heading__icon { background: #80868b; }
.tier .row-heading__icon { background: #fff; color: #202124; box-shadow: inset 0 0 0 1px var(--md-outline); }
.tier .row-heading__icon { background: #202124; color: #fff; box-shadow: none; }

/* Side-shuffle between campaign and Customize */
.view--campaign { overflow-x: clip; }
@keyframes slideOutLeft { to { opacity: 0; transform: translateX(-56px); } }
@keyframes slideOutRight { to { opacity: 0; transform: translateX(56px); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(56px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-56px); } to { opacity: 1; transform: none; } }
.slide-out-left { animation: slideOutLeft 0.22s cubic-bezier(0.4, 0, 1, 1) forwards; }
.slide-out-right { animation: slideOutRight 0.22s cubic-bezier(0.4, 0, 1, 1) forwards; }
.slide-in-right { animation: slideInRight 0.3s var(--md-motion-standard) both; }
.slide-in-left { animation: slideInLeft 0.3s var(--md-motion-standard) both; }
@media (prefers-reduced-motion: reduce) { .slide-out-left, .slide-out-right, .slide-in-left, .slide-in-right { animation-duration: 0.01s; } }
.how__add { margin-left: auto; flex: none; background: #fff; align-self: center; }
.how__add:hover { background: #f4f8ff; }
@media (max-width: 700px) { .how { flex-wrap: wrap; } .how__add { margin-left: 48px; } }
.md-button .md-button__icon { width: 18px; height: 18px; margin: -2px 6px 0 -4px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; vertical-align: middle; }
.ct-section--current .ct-row { display: flex; align-items: center; gap: 16px; }
.md-button .md-button__icon--fill { fill: currentColor; stroke: none; width: 16px; height: 16px; margin-left: -2px; }

/* Add custom group */
.cost-option input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--md-link); cursor: pointer; }
.gt-icon { flex: none; width: 24px; height: 24px; margin-top: 0; fill: none; stroke: #5f6368; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.md-button--text:disabled { color: rgba(0,0,0,.38); cursor: default; pointer-events: none; }
.artist__media--icon { display: grid; place-items: center; background: #eceff1; }
.artist__media--icon svg.ga-icon { width: 38px; height: 38px; fill: none; stroke: #5f6368; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.artist__type { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; color: var(--md-muted); }
.artist[aria-pressed="false"] .artist__type { color: #b0b5ba; }
.artist[aria-pressed="false"] .ga-icon { stroke: #b0b5ba; }

/* Icon cards (custom group): grey circle floated left */
.artist--icon { flex-direction: row; align-items: center; gap: 12px; padding: 12px 40px 12px 12px; }
.artist--icon .artist__circle { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e3e6e8; }
.artist--icon .ga-icon { width: 24px; height: 24px; fill: none; stroke: #5f6368; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.artist--icon .artist__body { padding: 0; flex: 1; }
.artist--icon .artist__x { position: absolute; top: 50%; right: 10px; margin-top: -9px; width: 18px; height: 18px; padding: 0; background: none; box-shadow: none; border-radius: 0; color: #5f6368; }
.artist--icon[aria-pressed="false"] .artist__circle { background: #eceff1; }
.artist--icon[aria-pressed="false"] .ga-icon { stroke: #b0b5ba; }
.md-button--contained.md-fab-extended.fab-update { display: none; }
body.is-customizing .md-button--contained.md-fab-extended.fab-update { display: inline-flex; }
.customize { padding-bottom: 140px; }
.tier--custom .group-remove { margin-left: auto; }
.tier--custom .group-name { min-width: 0; overflow-wrap: anywhere; }
.tier--custom .group-remove { width: auto; height: 36px; padding: 0 14px 0 10px; gap: 8px; border-color: rgba(217, 48, 37, 0.55); color: #d93025; font-size: 0.8125rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.tier--custom .group-remove:hover { background: rgba(217, 48, 37, 0.06); }
.tier--custom .group-remove:focus-visible { outline-color: #d93025; }
.md-dialog--small { width: min(420px, calc(100vw - 32px)); }
.md-menu li[hidden] { display: none; }
.md-fab-extended .md-fab__clock { width: 24px; height: 24px; margin: 0 10px 0 -6px; stroke-width: 2; }
.md-button--contained.md-fab-extended { height: 48px; padding: 0 28px; font-size: 0.9375rem; right: 28px; bottom: 28px; }
.md-fab-extended .md-fab__clock { width: 20px; height: 20px; margin: 0 8px 0 -4px; }
@media (max-width: 600px) { .md-button--contained.md-fab-extended { right: 16px; bottom: 16px; } }

/* Schedule */
.sch-list { display: flex; flex-direction: column; gap: 10px; }
.sch-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid #cfd3d8; border-radius: 8px; }
.sch-item .row-heading__icon { width: 36px; height: 36px; flex: none; }
.sch-item__name { flex: 1; min-width: 0; font-size: 1rem; font-weight: 500; }
.sch-field { display: flex; flex-direction: column; gap: 3px; font-size: 0.75rem; color: var(--md-muted); }
.sch-field input { font: inherit; font-size: 0.9375rem; color: var(--md-on-surface); padding: 7px 8px; border: 1px solid #c7cbd1; border-radius: 4px; background: #fff; }
.sch-field input:focus { outline: 2px solid var(--md-link); outline-offset: -1px; border-color: transparent; }
.sch-empty { margin: 0; color: var(--md-muted); }
@media (max-width: 560px) { .sch-item { flex-wrap: wrap; } .sch-item__name { flex-basis: calc(100% - 60px); } }
.schedule-bar { position: fixed; right: 28px; bottom: 28px; z-index: 15; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 8px 0 16px; background: #fff; border: 1px solid var(--md-outline); border-radius: 8px; box-shadow: var(--md-elevation-3); font-size: 0.9375rem; color: var(--md-on-surface); }
.schedule-bar[hidden] { display: none; }
.schedule-bar .md-icon { color: #5f6368; flex: none; }
.schedule-bar__edit .md-button__icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body.is-scheduled [data-action="schedule-send"].md-fab-extended { display: none !important; }
body.is-customizing .schedule-bar { display: none !important; }
@media (max-width: 600px) { .schedule-bar { right: 16px; left: 16px; bottom: 16px; height: auto; min-height: 48px; padding: 6px 8px 6px 14px; } }

/* Flashy schedule bar entrance */
@keyframes barPop {
  0% { opacity: 0; transform: translateX(40px) scale(0.5); clip-path: inset(0 0 0 72% round 24px); box-shadow: 0 0 0 0 rgba(66,133,244,0.6); }
  45% { opacity: 1; transform: translateX(-6px) scale(1.06); clip-path: inset(0 0 0 0 round 8px); box-shadow: 0 0 0 0 rgba(66,133,244,0.55); }
  70% { transform: translateX(2px) scale(0.99); box-shadow: 0 0 0 14px rgba(66,133,244,0); }
  100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 8px); box-shadow: var(--md-elevation-3); }
}
@keyframes clockSpin { from { transform: rotate(-360deg) scale(0.4); } to { transform: none; } }
@keyframes barText { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes barBump { 0% { transform: scale(1); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
.schedule-bar.is-entering { animation: barPop 0.75s cubic-bezier(0.22, 1.2, 0.36, 1) backwards; transform-origin: right center; }
.schedule-bar.is-entering .md-icon { animation: clockSpin 0.8s cubic-bezier(0.22, 1.2, 0.36, 1) 0.1s both; }
.schedule-bar.is-entering .schedule-bar__text, .schedule-bar.is-entering .schedule-bar__edit { animation: barText 0.45s ease-out 0.3s both; }
.schedule-bar.is-bumping { animation: barBump 0.35s ease-out; transform-origin: right center; }
.confetti { position: fixed; z-index: 30; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; opacity: 0; animation: confetti 0.95s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(0.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .schedule-bar.is-entering, .schedule-bar.is-entering * , .schedule-bar.is-bumping, .confetti { animation: none !important; } }

/* ---------- Loading transition ---------- */
.view--loading { justify-content: center; transition: opacity 0.6s ease; }
.view--loading.is-leaving { opacity: 0; }
.view__scrim--loading { background: radial-gradient(ellipse at center, rgba(10,10,14,0.72) 0%, rgba(0,0,0,0.9) 100%); }
.loader { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 36px; padding: 32px 24px; color: #fff; text-align: center; animation: loaderIn 0.7s var(--md-motion-standard) both; }
@keyframes loaderIn { from { opacity: 0; transform: scale(0.92) translateY(12px); } }
.loader__ring { position: relative; width: 300px; height: 300px; flex: none; }
.loader__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.loader__track { fill: none; stroke: rgba(255,255,255,0.22); stroke-width: 6; }
.loader__progress { fill: none; stroke: #f57c00; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 841.9; stroke-dashoffset: 841.9; filter: drop-shadow(0 0 8px rgba(245,124,0,0.7)); }
.loader__photo { position: absolute; inset: 28px; border-radius: 50%; overflow: hidden; border: 4px solid rgba(255,255,255,0.92); box-shadow: 0 8px 32px rgba(0,0,0,0.5); animation: loaderPulse 2.4s ease-in-out infinite; }
.loader__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
@keyframes loaderPulse { 50% { transform: scale(1.025); } }
.loader__spin { position: absolute; inset: 0; transform: rotate(0deg); }
.loader__knob { position: absolute; top: 16px; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #f57c00; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(0,0,0,0.35), 0 4px 14px rgba(245,124,0,0.6); }
.loader__icon { grid-area: 1 / 1; width: 26px; height: 26px; opacity: 0; transform: scale(0.3) rotate(-90deg); transition: opacity 0.25s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.loader__icon.is-active { opacity: 1; transform: none; }
.loader__stages { display: grid; width: min(480px, 100%); min-height: 132px; }
.loader__stage { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.5s var(--md-motion-standard); pointer-events: none; }
.loader__stage.is-active { opacity: 1; transform: none; }
.loader__stage h2 { margin: 0 0 10px; font-size: 1.625rem; font-weight: 500; line-height: 1.25; }
.loader__stage p { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: rgba(255,255,255,0.86); }
.loader__stage b { color: #fff; font-weight: 700; }
.loader__dots { display: flex; gap: 8px; }
.loader__dots span { width: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); transition: background 0.4s; }
.loader__dots span.is-done { background: #f57c00; }
@keyframes viewIn { from { opacity: 0; } }
.view.view-enter { animation: viewIn 0.7s ease both; }
@media (max-width: 480px) { .loader__ring { transform: scale(0.82); margin: -26px 0; } }
@media (prefers-reduced-motion: reduce) { .loader, .loader__photo { animation: none; } }

/* Loading: white, side-by-side layout */
.view--loading { background: #fff; }
.loader { flex-direction: row; align-items: center; gap: clamp(32px, 6vw, 72px); color: var(--md-on-surface); text-align: left; max-width: 980px; }
.loader__side { display: flex; flex-direction: column; gap: 28px; width: min(440px, 100%); }
.loader__stages { width: 100%; min-height: 140px; }
.loader__stage h2 { color: #202124; }
.loader__stage p { color: #5f6368; }
.loader__stage b { color: #202124; }
.loader__track { stroke: #e3e6e8; }
.loader__progress { filter: drop-shadow(0 0 6px rgba(245,124,0,0.35)); }
.loader__photo { border-color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.22); }
.loader__knob { box-shadow: 0 0 0 4px #fff, 0 4px 14px rgba(245,124,0,0.45); }
.loader__icon { transform: scale(0.3); transition: opacity 0.25s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.loader__icon.is-active { transform: none; }
.loader__dots span { background: #e3e6e8; }
@media (max-width: 860px) { .loader { flex-direction: column; gap: 28px; } .loader__side { width: min(440px, 100%); } }
