/* Toit commun
   Palette : matin gris-bleu, encre marine, bleu volet, jaune soleil. */
:root {
  --paper: #EEF1F4;
  --surface: #FFFFFF;
  --ink: #16233B;
  --ink-2: #56627A;
  --line: #D3DAE3;
  --cobalt: #2743C4;
  --cobalt-deep: #1A2E91;
  --sun: #F5C02E;
  --yes: #13805A;
  --no: #B4453C;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow-card: 0 22px 40px -22px rgba(22, 35, 59, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
img.broken { visibility: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cobalt); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.tag :focus-visible, .tag:focus-visible { outline-color: var(--sun); }

svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--cobalt-deep); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover:not(:disabled) { background: #FFD24F; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.btn-danger { background: transparent; color: var(--no); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

.linkish {
  display: inline-flex; align-items: center; gap: .4em;
  background: none; border: 0; padding: 6px 0; color: var(--ink-2); font-weight: 500;
}
.linkish:hover:not(:disabled) { color: var(--ink); }
.linkish:disabled { opacity: .4; cursor: default; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: .9375rem; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-s);
  font-size: 1rem;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); }

/* ---------- Marque ---------- */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em;
}
.wordmark svg { width: 30px; height: 30px; color: var(--cobalt); stroke-width: 2.4; }

/* ---------- Étiquette de bagage (le code du séjour) ---------- */
.tag {
  --notch: 16px;
  position: relative;
  background: var(--cobalt); color: #fff;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
  border-radius: 0 10px 10px 0;
}
.tag::before { /* œillet */
  content: ""; position: absolute; left: calc(var(--notch) * .9); top: 50%;
  width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}
.tag-sm {
  --notch: 9px;
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 12px 0 28px; border: 0;
  font-weight: 800; font-size: .9375rem; letter-spacing: .12em; font-variant-numeric: tabular-nums;
}
.tag-sm::before { width: 8px; height: 8px; margin-top: -4px; left: 11px; box-shadow: none; }
.tag-sm:hover { background: var(--cobalt-deep); }
.tag-hero { display: inline-block; padding: 18px 26px 18px 58px; }
.tag-code { font-weight: 900; font-size: clamp(2rem, 9vw, 2.75rem); letter-spacing: .14em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Accueil ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: 22px 20px 64px; }
.home-hero { padding: 48px 0 36px; }
.home-hero h1 {
  font-size: clamp(2.5rem, 8.5vw, 5rem); line-height: .98; font-weight: 900; letter-spacing: -.035em;
}
.lede { margin-top: 20px; max-width: 46ch; font-size: 1.125rem; color: var(--ink-2); }
.home-hero h1 { max-width: 14ch; }

