:root {
  /* Sumoor — dark-first, minimalista, premium */
  --bg: #0A0A0B;          /* fundo principal */
  --bg-2: #0F0F12;        /* bandas sutis */
  --surface: #17171A;     /* cards, topbar, composer */
  --surface-2: #202024;   /* superfícies elevadas: inputs, chips */
  --border: #26262C;      /* bordas sutis */
  --text: #F4F4F0;        /* texto principal */
  --muted: #92929C;       /* texto secundário */
  --primary: #7657FF;     /* cor da marca */
  --primary-2: #9179FF;   /* violeta claro p/ hover/detalhe */
  --sent: #33276B;        /* violeta escuro: mensagens enviadas */
  --coral: #FF6257;       /* urgência, destruição, tempo acabando */
  --danger: #FF4D5E;      /* erros críticos */
  --ok: #4FD1A1;          /* sucesso / online */
  --warn: #FFBD4A;        /* avisos */
  --radius: 15px;
  --shadow: 0 12px 40px rgba(0,0,0,.5);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(118,87,255,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; }
a { color: var(--primary-2); }

.gradient-text { color: var(--text); }
/* wordmark via CSS mask (colore com a cor do tema) */
.brand-logo { display: inline-block; height: 30px; width: 110px;
  background: var(--text);
  -webkit-mask: url(/logo.svg) left center/contain no-repeat;
  mask: url(/logo.svg) left center/contain no-repeat; }
.brand-logo.lg { height: 40px; width: 147px; }
.brand-logo.sm { height: 24px; width: 88px; }
.brand-eye { display: inline-block; width: 22px; height: 22px; background: var(--primary);
  -webkit-mask: url(/icon.svg) center/contain no-repeat; mask: url(/icon.svg) center/contain no-repeat; }

/* ---------- Landing ---------- */
.wrap {
  min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}
.page { width: 100%; max-width: 460px; }
.card {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand h1 { font-size: 22px; margin: 0; letter-spacing: -.3px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; line-height: 1.5; }

.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px;
  border-radius: 12px; margin-bottom: 20px; }
.tabs button { flex: 1; padding: 10px; border-radius: 8px; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px; transition: .15s; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted);
  margin: 16px 0 7px; }
.input, textarea, select {
  width: 100%; padding: 13px 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, textarea:focus, select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(118,87,255,.25);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { padding: 9px 13px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--muted); }
.chip.active { color: #fff; border-color: transparent;
  background: linear-gradient(90deg, var(--primary), var(--primary-2)); }

.btn {
  width: 100%; margin-top: 22px; padding: 14px; border-radius: 12px; font-weight: 700;
  font-size: 15px; color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(118,87,255,.30); transition: transform .08s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.secondary { background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); box-shadow: none; }

.note { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.6;
  display: flex; gap: 8px; align-items: flex-start; }
.note svg { flex: none; margin-top: 1px; }
.err { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; font-weight: 600; }

