/* Chuut — papier cadeau, ruban et étiquette. */
:root {
  --paper: #eef1f4;
  --card: #ffffff;
  --ink: #1f2140;
  --muted: #5d6178;
  --line: #dadfe7;
  --ribbon: #c9264b;
  --tag: #f2c14e;
  --tag-ink: #1f2140;
  --sage: #2e7d6b;
  --mustard: #a8701a;
  --danger: #b3261e;
  --wrap: #2a2d57;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14162a;
    --card: #1e2139;
    --ink: #eceef6;
    --muted: #9ca1bc;
    --line: #2e3250;
    --ribbon: #ee4d6b;
    --mustard: #e0a43a;
    --danger: #ff6b5e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
#app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  background: var(--paper);
}
body.tabs #app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) {
  body { background: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
  #app { box-shadow: 0 0 0 1px var(--line); }
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
p { margin: 0 0 10px; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icônes */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.dim { color: var(--muted); }
.i.big { width: 44px; height: 44px; stroke-width: 1.4; color: var(--muted); }

/* Barre du haut */
.appbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  margin: 0 -16px; padding: calc(env(safe-area-inset-top) + 4px) 8px 4px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.bar-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: var(--ink); cursor: pointer; }
.bar-btn:active { background: var(--line); }
.bar-title { text-align: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* En-têtes de page */
.page-top { padding: 18px 0 6px; }
#app > .page-top:first-child { padding-top: calc(env(safe-area-inset-top) + 32px); }
.title { font-size: clamp(1.8rem, 7.5vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.desc { color: var(--muted); margin: 4px 0 8px; }
.meta { display: block; font-size: .875rem; color: var(--muted); }
.page-top .meta { display: inline-flex; align-items: center; gap: 6px; }
.page-top .meta .i { width: 18px; height: 18px; }
.kicker { color: var(--ribbon); font-weight: 700; margin: 0 0 2px; }
.section { font-size: 1.05rem; font-weight: 700; margin: 28px 0 10px; }

/* Boutons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--ribbon); color: #fff;
  font: 700 1rem var(--display); text-decoration: none; cursor: pointer;
  touch-action: manipulation; user-select: none; transition: transform .12s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.quiet { background: transparent; color: var(--muted); }
.btn.danger { background: var(--danger); }
.btn.danger-quiet { background: transparent; color: var(--danger); margin-top: 24px; }
.empty .btn { width: auto; }
.link { background: none; border: 0; padding: 10px 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 8px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
.actions.stack { grid-template-columns: 1fr; }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; }

/* Formulaires */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: .92rem; padding: 0; }
input, textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
textarea { resize: none; line-height: 1.4; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin-top: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--ink); }
.radio input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--ribbon); flex: none; }
.radio small { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.inline-form { display: grid; gap: 10px; margin-bottom: 8px; }
.group-form { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }

/* Papier cadeau + ruban : l'image par défaut d'une partie */
.wrap-art {
  display: block;
  background:
    linear-gradient(90deg, transparent 45%, var(--ribbon) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 43%, var(--ribbon) 43% 57%, transparent 57%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px),
    var(--wrap);
}
.cover { margin: 0 -16px; aspect-ratio: 16 / 9; max-height: 260px; overflow: hidden; background: var(--wrap); }
.cover img, .cover .wrap-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-pick { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; cursor: pointer; }
.cover-pick img, .cover-pick .wrap-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-pick:focus-within { outline: 3px solid var(--tag); outline-offset: 2px; }
.cover-label { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--card); color: var(--ink); border-radius: 999px; font-weight: 700; font-size: .9rem; }

/* Listes groupées */
.group { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.group > li + li, .group > .dl-row + .dl-row { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; text-decoration: none; }
a.row:active { background: var(--paper); }
.row-title { display: block; font-weight: 700; line-height: 1.3; }
.row-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--paper); }
.row.unread .row-icon { background: var(--ribbon); color: #fff; }
.row.unread .row-title { font-weight: 800; }
.thumb { width: 54px; height: 54px; flex: none; border-radius: 12px; object-fit: cover; }
.group.plain .row { align-items: flex-start; font-size: .95rem; }
.group.plain .i { margin-top: 2px; }
.dl-row { padding: 12px 14px; }
.dl-row dt { font-size: .84rem; color: var(--muted); }
.dl-row dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.dl { margin: 18px 0 10px; }

/* Statuts */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-REGISTRATION_OPEN { color: var(--sage); }
.s-CHOICE_OPEN { color: var(--ribbon); }
.s-GIFT_PREPARATION { color: var(--mustard); }
.s-REVEALED { color: var(--ink); }
.s-CANCELLED { color: var(--muted); }

.notice { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--tag); color: var(--tag-ink); font-weight: 700; text-align: left; }
.notice.tap { cursor: pointer; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 48px 12px; text-align: center; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 10px; }
.facts li { display: flex; align-items: center; gap: 10px; color: var(--muted); }

