/* Stars of My Life — mobile-first creation flow */

:root {
  --bg: #06081a;
  --panel: #0f1330;
  --panel-2: #141a3d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef0ff;
  --muted: rgba(238, 240, 255, 0.64);
  --faint: rgba(238, 240, 255, 0.4);
  --accent: #ffd47a;
  --accent-ink: #2a1d00;
  --primary: #5f8bff;
  --danger: #ff6b8a;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 56px;
  --cta-h: 84px;
  --col: 560px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); scroll-padding-bottom: calc(var(--cta-actual, var(--cta-h)) + 24px); overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: radial-gradient(900px 600px at 80% -10%, #141a4a 0%, var(--bg) 55%), var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
body.no-scroll { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* Frame                                                                */
/* ------------------------------------------------------------------ */

.app { max-width: var(--col); margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center; gap: 8px;
  background: rgba(6, 8, 26, 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar:empty { display: none; }
.topbar__btn {
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; font-size: 15px;
}
.topbar__btn:hover { background: var(--panel-2); border-color: var(--line); }
.topbar__title { flex: 1; text-align: center; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { min-width: 44px; }

.screen { flex: 1; padding: 20px 16px calc(var(--cta-actual, var(--cta-h)) + 24px); }
.screen--no-cta { padding-bottom: 32px; }

.cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6, 8, 26, 0), rgba(6, 8, 26, 0.92) 28%, #06081a);
}
.cta:empty { display: none; }
.cta__inner { max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.cta__row { display: flex; gap: 10px; }
.cta__row .btn { flex: 1; }

/* Progress */
.progress-steps { display: flex; align-items: center; gap: 6px; }
.progress-steps i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: block; transition: background 0.2s, width 0.2s; }
.progress-steps i.is-done { background: var(--primary); }
.progress-steps i.is-current { background: var(--accent); width: 20px; border-radius: 4px; }

/* ------------------------------------------------------------------ */
/* Type + buttons                                                        */
/* ------------------------------------------------------------------ */

.h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.15; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.2; }
.lead { color: var(--muted); font-size: 15px; margin-top: 8px; }
.hint { font-size: 13px; color: var(--faint); line-height: 1.45; }
.warn { font-size: 13px; line-height: 1.45; color: #ffd47a; background: rgba(255, 212, 122, 0.1); border: 1px solid rgba(255, 212, 122, 0.35); border-radius: 10px; padding: 10px 12px; }
.diag { font-size: 11px; color: var(--faint); opacity: 0.8; word-break: break-all; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 18px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:hover { background: #1a2150; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn--primary:hover { background: #7099ff; }
.btn--ghost { background: transparent; }
.btn--export { background: linear-gradient(135deg, #ffd47a, #ffb347); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 24px rgba(255, 190, 90, 0.28); }
.btn--export:hover { background: linear-gradient(135deg, #ffe09a, #ffbd5c); }
.btn--whatsapp { background: #25d366; border-color: transparent; color: #062b17; }
.btn--whatsapp:hover { background: #3ddf78; }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(255, 107, 138, 0.35); }
.btn--danger:hover { background: rgba(255, 107, 138, 0.1); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; }
.link-btn { background: none; border: none; padding: 10px 12px; color: var(--primary); font-size: 14px; font-weight: 500; border-radius: 8px; min-height: 40px; }
.link-btn:hover { background: rgba(95, 139, 255, 0.12); }
.link-btn--muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row--center { justify-content: center; }
.row--stack { width: 100%; }
.row--stack .btn { flex: 1 1 auto; min-width: 160px; }

/* ------------------------------------------------------------------ */
/* Fields                                                               */
/* ------------------------------------------------------------------ */

.f { display: flex; flex-direction: column; gap: 7px; }
.f > span { font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.f + .f { margin-top: 18px; }
.f--row { flex-direction: row; align-items: center; gap: 10px; }
input[type="text"], input[type="number"], select {
  width: 100%; min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 14px; font-size: 16px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus { border-color: rgba(95, 139, 255, 0.7); box-shadow: 0 0 0 3px rgba(95, 139, 255, 0.18); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input::placeholder { color: var(--faint); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9afd6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select option { color: #111; background: #fff; }
.in-year { width: 120px !important; flex: 0 0 auto; }
.age-hint { font-size: 13px; color: var(--faint); min-width: 54px; }

input[type="range"] { width: 100%; appearance: none; -webkit-appearance: none; height: 40px; background: transparent; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--text); border: 3px solid var(--primary); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--text); border: 3px solid var(--primary); }

.seg { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; }
.seg button { flex: 1; min-height: 42px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; padding: 0 6px; white-space: nowrap; }
.seg button.is-on { background: rgba(95, 139, 255, 0.22); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: 14px; font-weight: 500;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.chip.is-on { background: rgba(95, 139, 255, 0.22); border-color: rgba(95, 139, 255, 0.5); color: var(--text); }
.chip--add::before { content: "+"; color: var(--primary); font-weight: 700; }
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll .chip { flex: 0 0 auto; }

.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); flex: 0 0 auto; }
.check input:checked + span { color: var(--text); }

.colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.colors__dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; padding: 0; background: var(--c); transition: transform 0.1s; }
.colors__dot:hover { transform: scale(1.08); }
.colors__dot.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--panel), 0 0 12px var(--c); }
.colors__custom { position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px dashed var(--line-2); }
.colors__custom input { position: absolute; inset: -8px; width: 48px; height: 48px; padding: 0; border: none; opacity: 0; cursor: pointer; }
.colors__custom::after { content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); pointer-events: none; }

details.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 6px; }
details.more > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 500; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "⌄"; transition: transform 0.15s; }
details.more[open] > summary::after { transform: rotate(180deg); }
details.more .f { margin-top: 14px; }

/* ------------------------------------------------------------------ */
/* Cards + lists                                                        */
/* ------------------------------------------------------------------ */

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 12px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card__head h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); }
.card__sub { color: var(--muted); font-size: 14px; }
.card__empty { color: var(--faint); font-size: 14px; padding: 10px 0; }

.list { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 4px;
  background: transparent; border: none; border-bottom: 1px solid var(--line); text-align: left; color: var(--text);
}
.item:last-child { border-bottom: none; }
.item:hover { background: rgba(255, 255, 255, 0.025); }
.item__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: 0 0 auto; }
.item__year { min-width: 46px; color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.item__title { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__sub { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__chev { color: var(--faint); font-size: 18px; flex: 0 0 auto; }
.item--add { color: var(--primary); font-weight: 600; min-height: 46px; }
.item--add .item__dot { background: transparent; box-shadow: none; border: 1.5px dashed var(--primary); }

/* Status badges */
.badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; vertical-align: 2px; }
.badge--remembered { color: var(--accent); background: rgba(255, 212, 122, 0.12); border: 1px solid rgba(255, 212, 122, 0.35); }
.badge--parted { color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); }
.item--passed .item__dot { box-shadow: 0 0 14px var(--c), 0 0 0 3px rgba(255, 212, 122, 0.25); }
.item--parted .item__dot { opacity: 0.55; box-shadow: none; }
.item--parted .item__title { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Landing                                                              */
/* ------------------------------------------------------------------ */

/* Landing fills the space above the bottom bar: hero grows, text sits below it. */
.landing {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: calc(100dvh - var(--cta-actual, var(--cta-h)) - 60px); gap: 22px; padding-top: 8px;
}
.landing__hero { flex: 0 1 auto; height: min(54dvh, 520px); max-height: 100%; aspect-ratio: 9 / 16; max-width: 82vw; }
.landing__hero .phone { height: 100%; width: 100%; }
.landing__text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.landing .h1 { font-size: 32px; }
.landing .lead { max-width: 34ch; margin-top: 0; }
.landing__foot { color: var(--faint); font-size: 12px; margin-top: 4px; }
.landing__foot:empty { display: none; }
.landing__foot a { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Stage (the canvas)                                                   */
/* ------------------------------------------------------------------ */

.stage-host { display: contents; }
.phone {
  position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #03040c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone canvas { display: block; width: 100%; height: 100%; }
.phone__tap { position: absolute; inset: 0; background: transparent; border: none; padding: 0; }
.phone__badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9); width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(10, 12, 30, 0.6); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 26px; padding-left: 5px; backdrop-filter: blur(8px); pointer-events: none; opacity: 0; transition: opacity 0.2s, transform 0.2s;
}
.phone.is-paused .phone__badge { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.preview { display: flex; flex-direction: column; align-items: center; gap: 8px; height: calc(var(--vvh, 100dvh) - var(--topbar-h) - var(--cta-actual, var(--cta-h)) - 30px - env(safe-area-inset-top)); min-height: 420px; margin-bottom: -14px; }
.preview .h2 { font-size: 20px; margin: 0; }
.preview__stage { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; }
.preview__stage .phone { height: min(100%, calc((100vw - 32px) * 16 / 9)); max-width: 100%; }
.preview__controls { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 480px; }
.scrub { flex: 1; }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.preview .hint { text-align: center; margin: 0; }
.preview__tip { font-size: 13px; }
.preview__controls .btn--icon { width: 38px; height: 38px; }
.preview__controls .btn--icon svg { width: 18px; height: 18px; }
.preview__controls .btn--icon:last-child { width: 34px; height: 34px; color: var(--muted); }
.preview__controls .btn--icon:last-child svg { width: 17px; height: 17px; }
.preview__controls .scrub { height: 32px; }
.preview__controls .scrub::-webkit-slider-runnable-track { height: 4px; }
.preview__controls .scrub::-moz-range-track { height: 4px; }
.preview__controls .scrub::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; border-width: 2px; }
.preview__controls .scrub::-moz-range-thumb { width: 14px; height: 14px; border-width: 2px; }
.preview__controls .time { font-size: 12px; min-width: 70px; }

/* Desktop side pane */
.side { display: none; }

/* ------------------------------------------------------------------ */
/* Bottom sheet                                                         */
/* ------------------------------------------------------------------ */

.sheet-overlay { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100dvh); z-index: 60; background: rgba(4, 5, 16, 0.62); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: var(--col); max-height: calc(var(--vvh, 100dvh) - 24px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-in 0.22s ease-out;
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.sheet__head h2 { font-size: 18px; font-weight: 700; }
.sheet__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; }
.sheet__body { overflow-y: auto; overflow-x: hidden; padding: 4px 16px 16px; flex: 1; overscroll-behavior: contain; }
.sheet__foot { display: flex; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.sheet__foot .btn--primary { flex: 1; }
/* Keyboard up: the sheet follows the visible area and the footer buttons are
   hidden so the fields get the room; they return when the keyboard closes. */
.kb-open .sheet { max-height: var(--vvh, 100dvh); }
.kb-open .sheet__foot { display: none; }
.kb-open .sheet__head { padding-top: 10px; }
.sheet__section { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); margin: 22px 0 10px; }
.sheet__section:first-child { margin-top: 6px; }
.sheet__section { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet__section .link-btn { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; }
.sheet__body .f + .f { margin-top: 14px; }
.chips--tight { gap: 6px; }
.chips--tight .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.chip--more { border-style: dashed; color: var(--primary); }
.sheet__body .colors__dot, .sheet__body .colors__custom { width: 28px; height: 28px; }
.sheet__body .colors { gap: 8px; }
.quick { display: flex; flex-direction: column; gap: 14px; }
.quick-group { display: flex; flex-direction: column; gap: 8px; }
.quick-group__title { font-size: 12.5px; color: var(--muted); }
.toast__act { background: none; border: none; color: var(--accent); font-weight: 700; padding: 4px 8px; margin-left: 6px; font-size: 13px; }
.phase { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.phase .icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 18px; }
.phase .icon-btn:hover { background: var(--panel-2); color: var(--text); }

/* ------------------------------------------------------------------ */
/* Export + share dialogs                                               */
/* ------------------------------------------------------------------ */

.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 16, 0.78); backdrop-filter: blur(10px); display: flex; align-items: flex-end; justify-content: center; }
.overlay--fixed { z-index: 80; }
.dialog {
  width: 100%; max-width: var(--col); background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-height: 92dvh; overflow: auto;
}
.dialog h3 { font-size: 18px; font-weight: 700; }
.dialog__sub { color: var(--muted); font-size: 14px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.15s; }
.dialog__result { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.dialog__result video { max-height: 38dvh; max-width: 100%; border-radius: 12px; background: #000; aspect-ratio: 9 / 16; }
.dialog__result .row { width: 100%; }
.dialog__close { align-self: center; }
.share__msg { font-size: 14px; line-height: 1.5; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; user-select: all; -webkit-user-select: all; }
.share__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-opt { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; padding: 0 6px; }
.share-opt--wa { background: #25d366; color: #062b17; border-color: transparent; }
.share-opt--tg { background: #2aabee; color: #06283a; border-color: transparent; }
.share-opt--x { background: #e8ecff; color: #0b0e24; border-color: transparent; }

.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
  background: #1a2150; color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 16px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Wide screens: story + live preview side by side                       */
/* ------------------------------------------------------------------ */

@media (min-width: 1000px) {
  .app.is-wide { max-width: 1100px; display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; column-gap: 40px; }
  .app.is-wide .topbar { grid-column: 1; }
  .app.is-wide .screen { grid-column: 1; }
  .app.is-wide .side { display: block; grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 24px; align-self: start; padding: 24px 0; }
  .app.is-wide .side .phone { width: 100%; }
  .app.is-wide .cta { left: auto; right: auto; width: 100%; max-width: 1100px; margin: 0 auto; }
  .app.is-wide .cta__inner { max-width: 680px; margin: 0; }
  .sheet, .dialog { border-radius: 22px; margin-bottom: 24px; }
  .sheet-overlay, .overlay { align-items: center; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.phase--base { min-height: 44px; }
.phase--base .phase__year { padding: 0 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.phase--base .phase__label { font-weight: 600; }
.phase--base .hint { font-size: 12px; text-align: center; }
.btn--icon svg, .topbar__btn svg { display: block; }
.btn--icon svg { width: 22px; height: 22px; }

/* Press-and-hold reordering */
.item--person { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.list.is-reordering .item { transition: transform 0.16s ease; }
.list.is-reordering .item.is-lifted { transition: none; position: relative; z-index: 5; background: var(--panel-2); border-radius: 12px; border-bottom-color: transparent; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.list__hint { margin-top: 10px; }
.list__hint .link-btn { min-height: 0; padding: 0 4px; font-size: inherit; }

/* Compact one-line You card */
.card--row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--text); padding: 10px 14px; cursor: pointer; }
.card--row:hover { background: var(--panel-2); }
.card__me { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.card__me strong { font-size: 15px; }
.card__me .card__sub { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }

/* DuoCraft Apps navigation strip (website build only) */
.sitenav { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 560px; margin: -8px auto 0; padding: 6px 0; font-size: 14px; }
.sitenav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; }
.sitenav a:hover { color: var(--text); }
.sitenav__brand { font-weight: 600; color: var(--text) !important; }
.sitenav__brand img { width: 24px; height: 24px; border-radius: 7px; background: #fff; padding: 2px; }
.sitenav__links { display: flex; gap: 16px; }
