/* Amigo secreto — Clicarte. Mobile primeiro (390 px de referência), zonas seguras do iPhone/Android. */

@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url(/assets/vendor/fonts/fredoka-500.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(/assets/vendor/fonts/fredoka-600.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url(/assets/vendor/fonts/atkinson-400.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url(/assets/vendor/fonts/atkinson-700.woff2) format('woff2'); }

:root {
  --red: #D7141E;
  --red-d: #A10E17;
  --night: #12306B;
  --blue: #2F5FD0;
  --bg: #F4F7FC;
  --text: #0F1A33;
  --text2: #4A5675;
  --line: #D5DDEC;
  --chip: #DCE6FA;
  --pink: #FDE3E4;
  --green-bg: #E7F0E9;
  --green: #1F5A33;
  --white: #FFFFFF;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --font-title: Fredoka, 'Trebuchet MS', sans-serif;
  --font-text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-text);
  font-size: 16px; line-height: 1.4; min-height: 100dvh;
}
body[data-theme="blue"] { background: var(--night); }
body[data-theme="red"] { background: var(--red); }
body.has-sheet { overflow: hidden; }

h1, h2 { font-family: var(--font-title); font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: var(--night); }
a:hover { color: var(--red); }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ico { display: inline-flex; flex: none; }
.muted { color: var(--text2); }

/* --- Estrutura de ecrã ------------------------------------------------------ */
.screen {
  max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  padding-left: var(--sal); padding-right: var(--sar);
}
.screen.dark { background: var(--night); color: var(--white); position: relative; overflow: hidden; }
.pad { padding: 16px 20px 0; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.foot { padding: 12px 20px calc(24px + var(--sab)); display: flex; flex-direction: column; gap: 10px; }
.foot.sticky { position: sticky; bottom: 0; background: var(--bg); box-shadow: 0 -10px 14px -8px rgba(15, 26, 51, .14); padding-top: 12px; z-index: 5; }
.center-screen { align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; }
.title { font-size: 30px; line-height: 1.1; color: var(--night); }

.topbar { padding: calc(20px + var(--sat)) 20px 0; display: flex; align-items: center; gap: 12px; }
.step { font-size: 14px; color: var(--text2); font-weight: 700; }

/* Cabeçalho colorido com fundo arredondado */
.hero {
  background: var(--night); color: var(--white); border-radius: 0 0 28px 28px; position: relative; overflow: hidden;
  padding: calc(22px + var(--sat)) 22px 26px; display: flex; flex-direction: column; gap: 6px;
}
.hero.red { background: var(--red); padding-left: 20px; padding-right: 20px; }
.hero h1 { font-size: 30px; line-height: 1.1; margin-top: 8px; }
.hero p { font-size: 15px; opacity: .95; }
.hero .snow { position: absolute; border-radius: 50%; background: #fff; }
.hero .back-link { color: var(--white); font-size: 14px; font-weight: 700; text-decoration: none; padding: 6px 0; }

/* --- Botões ------------------------------------------------------------------- */
.btn, .btn-outline, .btn-light, .btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 56px; border-radius: 16px; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  font: 600 18px var(--font-title); text-align: center; padding: 0 16px;
}
.btn { background: var(--red); color: var(--white); }
.btn:hover { color: var(--white); background: var(--red-d); }
.btn.off, .btn:disabled { background: var(--line); color: var(--text2); cursor: default; }
.btn-outline { background: transparent; border-color: var(--night); color: var(--night); font: 700 16px var(--font-text); }
.btn-light { background: var(--white); color: var(--night); font: 700 16px var(--font-text); min-height: 52px; border-radius: 14px; }
.btn-light.line { background: transparent; border-color: var(--white); color: var(--white); }
.btn-ghost { background: transparent; color: var(--night); font: 700 15px var(--font-text); min-height: 48px; text-decoration: underline; }
.btn-small { min-height: 48px; border-radius: 12px; font-size: 16px; }
.link-btn { background: none; border: 0; padding: 12px 4px; min-height: 44px; color: var(--night); font: 700 14px var(--font-text); text-decoration: underline; cursor: pointer; }
.on-dark .link-btn, .dark .link-btn { color: var(--white); }

.round-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; text-decoration: none; padding: 0;
}
.round-btn.on-dark { border: 0; }

/* --- Campos ---------------------------------------------------------------------- */
.label { font-weight: 700; font-size: 14px; display: block; margin-bottom: 6px; }
.field {
  height: 52px; width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 0 14px;
  font: 400 17px var(--font-text); color: var(--text); background: var(--white);
}
.field.big { height: 56px; font-size: 18px; padding: 0 16px; }
.field.code { letter-spacing: .6em; text-align: center; font: 600 28px var(--font-title); }
.field:focus { border-color: var(--night); outline: none; }
.hint { font-size: 14px; color: var(--text2); }
.error { color: var(--red-d); font-weight: 700; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 10px; }

.chip {
  border: 2px solid var(--line); background: var(--white); color: var(--text); border-radius: 999px; padding: 0 14px;
  min-height: 44px; font: 700 15px var(--font-text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip.on { border-color: var(--night); background: var(--night); color: var(--white); }
.chip.red.on { border-color: var(--red); background: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { background: var(--chip); color: var(--night); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px; }
.tag { display: inline-flex; align-items: center; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; font-size: 13px; font-weight: 700; min-height: 36px; }
.tag button { border: 0; background: none; width: 32px; height: 32px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.badge { border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge.pink { background: var(--pink); color: var(--red-d); }
.badge.blue { background: var(--chip); color: var(--night); }
.badge.green { background: var(--green-bg); color: var(--green); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.link { text-decoration: none; color: var(--text); }
.card h2 { font-size: 19px; color: var(--night); }
.info { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; background: var(--chip); color: var(--night); }
.info.bad { background: var(--pink); color: var(--red-d); }
.info.warn { background: #FFF3D6; color: #6A4A00; }

/* --- Avatares ------------------------------------------------------------------------- */
.av {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--white);
  font-family: var(--font-title); font-weight: 600; flex: none; user-select: none;
}
.avs { display: flex; }
.avs .av { border: 3px solid var(--white); margin-left: -12px; }
.avs .av:first-child { margin-left: 0; }
.ring { padding: 3px; border-radius: 50%; border: 3px solid transparent; display: inline-flex; position: relative; }
.ring.on { border-color: var(--red); }
.person { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 400 14px var(--font-text); color: var(--text); min-width: 0; }
.person span.nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; align-content: start; }
.del-badge { position: absolute; right: -4px; top: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; }

/* --- Abas e cartões do ecrã 1 ----------------------------------------------------------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #E3E9F5; border-radius: 14px; padding: 4px; }
.tab { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--night); font: 700 15px var(--font-text); cursor: pointer; }
.tab.on { background: var(--white); color: var(--red-d); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { font: 600 20px var(--font-title); }
.account-chip { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--white); color: var(--red-d); border: 0; font: 700 13px var(--font-text); cursor: pointer; max-width: 150px; }
.account-chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font: 600 18px var(--font-title); flex: 1; }

/* --- Assinatura Clicarte -------------------------------------------------------------------- */
.sig { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text2); text-decoration: none; font-size: 13px; padding: 6px 0; }
.sig img { height: 18px; width: auto; display: block; }
.sig.on-dark { color: var(--white); }

/* --- Passos do assistente ------------------------------------------------------------------------ */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 18px 20px 0; }
.section-head h2 { font-size: 18px; }
.count { color: var(--red); font-weight: 700; font-size: 15px; }
.sec { font: 600 16px var(--font-title); color: var(--night); display: flex; align-items: center; gap: 6px; }
.house { background: var(--white); border: 2px solid var(--line); border-radius: 16px; padding: 6px 8px 6px 12px; display: flex; align-items: center; gap: 8px; min-height: 56px; }
.house .ht { font-weight: 700; font-size: 13px; width: 66px; flex: none; color: var(--text2); }
.house .members { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.house .ring { padding: 2px; background: none; border-width: 3px; cursor: pointer; }
.btn-dash { min-height: 44px; border: 2px dashed #9FB3DA; background: transparent; border-radius: 14px; color: var(--night); font: 700 14px var(--font-text); cursor: pointer; width: 100%; }
.btn-line { min-height: 44px; border: 2px solid var(--night); background: var(--white); border-radius: 14px; color: var(--night); font: 700 14px var(--font-text); cursor: pointer; width: 100%; }
.move { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--night); background: var(--white); color: var(--night); font: 700 13px var(--font-text); cursor: pointer; flex: none; }

.rule { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--white); border: 2px solid var(--line); border-radius: 16px; padding: 7px 12px; min-height: 56px; cursor: pointer; color: var(--text); font-family: var(--font-text); }
.rule.on { border-color: var(--night); }
.rule:disabled { opacity: .6; cursor: default; }
.box { width: 30px; height: 30px; border-radius: 9px; border: 2px solid #9FB3DA; display: flex; align-items: center; justify-content: center; flex: none; background: var(--white); }
.rule.on .box { background: var(--red); border-color: var(--red); }
.rule b { font-size: 15px; display: block; }
.rule small { font-size: 13px; color: var(--text2); display: block; }
.adv-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 14px; border: 2px dashed #9FB3DA; color: var(--night); text-decoration: none; font-weight: 700; font-size: 15px; }

.givers { margin-top: 12px; overflow-x: auto; padding: 4px 16px 8px; display: flex; gap: 4px; -webkit-overflow-scrolling: touch; }
.giver { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: 400 12px var(--font-text); color: var(--text); flex: none; width: 66px; }
.cells { padding: 10px 16px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.cell { position: relative; background: var(--white); border: 2px solid var(--line); border-radius: 16px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: 700 13px var(--font-text); color: var(--text); min-height: 44px; }
.cell.no { background: var(--bg); border-style: dashed; }
.cell.no .av { opacity: .45; }
.cell small { font-weight: 400; font-size: 12px; color: var(--text2); }
.badge-dot { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.status-row { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 8px; min-height: 48px; }
.status-row .who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.status-row .who b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.status-row .who span { font-size: 12px; color: var(--text2); }
.reset { min-height: 44px; min-width: 104px; border-radius: 10px; border: 2px solid var(--night); background: var(--white); color: var(--night); font: 700 14px var(--font-text); cursor: pointer; }
.reset.armed { border-color: var(--red); background: var(--red); color: var(--white); }
.hero-actions { display: flex; gap: 8px; margin-top: 12px; }
.hero-actions .btn { min-height: 48px; border-radius: 12px; font-size: 16px; flex: 1; }
.hero-actions .btn-light { width: auto; padding: 0 16px; min-height: 48px; }

/* --- Roda (ecrã 6B) -------------------------------------------------------------------------------- */
.wheel-head { padding: calc(34px + var(--sat)) 22px 0; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.wheel-head h1 { font-size: 36px; line-height: 1.05; margin-top: 6px; }
.wheel-head a, .wheel-head .link-btn { align-self: center; color: var(--white); font-size: 14px; font-weight: 700; padding: 10px 12px; }
.wheel { position: relative; width: 390px; max-width: 100%; margin: 10px auto 0; }
.wheel .p { position: absolute; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; color: var(--white); font: 700 13px var(--font-text); cursor: pointer; }
.wheel .p span.nm { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wheel .ring { border: 3px dashed var(--white); }
.wheel .ring.taken { border-style: solid; border-color: var(--red); }
.wheel .lock { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; }
.tree { position: absolute; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.tree .tri { width: 0; height: 0; border-left: solid transparent; border-right: solid transparent; border-bottom: solid var(--white); }
.legend { margin: auto 20px 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend i { width: 22px; height: 22px; border-radius: 50%; border: 3px dashed var(--white); flex: none; }
.legend i.t { border-style: solid; border-color: var(--red); background: var(--white); }
.snowdot { position: absolute; border-radius: 50%; background: #fff; pointer-events: none; }
.banner { margin: 10px 20px 0; background: var(--white); color: var(--night); border-radius: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.banner .btn-small { width: auto; min-height: 44px; padding: 0 14px; font-size: 15px; }

/* --- PIN ------------------------------------------------------------------------------------------ */
.pin-screen { align-items: center; }
.pin-top { align-self: stretch; padding: calc(20px + var(--sat)) 20px 0; }
.big-ring { padding: 4px; border-radius: 50%; border: 3px solid var(--red); display: inline-flex; margin-top: 4px; }
.pin-title { font-size: 28px; color: var(--night); margin-top: 12px; text-align: center; }
.pin-dots { display: flex; gap: 16px; margin-top: 20px; }
.pdot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--night); }
.pdot.on { background: var(--red); border-color: var(--red); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 0; width: 300px; max-width: 100%; margin-top: 24px; }
.key { height: 66px; width: 66px; border-radius: 50%; justify-self: center; border: 2px solid var(--line); background: var(--white); color: var(--night); font: 600 28px var(--font-title); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.key:active { background: var(--chip); }
.key.ghost { border-color: transparent; background: transparent; }

/* --- Ligar círculo (6C) e login ---------------------------------------------------------------------- */
.link-sheet { margin-top: auto; background: var(--white); border-radius: 28px 28px 0 0; padding: 26px 20px calc(18px + var(--sab)); display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.link-sheet h1 { font-size: 28px; line-height: 1.1; color: var(--night); }
.session-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--white); color: var(--night); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; max-width: 240px; }
.session-chip span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirm-box { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.confirm-box .circle { width: 44px; height: 44px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; flex: none; }

/* --- Presente (ecrã 8) ------------------------------------------------------------------------------------------- */
.gift-screen { align-items: center; text-align: center; padding-top: calc(60px + var(--sat)); padding-left: 24px; padding-right: 24px; }
.gift-screen h1 { font-size: 34px; line-height: 1.1; margin-top: 8px; }
.gift-btn { margin-top: 36px; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; position: relative; width: 300px; height: 300px; justify-content: flex-end; }
.gift-btn canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gift { display: flex; flex-direction: column; align-items: center; transition: transform .6s ease; }
.gift .bow { display: flex; gap: 4px; margin-bottom: -6px; transition: transform .6s ease, opacity .6s ease; }
.gift .bow i { width: 42px; height: 34px; border: 8px solid var(--white); box-sizing: border-box; display: block; }
.gift .bow i:first-child { border-radius: 50% 50% 50% 0; }
.gift .bow i:last-child { border-radius: 50% 50% 0 50%; }
.gift .lid { width: 230px; height: 48px; background: var(--red); border-radius: 8px; display: flex; justify-content: center; transition: transform .6s ease; }
.gift .lid i { width: 34px; height: 48px; background: var(--white); display: block; }
.gift .boxb { width: 200px; height: 160px; background: var(--red-d); border-radius: 0 0 12px 12px; display: flex; justify-content: center; }
.gift .boxb i { width: 34px; height: 160px; background: var(--white); display: block; }
.gift.open .lid { transform: translateY(-70px) rotate(-12deg); }
.gift.open .bow { transform: translateY(-80px) rotate(-12deg); opacity: 0; }
.gift-hint { margin-top: 20px; font: 600 20px var(--font-title); }
.date-pill { margin-top: 12px; background: var(--white); color: var(--night); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; }
.open-screen { padding: calc(20px + var(--sat)) 16px calc(32px + var(--sab)); display: flex; flex-direction: column; gap: 14px; }
.result { background: var(--red); color: var(--white); border-radius: 22px; padding: 26px 18px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; overflow: hidden; }
.result .nm { font: 600 38px/1 var(--font-title); }
.result .ring-w { padding: 4px; border-radius: 50%; border: 3px solid var(--white); display: flex; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { font-size: 19px; color: var(--night); }
.sizes { display: flex; gap: 8px; }
.size { width: 52px; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--white); color: var(--text); font: 700 15px var(--font-text); cursor: pointer; }
.size.on { border-color: var(--night); background: var(--night); color: var(--white); }
.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--night); background: var(--white); color: var(--night); font: 600 22px var(--font-title); cursor: pointer; }
.stepper b { font: 600 26px var(--font-title); min-width: 40px; text-align: center; }
.custom-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; font-weight: 700; font-size: 15px; }
.custom-item button { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.add-row { display: flex; gap: 8px; }
.add-row .field { height: 48px; }
.add-row button { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--night); color: var(--white); font: 700 15px var(--font-text); cursor: pointer; flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.account-card { background: var(--night); color: var(--white); border-radius: 18px; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.account-card h2 { font-size: 20px; }
.account-card p { font-size: 15px; opacity: .95; }

/* --- Avisos e folhas ------------------------------------------------------------------------------------------------ */
#toast { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translate(-50%, 20px); background: var(--text); color: var(--white); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; max-width: min(92vw, 440px); text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.backdrop { position: fixed; inset: 0; background: rgba(15, 26, 51, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: var(--white); width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; max-height: calc(100dvh - var(--sat) - 24px); overflow-y: auto; padding: 18px 20px calc(20px + var(--sab)); display: flex; flex-direction: column; gap: 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 22px; color: var(--night); }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.sheet-text { font-size: 16px; color: var(--text2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #E3E9F5; border-radius: 14px; padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); font: 700 16px var(--font-text); color: var(--night); cursor: pointer; text-decoration: none; width: 100%; text-align: left; }
.menu-item.danger { color: var(--red-d); }

.legal { padding: calc(24px + var(--sat)) 20px calc(32px + var(--sab)); display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font-size: 30px; color: var(--night); }
.legal h2 { font-size: 20px; color: var(--night); margin-top: 8px; }
.legal li { margin-bottom: 4px; }

/* Ecrãs maiores: mantém a coluna do telemóvel, com uma moldura suave. */
@media (min-width: 560px) {
  body { background: #E8EEF9; }
  body[data-theme="blue"], body[data-theme="red"] { background: #0C2250; }
  .screen { box-shadow: 0 0 0 1px var(--line); }
  .backdrop { align-items: center; }
  .sheet { border-radius: 24px; }
}

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