/* ==========================================================================
   Eternal Timekeeper: Memory Creation Wizard
   One responsive stylesheet for desktop and phone (breakpoint: 960px).
   Colors and fonts come from the Eternal Timekeeper Brand Guide.
   Load fonts in <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap" rel="stylesheet">
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand guide palette */
  --etk-cream: #F8F5F1;          /* Background / Cream: page background */
  --etk-charcoal: #2D2D2D;       /* Foreground / Charcoal: primary text */
  --etk-gold: #C4781C;           /* Primary / Gold: decorative accents, icons, focus ring */
  --etk-champagne: #F6EADE;      /* Soft warm highlights: side panel, info boxes */
  --etk-cream-light: #FAF8F4;    /* Subtle surface tint */
  --etk-secondary: #EAE6E0;      /* Secondary surfaces */
  --etk-muted: #E4E1DB;          /* Muted surfaces, card borders */
  --etk-muted-fg: #666666;       /* Secondary text, captions */
  --etk-border: #D7D2CA;         /* Dividers */
  --etk-destructive: #EE4343;    /* Errors (icons / fills) */

  /* Accessibility-adjusted shades (WCAG AA 4.5:1 for normal text).
     #C4781C with white text is ~3.5:1, so text-bearing elements use deeper golds. */
  --etk-gold-button: #A8620F;    /* Button fills with white text (4.75:1) */
  --etk-gold-text: #8F5410;      /* Links, labels, gold text on cream/white */
  --etk-gold-text-hover: #6E400B;
  --etk-input-border: #B5ADA2;   /* Input outlines: more visible than --etk-border */
  --etk-required: #B83232;       /* "Required" text, error text */
  --etk-success: #1E7A45;        /* "All changes saved", "Looks good" */
  --etk-surface: #FFFFFF;        /* Cards and form fields sit on white */
  --etk-chip-border: #E3C9A6;
  --etk-dashed: #D9B98F;

  --etk-font-heading: "Playfair Display", Georgia, serif;
  --etk-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --etk-radius-sm: 10px;
  --etk-radius: 14px;
  --etk-radius-lg: 16px;
  --etk-radius-pill: 999px;
  --etk-shadow-pop: 0 6px 20px rgba(45, 45, 45, 0.08);
  --etk-focus: 0 0 0 3px rgba(196, 120, 28, 0.35);
  --etk-tap: 44px;               /* Minimum touch target */
}

/* ---------- 2. Base ---------- */
.etk-wizard, .etk-wizard * { box-sizing: border-box; }
.etk-wizard {
  margin: 0;
  min-height: 100vh;
  background: var(--etk-cream);
  color: var(--etk-charcoal);
  font-family: var(--etk-font-body);
  font-size: 16px;
  line-height: 1.5;
}
.etk-wizard h1, .etk-wizard h2, .etk-wizard h3 {
  font-family: var(--etk-font-heading);
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}
/* Italic in Playfair is reserved for emphasis: <h1>Tell Margaret's <em>story</em></h1> */
.etk-wizard h1 em, .etk-wizard h2 em { font-style: italic; }
.etk-wizard a { color: var(--etk-gold-text); }
.etk-wizard a:hover { color: var(--etk-gold-text-hover); }
.etk-wizard :focus-visible { outline: none; box-shadow: var(--etk-focus); border-radius: 6px; }
.etk-wizard [tabindex="-1"]:focus { box-shadow: none; } /* headings focused by script for screen readers */
.etk-wizard p { margin: 0; }
/* The `hidden` attribute must always win over component display rules (choice panels, pin states). */
.etk-wizard [hidden] { display: none !important; }
.etk-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Header & footer ---------- */
.etk-header {
  max-width: 1280px; margin: 0 auto; padding: 24px 40px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.etk-logo img { height: 64px; width: auto; display: block; }
.etk-nav { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; font-size: 15px; }
.etk-nav a { color: var(--etk-charcoal); text-decoration: none; }
.etk-menu-btn { display: none; }

/* Shared site header (partials/_site_header.html): wizard, My memorials, Sign in */
.etk-site-header { max-width: none; width: 100%; margin: 0; padding: 0; background: var(--etk-surface); border-bottom: 1px solid var(--etk-muted); display: block; }
.etk-site-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 18px 40px;
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between;
}
.etk-site-header .etk-logo img { height: 56px; }
.etk-site-nav { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; font-size: 15px; }
.etk-wizard .etk-site-nav a { color: var(--etk-charcoal); text-decoration: none; padding: 10px 2px; border-bottom: 3px solid transparent; display: inline-flex; align-items: center; gap: 8px; }
.etk-wizard .etk-site-nav a:hover { color: var(--etk-gold-text); }
.etk-wizard .etk-site-nav a.is-active { color: var(--etk-gold-text); font-weight: 700; border-bottom-color: var(--etk-gold-button); }
.etk-signout-form { margin: 0; }
.etk-signout {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--etk-charcoal);
  background: transparent; border: 1px solid var(--etk-border); border-radius: var(--etk-radius-pill);
}
.etk-signout:hover { border-color: var(--etk-gold-button); color: var(--etk-gold-text); }

.etk-footer { border-top: 1px solid var(--etk-muted); }
.etk-footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 40px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; font-size: 15px;
}
.etk-footer__inner a { color: var(--etk-charcoal); text-decoration: none; }
.etk-footer__inner img { height: 52px; width: auto; display: block; }
.etk-footer__bar { background: var(--etk-charcoal); color: var(--etk-cream); font-size: 13px; padding: 20px 40px; text-align: right; }