/* Étapes de la partie */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 16px 0 6px; }
.steps li { padding-top: 8px; border-top: 4px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--muted); }
.steps li.done { border-color: var(--ink); color: var(--ink); }
.steps li.now { border-color: var(--ribbon); color: var(--ribbon); }
.cancelled { display: flex; align-items: center; gap: 8px; margin: 16px 0; color: var(--muted); font-weight: 700; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 16px 0; }
.panel h2 { font-size: 1.2rem; margin-bottom: 6px; }
.panel.locked, .panel:has(> .i) { display: flex; gap: 14px; align-items: flex-start; }
.panel > .i { margin-top: 2px; color: var(--muted); }
.panel.center { text-align: center; }

/* Grille de numéros */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; margin: 14px 0 16px; }
.num {
  aspect-ratio: 1; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  font: 800 1.2rem var(--display); font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation;
}
.num { position: relative; display: grid; place-content: center; background: var(--card); }
.num.taken { background: var(--line); border-color: var(--line); color: var(--muted); opacity: .7; cursor: not-allowed; }
.num.mine { background: transparent; border-style: dashed; color: var(--muted); cursor: not-allowed; }
.num.mine small { font: 700 .62rem var(--body); line-height: 1; }
.num.selected { background: var(--tag); color: var(--tag-ink); border-color: var(--tag-ink); }
.num.selected::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ribbon); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 14px; font-size: .82rem; color: var(--muted); }
.legend .key { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line); margin-left: 6px; }
.legend .key:first-child { margin-left: 0; }
.legend .key.free { background: var(--card); }
.legend .key.taken { background: var(--line); }
.legend .key.mine { border-style: dashed; }

/* Popup d'installation */
.install-pop {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80; transform: translateX(-50%);
  display: flex; gap: 12px; align-items: flex-start; width: min(calc(100% - 24px), 456px); padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 14px 40px rgba(15, 17, 40, .2); animation: pop-in .3s cubic-bezier(.2, .8, .2, 1);
}
body.tabs .install-pop { bottom: calc(88px + env(safe-area-inset-bottom)); }
.install-pop img { border-radius: 13px; flex: none; }
.install-pop b { font-family: var(--display); font-size: 1.05rem; }
.install-pop p { margin: 2px 0 10px; font-size: .9rem; color: var(--muted); }
.ip-actions { display: flex; gap: 8px; }
.ip-actions .btn { width: auto; min-height: 42px; padding: 0 16px; font-size: .92rem; }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, 16px); } }

/* Étiquette du numéro secret */
.tag-row { display: flex; align-items: center; gap: 18px; margin: 16px 0; padding: 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.tag {
  position: relative; flex: none; width: 92px; height: 58px; padding: 0 0 0 20px; border: 0; cursor: pointer;
  background: var(--tag); color: var(--tag-ink); font: 800 1.8rem var(--display); font-variant-numeric: tabular-nums;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%);
  transform: rotate(-5deg);
}
.tag::before { content: ''; position: absolute; left: 13px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--card); }
.tag span { display: inline-block; transition: filter .2s; }
.tag.hidden span { filter: blur(7px); }

.invite { display: grid; gap: 10px; }
.code { display: block; padding: 14px; text-align: center; font: 800 1.5rem var(--display); letter-spacing: .12em; background: var(--card); border: 1.5px dashed var(--line); border-radius: 14px; user-select: all; }
.meter { height: 8px; margin: 0 0 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }

/* Participants */
.av { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font: 800 .85rem var(--display); }
.av-0 { background: #2a2d57; } .av-1 { background: #c9264b; } .av-2 { background: #2e7d6b; }
.av-3 { background: #a8701a; } .av-4 { background: #5b4b8a; } .av-5 { background: #3d6e9e; }
.empty-av { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); }
.you { font-size: .82rem; font-weight: 700; color: var(--ribbon); }
.profile-head { display: flex; align-items: center; gap: 14px; }
.big-av { width: 64px; height: 64px; font-size: 1.6rem; background: #2a2d57; }
.note { margin: 8px 4px 0; }
.select-row select { border: 0; background: transparent; min-height: 44px; padding: 0; }

/* Interrupteur */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span[aria-hidden] { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .2s; }
.switch span[aria-hidden]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--tag); outline-offset: 2px; }
.switch input:disabled + span { opacity: .4; }