.home-actions { display: grid; gap: 22px; align-items: start; }
.panel { background: var(--surface); border-radius: var(--r-m); padding: 26px 22px; display: grid; gap: 18px; }
.panel h2, .join h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.join { --notch: 26px; padding: 26px 24px 26px 62px; display: grid; gap: 18px; }
.join::before { left: 22px; width: 18px; height: 18px; margin-top: -9px; }
.join .field > span { color: rgba(255, 255, 255, .8); font-weight: 500; }
.code-input {
  background: transparent !important; color: #fff;
  border: 0 !important; border-bottom: 2px solid rgba(255, 255, 255, .45) !important; border-radius: 0 !important;
  padding: 6px 0 !important; min-height: 0 !important;
  font-size: 2.25rem !important; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
}
.code-input:focus { border-bottom-color: var(--sun) !important; }
.code-input::placeholder { color: rgba(255, 255, 255, .45); font-size: 1.125rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.join .btn { justify-self: start; }

.mine { margin-top: 56px; }
.mine h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.mine ul { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.mine li { border-bottom: 1.5px solid var(--line); }
.mine a {
  display: flex; align-items: center; gap: 16px; padding: 16px 2px;
  color: var(--ink); text-decoration: none;
}
.mine a:hover strong { color: var(--cobalt); }
.mine strong { display: block; font-size: 1.125rem; }
.mine .code { margin-left: auto; font-weight: 800; letter-spacing: .12em; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (min-width: 820px) {
  .home { padding-top: 32px; }
  .home-hero { padding: 80px 0 56px; }
  .home-actions { grid-template-columns: 1fr 1fr; gap: 40px; }
  .panel { padding: 32px; }
  .join { transform: rotate(-1.5deg); margin-top: 18px; padding: 32px 32px 32px 74px; }
}

/* ---------- Pages étroites (rejoindre) ---------- */
.narrow { max-width: 560px; margin: 0 auto; padding: 22px 20px 64px; display: grid; gap: 20px; }
.narrow .tag-hero { justify-self: start; margin-top: 28px; }
.h-page { font-size: clamp(2rem, 7vw, 2.75rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.h-sec { font-size: 1.125rem; font-weight: 800; }
.who { display: flex; flex-wrap: wrap; gap: 10px; }
.who button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 18px 0 8px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700;
}
.who button:hover { border-color: var(--cobalt); }
.stack-form { display: grid; gap: 14px; }
.stack-form .btn { justify-self: start; }

/* ---------- Avatars ---------- */
.av {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c, var(--cobalt)); color: #fff;
  font-size: .875rem; font-weight: 800; line-height: 1;
}
.av.sm { width: 22px; height: 22px; font-size: .6875rem; }
.av.lg { width: 40px; height: 40px; font-size: 1rem; }
.avs { display: inline-flex; }
.avs .av { box-shadow: 0 0 0 2px var(--paper); }
.avs .av + .av { margin-left: -7px; }

/* ---------- En-tête du séjour ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1.5px solid var(--line); }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-s); color: var(--cobalt); }
.mark:hover { background: var(--surface); }
.mark svg { width: 28px; height: 28px; stroke-width: 2.4; }
.bar-title { min-width: 0; flex: 1; }
.bar-title h1 { font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.bar-people {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 0; background: none; border: 0; color: var(--ink-2); font-size: .875rem;
}
.bar-people .av { width: 20px; height: 20px; font-size: .625rem; }
.bar-people:hover { color: var(--ink); }

/* ---------- Onglets ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1.5px solid var(--line);
}
.tabs a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); text-decoration: none; font-size: .75rem; font-weight: 700;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--cobalt); }
.count {
  position: absolute; top: 7px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--line); color: var(--ink); font-size: .6875rem; line-height: 18px; text-align: center; font-weight: 800;
}
.count.hot { background: var(--sun); }

@media (min-width: 760px) {
  .tabs {
    position: static; height: auto; padding: 0;
    display: flex; gap: 28px; justify-content: flex-start;
    max-width: 1120px; margin: 0 auto; padding: 0 20px;
    background: none; border: 0;
  }
  .tabs a { flex-direction: row; gap: 8px; padding: 18px 0 14px; font-size: 1rem; border-bottom: 3px solid transparent; }
  .tabs a svg { width: 20px; height: 20px; }
  .tabs a.on { border-bottom-color: var(--cobalt); color: var(--ink); }
  .tabs a:hover { color: var(--ink); }
  .count { position: static; }
}

/* ---------- Contenu ---------- */
.view { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 28px); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 0; }
@media (min-width: 760px) {
  .view { padding-bottom: 64px; }
  .wrap { padding: 28px 20px 0; }
}
.loading { padding: 64px 20px; text-align: center; color: var(--ink-2); }

.empty {
  max-width: 440px; padding: 48px 4px; display: grid; gap: 14px; justify-items: start;
}
.empty h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.empty p { color: var(--ink-2); }

/* Ajout d'annonce */
.addbar {
  display: flex; gap: 6px; padding: 6px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  max-width: 720px;
}
.addbar:focus-within { border-color: var(--cobalt); }
.addbar input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 14px; font-size: 1rem; }
.addbar input:focus { outline: none; }
.addbar .btn { min-height: 44px; }
.hint { margin: 10px 0 0 18px; font-size: .875rem; color: var(--ink-2); }

/* Grille d'annonces */
.grid { margin-top: 32px; display: grid; gap: 30px 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { display: grid; gap: 12px; align-content: start; }
.tile-photo {
  position: relative; display: block; padding: 0; border: 0;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-m); background: var(--line);
}
.tile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile-photo:hover img { transform: scale(1.03); }
.nophoto { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-2); }
.nophoto svg { width: 44px; height: 44px; stroke-width: 1.5; }
.tile h3 { font-size: 1.0625rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.tile h3 button { all: unset; cursor: pointer; }
.tile h3 button:hover { color: var(--cobalt); }
.tile h3 button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.tile-kind { color: var(--ink-2); font-size: .9375rem; margin-top: 2px; }
.tile-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .9375rem; font-weight: 500; }
.tile-by { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .875rem; color: var(--ink-2); }
.rating { display: inline-flex; align-items: center; gap: 4px; }
.rating svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.pill {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 11px; border-radius: 999px;
  font-size: .8125rem; font-weight: 800; color: #fff; background: var(--ink);
}
.pill-todo { background: var(--sun); color: var(--ink); }
.pill-v1 { background: var(--yes); }
.pill-v2 { background: var(--sun); color: var(--ink); }
.pill-v-1 { background: var(--no); }
.warn { position: absolute; bottom: 12px; left: 12px; right: 12px; padding: 6px 10px; border-radius: var(--r-s); background: rgba(255,255,255,.94); color: var(--ink); font-size: .8125rem; font-weight: 500; text-align: left; }

