/* PHISH TANK — style.css */
:root {
  --bg: #071019;
  --bg2: #0a1622;
  --panel: #0d1a27;
  --panel2: #122438;
  --line: rgba(130, 180, 230, .14);
  --line2: rgba(130, 180, 230, .28);
  --text: #e6f0f8;
  --muted: #8aa4bd;
  --dim: #5f778f;
  --cyan: #22d3ee;
  --cyan2: #67e8f9;
  --coral: #ff5c5c;
  --coral2: #ff8a8a;
  --green: #34d399;
  --green2: #6ee7b7;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --paper: #fbfcfe;
  --paper2: #f1f5f9;
  --ink: #15202b;
  --ink2: #4a5b6c;
  --ink3: #7b8a99;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --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: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #0f2a3f 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 110%, #0e2233 0%, transparent 55%), var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.shake { animation: shake .55s cubic-bezier(.36,.07,.19,.97) both; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
code, kbd { font-family: var(--mono); }
kbd {
  display: inline-block; font-size: .72em; padding: .08em .45em; border-radius: 5px;
  border: 1px solid currentColor; opacity: .75; margin-right: .35em; vertical-align: middle; line-height: 1.5;
}
.muted { color: var(--muted); }
.ico { width: 1.2em; height: 1.2em; fill: currentColor; vertical-align: -0.25em; flex: none; }
.spacer { flex: 1; }
#app { height: 100vh; height: 100dvh; width: 100%; position: relative; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen.start, .screen.results { overflow: auto; align-items: center; justify-content: flex-start; padding: calc(24px + var(--sat)) 16px calc(24px + var(--sab)); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .45em; font-weight: 900; letter-spacing: .06em; font-size: 15px; color: var(--cyan2); white-space: nowrap; }
.brand em { font-style: normal; color: var(--text); margin-left: .25em; }
.brand .ico { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(34,211,238,.6)); }
.brand.big { font-size: clamp(30px, 6vw, 44px); letter-spacing: .1em; }
.brand.big .ico { animation: bob 3s ease-in-out infinite; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  padding: 10px 16px; border-radius: 11px; border: 1px solid var(--line2);
  background: var(--panel2); color: var(--text); font-weight: 700; letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s;
  user-select: none; -webkit-user-select: none; min-height: 44px;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 13px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn.primary { background: linear-gradient(180deg, #2ee6ff, #13b9d4); color: #04202a; border-color: transparent; box-shadow: 0 8px 24px rgba(34,211,238,.28); }
.btn.danger { background: linear-gradient(180deg, #ff6b6b, #e63e3e); color: #fff; border-color: transparent; box-shadow: 0 8px 24px rgba(255,92,92,.28); }
.btn.safe { background: linear-gradient(180deg, #3ee0a3, #17b67c); color: #032418; border-color: transparent; box-shadow: 0 8px 24px rgba(52,211,153,.28); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--muted); transition: background .15s, color .15s, transform .1s;
}
.icon-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ico { width: 1.35em; height: 1.35em; }
.icon-btn .btn-lbl { display: none; font-size: 13px; font-weight: 600; }
.icon-btn[aria-pressed="true"] { background: rgba(34,211,238,.16); color: var(--cyan2); border-color: rgba(34,211,238,.4); box-shadow: inset 0 0 0 1px rgba(34,211,238,.25), 0 0 14px rgba(34,211,238,.25); }
.icon-btn.tiny { width: auto; height: 32px; padding: 0 10px; font-size: 12px; }
.mute-btn .ico.off { display: none; }
.mute-btn[aria-pressed="true"] .ico.on { display: none; }
.mute-btn[aria-pressed="true"] .ico.off { display: inline; }
.mute-lbl { font-size: 12px; }
.chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; background: var(--panel2); border: 1px solid var(--line2); white-space: nowrap; }

/* ---------- START ---------- */
.start-card {
  position: relative; z-index: 1; width: 100%; max-width: 520px; margin: auto;
  background: linear-gradient(180deg, rgba(18,36,56,.9), rgba(13,26,39,.95));
  border: 1px solid var(--line2); border-radius: 22px; padding: 30px 28px 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.start-card .brand.big { display: flex; justify-content: center; margin-bottom: 8px; }
.tagline { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.field { display: block; margin: 0 0 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 11px; color: var(--text);
  background: rgba(7,16,25,.7); border: 1px solid var(--line2); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.2); }
.avatar-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; padding: 0;
  background: var(--c); display: grid; place-items: center; font-weight: 900; color: rgba(0,0,0,.6); transition: transform .12s, border-color .12s;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked="true"] { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px var(--c), 0 0 18px var(--c); }
.howto { margin: 6px 0 18px; padding: 0 0 0 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: #c5d5e4; }
.howto li { padding-left: 26px; position: relative; }
.howto li::before { content: ""; position: absolute; left: 0; top: .32em; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--cyan2), var(--cyan) 60%, transparent 62%); box-shadow: 0 0 10px rgba(34,211,238,.6); }
.howto b { color: var(--text); }
.form-error { color: var(--coral2); font-size: 13.5px; margin: -6px 0 10px; }
#start-form .btn.primary { width: 100%; }
#btn-resume { width: 100%; margin-top: 10px; }
.start-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12px; }
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bubbles i {
  position: absolute; bottom: -60px; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(103,232,249,.35); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.25), transparent 55%);
  animation: rise linear infinite; opacity: .6;
}
.bubbles i:nth-child(1) { left: 8%; animation-duration: 14s; width: 10px; height: 10px; }
.bubbles i:nth-child(2) { left: 20%; animation-duration: 19s; animation-delay: -6s; }
.bubbles i:nth-child(3) { left: 33%; animation-duration: 11s; animation-delay: -3s; width: 8px; height: 8px; }
.bubbles i:nth-child(4) { left: 47%; animation-duration: 21s; animation-delay: -10s; width: 26px; height: 26px; }
.bubbles i:nth-child(5) { left: 61%; animation-duration: 13s; animation-delay: -8s; }
.bubbles i:nth-child(6) { left: 72%; animation-duration: 17s; animation-delay: -2s; width: 12px; height: 12px; }
.bubbles i:nth-child(7) { left: 84%; animation-duration: 23s; animation-delay: -12s; width: 22px; height: 22px; }
.bubbles i:nth-child(8) { left: 93%; animation-duration: 15s; animation-delay: -5s; }

/* ---------- TOP BAR ---------- */
.game { background: var(--bg); }
.topbar {
  display: flex; align-items: center; gap: 14px; height: calc(54px + var(--sat)); padding: var(--sat) 14px 0 calc(14px + var(--sal));
  background: linear-gradient(180deg, #0e1d2d, #0b1826); border-bottom: 1px solid var(--line); flex: none; position: relative; z-index: 5;
}
.topbar .lbl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.topbar .num { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 17px; }
.day-chip { background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.35); color: var(--cyan2); }
.rating { display: flex; align-items: center; gap: 9px; }
.meter { position: relative; width: 150px; height: 12px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid var(--line2); overflow: hidden; }
.meter .fill { position: absolute; inset: 0; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #22d3ee, #34d399); transition: width .6s cubic-bezier(.2,.8,.2,1), background .4s; box-shadow: 0 0 12px rgba(52,211,153,.5); }
.meter .fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%); background-size: 200% 100%; animation: shimmer 3s linear infinite; }
.meter.warn .fill { background: linear-gradient(90deg, #fbbf24, #f59e0b); box-shadow: 0 0 12px rgba(251,191,36,.5); }
.meter.crit .fill { background: linear-gradient(90deg, #ff5c5c, #e02424); box-shadow: 0 0 14px rgba(255,92,92,.6); animation: pulse-red 1.2s ease-in-out infinite; }
.meter .cracks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.meter .cracks path { fill: none; stroke: #050b12; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; stroke-dasharray: 60; stroke-dashoffset: 60; }
.meter.crack1 .cracks .c1 path, .meter.crack2 .cracks .c1 path, .meter.crack2 .cracks .c2 path,
.meter.crack3 .cracks .c1 path, .meter.crack3 .cracks .c2 path, .meter.crack3 .cracks .c3 path { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .5s ease-out, opacity .1s; }
.meter.shatter { animation: shatter .5s ease-out; }
.rating .num { min-width: 32px; text-align: right; }
.score { display: flex; align-items: baseline; gap: 8px; }
.score .num { font-size: 19px; color: var(--cyan2); text-shadow: 0 0 12px rgba(34,211,238,.35); transition: transform .15s; }
.score .num.bump { animation: bump .45s ease; }
.score .num.dip { animation: dip .45s ease; color: var(--coral2); }
.streak { display: flex; align-items: center; gap: 4px; color: var(--dim); font-weight: 800; font-variant-numeric: tabular-nums; transition: color .3s; }
.streak .ico { width: 1.3em; height: 1.3em; opacity: .4; transition: opacity .3s, transform .3s; transform-origin: 50% 90%; }
.streak.lit { color: var(--amber); }
.streak.lit .ico { opacity: 1; color: #fb923c; filter: drop-shadow(0 0 6px rgba(251,146,60,.8)); animation: flicker .5s ease-in-out infinite alternate; }
.streak.hot .ico { color: #f97316; transform: scale(1.25); filter: drop-shadow(0 0 10px rgba(249,115,22,1)); }
.me-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: rgba(0,0,0,.65); background: var(--cyan); font-size: 14px; }

/* ---------- GAME BODY ---------- */
.game-body { flex: 1; display: flex; min-height: 0; position: relative; overflow: hidden; }
.inbox { width: 340px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; padding-left: var(--sal); }
.inbox-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.inbox-head h2 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.count { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(34,211,238,.15); color: var(--cyan2); }
.inbox-list { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.inbox-hint { padding: 8px 16px calc(8px + var(--sab)); font-size: 11.5px; color: var(--dim); border-top: 1px solid var(--line); }
.mail-item {
  display: grid; grid-template-columns: 38px 1fr auto; grid-template-rows: auto auto auto; column-gap: 11px; row-gap: 1px;
  padding: 10px 10px; border-radius: 12px; cursor: pointer; position: relative; border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.mail-item:hover { background: rgba(255,255,255,.04); }
.mail-item.selected { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.3); }
.mail-item.arrive { animation: arrive .55s cubic-bezier(.2,.9,.2,1.1) both; }
.mail-item .av { grid-row: 1 / span 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: rgba(0,0,0,.65); font-size: 15px; }
.mail-item .who { font-weight: 500; color: #c9d7e5; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .when { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.mail-item .subj { grid-column: 2 / span 2; font-size: 13.5px; color: #b6c5d4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .prev { grid-column: 2 / span 2; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item.unread .who, .mail-item.unread .subj { font-weight: 800; color: var(--text); }
.mail-item.unread::before { content: ""; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.mail-item .st { position: absolute; right: 10px; bottom: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.mail-item .st .ico { width: 13px; height: 13px; }
.mail-item .st.ok { background: rgba(52,211,153,.2); color: var(--green2); }
.mail-item .st.bad { background: rgba(255,92,92,.2); color: var(--coral2); }
.mail-item .st.hook { background: var(--coral); color: #fff; }
.mail-item .att-dot { display: inline-block; vertical-align: -2px; margin-left: 4px; color: var(--dim); width: 12px; height: 12px; }

/* ---------- READER ---------- */
.reader { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); position: relative; min-height: 0; }
.reader-empty { flex: 1; display: grid; place-items: center; color: var(--ink3); text-align: center; }
.reader-empty .ico { width: 48px; height: 48px; opacity: .3; display: block; margin: 0 auto 6px; }
.reader-content { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 30px 40px; }
.reader.inspect .reader-content { background: repeating-linear-gradient(0deg, rgba(34,211,238,.035) 0 1px, transparent 1px 22px), var(--paper); }
.reader-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.reader-top .back { display: none; color: var(--ink2); }
.em-subject { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; flex: 1; letter-spacing: -.01em; }
.em-state { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.em-state.ok { background: #d1fae5; color: #047857; }
.em-state.bad { background: #fee2e2; color: #b91c1c; }
.em-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid #e4e9ef; margin-bottom: 16px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: rgba(0,0,0,.6); font-size: 17px; }
.em-meta { min-width: 0; font-size: 13.5px; color: var(--ink2); }
.em-from { font-size: 15px; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.em-from b { font-weight: 800; }
.addr { font-size: 12.5px; color: var(--ink2); background: #eef2f6; padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.em-from .addr { color: #1f2f3f; }
.em-replyto { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.em-replyto .addr { background: #fff3e0; color: #92400e; }
.em-to { margin-top: 4px; }
.em-meta .k { font-size: 11.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.em-time { font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.att-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 10px; border: 1px solid #dfe5ec;
  background: #fff; color: var(--ink); font-size: 13px; font-family: inherit; text-align: left; transition: box-shadow .15s, transform .1s;
}
.att-chip:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.att-chip .fi { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 9px; font-weight: 900; letter-spacing: .02em; color: #fff; flex: none; }
.att-chip .fi.pdf { background: #ef4444; } .att-chip .fi.doc { background: #2563eb; } .att-chip .fi.xls { background: #16a34a; }
.att-chip .fi.zip { background: #a16207; } .att-chip .fi.img { background: #7c3aed; } .att-chip .fi.exe { background: #111827; }
.att-chip .fi.html { background: #ea580c; } .att-chip .fi.other { background: #64748b; }
.att-chip .fn { font-weight: 600; word-break: break-all; }
.att-chip .fs { color: var(--ink3); font-size: 11.5px; margin-left: 2px; }
.att-chip.exe { border-color: #fecaca; }
.ext-banner { display: flex; gap: 10px; align-items: flex-start; background: #f2c94c; color: #3b2f00; border-left: 6px solid #b8860b; padding: 9px 12px; font-size: 13.5px; font-weight: 600; margin: 0 0 14px; border-radius: 4px; line-height: 1.4; }
.ext-banner .ico { color: #7a5a00; width: 1.25em; height: 1.25em; margin-top: 1px; }
.blocked-img { display: inline-flex; align-items: center; gap: 8px; background: #e9edf1; border: 1px solid #cfd6de; color: #4a5b6c; font-size: 11.5px; padding: 8px 10px; border-radius: 4px; max-width: 100%; margin: 4px 0 8px; pointer-events: none; user-select: none; -webkit-user-select: none; line-height: 1.3; text-align: left; vertical-align: middle; }
.blocked-img .bx { width: 18px; height: 18px; border: 1px solid #cfd6de; background: #fff; display: grid; place-items: center; color: #dc2626; flex: none; }
.blocked-img .bx .ico { width: 12px; height: 12px; }
.em-body { font-size: 15px; line-height: 1.6; color: #1e2b38; max-width: 720px; }
.em-body p { margin: 0 0 12px; }
.em-body h3 { margin: 16px 0 8px; font-size: 17px; }
.em-body a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.em-body a.btnlink, .em-body .button a, .em-body a[data-style="button"] { display: inline-block; background: #1d4ed8; color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 8px; font-weight: 700; }
.em-body table { border-collapse: collapse; margin: 8px 0 12px; font-size: 14px; }
.em-body td { border: 1px solid #e2e8f0; padding: 6px 10px; }
.em-body blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #cbd5e1; color: #475569; }
.em-body hr { border: 0; border-top: 1px solid #e2e8f0; margin: 14px 0; }
.em-body ul, .em-body ol { padding-left: 22px; }
.em-footer { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #e4e9ef; }
.em-footer .btn.ghost { color: var(--ink2); border-color: #d6dee7; }
.inspect-hint { font-size: 12.5px; color: #0e7490; font-weight: 600; }

/* inspect hotspots */
.hotspot { border-radius: 6px; }
.reader.inspect .hotspot, .reader.inspect .em-body a, .reader.inspect .em-body [data-tell], .reader.inspect .att-chip {
  outline: 2px dashed rgba(14,116,144,.55); outline-offset: 3px; cursor: pointer; transition: background .15s, outline-color .15s;
  animation: hot-pulse 1.6s ease-in-out infinite;
}
.reader.inspect .hotspot:hover, .reader.inspect .em-body a:hover, .reader.inspect .em-body [data-tell]:hover, .reader.inspect .att-chip:hover { background: rgba(34,211,238,.18); outline-color: var(--cyan); animation: none; }
.reader .spotted, .reader.inspect .spotted { outline: 2px solid var(--green) !important; background: rgba(52,211,153,.18) !important; animation: none !important; }
.em-body [data-tell].spotted { border-radius: 4px; }
.floatpts { position: fixed; z-index: 60; font-weight: 900; color: var(--green); font-size: 18px; pointer-events: none; animation: floatup 1s ease-out forwards; text-shadow: 0 1px 0 #fff, 0 0 10px rgba(52,211,153,.6); }

/* action bar */
.actionbar { flex: none; display: flex; gap: 12px; padding: 12px 22px calc(12px + var(--sab)); border-top: 1px solid #e4e9ef; background: #fff; box-shadow: 0 -10px 30px rgba(0,0,0,.05); }
.actionbar .btn { flex: 1; font-size: 15px; letter-spacing: .06em; }

/* debrief overlay on reading pane */
.debrief { position: absolute; inset: 0; z-index: 4; overflow-y: auto; background: rgba(7,16,25,.62); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 22px 16px calc(22px + var(--sab)); animation: fade .25s ease; }
.debrief-inner { width: 100%; max-width: 640px; background: var(--paper); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: pop .35s cubic-bezier(.2,.9,.2,1.2); margin: auto 0; }
.db-banner { display: flex; align-items: center; gap: 14px; padding: 18px 22px; color: #fff; }
.db-banner.ok { background: linear-gradient(120deg, #059669, #10b981); }
.db-banner.bad { background: linear-gradient(120deg, #b91c1c, #ef4444); }
.db-banner.hook { background: linear-gradient(120deg, #7f1d1d, #dc2626); }
.db-icon { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.db-icon .ico { width: 26px; height: 26px; }
.db-titles h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.db-points { font-weight: 800; font-size: 13.5px; opacity: .95; margin-top: 3px; letter-spacing: .02em; }
.db-points .neg { color: #fecaca; } .db-points .pos { color: #d1fae5; }
.db-text { padding: 16px 22px 4px; margin: 0; font-size: 15px; line-height: 1.55; }
.db-hooked { margin: 10px 22px 0; padding: 12px 14px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; font-size: 14px; }
#db-tells-wrap h3, .call-ending h3 { margin: 16px 22px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink3); }
.db-tells { list-style: none; margin: 0; padding: 0 22px; display: grid; gap: 8px; }
.db-tells li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f1f5f9; font-size: 14px; }
.db-tells li .mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #cbd5e1; color: #fff; }
.db-tells li .mk .ico { width: 14px; height: 14px; }
.db-tells li.spotted { background: #ecfdf5; }
.db-tells li.spotted .mk { background: var(--green); }
.db-tells li.flag { background: #fef2f2; } .db-tells li.flag .mk { background: var(--coral); }
.db-tells li.legit { background: #ecfdf5; } .db-tells li.legit .mk { background: var(--green); }
.db-tells li b { display: block; }
.db-tells li span { color: var(--ink2); }
.db-tells li .pts { font-size: 11px; color: #047857; font-weight: 800; margin-left: 6px; }
.db-actions { padding: 18px 22px 22px; display: flex; justify-content: flex-end; }

/* status bar */
.statusbar { position: fixed; left: 0; bottom: 0; z-index: 30; max-width: 70vw; padding: 5px 10px; font: 12.5px var(--mono); color: #1e293b; background: #f8fafc; border: 1px solid #cbd5e1; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--sat)) 16px calc(16px + var(--sab)); background: rgba(4,10,16,.78); backdrop-filter: blur(8px); animation: fade .3s ease; overflow-y: auto; }
.card { width: 100%; max-width: 520px; background: linear-gradient(180deg, #132539, #0e1c2c); border: 1px solid var(--line2); border-radius: 22px; padding: 28px 28px 26px; box-shadow: var(--shadow); animation: pop .4s cubic-bezier(.2,.9,.2,1.15); margin: auto; }
.card h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.01em; }
.card p { color: #c5d5e4; font-size: 15.5px; margin: 0 0 18px; }
.card .btn.primary { width: 100%; }
.card-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.intro-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(34,211,238,.12); color: var(--cyan2); font-weight: 700; font-size: 13.5px; margin-bottom: 20px; }
.intro-count span { font-size: 18px; }
.ds-stats, .res-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 16px; }
.stat { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.stat .v { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.ds-note { min-height: 1.4em; font-weight: 600; }
.ds-note.perfect { color: var(--amber); }

/* hooked */
.overlay.hooked { background: radial-gradient(circle at 50% 40%, rgba(160,10,10,.9), rgba(30,0,0,.96)); z-index: 45; }
.hooked-inner { text-align: center; max-width: 560px; animation: pop .35s ease; }
.hooked-hook .ico { width: 84px; height: 84px; color: #fff; filter: drop-shadow(0 0 20px rgba(255,80,80,.9)); animation: swing 1.6s ease-in-out infinite; transform-origin: 50% 0; }
.hooked-inner h2 { font-size: clamp(34px, 8vw, 62px); margin: 8px 0 12px; letter-spacing: .04em; color: #fff; }
.hooked-inner p { font-size: 17px; line-height: 1.5; color: #ffe4e6; margin: 0 0 14px; }
.hooked-penalty { display: inline-block; font-weight: 800; color: #fecaca; background: rgba(0,0,0,.35); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; letter-spacing: .04em; }
.hooked-inner .btn { min-width: 220px; }
.glitch { position: relative; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: .8; pointer-events: none; }
.glitch::before { color: #22d3ee; animation: glitch1 1.6s infinite linear alternate-reverse; clip-path: inset(20% 0 55% 0); }
.glitch::after { color: #ff5c5c; animation: glitch2 1.3s infinite linear alternate-reverse; clip-path: inset(60% 0 10% 0); }

/* breach */
.overlay.breach { background: #050000; z-index: 46; }
.breach-inner { text-align: center; max-width: 560px; position: relative; }
.breach-inner h2 { font-size: clamp(56px, 14vw, 110px); margin: 0 0 8px; letter-spacing: .12em; color: #ff2d2d; text-shadow: 0 0 40px rgba(255,45,45,.7); }
.breach-inner p { color: #fca5a5; font-size: 17px; margin: 0 0 24px; }
.breach-scan { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,0,0,.06) 0 2px, transparent 2px 4px); animation: scan 4s linear infinite; }

/* flash */
.flash { position: fixed; inset: 0; z-index: 44; pointer-events: none; background: #ff1b1b; opacity: 0; }
.flash.go { animation: flash .7s ease-out; }

/* ---------- CALL ---------- */
.overlay.call { background: radial-gradient(circle at 50% 30%, #12233a, #050b12 70%); z-index: 42; align-items: stretch; padding: 0; }
.call-incoming { margin: auto; text-align: center; padding: 30px 20px; width: 100%; max-width: 420px; }
.ring-wrap { position: relative; width: 150px; height: 150px; margin: 0 auto 26px; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(34,211,238,.55); animation: ring 1.8s ease-out infinite; }
.ring.r2 { animation-delay: .6s; } .ring.r3 { animation-delay: 1.2s; }
.ring-core { position: absolute; inset: 30px; border-radius: 50%; background: linear-gradient(180deg, #1e3a5f, #0f2237); display: grid; place-items: center; box-shadow: 0 0 40px rgba(34,211,238,.35); animation: wiggle .9s ease-in-out infinite; }
.ring-core .ico { width: 44px; height: 44px; color: var(--cyan2); }
.call-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; animation: blink 1.6s ease-in-out infinite; }
.call-caller { font-size: 28px; font-weight: 900; margin: 6px 0 2px; }
.call-sub { color: var(--muted); font-size: 14.5px; min-height: 1.5em; margin-bottom: 30px; }
.call-sub.urgent { color: var(--coral2); font-weight: 700; }
.call-btns { display: flex; justify-content: center; gap: 44px; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font-weight: 700; font-size: 13px; }
.call-btn .ico { width: 68px; height: 68px; padding: 18px; border-radius: 50%; color: #fff; box-sizing: border-box; transition: transform .12s; }
.call-btn:active .ico { transform: scale(.92); }
.call-btn.answer .ico { background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: answer-pulse 1.4s infinite; }
.call-btn.decline .ico { background: #dc2626; transform: rotate(135deg); }
.call-btn.decline:active .ico { transform: rotate(135deg) scale(.92); }
.call-dialog { display: flex; flex-direction: column; width: 100%; max-width: 620px; margin: 0 auto; height: 100%; padding: calc(12px + var(--sat)) 14px calc(12px + var(--sab)); }
.call-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.05); font-weight: 700; margin-bottom: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.2s infinite; }
.call-timer { margin-left: auto; font-family: var(--mono); color: var(--muted); font-weight: 500; }
.call-transcript { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; overscroll-behavior: contain; }
.bub { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15.5px; line-height: 1.5; animation: pop .25s ease; }
.bub.caller { align-self: flex-start; background: #1b2f47; border-bottom-left-radius: 5px; }
.bub.me { align-self: flex-end; background: linear-gradient(180deg, #22d3ee, #0ea5b7); color: #032027; border-bottom-right-radius: 5px; font-weight: 600; }
.bub .fb { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; padding-top: 6px; border-top: 1px solid rgba(0,0,0,.15); }
.bub .fb.good { color: #064e3b; } .bub .fb.bad { color: #7f1d1d; } .bub .fb.meh { color: #3f3f46; }
.bub .cursor { display: inline-block; width: .5em; height: 1em; background: var(--cyan2); vertical-align: -0.15em; margin-left: 2px; animation: blink .7s steps(1) infinite; }
.call-choices { display: grid; gap: 8px; padding-top: 12px; }
.choice { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--text); font-size: 15px; line-height: 1.4; transition: background .15s, transform .1s, border-color .15s; animation: slideup .3s ease both; }
.choice:hover { background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.5); }
.choice:active { transform: scale(.985); }
.choice:nth-child(2) { animation-delay: .06s; } .choice:nth-child(3) { animation-delay: .12s; } .choice:nth-child(4) { animation-delay: .18s; }
.choice kbd { margin-right: 8px; }
.call-ending { margin: auto; width: 100%; max-width: 560px; padding: 20px 16px; }
.call-ending .card h3 { margin: 18px 0 8px; }
.call-ending .db-tells { padding: 0; margin-bottom: 20px; }
.call-ending .db-tells li { background: rgba(255,255,255,.05); }
.call-ending .db-tells li span, .call-ending .db-tells li b { color: var(--text); }
.call-ending .db-tells li span { color: var(--muted); }
.call-ending .db-points { font-size: 15px; margin-bottom: 4px; }
.call-ending .db-points.pos { color: var(--green2); } .call-ending .db-points.neg { color: var(--coral2); }
.card.safe .card-kicker { color: var(--green2); } .card.hooked .card-kicker { color: var(--coral2); } .card.partial .card-kicker { color: var(--amber); }

/* ---------- SHEET ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4,10,16,.55); animation: fade .2s ease; }
.sheet { position: fixed; z-index: 51; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 560px; background: #fff; color: var(--ink); border-radius: 20px 20px 0 0; padding: 10px 22px calc(20px + var(--sab)); box-shadow: 0 -20px 60px rgba(0,0,0,.4); animation: slideup .3s cubic-bezier(.2,.9,.2,1); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: #cbd5e1; margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 12px; font-size: 20px; }
.sheet-body { font-size: 14.5px; color: var(--ink2); }
.sheet-body .row { margin: 0 0 10px; }
.sheet-body .k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink3); font-weight: 800; margin-bottom: 3px; }
.sheet-body .url { display: block; font-family: var(--mono); font-size: 13.5px; color: var(--ink); background: #f1f5f9; padding: 10px 12px; border-radius: 10px; word-break: break-all; line-height: 1.5; }
.sheet-body .url mark { background: #fde68a; color: #111827; padding: 1px 4px; border-radius: 4px; font-weight: 800; }
.sheet-body .url mark.bad { background: #fecaca; }
.sheet-body .shown { font-weight: 700; color: var(--ink); }
.sheet-body .warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13.5px; }
.sheet-body .warn .ico { color: #f97316; width: 18px; height: 18px; margin-top: 1px; }
.sheet-btns { display: flex; gap: 10px; margin-top: 16px; }
.sheet-btns .btn { flex: 1; }
.sheet-btns .btn.ghost { color: var(--ink); border-color: #d6dee7; }
@media (min-width: 760px) { .sheet { bottom: 40px; border-radius: 20px; padding-bottom: 20px; } }

/* ---------- POPOVER ---------- */
.popover { position: fixed; z-index: 55; width: min(320px, calc(100vw - 24px)); background: #0e1c2c; color: var(--text); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); animation: pop .22s cubic-bezier(.2,.9,.2,1.2); }
.popover.tell { border-color: rgba(52,211,153,.6); box-shadow: 0 0 0 1px rgba(52,211,153,.3), var(--shadow); }
.popover.normal { border-color: var(--line2); }
.pop-title { font-weight: 800; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.popover.tell .pop-title { color: var(--green2); }
.popover.normal .pop-title { color: var(--muted); }
.pop-text { font-size: 13.5px; color: #c5d5e4; line-height: 1.45; }

/* ---------- TOAST ---------- */
.toast { position: fixed; z-index: 58; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%); background: #0e1c2c; color: var(--text); border: 1px solid var(--line2); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: min(92vw, 480px); text-align: center; animation: toastin .25s ease; }
.toast.warn { border-color: rgba(251,191,36,.5); }
.toast.bad { border-color: rgba(255,92,92,.6); }
.toast.good { border-color: rgba(52,211,153,.6); }

.confetti { position: fixed; inset: 0; z-index: 57; pointer-events: none; }

/* ---------- RESULTS ---------- */
.results-inner { width: 100%; max-width: 960px; margin: 0 auto; }
.res-breach { background: linear-gradient(90deg, #7f1d1d, #b91c1c); padding: 12px 16px; border-radius: 12px; font-weight: 800; text-align: center; margin-bottom: 18px; letter-spacing: .03em; }
.res-hero { text-align: center; padding: 10px 0 20px; }
.res-name { color: var(--muted); font-weight: 700; margin-top: 12px; letter-spacing: .04em; }
.res-score { font-size: clamp(56px, 12vw, 96px); font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--cyan2); text-shadow: 0 0 40px rgba(34,211,238,.4); font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.res-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; }
.badge-icon { width: 120px; height: 120px; display: grid; place-items: center; animation: pop .6s cubic-bezier(.2,.9,.2,1.3); }
.badge-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 20px rgba(34,211,238,.35)); }
.badge-name { font-size: 24px; font-weight: 900; letter-spacing: .02em; }
.badge-blurb { color: var(--muted); max-width: 460px; font-size: 14.5px; }
.res-stats { grid-template-columns: repeat(4, 1fr); max-width: 640px; margin: 0 auto; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.res-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.res-card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
.cattable { width: 100%; border-collapse: collapse; font-size: 14px; }
.cattable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 4px 8px; }
.cattable td { padding: 7px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.cattable td.n { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; width: 46px; }
.cattable td.hit { color: var(--green2); } .cattable td.miss { color: var(--coral2); }
.cattable .bar { height: 7px; border-radius: 4px; background: rgba(255,92,92,.35); overflow: hidden; width: 90px; }
.cattable .bar i { display: block; height: 100%; background: var(--green); }
.weak { display: grid; gap: 10px; }
.weak .tip { padding: 12px 14px; border-radius: 12px; background: rgba(255,92,92,.08); border: 1px solid rgba(255,92,92,.25); font-size: 14px; line-height: 1.5; }
.weak .tip b { display: block; color: var(--coral2); margin-bottom: 3px; }
.weak .none { color: var(--green2); font-weight: 700; }
.summary { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,.3); padding: 12px 14px; border-radius: 12px; margin: 0 0 10px; color: #c5d5e4; }
.rank { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(34,211,238,.15); color: var(--cyan2); text-transform: none; letter-spacing: 0; }
.lb { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.lb li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; font-size: 14px; }
.lb li:nth-child(odd) { background: rgba(255,255,255,.03); }
.lb li.me { background: rgba(34,211,238,.14); border: 1px solid rgba(34,211,238,.4); }
.lb li .r { font-weight: 900; color: var(--dim); text-align: center; }
.lb li .n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb li .n small { display: block; font-weight: 500; color: var(--dim); font-size: 11.5px; }
.lb li .s { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--cyan2); }
.res-actions { display: flex; justify-content: center; padding: 26px 0 10px; }

/* ---------- ANIMATIONS ---------- */
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
@keyframes rise { 0% { transform: translateY(0) translateX(0); opacity: 0 } 10% { opacity: .6 } 100% { transform: translateY(-110vh) translateX(20px); opacity: 0 } }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
@keyframes pulse-red { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
@keyframes shatter { 0% { transform: scale(1) } 30% { transform: scale(1.08) rotate(-1deg) } 60% { transform: scale(.98) rotate(1deg) } 100% { transform: none } }
@keyframes bump { 0% { transform: scale(1) } 40% { transform: scale(1.3); color: #6ee7b7 } 100% { transform: scale(1) } }
@keyframes dip { 0% { transform: translateY(0) } 40% { transform: translateY(4px) scale(.94) } 100% { transform: none } }
@keyframes flicker { from { transform: scale(1) rotate(-3deg) } to { transform: scale(1.12) rotate(3deg) } }
@keyframes arrive { 0% { transform: translateY(-18px) scale(.96); opacity: 0; background: rgba(34,211,238,.25) } 60% { background: rgba(34,211,238,.18) } 100% { transform: none; opacity: 1 } }
@keyframes hot-pulse { 0%,100% { outline-color: rgba(14,116,144,.55) } 50% { outline-color: rgba(34,211,238,.9) } }
@keyframes floatup { 0% { transform: translateY(0); opacity: 1 } 100% { transform: translateY(-46px); opacity: 0 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { 0% { transform: scale(.92) translateY(8px); opacity: 0 } 100% { transform: none; opacity: 1 } }
@keyframes slideup { 0% { transform: translate(-50%, 30px); opacity: 0 } 100% { transform: translate(-50%, 0); opacity: 1 } }
.choice, .toast { animation-name: slideup2; }
@keyframes slideup2 { 0% { transform: translateY(12px); opacity: 0 } 100% { transform: none; opacity: 1 } }
.toast { animation: toastin .25s ease; }
@keyframes toastin { 0% { transform: translate(-50%, 14px); opacity: 0 } 100% { transform: translate(-50%, 0); opacity: 1 } }
@keyframes shake { 10%,90% { transform: translate3d(-2px,0,0) } 20%,80% { transform: translate3d(4px,0,0) } 30%,50%,70% { transform: translate3d(-7px,0,0) } 40%,60% { transform: translate3d(7px,0,0) } }
@keyframes flash { 0% { opacity: .95 } 100% { opacity: 0 } }
@keyframes swing { 0%,100% { transform: rotate(-12deg) } 50% { transform: rotate(12deg) } }
@keyframes glitch1 { 0% { transform: translate(-3px, 1px) } 25% { transform: translate(2px, -1px) } 50% { transform: translate(-1px, 2px) } 75% { transform: translate(3px, 0) } 100% { transform: translate(-2px, -2px) } }
@keyframes glitch2 { 0% { transform: translate(3px, -1px) } 25% { transform: translate(-2px, 1px) } 50% { transform: translate(1px, -2px) } 75% { transform: translate(-3px, 0) } 100% { transform: translate(2px, 2px) } }
@keyframes scan { from { background-position: 0 0 } to { background-position: 0 100px } }
@keyframes ring { 0% { transform: scale(.55); opacity: 1 } 100% { transform: scale(1.35); opacity: 0 } }
@keyframes wiggle { 0%,100% { transform: rotate(0) } 20% { transform: rotate(-12deg) } 40% { transform: rotate(10deg) } 60% { transform: rotate(-8deg) } 80% { transform: rotate(6deg) } }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes answer-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6) } 100% { box-shadow: 0 0 0 18px rgba(22,163,74,0) } }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 1100px) { .icon-btn .btn-lbl { display: inline; } #btn-inspect { width: auto; padding: 0 12px; } }
@media (max-width: 1000px) { .topbar { gap: 10px; } .meter { width: 110px; } .topbar .lbl { display: none; } }
@media (max-width: 759px) {
  body { font-size: 15px; }
  .topbar { height: calc(50px + var(--sat)); padding-left: calc(10px + var(--sal)); padding-right: calc(10px + var(--sar)); gap: 8px; }
  .topbar .brand span { display: none; }
  .meter { width: 64px; height: 10px; }
  .me-avatar { display: none; }
  .score .num { font-size: 16px; }
  .chip.day-chip { padding: 3px 8px; font-size: 11.5px; }
  .rating .num { min-width: 24px; font-size: 14px; }
  .streak { font-size: 13px; }
  .icon-btn { width: 36px; height: 36px; }
  .inbox { width: 100%; border-right: 0; }
  .reader { position: absolute; inset: 0; z-index: 3; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.9,.2,1); visibility: hidden; }
  .game.show-reader .reader { transform: none; visibility: visible; }
  .reader-top .back { display: inline-flex; margin-left: -8px; }
  .reader-content { padding: 14px 16px calc(120px + var(--sab)); }
  .em-subject { font-size: 19px; }
  .em-head { grid-template-columns: 40px 1fr; }
  .em-time { grid-column: 2; }
  .actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 12px calc(10px + var(--sab)); }
  .actionbar .btn { font-size: 14px; letter-spacing: .03em; padding: 12px 8px; }
  .debrief { padding: 12px 10px calc(12px + var(--sab)); align-items: stretch; }
  .debrief-inner { margin: 0; }
  .db-actions .btn { width: 100%; }
  .statusbar { display: none !important; }
  .toast { bottom: calc(110px + var(--sab)); }
  .res-grid { grid-template-columns: 1fr; }
  .res-stats { grid-template-columns: repeat(2, 1fr); }
  .start-card { padding: 24px 18px 16px; }
  .call-btns { gap: 36px; }
  .inbox-hint { display: none; }
  .inbox-list { padding-bottom: calc(12px + var(--sab)); }
}
@media (max-width: 400px) { #btn-mute { display: none; } .topbar { gap: 6px; } }
@media (hover: none) { .statusbar { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .meter .fill::after, .bubbles i, .glitch::before, .glitch::after, .breach-scan { display: none !important; }
  .reader { transform: none !important; }
}

.lb-link { color: var(--cyan, #22d3ee); font-weight: 700; text-decoration: none; font-size: 13px; margin-left: 10px; }
.lb-link:hover { text-decoration: underline; }
.lb-link.big { display: inline-block; margin: 0 14px 0 0; font-size: 15px; }
