:root {
  --pink: #ec1187;
  --orange: #ff8d10;
  --grad: linear-gradient(135deg, #ec1187 0%, #ff4f5a 50%, #ff8d10 100%);
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #111;
  --muted: #6b6b76;
  --line: #e6e6ea;
  --danger: #e5243b;
  --ok: #18a957;
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; border: 0; }
input, textarea { font: inherit; }

.gradient-bg { background: var(--grad); background-attachment: fixed; }
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

.logo { font-weight: 900; font-size: 28px; letter-spacing: -1px; color: #fff; text-decoration: none; }
.logo.dark { color: var(--text); }
.logo span { display: inline-block; transform: rotate(-4deg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 18px; border-radius: 999px;
  font-weight: 800; font-size: 17px; background: #000; color: #fff; text-decoration: none;
  transition: transform .08s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.white { background: #fff; color: #000; }
.btn.grad { background: var(--grad); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); }
.btn.ig { background: linear-gradient(45deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); color: #fff; }
.btn.snap { background: #fffc00; color: #000; }
.btn.sm { width: auto; padding: 10px 16px; font-size: 14px; }

.field {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; font-size: 16px; outline: none;
}
.field:focus { border-color: var(--pink); }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 8px 2px; }

/* ---------- landing ---------- */
.hero { text-align: center; color: #fff; padding: 40px 0 26px; }
.hero h1 { font-size: 38px; line-height: 1.05; font-weight: 900; margin: 18px 0 10px; letter-spacing: -1px; }
.hero p { font-size: 17px; opacity: .92; margin: 0; }
.panel { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.tabs { display: flex; background: #f0f0f3; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 10px; border-radius: 999px; background: transparent; font-weight: 700; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.prefix { position: relative; }
.prefix span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.prefix .field { padding-left: 34px; }
.stack > * + * { margin-top: 12px; }
.features { color: #fff; margin-top: 26px; display: grid; gap: 10px; }
.features div { background: rgba(255,255,255,.16); border-radius: 16px; padding: 14px 16px; font-weight: 600; }

/* ---------- send page ---------- */
/* Everything fits on one phone screen (also inside Instagram's in-app browser). */
.send-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: max(16px, 3.5vh); padding-bottom: 10px; }
#form-view { flex: 1; display: flex; flex-direction: column; }
.send-card { border-radius: 30px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.12); }
.send-head { background: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #fff; overflow: hidden;
  display: grid; place-items: center; font-weight: 900; font-size: 22px; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.send-head .who { font-size: 16px; color: #111; font-weight: 500; }
.send-head .prompt { font-weight: 800; font-size: 16px; line-height: 1.25; }
.send-body { position: relative; background: rgba(255,255,255,.35); padding: 16px 20px 58px; }
.send-body textarea {
  width: 100%; height: 17vh; min-height: 80px; max-height: 190px; border: 0; background: transparent; resize: none; outline: none;
  font-size: 21px; font-weight: 700; color: #111; line-height: 1.35;
}
.send-body textarea::placeholder { color: rgba(80,40,70,.45); }
.dice {
  position: absolute; right: 16px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.45); font-size: 24px; display: grid; place-items: center;
}
.dice:active { transform: rotate(90deg); }
.anon-note { text-align: center; color: #fff; font-weight: 500; margin: 10px 0; font-size: 17px; }
.btn.big { padding: 19px 18px; font-size: 21px; box-shadow: 0 10px 25px rgba(0,0,0,.15); }
.send-wrap .error { margin: 0 0 8px; min-height: 0; }
.cta { margin-top: auto; padding-top: 12px; text-align: center; }
.tapped { color: #fff; font-weight: 800; font-size: min(18px, 4.3vw); margin-bottom: 10px; white-space: nowrap; }
.legal { margin-top: 12px; display: flex; gap: 22px; justify-content: center; }
.legal a { color: rgba(255,255,255,.6); font-weight: 700; text-decoration: none; }
.device-note { color: rgba(255,255,255,.6); font-size: 11px; margin-top: 6px; }

/* sent screen */
.sent { flex: 1; text-align: center; color: #fff; padding-top: 6vh; position: relative; }
.sent-back { position: absolute; left: 4px; top: -2vh; background: none; color: #fff; font-size: 46px; font-weight: 300; line-height: 1; }
.tick { width: 168px; height: 168px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 7vh auto 22px; }
.tick svg { width: 96px; height: 96px; fill: none; stroke: #ee2a6b; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.sent h2 { font-size: 40px; margin: 0 0 6px; font-weight: 900; }
.big-tapped { white-space: normal; font-size: min(30px, 7vw); font-weight: 600; line-height: 1.3; opacity: .85; margin-bottom: 26px; }
.link-btn { background: none; color: #fff; font-weight: 800; font-size: 21px; text-decoration: underline; text-underline-offset: 5px; margin-top: 22px; }

/* ---------- play tab ---------- */
.dark-page { background: #0f1424; color: #fff; }
.dark-page .icon-btn { background: #232a3d; color: #fff; box-shadow: none; }
.top-tabs { display: flex; gap: 22px; align-items: center; }
.top-tabs button { background: none; font-size: 30px; font-weight: 900; color: #3b4a73; letter-spacing: -1px; position: relative; }
.top-tabs button.active { color: #fff; }
.top-tabs .dot { position: absolute; top: 6px; right: -14px; width: 10px; height: 10px; border-radius: 50%; background: #ff2d55; }
.platforms { display: flex; background: #1b2338; border-radius: 999px; padding: 5px; margin-bottom: -26px; position: relative; z-index: 2; width: 86%; margin-left: auto; margin-right: auto; }
.platforms button { flex: 1; padding: 12px 0; border-radius: 999px; background: none; color: #fff; font-size: 22px; }
.platforms button.active { background: #5f8399; }
.profile-card {
  position: relative; border-radius: 36px; overflow: hidden; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px 24px 24px; background: #555;
}
.profile-card .bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.8); }
.profile-card .bg.none { background: var(--grad); filter: none; }
.profile-card > *:not(.bg) { position: relative; }
.pfp { width: 120px; height: 120px; border-radius: 50%; border: 5px solid #fff; background: var(--grad) center/cover; display: grid; place-items: center; font-size: 48px; font-weight: 900; }
.pfp-edit { position: absolute; right: -4px; bottom: -4px; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #000; font-size: 18px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.profile-card h2 { font-size: 40px; line-height: 1.05; font-weight: 900; margin: 20px 0 0; text-shadow: 0 2px 12px rgba(0,0,0,.35); letter-spacing: -1px; }
.prompt-edit { position: absolute !important; right: 18px; bottom: 18px; width: 50px; height: 50px; border-radius: 50%; background: rgba(0,0,0,.35); border: 3px solid #f6d58b; color: #fff; font-size: 20px; }
.steps-card { background: #1b2234; border-radius: 30px; padding: 24px 20px; margin-top: 22px; text-align: center; border: 1px solid #2a3350; }
.steps-card h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.steps-card .linktxt { font-weight: 800; letter-spacing: .5px; margin-bottom: 14px; text-transform: uppercase; font-size: 14px; word-break: break-all; }
.btn.outline { background: none; color: #fff; border: 2px solid #fff; width: auto; padding: 12px 40px; }
.steps-card .btn.grad { margin-top: 10px; font-size: 22px; padding: 18px; }

/* tutorial */
.guide { background: #121a2c; color: #fff; }
.guide h3 { text-align: center; font-size: 26px; margin: 4px 0 14px; line-height: 1.15; }
.dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 12px; }
.dots span { width: 44px; height: 44px; border-radius: 50%; background: #2c3650; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.dots span.on { background: #fff; color: #000; }
.guide .title { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.mock { border-radius: 26px; height: 270px; overflow: hidden; position: relative; display: grid; place-items: center; background: linear-gradient(160deg, #6b5a4f, #2e2a33); }
.mock .bar { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.mock .bar span { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; font-weight: 800; }
.mock .bar span.hl { outline: 3px solid #fff; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.mock .grid { display: grid; grid-template-columns: repeat(3, auto); gap: 14px; }
.mock .stk { background: #fff; color: #555; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.mock .stk.link { color: #1e74e8; outline: 3px solid #fff; outline-offset: 6px; border-radius: 8px; animation: pulse 1s infinite alternate; }
.mock .field-mock { width: 85%; background: rgba(0,0,0,.35); border-radius: 14px; padding: 14px; text-align: left; font-size: 14px; }
.mock .field-mock .url { border-bottom: 1px solid #aaa; padding: 8px 0; color: #9ecbff; word-break: break-all; }
.mock img { height: 100%; }
.guide .btn.white { margin-top: 18px; }
/* ---------- inbox ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 16px; }
.topbar .actions { display: flex; gap: 8px; }
.icon-btn { background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.link-card { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 18px; }
.link-card .label { font-size: 13px; font-weight: 700; opacity: .9; text-transform: uppercase; letter-spacing: .5px; }
.link-card .url { font-size: 18px; font-weight: 800; margin: 6px 0 14px; word-break: break-all; }
.link-card .row { display: flex; gap: 8px; }
.link-card .row .btn { flex: 1; }
.filter { display: flex; gap: 8px; margin: 20px 0 12px; }
.filter button { padding: 9px 16px; border-radius: 999px; background: #fff; font-weight: 700; color: var(--muted); font-size: 14px; }
.filter button.active { background: #000; color: #fff; }
.filter .count { opacity: .7; margin-left: 4px; }
.msg {
  background: #fff; border-radius: 18px; padding: 16px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); cursor: pointer; margin-bottom: 10px; border: 2px solid transparent;
}
.msg.unseen { border-color: var(--pink); }
.msg .bubble { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; font-size: 20px; flex: none; }
.msg .txt { flex: 1; min-width: 0; }
.msg .preview { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.msg .sub { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.badge.flag { background: #fde7ea; color: var(--danger); }
.badge.new { background: var(--grad); color: #fff; }
.badge.shared { background: #e3f7ea; color: #13853d; }
.msg.is-shared .preview { opacity: .6; }
.shared-pill { background: #e3f7ea; color: #13853d; border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 14px; text-align: center; margin: 0 auto 10px; width: fit-content; max-width: 100%; }
.badge.wait { background: #efeff3; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 46px; }

/* sheet / modal */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; z-index: 20; }
.sheet-bg.open { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 94vh; overflow-y: auto;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 12px 16px 26px; z-index: 21;
  transform: translateY(100%); transition: transform .25s ease; max-width: 560px; margin: 0 auto;
}
.sheet.open { transform: none; }
.grabber { width: 44px; height: 5px; background: #cfcfd6; border-radius: 9px; margin: 0 auto 14px; }
.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.slides img { height: 46vh; max-height: 440px; aspect-ratio: 9/16; border-radius: 14px; scroll-snap-align: center; flex: none; background: #1e1e1e; }
.slides-note { text-align: center; font-size: 13px; color: var(--muted); margin: 8px 0 12px; font-weight: 600; }
.seg { display: flex; background: #e9e9ee; border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 8px; border-radius: 10px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); }
.private {
  background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; font-size: 14px;
  border: 1px dashed #d7d7de;
}
.private h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.private .kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.private .kv b { text-align: right; }
.flag-box { background: #fde7ea; color: #9b1022; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.original { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-grid .full { grid-column: 1 / -1; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%);
  background: #111; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: transform .25s ease; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.sheet.guide { background: #121a2c; }

[hidden] { display: none !important; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #1b2338; border: 1px solid #2a3350;
  border-radius: 18px; padding: 12px 14px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.banner .btn { flex: none; }
.hint { font-size: 13px; color: var(--muted); margin: -4px 2px 10px; }

/* ---------- full-screen message view ---------- */
.msg-view { position: fixed; inset: 0; background: #0f1424; color: #fff; z-index: 15; overflow-y: auto; }
.mv-inner { max-width: 480px; margin: 0 auto; padding: 14px 16px 40px; }
.mv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.round { width: 52px; height: 52px; border-radius: 50%; background: #16203a; color: #fff; font-size: 30px; display: grid; place-items: center; flex: none; line-height: 1; }
#mv-options { font-size: 22px; }
.mv-platforms { margin: 0; width: auto; flex: 1; max-width: 250px; }
.mv-platforms button { padding: 10px 0; }
.flag-pill { background: #fde7ea; color: #d0182f; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 15px; text-align: center; margin: 0 auto 14px; width: fit-content; max-width: 100%; }
.msg-view .slides { justify-content: safe center; }
.msg-view .slides img { height: 52vh; max-height: 560px; border-radius: 18px; }
.msg-view .slides-note { color: #8b95b5; }
.mv-tools { display: flex; justify-content: center; gap: 18px; margin: 6px 0 22px; }
.tool { width: 48px; height: 48px; border-radius: 50%; background: #2a3350; color: #fff; font-size: 22px; display: grid; place-items: center; }
.tool.txt { font-size: 12px; font-weight: 800; }
.tool.rainbow { background: conic-gradient(red, orange, yellow, lime, cyan, blue, magenta, red); border: 3px solid #fff; }
.hint-btn { background: #e0314f; color: #fff; font-size: 20px; padding: 20px; margin-bottom: 14px; }
.msg-view .private { color: var(--text); }
.mv-reply { width: 92%; margin: 0 auto; display: flex; }
.mv-original { margin-top: 18px; color: #8b95b5; }
.mv-original summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.mv-original .original { color: var(--text); }

.sheet.options { background: #fff; color: #111; z-index: 31; }
.sheet-bg { z-index: 30; }
.sheet { z-index: 31; }
.opt-title { text-align: center; font-size: 24px; margin: 6px 0 18px; }
.opt-list { background: #f4f5f7; border-radius: 22px; padding: 6px 10px; }
.opt-list button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 14px 6px; background: none; font-size: 19px; font-weight: 500; color: #111; text-align: left; }
.opt-list button.red { color: #e0182f; }
.opt-list .ico { width: 52px; height: 52px; border-radius: 50%; background: #e7e9ee; display: grid; place-items: center; font-size: 22px; flex: none; }
.opt-list .lbl { flex: 1; }
.opt-list .chev { font-size: 28px; color: #555; }
.sent .check { font-size: 72px; margin-top: 8vh; }