/* ---------- Vote (cartes à glisser) ---------- */
.vote { max-width: 460px; margin: 0 auto; padding: 16px 16px 0; }
.deck {
  position: relative;
  height: clamp(340px, calc(100vh - 330px), 640px);
  height: clamp(340px, calc(100dvh - 330px), 640px);
}
@media (min-width: 760px) {
  .vote { padding-top: 24px; }
  .deck { height: clamp(420px, calc(100dvh - 310px), 640px); }
}
.deck.is-empty { height: auto; }
.card {
  position: absolute; inset: 0;
  border-radius: var(--r-l); overflow: hidden;
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-card);
  transform: translateY(calc(var(--i) * 12px)) scale(calc(1 - var(--i) * .04));
  transition: transform .25s ease;
  user-select: none; -webkit-user-select: none;
}
.card.top { touch-action: none; cursor: grab; }
.card.top:active { cursor: grabbing; }
.card-photos img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; pointer-events: none;
}
.card-photos img.on { opacity: 1; }
.card-photos .nophoto { position: absolute; inset: 0; color: rgba(255,255,255,.5); }
.card-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.card-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .4); }
.card-bars i.on { background: #fff; }
.card-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 72px 20px 18px;
  background: linear-gradient(to top, rgba(12, 20, 38, .92) 0%, rgba(12, 20, 38, .7) 55%, rgba(12, 20, 38, 0) 100%);
  display: grid; gap: 4px;
}
.card-info h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.card-info p { font-size: .9375rem; color: rgba(255, 255, 255, .85); }
.card-by { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.card-by .av { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.card-more {
  justify-self: start; margin-top: 8px; padding: 7px 14px;
  background: rgba(255, 255, 255, .16); border: 0; border-radius: 999px; color: #fff; font-weight: 700; font-size: .875rem;
}
.card-more:hover { background: rgba(255, 255, 255, .28); }
.card-more:focus-visible { outline-color: var(--sun); }

.stamp {
  position: absolute; top: 34px; padding: 6px 14px;
  border: 4px solid currentColor; border-radius: 10px;
  font-size: 1.75rem; font-weight: 900; letter-spacing: .02em; background: rgba(255,255,255,.9);
  opacity: 0; pointer-events: none;
}
.s-yes { left: 22px; color: var(--yes); transform: rotate(-12deg); opacity: var(--yes-o, 0); }
.s-no { right: 22px; color: var(--no); transform: rotate(12deg); opacity: var(--no-o, 0); }
.s-love { left: 50%; top: 42%; color: var(--ink); background: var(--sun); border-color: var(--ink); transform: translateX(-50%) rotate(-4deg); opacity: var(--love-o, 0); white-space: nowrap; }

.vote-actions { display: flex; justify-content: center; align-items: flex-start; gap: 26px; margin-top: 22px; }
.vbtn {
  display: grid; justify-items: center; gap: 6px;
  background: none; border: 0; padding: 0; font-weight: 700; font-size: .8125rem; color: var(--ink-2);
}
.vbtn svg {
  box-sizing: content-box; width: 26px; height: 26px; padding: 18px;
  border-radius: 50%; background: var(--surface); stroke-width: 2.6;
  box-shadow: 0 8px 18px -12px rgba(22, 35, 59, .6);
  transition: transform .12s;
}
.vbtn:hover svg { transform: scale(1.06); }
.vbtn:active svg { transform: scale(.94); }
.vbtn-no svg { color: var(--no); }
.vbtn-yes svg { color: var(--yes); fill: currentColor; }
.vbtn-love svg { color: var(--ink); background: var(--sun); fill: currentColor; stroke-width: 1.6; width: 22px; height: 22px; padding: 16px; margin-top: 4px; }
.vote-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: .875rem; }
.kbd-hint { display: none; margin-top: 4px; font-size: .8125rem; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: block; } }