/* ---------- Modal link criado ---------- */
.created { text-align: center; }
.linkbox { display: flex; gap: 8px; margin-top: 14px; }
.linkbox input { font-size: 13px; }
.copybtn { padding: 0 16px; border-radius: 12px; background: var(--primary);
  color: #fff; font-weight: 700; white-space: nowrap; }

/* ---------- Room ---------- */
.room { display: flex; flex-direction: column; height: 100dvh; height: var(--app-h, 100dvh); }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 5;
}
.topbar .rname { font-weight: 700; font-size: 16px; line-height: 1.1; }
.topbar .rmeta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.topbar .grow { flex: 1; min-width: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px;
  padding: 6px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.timer.warn { color: #fff; background: var(--coral); border-color: transparent; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); display: grid; place-items: center; color: var(--text); }

.people { display: flex; gap: 6px; align-items: center; padding: 8px 14px; overflow-x: auto;
  background: var(--bg-2); border-bottom: 1px solid var(--border); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; flex: none; }

.messages { flex: 1; overflow-y: auto; padding: 16px 12px 8px; display: flex;
  flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.day { align-self: center; font-size: 11px; color: var(--muted); background: var(--surface-2);
  padding: 4px 12px; border-radius: 999px; margin: 8px 0; }
.sysmsg { align-self: center; font-size: 12px; color: var(--muted); margin: 4px 0; }

.row { display: flex; gap: 8px; max-width: 84%; }
.row.me { align-self: flex-end; flex-direction: row-reverse; }
.row .av { width: 30px; height: 30px; flex: none; }
.bubble { background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 8px 12px; position: relative; }
.row.me .bubble { background: var(--sent);
  border: 1px solid #40308a; color: #fff; }
.bubble .who { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.bubble .txt { font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.bubble .time { font-size: 10px; opacity: .65; margin-top: 3px; text-align: right; }
.bubble img, .bubble video { max-width: 100%; border-radius: 12px; display: block; margin-top: 2px; }
.bubble img { cursor: zoom-in; }
.filecard { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  padding: 4px 2px; }
.filecard .fi { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.18);
  display: grid; place-items: center; flex: none; }
.row:not(.me) .filecard .fi { background: var(--surface-2); }
.filecard .fname { font-size: 14px; font-weight: 600; word-break: break-all; }
.filecard .fsize { font-size: 11px; opacity: .7; }

.composer { border-top: 1px solid var(--border); background: var(--surface);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
.previews { display: flex; gap: 8px; padding: 0 2px 8px; flex-wrap: wrap; }
.preview { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.preview .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 12px; }
.preview .pfile { font-size: 10px; padding: 4px; text-align: center; color: var(--muted); word-break: break-all; }
.inrow { display: flex; align-items: flex-end; gap: 8px; }
.attach { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); display: grid; place-items: center; flex: none; color: var(--text); }
textarea.msgin { flex: 1; resize: none; max-height: 140px; border-radius: 22px; padding: 12px 16px; }
.send { width: 44px; height: 44px; border-radius: 50%; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(118,87,255,.35); }
.send[disabled] { opacity: .5; }

/* Join overlay */
.overlay { position: fixed; inset: 0; background: rgba(5,6,10,.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; z-index: 50; }
.overlay .card { max-width: 400px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center;
  z-index: 60; padding: 20px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Expired screen */
.expired-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  background: var(--bg); z-index: 70; text-align: center; }
.expired-screen .big { font-size: 40px; margin-bottom: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 80; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ================= V2 ================= */
.opt { color: var(--muted); font-weight: 500; }
.advtoggle { width: 100%; margin-top: 20px; display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  color: var(--text); font-weight: 600; font-size: 14px; }
.advtoggle svg { transition: transform .2s; color: var(--muted); }

.switch { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); position: relative; transition: .2s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch .stxt { display: flex; flex-direction: column; }
.switch .stxt b { font-size: 14px; }
.switch .stxt small { color: var(--muted); font-size: 12px; }

.badge { font-size: 12px; }
.badge.hidden { display: none; }

.hostmenu { position: absolute; top: calc(100% + 6px); right: 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20; min-width: 220px; }
.hostmenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  background: transparent; color: var(--danger); border-radius: 8px; font-weight: 600; font-size: 14px; text-align: left; }
.hostmenu button:hover { background: var(--surface); }

.pendingbar { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 14px; }
.pendingbar .ptitle { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.prow { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.prow .pname { flex: 1; font-weight: 600; font-size: 14px; }
.papprove, .pdeny { padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.papprove { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #fff; }
.pdeny { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

.pchip { position: relative; display: flex; align-items: center; flex: none; }
.pchip .crown { position: absolute; top: -3px; left: -3px; font-size: 11px; color: var(--warn); }
.pchip .kick { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px; line-height: 1; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* marca d'água anti-print */
.watermark { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: 60px 40px; transform: rotate(-24deg) scale(1.5);
  transform-origin: center; opacity: .10; }
.watermark span { font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--text); }
body.noshot .messages, body.noshot .bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.noshot .bubble img, body.noshot .bubble video { -webkit-user-drag: none; }

.shotcover { position: fixed; inset: 0; z-index: 65; background: var(--bg);
  display: grid; place-items: center; text-align: center; }
.shotcover .big { font-size: 48px; margin-bottom: 10px; }
.shotcover p { font-weight: 700; margin: 0; }
.shotcover small { color: var(--muted); }

/* ================= Landing V3 (estilo dos prints) ================= */
.appbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 0; }
.appbar .logo { height: 34px; width: auto; display: block; }
.shieldbtn { width: 46px; height: 46px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }
.shieldbtn svg { width: 22px; height: 22px; }

.hero { margin: 26px 4px 22px; }
.hero h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.5px; margin: 0; font-weight: 800; }
.hero .hl { color: var(--primary); }
.lede { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 14px 0 0; }

.card { width: 100%; max-width: 460px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; }

.seg { display: flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--border);
  padding: 5px; border-radius: 15px; margin-bottom: 20px; }
.seg-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 8px; border-radius: 11px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14.5px; transition: .18s; }
.seg-btn svg { width: 18px; height: 18px; }
.seg-btn.active { background: linear-gradient(180deg, #8168ff, var(--primary)); color: #fff;
  box-shadow: 0 6px 16px rgba(118,87,255,.35); }

label { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin: 18px 0 9px; }
.hint { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }

.field { position: relative; }
.field input { width: 100%; padding: 15px 46px 15px 16px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 14px; color: var(--text); outline: none;
  font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #6a6a76; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(118,87,255,.22); }
.field .fic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); display: grid; place-items: center; }
.field .fic svg { width: 20px; height: 20px; }
.field .fic.tap { background: none; border: none; cursor: pointer; }
.field .fic.tap.on { color: var(--primary); }
.passfield { margin-top: 12px; }

.durgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dur { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 15px 10px;
  border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 14.5px; transition: .15s; }
.dur svg { width: 16px; height: 16px; }
.dur.active { border-color: transparent; color: #fff;
  background: linear-gradient(180deg, #8168ff, var(--primary)); box-shadow: 0 6px 16px rgba(118,87,255,.3); }

.advbtn { width: 100%; margin-top: 16px; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: 14.5px; }
.advbtn .l { display: flex; align-items: center; gap: 10px; }
.advbtn .l svg { width: 18px; height: 18px; color: var(--primary); }
.advbtn .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }

.adv { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.optcard { background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.optrow { display: flex; align-items: center; gap: 12px; }
.opic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(118,87,255,.12);
  border: 1px solid rgba(118,87,255,.25); display: grid; place-items: center; color: var(--primary); }
.opic svg { width: 20px; height: 20px; }
.opbody { flex: 1; min-width: 0; }
.opbody b { font-size: 14.5px; font-weight: 700; }
.opbody small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.optag { font-size: 11px; color: var(--muted); font-weight: 600; margin-left: 4px; }

.sw { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); transition: .2s; }
.sw .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.sw input:checked + .track { background: linear-gradient(90deg, #8168ff, var(--primary)); border-color: transparent; }
.sw input:checked + .track::after { transform: translateX(22px); }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.stepper button { width: 32px; height: 32px; border-radius: 9px; background: transparent; color: var(--text);
  font-size: 20px; font-weight: 700; display: grid; place-items: center; }
.stepper button:active { background: var(--surface); }
.stepper span { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; }

.infobox { display: flex; gap: 11px; align-items: flex-start; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 15px; margin-top: 18px; }
.infobox .ii { color: var(--primary); flex: none; }
.infobox .ii svg { width: 20px; height: 20px; }
.infobox span:last-child { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.cta { width: 100%; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px; border-radius: 16px; font-weight: 700; font-size: 15.5px; color: #fff;
  background: linear-gradient(180deg, #8168ff, var(--primary));
  box-shadow: 0 10px 26px rgba(118,87,255,.4); transition: transform .08s, opacity .15s; }
.cta:active { transform: translateY(1px); }
.cta[disabled] { opacity: .6; }
.cta svg { width: 20px; height: 20px; }
.cta .arr { margin-left: auto; opacity: .85; }
.cta .spin { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.ghost { width: 100%; margin-top: 10px; padding: 15px; border-radius: 14px; background: transparent;
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14.5px; }

.privacy { display: flex; gap: 13px; align-items: flex-start; margin: 16px 2px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.privacy .pic { width: 44px; height: 44px; flex: none; border-radius: 13px; background: rgba(118,87,255,.1);
  border: 1px solid rgba(118,87,255,.22); display: grid; place-items: center; color: var(--primary); }
.privacy .pic svg { width: 22px; height: 22px; }
.privacy b { font-size: 14.5px; }
.privacy p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 3px 0 0; }

/* modal */
.card.modal { max-width: 400px; text-align: center; }
.mbrand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.mbrand h2 { margin: 0; font-size: 20px; }
.linkbox { display: flex; gap: 8px; margin: 14px 0; }
.linkbox .input { flex: 1; font-size: 13px; padding: 13px 14px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text); }
.copybtn { padding: 0 18px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; }

/* ================= Modo app nativo (PWA) ================= */
/* Trava a casca: nada rola como página; só os containers internos rolam. */
html.appmode, html.appmode body {
  height: 100%; margin: 0; overflow: hidden;
  position: fixed; inset: 0; width: 100%;
  overscroll-behavior: none; touch-action: manipulation;
}
html.appmode { -webkit-text-size-adjust: 100%; }
/* impede seleção/callout na UI (sensação de app), mas permite copiar mensagens */
html.appmode .room { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.appmode .bubble .txt, html.appmode input, html.appmode textarea {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
.messages { overscroll-behavior: contain; }
/* inputs nunca abaixo de 16px -> iOS não dá zoom (que empurrava a tela) */
input, textarea { font-size: 16px; }
.msgin { font-size: 16px !important; }

/* trava de orientação: se algum aparelho ignorar o manifest, evita layout quebrado */
@media (orientation: landscape) and (max-height: 480px) {
  html.appmode .rotatelock { display: flex; }
}
.rotatelock { display: none; position: fixed; inset: 0; z-index: 200; background: var(--bg);
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.rotatelock .big { font-size: 44px; }
.rotatelock p { color: var(--muted); margin: 0; max-width: 280px; }

/* ================= Modal de confirmação (nosso visual) ================= */
.cdialog { position: fixed; inset: 0; z-index: 90; background: rgba(5,5,7,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px; }
.cdialog-card { width: 100%; max-width: 360px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 22px; padding: 26px 22px 22px;
  text-align: center; box-shadow: var(--shadow); }
.cdialog-emoji { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.cdialog-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.cdialog-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cdialog-actions { display: flex; gap: 10px; }
.cd-cancel, .cd-ok { flex: 1; padding: 14px; border-radius: 13px; font-weight: 700; font-size: 15px; }
.cd-cancel { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.cd-ok { background: linear-gradient(180deg, #8168ff, var(--primary)); color: #fff; }
.cd-ok.danger { background: var(--coral); }