/* ---------- 4. Progress: desktop stepper + phone step bar ---------- */
.etk-stepper { max-width: 1280px; margin: 0 auto; padding: 16px 40px 48px; overflow-x: auto; }
.etk-stepper ol {
  list-style: none; margin: 0; padding: 0; min-width: 820px;
  display: grid; grid-template-columns: repeat(9, minmax(90px, 1fr));
}
.etk-stepper li { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.etk-stepper a { text-decoration: none; color: inherit; display: contents; }
.etk-stepper__dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: var(--etk-surface); border: 2px solid var(--etk-border); color: var(--etk-muted-fg);
}
.etk-stepper__label { font-size: 14px; line-height: 1.3; color: var(--etk-muted-fg); }
.etk-stepper li.is-done .etk-stepper__dot { background: var(--etk-gold-button); border-color: var(--etk-gold-button); color: #fff; }
.etk-stepper li.is-current .etk-stepper__dot { background: var(--etk-surface); border: 3px solid var(--etk-gold-button); color: var(--etk-gold-text); }
.etk-stepper li.is-current .etk-stepper__label { font-weight: 700; color: var(--etk-gold-text); }

.etk-stepbar { display: none; }  /* phone only, see section 12 */

/* ---------- 5. Two-column step layout ---------- */
.etk-layout { border-top: 1px solid var(--etk-muted); display: flex; flex-wrap: wrap; }
.etk-panel {
  flex: 1 1 360px; background: var(--etk-champagne); color: var(--etk-charcoal);
  padding: 72px 56px;
}
.etk-panel__inner { max-width: 460px; margin-left: auto; display: flex; flex-direction: column; gap: 20px; }
.etk-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.etk-panel h1 { font-size: 34px; line-height: 1.2; }
.etk-panel__intro { font-size: 16px; line-height: 1.65; }
.etk-panel__tip {
  background: var(--etk-surface); border: 1px solid #E8D5BE; border-radius: 12px;
  padding: 20px 22px; font-size: 15px; line-height: 1.6;
  display: flex; flex-direction: column; gap: 8px;
}
.etk-panel__tip > strong:first-child { display: block; }

.etk-content { flex: 999 1 560px; min-width: 0; padding: 56px 56px 72px; }
.etk-content__inner { max-width: 760px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- 6. Cards, badges, info boxes ---------- */
.etk-card {
  background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: var(--etk-radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 20px;
}
.etk-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.etk-card__head h2 { font-size: 18px; }
.etk-card__lead { font-size: 15px; line-height: 1.55; color: var(--etk-muted-fg); }
.etk-badge { font-size: 13px; font-weight: 600; color: var(--etk-muted-fg); }
.etk-badge--required { color: var(--etk-required); }

.etk-info {
  background: var(--etk-champagne); border-radius: 12px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55;
}
.etk-info svg { flex: none; margin-top: 2px; }

/* ---------- 7. Form fields ---------- */
.etk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.etk-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.etk-label { font-size: 14px; font-weight: 600; color: var(--etk-gold-text); }
.etk-label .etk-optional { font-weight: 500; color: var(--etk-muted-fg); }
.etk-input, .etk-select, .etk-textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px prevents iOS zoom on focus */
  color: var(--etk-charcoal); background: var(--etk-surface);
  border: 1px solid var(--etk-input-border); border-radius: var(--etk-radius-sm);
  padding: 14px 16px; min-height: 52px;
}
.etk-select { padding: 13px 12px; }
.etk-input::placeholder, .etk-textarea::placeholder { color: #8A847C; }
.etk-input:focus, .etk-select:focus, .etk-textarea:focus { outline: none; border-color: var(--etk-gold); box-shadow: var(--etk-focus); }
.etk-field.is-valid .etk-input { border: 2px solid #2E9B5F; }
.etk-field.has-error .etk-input, .etk-field.has-error .etk-select { border: 2px solid var(--etk-required); }
.etk-hint { font-size: 13px; color: var(--etk-muted-fg); }
.etk-valid-msg { font-size: 13px; font-weight: 600; color: var(--etk-success); }
.etk-error-msg { font-size: 13px; font-weight: 600; color: var(--etk-required); }

/* Date: Month / Day / Year. min-width:0 on the fieldset is REQUIRED,
   otherwise fieldsets refuse to shrink and the Year box overflows on phones. */
.etk-date { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.etk-date legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--etk-gold-text); }
.etk-date__parts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 8px; }
.etk-date__part { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.etk-date__part label { font-size: 12px; color: var(--etk-muted-fg); }
.etk-date__part .etk-input, .etk-date__part .etk-select { padding-left: 10px; padding-right: 8px; }

/* Native disclosure for optional groups ("More about their life") */
.etk-disclosure { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); }
.etk-disclosure > summary {
  list-style: none; cursor: pointer; padding: 16px 18px; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.etk-disclosure > summary::-webkit-details-marker { display: none; }
.etk-disclosure__title { font-size: 16px; font-weight: 700; display: block; }
.etk-disclosure__sub { font-size: 13px; color: var(--etk-muted-fg); display: block; }
.etk-disclosure__chev { transition: transform .2s; flex: none; }
.etk-disclosure[open] .etk-disclosure__chev { transform: rotate(180deg); }
.etk-disclosure__body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 960px) {
  /* On desktop the optional group is shown open by default (add `open` in the template). */
}

/* Repeatable rows (schools, jobs, family, videos, songs) */
.etk-repeat { display: flex; flex-direction: column; gap: 12px; }
.etk-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.etk-row > .etk-input, .etk-row > .etk-select { flex: 1 1 160px; min-width: 0; width: auto; }
.etk-row[hidden] { display: none; }

/* ---------- 8. Buttons ---------- */
.etk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  min-height: 52px; padding: 14px 32px; border-radius: var(--etk-radius-pill); border: 0;
}
/* `.etk-wizard` prefix so <a class="etk-btn …"> beats the generic `.etk-wizard a` link color. */
.etk-wizard .etk-btn--primary { background: var(--etk-gold-button); color: #fff; }
.etk-wizard .etk-btn--primary:hover { background: #93550C; color: #fff; }
.etk-wizard .etk-btn--secondary { background: var(--etk-surface); color: var(--etk-gold-text); border: 2px solid var(--etk-gold-button); font-weight: 600; }
.etk-btn--ghost { background: transparent; color: var(--etk-gold-text); font-weight: 600; padding: 12px 4px; min-height: var(--etk-tap); }
.etk-btn--add { background: transparent; color: var(--etk-gold-text); font-weight: 600; font-size: 15px; padding: 8px 0; min-height: var(--etk-tap); align-self: flex-start; }
.etk-btn--block { width: 100%; }
.etk-btn--square { border-radius: var(--etk-radius-sm); }
.etk-icon-btn {
  width: var(--etk-tap); height: var(--etk-tap); flex: none; border-radius: var(--etk-radius-sm);
  border: 1px solid var(--etk-muted); background: var(--etk-surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.etk-btn[disabled], .etk-icon-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Step actions: Back / Skip / Save & continue */
.etk-actions {
  border-top: 1px solid var(--etk-muted); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.etk-actions__right { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.etk-saved { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--etk-success); }
.etk-saved[data-state="saving"] { color: var(--etk-muted-fg); }
.etk-saved[data-state="error"] { color: var(--etk-required); }

/* ---------- 9. Choice cards (Step 7), built on real radio inputs ---------- */
.etk-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.etk-choice { position: relative; display: block; cursor: pointer; }
.etk-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.etk-choice__card {
  height: 100%; min-height: 150px; padding: 20px; border-radius: var(--etk-radius);
  background: var(--etk-surface); border: 2px solid var(--etk-muted);
  display: flex; flex-direction: column; gap: 8px;
}
.etk-choice__title { font-size: 17px; font-weight: 700; }
.etk-choice__desc { font-size: 14px; line-height: 1.5; color: var(--etk-muted-fg); }
.etk-choice input:checked + .etk-choice__card { background: var(--etk-champagne); border-color: var(--etk-gold-button); box-shadow: 0 0 0 3px rgba(196, 120, 28, .15); }
.etk-choice input:focus-visible + .etk-choice__card { box-shadow: var(--etk-focus); }

/* ---------- 10. Media & lists ---------- */
.etk-dropzone {
  min-height: 170px; border-radius: var(--etk-radius-lg); border: 2px dashed var(--etk-dashed);
  background: var(--etk-champagne); color: var(--etk-gold-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px; text-align: center; cursor: pointer; font: inherit;
}
.etk-dropzone.is-dragover { border-color: var(--etk-gold-button); background: #F1DEC8; }
.etk-dropzone__title { font-size: 17px; font-weight: 700; }
.etk-dropzone__sub { font-size: 14px; color: var(--etk-muted-fg); }

.etk-tabs { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--etk-muted); overflow-x: auto; }
.etk-tab { flex: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--etk-muted-fg); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; min-height: var(--etk-tap); cursor: pointer; }
.etk-tab[aria-selected="true"] { color: var(--etk-gold-text); font-weight: 700; border-bottom-color: var(--etk-gold-button); }

.etk-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.etk-photo { position: relative; aspect-ratio: 1 / 1; border-radius: var(--etk-radius-sm); overflow: hidden; background: var(--etk-secondary); }
.etk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etk-photo.is-cover { outline: 3px solid var(--etk-gold-button); outline-offset: 2px; }
.etk-photo__badge { position: absolute; left: 6px; top: 6px; background: var(--etk-gold-button); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 6px; }
.etk-photo__progress { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.85); }
.etk-photo__progress > span { display: block; height: 100%; border-radius: 3px; background: var(--etk-gold-button); }

.etk-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 12px;
}
.etk-item__thumb { flex: none; width: 48px; height: 48px; border-radius: 6px; background: var(--etk-secondary); object-fit: cover; }
.etk-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.etk-item__title { font-size: 15px; font-weight: 600; }
.etk-item__meta { font-size: 13px; color: var(--etk-muted-fg); }
.etk-video-thumb { flex: 0 0 200px; aspect-ratio: 16 / 9; border-radius: var(--etk-radius-sm); background: #2A2F3A; object-fit: cover; }

.etk-results { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 12px; box-shadow: var(--etk-shadow-pop); overflow: hidden; }
.etk-results .etk-item { border: 0; border-bottom: 1px solid var(--etk-secondary); border-radius: 0; }

.etk-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.etk-chip { font: inherit; font-size: 14px; font-weight: 600; color: var(--etk-gold-text); background: var(--etk-champagne); border: 1px solid var(--etk-chip-border); border-radius: var(--etk-radius-pill); padding: 10px 16px; min-height: var(--etk-tap); cursor: pointer; }

.etk-numbered { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
/* Number badge is absolutely positioned so bold words inside the text don't split into columns. */
.etk-numbered li { position: relative; padding-left: 40px; min-height: 28px; font-size: 14px; line-height: 1.5; }
.etk-numbered li::before {
  counter-increment: etk; content: counter(etk);
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--etk-champagne); color: var(--etk-gold-text); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.etk-numbered { counter-reset: etk; }
/* Big instruction cards on the phone pin page */
.etk-numbered--cards { grid-template-columns: 1fr; width: 100%; text-align: left; gap: 14px; }
.etk-numbered--cards li { background: var(--etk-champagne); border-radius: 12px; padding: 16px 16px 16px 62px; font-size: 16px; line-height: 1.4; }
.etk-numbered--cards li::before { left: 16px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; background: var(--etk-gold-button); color: #fff; }

.etk-qr { padding: 14px; border: 1px solid var(--etk-muted); border-radius: 12px; background: #fff; width: max-content; }
.etk-qr svg { display: block; width: 180px; height: 180px; }

.etk-map { position: relative; height: 300px; border-radius: 12px; overflow: hidden; background: var(--etk-secondary); }
.etk-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #E0A33B; display: inline-block; }

.etk-editor { background: var(--etk-surface); border: 1px solid var(--etk-input-border); border-radius: var(--etk-radius); overflow: hidden; }
.etk-editor__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--etk-champagne); border-bottom: 1px solid var(--etk-muted); }
.etk-editor__toolbar button { font: inherit; font-size: 14px; font-weight: 600; color: var(--etk-charcoal); background: transparent; border: 0; border-radius: 8px; padding: 10px 14px; min-height: var(--etk-tap); cursor: pointer; }
.etk-editor__toolbar button[aria-pressed="true"] { background: #fff; }
.etk-editor__area { min-height: 420px; padding: 28px 32px; font-size: 17px; line-height: 1.75; outline: none; }
.etk-editor__foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--etk-muted); font-size: 13px; color: var(--etk-muted-fg); }

/* Step 7: "Is X resting at <cemetery>?" */
.etk-suggestion { background: var(--etk-champagne); border: 2px solid var(--etk-dashed); border-radius: var(--etk-radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.etk-suggestion__kicker { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--etk-gold-text); }
.etk-suggestion__q { font-family: var(--etk-font-heading); font-size: 22px; line-height: 1.35; }
.etk-suggestion__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.etk-suggestion-done { background: var(--etk-cream-light); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
@media (max-width: 959.98px) { .etk-suggestion__actions .etk-btn { width: 100%; } }

.etk-preview-text { font-family: var(--etk-font-heading); font-size: 17px; line-height: 1.7; }

/* ---------- 11. Bare (no-login) phone pages: pin link ---------- */
.etk-bare { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--etk-cream); }
.etk-bare__header { padding: 18px 20px; display: flex; justify-content: center; border-bottom: 1px solid var(--etk-muted); }
.etk-bare__header img { height: 36px; width: auto; }
.etk-bare__main { flex: 1; padding: 32px 24px 24px; display: flex; flex-direction: column; gap: 24px; }
.etk-bare__foot { padding: 16px 24px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.etk-bare .etk-map { height: 55vh; border-radius: 0; margin: 0 -24px; }
.etk-big-btn { min-height: 64px; font-size: 18px; }

/* ---------- 12. Phone layout (< 960px) ---------- */
@media (max-width: 959.98px) {
  .etk-header { padding: 12px 20px; border-bottom: 1px solid var(--etk-muted); }
  .etk-logo img { height: 40px; }
  .etk-nav { display: none; }
  .etk-nav.is-open { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 4px; }
  .etk-nav.is-open a, .etk-nav.is-open .etk-btn { min-height: var(--etk-tap); display: flex; align-items: center; }
  .etk-site-header { padding: 0; }
  .etk-site-header__inner { padding: 12px 20px; }
  .etk-site-header .etk-logo img { height: 40px; }
  .etk-site-nav--public { gap: 16px; }
  .etk-nav.etk-site-nav.is-open { padding: 8px 0 4px; border-top: 1px solid var(--etk-muted); }
  .etk-wizard .etk-nav.is-open a { border-bottom: 0; padding: 0 4px; }
  .etk-nav.is-open .etk-signout { width: 100%; justify-content: center; min-height: var(--etk-tap); margin-top: 8px; }
  .etk-menu-btn { display: inline-flex; width: var(--etk-tap); height: var(--etk-tap); border: 0; background: var(--etk-secondary); border-radius: var(--etk-radius-sm); align-items: center; justify-content: center; cursor: pointer; }

  .etk-stepper { display: none; }
  .etk-stepbar { display: block; position: sticky; top: 0; z-index: 10; background: var(--etk-champagne); }
  .etk-stepbar__row { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
  .etk-stepbar__arrow { width: var(--etk-tap); height: var(--etk-tap); display: inline-flex; align-items: center; justify-content: center; color: var(--etk-gold-text); }
  .etk-stepbar__arrow[aria-disabled="true"] { opacity: .3; pointer-events: none; }
  .etk-stepbar__center { text-align: center; }
  .etk-stepbar__count { font-size: 12px; font-weight: 600; color: var(--etk-muted-fg); letter-spacing: 1px; text-transform: uppercase; }
  .etk-stepbar__name { font-size: 16px; font-weight: 700; color: var(--etk-gold-text); }
  .etk-stepbar__track { height: 4px; background: var(--etk-muted); }
  .etk-stepbar__fill { height: 4px; background: var(--etk-gold-button); }

  .etk-layout { border-top: 0; flex-direction: column; }
  /* The side panel becomes a simple intro at the top of the step */
  .etk-panel { flex: none; background: transparent; padding: 24px 20px 0; }
  .etk-panel__inner { max-width: none; margin: 0; gap: 12px; }
  .etk-panel .etk-eyebrow { display: none; }       /* step count lives in the step bar */
  .etk-panel h1 { font-size: 24px; line-height: 1.25; }
  .etk-panel__intro { font-size: 15px; line-height: 1.55; color: var(--etk-muted-fg); }
  .etk-panel__tip { background: var(--etk-champagne); border: 0; padding: 14px 16px; font-size: 14px; }
  .etk-panel__preview { display: none; }           /* Preview lives in the menu on phones */

  .etk-content { flex: none; padding: 20px 20px 24px; }
  .etk-content__inner { gap: 20px; }
  .etk-card { padding: 18px; gap: 16px; }
  .etk-grid { grid-template-columns: 1fr; }
  .etk-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .etk-video-thumb { flex-basis: 100%; }
  .etk-editor__area { min-height: 300px; padding: 18px; font-size: 16px; }
  .etk-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .etk-chip { flex: none; }

  /* Sticky bottom action bar: Skip + Save & continue. Back is the arrow in the step bar. */
  .etk-actions {
    position: sticky; bottom: 0; z-index: 10; margin: 0 -20px -24px;
    background: var(--etk-cream); border-top: 1px solid var(--etk-muted);
    padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  }
  .etk-actions__back, .etk-actions .etk-saved { display: none; }
  .etk-actions__right { width: 100%; flex-wrap: nowrap; gap: 12px; }
  .etk-actions__right .etk-btn { flex: 1.3; padding-left: 12px; padding-right: 12px; }
  .etk-actions__right .etk-btn--ghost { flex: 1; border: 2px solid var(--etk-gold-button); border-radius: var(--etk-radius-pill); min-height: 52px; }
  .etk-saved--inline { display: inline-flex; }     /* phone shows the saved note inside the form instead */
  .etk-hide-phone { display: none; }

  .etk-footer__inner { padding: 24px 20px; gap: 16px; }
  .etk-footer__bar { text-align: center; padding: 16px 20px; }
}
@media (min-width: 960px) { .etk-saved--inline { display: none; } }

/* Show/hide helpers for the few places desktop and phone differ in content (Step 7). */
.etk-only-phone, .etk-only-phone-inline { display: none !important; }
@media (max-width: 959.98px) {
  .etk-only-phone { display: flex !important; }
  .etk-only-phone-inline { display: inline !important; }
  .etk-only-desktop, .etk-only-desktop-block, .etk-only-desktop-inline { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .etk-wizard * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Additions for the Django 1.11 port (2026-11)
   ========================================================================== */
.etk-stepper__link { display: contents; color: inherit; }
.etk-flash { border-radius: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.5; background: var(--etk-champagne); }
.etk-flash--success { background: #E3F3E9; color: #14532F; }
.etk-flash--error { background: #FBE7E7; color: #7A1F1F; }
.etk-flash--warning { background: #FFF4DB; color: #6B4A00; }

/* My memorials resting-place reminder (partials/_dashboard_resting_prompt.html) */
.etk-reminder { flex-direction: row; gap: 18px; align-items: flex-start; padding: 22px 24px; }
.etk-reminder__icon { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--etk-champagne); display: flex; align-items: center; justify-content: center; color: var(--etk-gold-button); }
.etk-reminder__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.etk-reminder__eyebrow { color: var(--etk-gold-text); font-size: 12px; }
.etk-reminder__q { font-family: var(--etk-font-heading); font-size: 21px; line-height: 1.35; }
.etk-reminder__q em { font-style: italic; }
.etk-reminder__hint { font-size: 14px; }
.etk-reminder__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 0; }
.etk-reminder__actions .etk-btn { min-height: 44px; padding: 0 20px; }
.etk-reminder__actions .etk-reminder__later { color: var(--etk-muted-fg); padding: 0 8px; }
@media (max-width: 959.98px) { .etk-reminder { flex-direction: column; padding: 18px; } }

/* ---------- Layout helpers used by the step templates ---------- */
.etk-stack { display: flex; flex-direction: column; gap: 24px; }
.etk-stack--tight { gap: 18px; }
.etk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.etk-grid--dates { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.etk-divider { border-top: 1px solid var(--etk-muted); }
.etk-info--error { background: #FBE7E7; color: #7A1F1F; }
.etk-row__main { flex: 3 1 220px !important; }
.etk-row__side { flex: 2 1 140px !important; }
.etk-row--single { flex-wrap: nowrap; }
.etk-row--single > .etk-input { flex: 1 1 auto; }
.etk-add-partner { white-space: normal; text-align: left; }

/* Step 1 photo pickers: round profile photo + wide cover, both with previews */
.etk-photo-pickers { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.etk-photo-picker { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.etk-photo-picker--cover { flex: 1 1 280px; align-items: stretch; }
.etk-photo-picker--cover > summary { display: none; }
.etk-dropzone { position: relative; overflow: hidden; }
.etk-dropzone > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.etk-dropzone--round { width: 140px; height: 140px; min-height: 0; border-radius: 50%; flex: none; padding: 0; }
.etk-dropzone--wide { min-height: 140px; }
.etk-dropzone__empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.etk-dropzone__label { font-weight: 700; font-size: 14px; }
.etk-dropzone__change { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(45,45,45,.75); color: #fff; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; }
.etk-dropzone.has-image { border-style: solid; border-color: var(--etk-muted); background: var(--etk-secondary); }
.etk-dropzone:focus-within { box-shadow: var(--etk-focus); }

/* Optional groups rendered as a card that is a <details> (open on desktop, closed on phone) */
.etk-card--details > summary { list-style: none; cursor: pointer; }
.etk-card--details > summary::-webkit-details-marker { display: none; }
.etk-card__summary { align-items: center; }
.etk-card__summary-right { display: inline-flex; align-items: center; gap: 10px; }
.etk-card--details[open] .etk-disclosure__chev { transform: rotate(180deg); }
.etk-card--details:not([open]) { gap: 0; }
.etk-only-phone-block { display: none; }
@media (min-width: 960px) {
  /* Desktop keeps "More about their life" open; the summary is just a heading. */
  .etk-card--details > summary { pointer-events: none; cursor: default; }
}
@media (max-width: 959.98px) {
  .etk-grid--3 { grid-template-columns: 1fr; }
  .etk-only-phone-block { display: block; }
  .etk-photo-picker--profile { width: 100%; }
  .etk-photo-picker--cover { flex-basis: 100%; border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); padding: 0 14px; }
  .etk-photo-picker--cover > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-weight: 600; cursor: pointer; list-style: none; }
  .etk-photo-picker--cover[open] { padding-bottom: 14px; }
  .etk-card--details > summary { min-height: 44px; }
}

/* ---------- Shared bits for steps 2–9 ---------- */
.etk-stack--loose { gap: 28px; }
.etk-stack--tiny { gap: 6px; }
.etk-card h2 { font-size: 18px; }
.etk-label--strong { color: var(--etk-charcoal); font-size: 15px; font-weight: 700; }
.etk-list-title { font-family: var(--etk-font-body) !important; font-size: 15px !important; font-weight: 700 !important; }
.etk-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.etk-row--add { flex-wrap: nowrap; }
.etk-row--add > .etk-input { flex: 1 1 auto; }
.etk-row--add > .etk-btn { flex: none; }
.etk-btn--small { min-height: 44px; padding: 8px 20px; font-size: 15px; }
.etk-btn--tall { min-height: 56px; }
.etk-wizard .etk-btn--pill { background: var(--etk-surface); color: var(--etk-gold-text); border: 1px solid var(--etk-chip-border); font-weight: 600; min-height: 44px; padding: 8px 20px; }
.etk-wizard .etk-btn--pill:hover { border-color: var(--etk-gold-button); }
.etk-wizard .etk-danger { color: var(--etk-required); }
.etk-wizard .etk-btn--danger { background: var(--etk-required); }
.etk-valid-msg--lg { font-size: 15px; }
.etk-hint--after-grid { margin-top: -8px; }
.etk-panel__note { font-size: 15px; line-height: 1.6; }
.etk-only-phone-block-tip { display: none !important; }
.etk-input--readonly { background: var(--etk-champagne); border-color: var(--etk-chip-border); }
.etk-chips-intro { font-size: 15px; font-weight: 600; }
.etk-chip.is-used { opacity: .6; }

/* Step 2 editor */
.etk-story h2 { font-family: var(--etk-font-body); font-size: 19px; font-weight: 700; margin: 18px 0 8px; }
.etk-story h2:first-child { margin-top: 0; }
.etk-story p { margin: 0 0 14px; }
.etk-story ul, .etk-story ol { margin: 0 0 14px; padding-left: 24px; }
.etk-editor.is-empty .etk-story::before { content: attr(data-placeholder); color: #8A847C; pointer-events: none; }
.etk-editor__foot .etk-saved { font-size: 13px; }
.etk-editor:focus-within { border-color: var(--etk-gold); box-shadow: var(--etk-focus); }

/* Step 3 profile rows */
.etk-card--rows { gap: 0; padding-top: 12px; padding-bottom: 12px; }
.etk-profile-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--etk-muted); }
.etk-profile-row:last-child { border-bottom: 0; }
.etk-profile-row__label { display: flex; align-items: center; gap: 12px; font-weight: 600; min-height: 52px; }
.etk-profile-row__icon { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--etk-champagne); color: var(--etk-gold-text); display: inline-flex; align-items: center; justify-content: center; }
.etk-profile-row__input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.etk-profile-row.is-valid .etk-input { border: 2px solid #2E9B5F; }
.etk-profile-row.has-error .etk-input { border: 2px solid var(--etk-required); }

/* Step 4 photos */
.etk-photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.etk-dropzone--action { min-height: 170px; }
.etk-action-card { min-height: 170px; border-radius: var(--etk-radius-lg); border: 1px solid var(--etk-muted); background: var(--etk-surface); color: var(--etk-gold-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; cursor: pointer; font: inherit; }
.etk-action-card[aria-expanded="true"] { border: 2px solid var(--etk-gold-button); background: var(--etk-champagne); }
.etk-album-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--etk-muted); }
.etk-album-bar .etk-tabs { border-bottom: 0; flex-wrap: wrap; }
.etk-wizard a.etk-tab { text-decoration: none; display: inline-flex; align-items: center; }
.etk-tab[aria-current="page"] { color: var(--etk-gold-text); font-weight: 700; border-bottom-color: var(--etk-gold-button); }
.etk-tab-add { padding: 8px 10px; flex: none; white-space: nowrap; }
.etk-album-rename-btn { color: var(--etk-muted-fg); font-size: 14px; white-space: nowrap; }
.etk-album-edit { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.etk-album-delete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.etk-photo-grid { list-style: none; margin: 0; padding: 0; }
.etk-photo-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.etk-photo-tile.is-dragging { opacity: .4; }
button.etk-photo { border: 0; padding: 0; cursor: pointer; width: 100%; font: inherit; }
.etk-photo__badge { display: none; }
.etk-photo-tile.is-cover .etk-photo { outline: 3px solid var(--etk-gold-button); outline-offset: 2px; }
.etk-photo-tile.is-cover .etk-photo__badge { display: block; }
.etk-photo__caption { font-size: 13px; color: var(--etk-muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.etk-photo__caption:empty::before { content: "Add a caption"; }
.etk-photo-tile.is-cover .etk-photo__caption:empty::before { content: "Cover photo"; }
.etk-photo-tile.is-uploading .etk-photo img { opacity: .55; }
.etk-photo img:not([src]) { visibility: hidden; }
.etk-empty-photos { border: 2px dashed var(--etk-border); border-radius: var(--etk-radius); padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--etk-muted-fg); }
.etk-photo-help { margin-top: -8px; }

/* Native <dialog> used for photo options */
.etk-dialog { border: 0; border-radius: var(--etk-radius-lg); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--etk-charcoal); }
.etk-dialog::backdrop { background: rgba(45,45,45,.55); }
.etk-dialog__inner { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.etk-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.etk-dialog__head h2 { font-size: 20px; }
.etk-dialog__img { width: 100%; max-height: 260px; object-fit: contain; background: var(--etk-secondary); border-radius: var(--etk-radius-sm); }
.etk-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.etk-dialog__confirm { background: #FBE7E7; border-radius: 12px; padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Send-to-phone (Step 4 + Step 7) */
.etk-send-phone { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.etk-send-phone__qr { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; }
.etk-send-phone__forms { flex: 1 1 260px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.etk-send-link { display: flex; flex-direction: column; gap: 14px; }
.etk-send-link__label { font-size: 14px; font-weight: 600; color: var(--etk-muted-fg); }
.etk-send-link .etk-row > .etk-input { flex: 1 1 180px; }
.etk-send-link__email > summary { cursor: pointer; color: var(--etk-gold-text); font-weight: 600; min-height: 44px; display: flex; align-items: center; text-decoration: underline; }
.etk-send-link__email[open] > summary { margin-bottom: 8px; }

/* Step 5 videos */
.etk-video-list, .etk-song-list, .etk-tribute-list, .etk-family-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.etk-video-card { display: flex; gap: 16px; align-items: center; background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: var(--etk-radius-lg); padding: 14px; }
.etk-video-card__thumb { position: relative; flex: 0 0 200px; aspect-ratio: 16 / 9; border-radius: var(--etk-radius-sm); background: #2A2F3A; overflow: hidden; display: block; }
.etk-video-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etk-video-card__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--etk-charcoal); display: flex; align-items: center; justify-content: center; }
.etk-video-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* Step 6 music */
.etk-search__box { position: relative; }
.etk-search__box > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--etk-muted-fg); }
.etk-search__box .etk-input { padding-left: 46px; border-color: var(--etk-gold-button); }
.etk-results { list-style: none; margin: 0; padding: 0; }
.etk-results .etk-item:last-child { border-bottom: 0; }
.etk-song { counter-increment: song; }
.etk-song-list { counter-reset: song; gap: 12px; }
.etk-song__num::before { content: counter(song); font-weight: 600; color: var(--etk-muted-fg); width: 18px; display: inline-block; text-align: center; }
.etk-item__thumb--blank { display: inline-block; }

/* Step 7 extras */
.etk-choices__legend { font-family: var(--etk-font-heading); font-size: 22px; margin-bottom: 16px; padding: 0; }
.etk-choices__legend--phone { padding: 0; margin-bottom: 8px; }
.etk-choice__card > svg { color: var(--etk-gold); }
.etk-at-grave { background: var(--etk-gold-button); color: #fff; border-radius: 16px; padding: 22px; flex-direction: column; gap: 14px; }
.etk-at-grave__title { font-size: 18px; font-weight: 700; }
.etk-at-grave__text { font-size: 14px; line-height: 1.5; }
.etk-wizard .etk-at-grave__btn { background: #fff; color: var(--etk-gold-text); }
.etk-map-wrap { position: relative; }
.etk-map__label { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: #fff; border-radius: 8px; box-shadow: var(--etk-shadow-pop); padding: 6px 10px; font-size: 13px; }
.etk-numbered--ruled { border-top: 1px solid var(--etk-muted); padding-top: 20px; }
.etk-waiting { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--etk-muted-fg); }
.etk-suggestion__addr { font-size: 15px; }

/* Step 8 family */
.etk-family-head { display: grid; grid-template-columns: 28px minmax(0, 3fr) minmax(0, 2fr) 148px; gap: 12px; }
.etk-family-row { display: grid; grid-template-columns: 28px minmax(0, 3fr) minmax(0, 2fr) 148px; gap: 12px; align-items: center; }
.etk-family-row.is-dragging { opacity: .4; }
.etk-family-row__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.etk-family-row__tools { display: flex; gap: 8px; justify-content: flex-end; }
.etk-drag-handle { color: #9A948B; cursor: grab; display: inline-flex; justify-content: center; }
.etk-family-row:first-child .etk-move-btn[data-move="up"], .etk-family-row:last-child .etk-move-btn[data-move="down"] { display: none; }

/* Step 9 tributes & finish */
.etk-share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.etk-radio-card { border: 1px solid var(--etk-muted); margin: 0; min-width: 0; }
.etk-radio-card legend { font-weight: 700; font-size: 17px; padding: 0 6px; }
.etk-radio, .etk-check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.etk-radio input, .etk-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--etk-gold-button); flex: none; }
.etk-radio__sub { display: block; color: var(--etk-muted-fg); font-size: 15px; }
.etk-check { border-top: 1px solid var(--etk-muted); padding-top: 16px; font-size: 15px; }
.etk-tribute { border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.etk-tribute--example { border: 1px dashed var(--etk-border); background: var(--etk-cream); }
.etk-tribute__kicker { font-size: 12px; color: var(--etk-muted-fg); }
.etk-tribute__msg { font-family: var(--etk-font-heading); font-size: 16px; line-height: 1.6; }
.etk-tribute__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.etk-card__head--sub h3 { font-size: 16px; }
.etk-glance { background: var(--etk-champagne); border-radius: var(--etk-radius-lg); padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.etk-glance h2 { font-size: 19px; }
.etk-glance__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.etk-glance__list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.etk-glance__list svg { flex: none; }
.etk-glance__list a { font-weight: 600; margin-left: 4px; }

/* No-login phone pages (pin + photo links) */
.etk-pin-state { display: contents; }
.etk-bare__main--center { align-items: center; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.etk-bare__main--middle { justify-content: center; }
.etk-bare__main--map { padding-top: 0; gap: 16px; }
.etk-bare__main--saved { padding-top: 64px; }
.etk-bare__portrait { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.etk-bare__kicker { font-size: 14px; font-weight: 600; color: var(--etk-muted-fg); }
.etk-bare__title { font-size: 26px; line-height: 1.25; margin-top: 8px; }
.etk-bare__title--sm { font-size: 24px; }
.etk-bare__title--xs { font-size: 20px; margin-top: 0; }
.etk-bare__note { font-size: 15px; color: var(--etk-muted-fg); text-align: center; }
.etk-bare__note--left { text-align: left; }
.etk-bare__check { width: 96px; height: 96px; border-radius: 50%; background: #E3F3E9; display: flex; align-items: center; justify-content: center; }
.etk-info--plain { background: #fff; border: 1px solid var(--etk-muted); }
.etk-spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--etk-champagne); border-top-color: var(--etk-gold-button); animation: etk-spin 1s linear infinite; }
@keyframes etk-spin { to { transform: rotate(360deg); } }
.etk-bare .etk-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 959.98px) {
  .etk-only-phone-block-tip { display: flex !important; }
  .etk-photo-actions { grid-template-columns: 1fr; gap: 12px; }
  .etk-album-bar { flex-wrap: wrap; align-items: center; border-bottom: 0; }
  .etk-album-bar .etk-tabs { border-bottom: 1px solid var(--etk-muted); width: 100%; flex-wrap: nowrap; }
  .etk-profile-row { grid-template-columns: 1fr; gap: 8px; }
  .etk-profile-row__label { min-height: 0; }
  .etk-video-card { flex-direction: column; align-items: stretch; }
  .etk-video-card__thumb { flex-basis: auto; width: 100%; }
  .etk-row--add { flex-wrap: wrap; }
  .etk-row--add > .etk-btn { width: 100%; }
  .etk-family-head { display: none; }
  .etk-family-list { gap: 12px; }
  .etk-family-row { grid-template-columns: 1fr; gap: 10px; border: 1px solid var(--etk-muted); border-radius: var(--etk-radius); padding: 14px; }
  .etk-family-row__tools { justify-content: flex-start; }
  .etk-drag-handle { display: none; }
  .etk-glance__list { grid-template-columns: 1fr; }
  .etk-glance { padding: 20px; }
  .etk-share-row .etk-btn { flex: 1 1 auto; }
  .etk-send-phone { gap: 20px; }
}
@media (min-width: 960px) {
  .etk-move-btn { display: none; }
  .etk-family-head, .etk-family-row { grid-template-columns: 28px minmax(0, 3fr) minmax(0, 2fr) 44px; }
}

/* Shared header/footer fixes on phones (also used by the account pages):
   - `.etk-wizard .etk-site-nav a { display: inline-flex }` beat `.etk-hide-phone`,
     so the signed-out header showed every link;
   - the footer's space-between spread the logo and links unevenly. */
@media (max-width: 959.98px) {
  .etk-wizard .etk-site-nav a.etk-hide-phone { display: none; }
  .etk-footer__inner { justify-content: flex-start; gap: 16px 20px; }
  .etk-footer__inner > img { flex: 0 0 100%; height: 40px; object-fit: contain; object-position: left center; }
}

/* ---------- Step 1: Companion card ---------- */
[data-companion] .etk-photo-picker--profile { align-items: flex-start; }
.etk-companion-remove { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.etk-wizard .etk-companion-remove__btn { color: var(--etk-required); padding-left: 0; }
.etk-confirm { background: #FBEDED; border: 1px solid #EBC3C3; border-radius: var(--etk-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; }
.etk-confirm__actions { display: flex; flex-wrap: wrap; gap: 10px; }