/* ---------- Classement ---------- */
.rank-wrap { max-width: 820px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rk {
  display: grid; grid-template-columns: 34px 84px 1fr auto; gap: 14px; align-items: center;
  padding: 18px 0; border-bottom: 1.5px solid var(--line);
}
.rk-n { font-size: 1.75rem; font-weight: 900; color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.rk-thumb { padding: 0; border: 0; width: 84px; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: var(--line); }
.rk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rk-body { min-width: 0; display: grid; gap: 6px; }
.rk-body h3 { font-size: 1.0625rem; font-weight: 800; line-height: 1.3; }
.rk-body h3 button { all: unset; cursor: pointer; }
.rk-body h3 button:hover { color: var(--cobalt); }
.rk-body h3 button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.rk-sum { font-size: .875rem; color: var(--ink-2); }
.rk-score { text-align: right; }
.rk-score strong { display: block; font-size: 1.75rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.rk-score span { font-size: .8125rem; color: var(--ink-2); }

.rk.first { grid-template-columns: 1fr auto; grid-template-areas: "thumb thumb" "body score"; padding-top: 4px; }
.rk.first .rk-n { display: none; }
.rk.first .rk-thumb { grid-area: thumb; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-m); position: relative; }
.rk.first .rk-body { grid-area: body; }
.rk.first .rk-score { grid-area: score; }
.rk.first h3 { font-size: 1.5rem; letter-spacing: -.02em; }
.lead-flag {
  position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font-weight: 800; font-size: .875rem;
}

.meter { display: flex; gap: 3px; height: 8px; max-width: 320px; }
.meter i { flex: 1; border-radius: 2px; background: var(--line); }
.meter .m2 { background: var(--sun); }
.meter .m1 { background: var(--yes); }
.meter .m-1 { background: var(--no); }

.progress { margin-bottom: 26px; }
.progress ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.progress li { display: flex; align-items: center; gap: 8px; font-size: .9375rem; }
.progress li .muted { font-variant-numeric: tabular-nums; }
.legend { margin-top: 18px; font-size: .875rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 8px; border-radius: 2px; }

@media (max-width: 520px) {
  .rk { grid-template-columns: 26px 64px 1fr auto; gap: 12px; }
  .rk-thumb { width: 64px; }
  .rk-n { font-size: 1.375rem; }
}

/* ---------- Feuilles (détail, partage, modification) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(22, 35, 59, .5); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: var(--r-l) var(--r-l) 0 0;
  padding-bottom: calc(24px + var(--safe-b));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet-wrap.in .sheet-bg { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
@media (min-width: 760px) {
  .sheet-wrap { align-items: center; padding: 32px; }
  .sheet { max-width: 640px; max-height: 88vh; border-radius: var(--r-l); transform: translateY(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
  .sheet-wrap.in .sheet { opacity: 1; }
}
.sheet-x {
  position: sticky; top: 12px; float: right; margin: 12px 12px -52px 0; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(22, 35, 59, .5);
}
.sheet-body { padding: 24px 20px 0; display: grid; gap: 22px; }
@media (min-width: 760px) { .sheet-body { padding: 28px 28px 0; } }
.sheet-body > h2 { font-size: 1.625rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; padding-right: 40px; }
.sheet-body h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }

.gallery {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory;
  background: var(--ink); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 88%; height: clamp(220px, 42vh, 380px); object-fit: cover; scroll-snap-align: start; }
.gallery img:only-child { width: 100%; }

.facts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { padding: 6px 12px; background: var(--surface); border-radius: 999px; font-size: .875rem; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.facts .rating svg { color: var(--ink); }
.price { font-size: 1.25rem; font-weight: 800; }
.note { padding: 14px 16px; border-left: 4px solid var(--sun); background: var(--surface); border-radius: 0 var(--r-s) var(--r-s) 0; }
.note small { display: block; color: var(--ink-2); margin-bottom: 4px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button {
  min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); font-weight: 700; font-size: .9375rem;
}
.seg button:hover { border-color: var(--ink-2); }
.seg button[aria-pressed="true"].v-1 { background: var(--no); border-color: var(--no); color: #fff; }
.seg button[aria-pressed="true"].v1 { background: var(--yes); border-color: var(--yes); color: #fff; }
.seg button[aria-pressed="true"].v2 { background: var(--sun); border-color: var(--sun); color: var(--ink); }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.people .v { margin-left: auto; font-size: .875rem; font-weight: 700; }
.people .v.v1 { color: var(--yes); }
.people .v.v-1 { color: var(--no); }
.people .v.v2 { color: var(--ink); background: var(--sun); padding: 2px 10px; border-radius: 999px; }
.people .v.v0 { color: var(--ink-2); font-weight: 400; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet .tag-hero { justify-self: start; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; z-index: 80;
  bottom: calc(var(--tabbar) + var(--safe-b) + 16px);
  max-width: min(92vw, 460px); padding: 13px 18px;
  background: var(--ink); color: #fff; border-radius: var(--r-s);
  font-size: .9375rem; font-weight: 500;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { #toast { bottom: 28px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