/* Compte à rebours */
.countdown { display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.countdown div { min-width: 66px; padding: 10px 6px; border-radius: 12px; background: var(--ink); color: var(--paper); }
.countdown b { display: block; font: 800 1.6rem var(--display); font-variant-numeric: tabular-nums; }
.countdown small { font-size: .74rem; }

/* Révélation : le paquet se déballe une seule fois */
.reveal { position: relative; overflow: hidden; margin: 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.reveal-body { padding: 22px 18px; }
.reveal-line { font: 700 1.25rem/1.35 var(--display); margin: 0 0 12px; }
.reveal-line strong { font-weight: 800; background: linear-gradient(transparent 58%, var(--tag) 58%); color: var(--ink); }
.reveal h3 { font-size: 1rem; margin: 22px 0 6px; }
.pairs { list-style: none; padding: 0; margin: 0; }
.pairs li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pairs li span:last-child { text-align: right; }
.wrap-panel { display: none; position: absolute; top: 0; bottom: 0; width: 50.5%; background-size: 200% 100%; }
.wrap-panel.left { left: 0; background-position: 0 0; }
.wrap-panel.right { right: 0; background-position: 100% 0; }
.reveal.unwrap .wrap-panel { display: block; animation: unwrap-l 1.1s .6s cubic-bezier(.7, 0, .3, 1) forwards; }
.reveal.unwrap .wrap-panel.right { animation-name: unwrap-r; }
@keyframes unwrap-l { to { transform: translateX(-102%); } }
@keyframes unwrap-r { to { transform: translateX(102%); } }

/* Conversation */
.chat-intro { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 16px; padding: 12px 14px; background: var(--card); border-radius: 14px; color: var(--muted); font-size: .92rem; }
.chat { display: flex; flex-direction: column; gap: 6px; min-height: 45dvh; padding-bottom: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.theirs { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 6px; }
.bubble time { display: block; margin-top: 2px; font-size: .72rem; opacity: .6; }
.chat-empty { margin: 32px 16px; text-align: center; color: var(--muted); }
.composer { position: sticky; bottom: 0; margin: 0 -16px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.quota-text { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; font-size: .84rem; color: var(--muted); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 14px; height: 4px; border-radius: 2px; background: var(--ribbon); }
.dots i.used { background: var(--line); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 16px; border-radius: 22px; }
.send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ribbon); color: #fff; cursor: pointer; }
.send:disabled { opacity: .4; cursor: not-allowed; }

/* Barre d'onglets */
#tabs {
  position: fixed; bottom: 0; left: 50%; z-index: 20; transform: translateX(-50%);
  width: min(100%, 480px); display: none; grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 92%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.tabs #tabs { display: grid; }
#tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; user-select: none; }
#tabs a.active { color: var(--ink); }
#tabs a.active .i { stroke-width: 2.3; }
#tabs .tab-new .i { width: 42px; height: 28px; padding: 3px 10px; border-radius: 10px; background: var(--ribbon); color: #fff; }
#notif-dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: var(--ribbon); color: #fff; font-size: .68rem; font-style: normal; }
#notif-dot[hidden] { display: none; }

/* Écran de démarrage */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px; background: #1f2140; color: #fff; transition: opacity .35s; }
#splash img { width: 88px; height: 88px; border-radius: 20px; }
#splash b { font: 800 1.7rem var(--display); letter-spacing: -.02em; }
#splash.gone { opacity: 0; pointer-events: none; }

/* Feuille de confirmation */
.sheet-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 22, 42, .45); animation: fade .2s; }
.sheet { width: min(100%, 480px); display: grid; gap: 10px; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 22px 22px 0 0; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.grabber { justify-self: center; width: 40px; height: 5px; margin-bottom: 6px; border-radius: 3px; background: var(--line); }
.sheet h2 { font-size: 1.3rem; }
.sheet p { color: var(--muted); margin: 0 0 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 95;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--paper); font-weight: 700; text-align: center;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; pointer-events: none;
}
body.tabs #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--danger); color: #fff; }

/* Connexion */
.auth-head { display: grid; justify-items: start; gap: 4px; padding: calc(env(safe-area-inset-top) + 44px) 0 10px; }
.auth-head img { border-radius: 16px; }
.wordmark { font: 800 2.8rem/1 var(--display); letter-spacing: -.03em; margin: 10px 0 4px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 32ch; margin-bottom: 14px; }
.auth-head + .notice { margin-top: 0; }
.form .title { margin-top: 8px; }

.appbar + .auth-head { padding-top: 8px; }

/* Page de présentation (pleine largeur, hors cadre téléphone) */
body.landing #app { max-width: none; padding: 0; box-shadow: none; }
.lp { --w: 1080px; --gutter: max(20px, calc((100% - var(--w)) / 2)); }
.lp > * { padding-left: var(--gutter); padding-right: var(--gutter); }
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding-top: calc(env(safe-area-inset-top) + 16px); padding-bottom: 8px; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.35rem var(--display); letter-spacing: -.02em; }
.lp-brand img { border-radius: 9px; }
.lp-login { font-weight: 700; padding: 10px 4px; text-underline-offset: 3px; }

.lp-hero { display: grid; gap: 48px; align-items: center; padding-top: 32px; padding-bottom: 72px; }
.lp-hero h1 { font-size: clamp(2.7rem, 11.5vw, 4.8rem); font-weight: 800; letter-spacing: -.035em; line-height: .98; margin-bottom: 20px; max-width: 11ch; }
.lp-lede { font-size: 1.15rem; color: var(--muted); max-width: 36ch; }
.lp-cta { display: grid; gap: 10px; margin-top: 26px; max-width: 360px; }
.lp-visual { position: relative; width: min(100%, 440px); justify-self: center; margin-bottom: 28px; }
.lp-art { display: block; width: 100%; height: auto; }
.lp-tag { position: absolute; left: 0; bottom: 6%; width: 132px; height: 82px; padding-left: 30px; font-size: 2.7rem; clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 50%); transform: rotate(-10deg); }
.lp-tag::before { left: 18px; width: 12px; height: 12px; margin-top: -6px; background: var(--paper); }
.lp-hint { position: absolute; left: 0; bottom: -40px; margin: 0; font-size: .92rem; color: var(--muted); }

.lp-section { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.lp-section h2, .lp-final h2 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 28px; max-width: 18ch; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.lp-steps li { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.lp-step-art { width: 100%; height: auto; display: block; }
.lp-n { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%; background: var(--ribbon); color: #fff; font: 800 .95rem var(--display); }
.lp-steps h3 { font-size: 1.15rem; margin: 0 0 6px; }
.lp-steps p, .lp-features p { margin: 0; color: var(--muted); max-width: 40ch; }

.lp-split { display: grid; gap: 32px; align-items: center; }
.lp-phone { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; justify-self: center; padding: 22px 16px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; }
.lp-phone .bubble.theirs { background: var(--paper); border-color: transparent; }
.lp-phone .quota-text { margin: 10px 0 0; }

.lp-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.lp-features .i { width: 28px; height: 28px; color: var(--ribbon); margin-bottom: 10px; }
.lp-features h3 { font-size: 1.15rem; margin-bottom: 6px; }

.lp-faq { max-width: 720px; }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font: 700 1.08rem var(--display); cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary .i { transition: transform .2s; }
.lp-faq details[open] summary .i { transform: rotate(90deg); }
.lp-faq details p { margin: 0 0 18px; color: var(--muted); max-width: 60ch; }

.lp-final {
  padding-top: 64px; padding-bottom: 64px; color: #fff;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 14px), #2a2d57;
}
.lp-final .btn { width: auto; display: inline-flex; }
.lp-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .9rem; }
.lp-foot select { width: auto; min-height: 40px; padding: 6px 10px; }

@media (min-width: 700px) {
  .lp-features { grid-template-columns: 1fr 1fr; gap: 40px 56px; }
}
@media (min-width: 860px) {
  .lp-hero { grid-template-columns: 1.1fr .9fr; padding-top: 72px; padding-bottom: 110px; }
  .lp-cta { grid-template-columns: auto auto; justify-content: start; max-width: none; }
  .lp-cta .btn { width: auto; }
  .lp-steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .lp-steps li { grid-template-columns: 1fr; align-items: start; }
  .lp-step-art { max-width: 200px; }
  .lp-split { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.unwrap .wrap-panel { display: none; }
}
