/* ═══════════════════════════════════════════════════════════════
   Rainy AI — Premium Stylesheet  v4
   "Multimillion-dollar subscription product" quality bar.
═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --blue:       #0052FF;
  --blue2:      #3D7BFF;
  --blue-dim:   rgba(0, 82, 255, 0.10);
  --blue-glow:  rgba(0, 82, 255, 0.28);
  --rain:       #60BEFF;
  --green:      #00C97A;
  --red:        #FF4560;
  --amber:      #F5A623;
  --purple:     #8B5CF6;
  --pink:       #EC4899;
  --cyan:       #06B6D4;
  --orange:     #FF6B35;

  --bg:         #080A0F;
  --bg2:        #0D0F16;
  --bg3:        #13161F;
  --bg4:        #191C28;
  --bg5:        #1F2334;
  --glass:      rgba(10, 12, 18, 0.92);
  --glass2:     rgba(13, 15, 22, 0.85);

  --border:     rgba(255, 255, 255, 0.06);
  --border-b:   rgba(0, 82, 255, 0.25);
  --border-s:   rgba(255, 255, 255, 0.10);

  --tx:         #EDF1FF;
  --tx2:        #7E8BB0;
  --tx3:        #454E72;
  --tx4:        #272D48;

  --ff:  'Outfit',        sans-serif;
  --fs:  'Space Grotesk', sans-serif;
  --fm:  'JetBrains Mono', monospace;

  --r:  14px;
  --r2: 10px;
  --r3:  8px;
  --r4:  6px;

  --sb: 268px;
  --th:  60px;

  /* Smooth transitions globally */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--fs); background: var(--bg); color: var(--tx); display: flex; flex-direction: column; height: 100dvh; }
::selection { background: rgba(0, 82, 255, .45); color: #fff; }
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 82, 255, .22); border-radius: 2px; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; -webkit-tap-highlight-color: transparent; }
textarea { font-family: inherit; color: inherit; }

/* ─── Background Layers ─── */
.bg-fx {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0,82,255,.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 110%, rgba(96,190,255,.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 50% 50%,  rgba(0,20,60,.3) 0%, transparent 70%);
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#bgRain { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .25; }

/* ─── Topbar ─── */
.topbar {
  height: var(--th);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; z-index: 300; position: relative;
}
.tb-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.sb-toggle {
  display: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--r3); color: var(--tx2);
  font-size: 14px; transition: all .2s var(--ease); flex-shrink: 0;
}
.sb-toggle:hover { border-color: var(--border-b); color: var(--tx); background: var(--blue-dim); }

.back-btn {
  display: flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 9.5px;
  font-weight: 500; color: var(--tx3); padding: 5px 12px; border: 1px solid var(--border);
  border-radius: var(--r4); transition: all .2s var(--ease); letter-spacing: .04em; white-space: nowrap;
}
.back-btn:hover { border-color: var(--border-b); color: var(--tx2); background: var(--blue-dim); }

/* ─── Logo ─── */
.logo { display: flex; align-items: center; gap: 10px; user-select: none; }
.logo-wrap { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.logo-wrap svg { width: 36px; height: 36px; display: block; overflow: visible; }
.logo-drop { opacity: 0.9; }
/* Logo is ALWAYS static. Rain only on the chat avatar. */

.logo-name { font-family: var(--ff); font-weight: 800; font-size: 18px; letter-spacing: -.03em; line-height: 1; }
.logo-name span { color: var(--blue2); }

.live-badge {
  display: flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 8.5px;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green);
  padding: 4px 10px; border: 1px solid rgba(0,201,122,.18); border-radius: 20px;
  background: rgba(0,201,122,.05);
}
.live-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); animation: lp 2s ease infinite; flex-shrink: 0; }
@keyframes lp {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(0,201,122,.5); }
  50%     { opacity:.5; box-shadow: 0 0 0 4px rgba(0,201,122,0); }
}

/* Image upload button */
.img-btn {
  display: flex; align-items: center; gap: 6px; font-family: var(--fm); font-size: 10px;
  font-weight: 600; padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--r2);
  color: var(--tx2); transition: all .2s; letter-spacing: .02em; cursor: pointer;
}
.img-btn:hover { border-color: var(--border-b); color: var(--tx); background: var(--blue-dim); }
#fileIn { display: none; }

/* Connect Wallet button */
.rk-btn {
  display: flex; align-items: center; gap: 7px; font-family: var(--ff); font-size: 13px;
  font-weight: 700; padding: 9px 18px; border-radius: 12px;
  background: linear-gradient(135deg, #0044DD, #3D7BFF);
  color: #fff; border: none;
  box-shadow: 0 3px 14px rgba(0,82,255,.38), inset 0 1px 0 rgba(255,255,255,.12);
  transition: all .22s var(--ease); letter-spacing: .01em; white-space: nowrap;
}
.rk-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,82,255,.52); }
.rk-btn.connected {
  background: linear-gradient(135deg, rgba(0,201,122,.12), rgba(0,201,122,.08));
  border: 1px solid rgba(0,201,122,.28); color: var(--green);
  box-shadow: 0 3px 14px rgba(0,201,122,.12);
}
.rk-btn .rk-av { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }

/* ─── App Shell ─── */
.app { display: flex; flex: 1; overflow: hidden; height: calc(100dvh - var(--th)); position: relative; z-index: 2; }

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sb); flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .3s var(--ease);
}
.sb-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 10px 8px; }
.sb-lbl {
  font-family: var(--fm); font-size: 8px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--tx4); padding: 0 8px; margin-bottom: 6px; margin-top: 8px;
}

/* Mode items */
.mi {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  border-radius: 11px; text-align: left; transition: all .18s var(--ease);
  cursor: pointer; margin-bottom: 2px; border: 1px solid transparent; position: relative;
}
.mi:hover { background: rgba(255,255,255,.035); }
.mi.active { background: rgba(0,82,255,.09); border-color: rgba(0,82,255,.18); }
.mi.active::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 2.5px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--blue2), var(--blue));
}
.mi-ico {
  width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-size: 15px; flex-shrink: 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); transition: all .2s;
}
.mi.active .mi-ico {
  background: rgba(0,82,255,.14); border-color: rgba(0,82,255,.28);
  box-shadow: 0 2px 12px rgba(0,82,255,.22);
}
.mi-txt { flex: 1; min-width: 0; }
.mi-name { font-weight: 600; font-size: 12.5px; color: var(--tx); line-height: 1.3; }
.mi-sub  { font-family: var(--fm); font-size: 8.5px; color: var(--tx3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi.active .mi-sub { color: var(--tx2); }

/* Badges */
.badge { font-family: var(--fm); font-size: 7px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 20px; text-transform: uppercase; flex-shrink: 0; }
.bh { background: linear-gradient(135deg, #FF6B35, #FF3950); color: #fff; }
.bp { background: linear-gradient(135deg, #F5A623, #EF4444); color: #000; }
.bw { background: linear-gradient(135deg, #8B5CF6, #EC4899); color: #fff; }
.bn { background: linear-gradient(135deg, #00C97A, #059669); color: #fff; }
.ba { background: linear-gradient(135deg, #06B6D4, #0052FF); color: #fff; }

.sb-sep { height: 1px; background: var(--border); margin: 8px 4px; }

/* Tier card */
.tier-wrap { padding: 8px 4px; }
.tier-card {
  border-radius: var(--r); padding: 14px 16px;
  border: 1px solid rgba(0,82,255,.18);
  background: linear-gradient(135deg, rgba(0,82,255,.07), rgba(0,82,255,.03));
  position: relative; overflow: hidden;
}
.tier-card::after {
  content: ''; position: absolute; top: -30px; right: -30px; width: 100px; height: 100px;
  border-radius: 50%; background: radial-gradient(circle, rgba(0,82,255,.18), transparent);
  pointer-events: none;
}
.tlbl  { font-family: var(--fm); font-size: 7.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--blue2); opacity: .7; margin-bottom: 3px; }
.tttl  { font-family: var(--ff); font-weight: 800; font-size: 14px; margin-bottom: 3px; letter-spacing: -.02em; }
.tdsc  { font-family: var(--fm); font-size: 8px; color: var(--tx3); line-height: 1.6; margin-bottom: 10px; }
.tup   { width: 100%; padding: 9px; font-family: var(--ff); font-size: 11px; font-weight: 700; border-radius: var(--r3); background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,82,255,.32); transition: all .2s; }
.tup:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,82,255,.48); }

/* Social links */
.sb-social {
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 12px 10px; border-top: 1px solid var(--border); flex-shrink: 0;
}
.sb-soc-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; color: var(--tx3);
  border: 1px solid transparent; transition: all .18s;
}
.sb-soc-icon svg { display: block; }
.sb-soc-icon:hover { background: rgba(255,255,255,.05); border-color: var(--border); color: var(--tx2); }

/* Query meter */
.qm  { padding: 10px 14px 14px; border-top: 1px solid var(--border); margin-top: auto; flex-shrink: 0; }
.qmh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.qml { font-family: var(--fm); font-size: 7.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tx4); }
.qmc { font-family: var(--fm); font-size: 9px; color: var(--tx3); }
.qmb { height: 3px; background: var(--bg5); border-radius: 2px; overflow: hidden; }
.qmf { height: 100%; background: linear-gradient(90deg, var(--blue), var(--rain)); border-radius: 2px; transition: width .5s var(--ease); }

/* ─── Main Chat Area ─── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.mode-hdr {
  height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(8,10,15,.8); backdrop-filter: blur(20px);
}
.mhl { display: flex; align-items: center; gap: 11px; }
.mhico  { font-size: 22px; line-height: 1; }
.mhtitle { font-family: var(--ff); font-weight: 800; font-size: 17px; letter-spacing: -.025em; }
.mhsub   { font-family: var(--fm); font-size: 8.5px; color: var(--tx3); letter-spacing: .02em; margin-top: 1px; }
.mhr  { display: flex; align-items: center; gap: 7px; }
.hbtn {
  font-family: var(--fm); font-size: 8.5px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 13px; border: 1px solid var(--border); border-radius: var(--r4);
  color: var(--tx3); transition: all .2s;
}
.hbtn:hover { border-color: var(--border-b); color: var(--tx2); background: var(--blue-dim); }
.msgs { flex: 1; overflow-y: auto; scroll-behavior: smooth; }

/* ─── Welcome Screen ─── */
@keyframes fu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.welcome { padding: 40px 32px 28px; max-width: 860px; margin: 0 auto; width: 100%; animation: fu .45s ease; }
.w-eye {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--fm); font-size: 8.5px;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blue2);
  padding: 5px 14px; border: 1px solid rgba(0,82,255,.2); border-radius: 20px;
  background: rgba(0,82,255,.07); margin-bottom: 22px;
}
.w-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue2); animation: lp 2s ease infinite; flex-shrink: 0; }
.w-h   { font-family: var(--ff); font-weight: 900; font-size: clamp(30px, 4.8vw, 54px); letter-spacing: -.05em; line-height: .9; margin-bottom: 16px; }
.w-h em { color: var(--blue2); font-style: normal; }
.w-p  { font-size: 13.5px; color: var(--tx2); margin-bottom: 28px; max-width: 540px; line-height: 1.75; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.pcard {
  padding: 15px 17px 18px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; cursor: pointer; transition: all .24s var(--ease);
  text-align: left; position: relative; overflow: hidden;
}
.pcard::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,82,255,.07), transparent);
  opacity: 0; transition: opacity .22s; border-radius: 14px;
}
.pcard:hover { border-color: rgba(0,82,255,.28); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.pcard:hover::before { opacity: 1; }
.pcard:active { transform: translateY(-1px); }
.pctag  { font-family: var(--fm); font-size: 7.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 7px; }
.pcq    { font-size: 12px; font-weight: 500; color: var(--tx); line-height: 1.5; }
.pcarr  { position: absolute; bottom: 13px; right: 15px; color: var(--tx4); font-size: 11px; transition: all .2s; }
.pcard:hover .pcarr { color: var(--blue2); transform: translateX(3px); }

/* ─── Message Rows ─── */
.msg-row {
  padding: 20px 26px;
  border-bottom: 1px solid rgba(255,255,255,.022);
  animation: fu .3s ease;
}
.msg-row.ur {
  background: linear-gradient(135deg, rgba(255,255,255,.012), rgba(255,255,255,.005));
}
.msg-inner { display: flex; gap: 14px; max-width: 900px; margin: 0 auto; }
.msg-row.ur .msg-inner { flex-direction: row-reverse; }

/* Avatars */
.avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; margin-top: 1px;
}
.avatar.bot {
  background: linear-gradient(145deg, #003FCC, #0060FF);
  box-shadow: 0 0 0 1px rgba(0,82,255,.32), 0 4px 16px rgba(0,82,255,.28);
  position: relative;
  /* overflow intentionally managed by JS rain drops */
}
.avatar.usr {
  background: var(--bg4); border: 1px solid var(--border-s);
  font-family: var(--fm); font-size: 8.5px; font-weight: 700; color: var(--tx3);
}

/* Raining avatar glow */
.avatar.bot.raining {
  box-shadow:
    0 0 0 2px rgba(96,190,255,.65),
    0 0 0 5px rgba(0,82,255,.2),
    0 0 22px rgba(0,82,255,.6) !important;
  animation: avGlow 0.9s ease-in-out infinite alternate;
}
@keyframes avGlow {
  from { box-shadow: 0 0 0 1.5px rgba(96,190,255,.5), 0 0 0 4px rgba(0,82,255,.12), 0 0 14px rgba(0,82,255,.45); }
  to   { box-shadow: 0 0 0 2.5px rgba(96,190,255,.9), 0 0 0 6px rgba(0,82,255,.28), 0 0 30px rgba(0,82,255,.75); }
}

.mbody { flex: 1; min-width: 0; }
.mname { font-family: var(--fm); font-size: 8.5px; color: var(--tx4); margin-bottom: 8px; letter-spacing: .05em; }
.msg-row.ur .mname { text-align: right; }
.mimg { max-width: 300px; border-radius: var(--r2); margin-bottom: 10px; border: 1px solid var(--border); }
.msg-row.ur .mimg { margin-left: auto; display: block; }

/* Message text */
.mtxt { font-size: 14px; line-height: 1.85; color: rgba(237,241,255,.88); word-break: break-word; }
.msg-row.ur .mtxt { text-align: right; color: var(--tx); }
.mtxt strong { color: var(--tx); font-weight: 600; }
.mtxt em     { color: var(--rain); font-style: normal; }
.mtxt a      { color: var(--rain); text-decoration: underline; text-underline-offset: 3px; }
.mtxt a:hover { color: var(--blue2); }
.mtxt code {
  background: rgba(0,82,255,.1); border: 1px solid rgba(0,82,255,.16);
  padding: 2px 7px; font-family: var(--fm); font-size: 11px;
  border-radius: 5px; color: var(--rain);
}
.mtxt pre {
  background: rgba(0,0,0,.55); border: 1px solid var(--border);
  padding: 16px 18px; margin: 12px 0; overflow-x: auto;
  font-family: var(--fm); font-size: 11.5px; line-height: 1.65;
  color: rgba(255,255,255,.78); border-radius: var(--r2);
  white-space: pre-wrap; position: relative;
}
.mtxt pre::before { content: 'CODE'; position: absolute; top: 8px; right: 10px; font-size: 6.5px; font-weight: 700; letter-spacing: .1em; color: var(--tx4); }
.mtxt ul, .mtxt ol { margin: 8px 0 8px 20px; }
.mtxt li  { margin-bottom: 5px; font-size: 13.5px; }
.mtxt h3  { font-family: var(--ff); font-weight: 700; font-size: 15px; margin: 18px 0 7px; color: var(--tx); }
.mtxt h4  { font-family: var(--fm); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue2); margin: 14px 0 6px; }
.mtxt table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.mtxt th { font-family: var(--fm); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); padding: 8px 12px; border-bottom: 1px solid var(--border-s); text-align: left; }
.mtxt td { padding: 8px 12px; border-bottom: 1px solid var(--border); }

/* Error bubble */
.mtxt .err-bubble {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: rgba(255,69,96,.06); border: 1px solid rgba(255,69,96,.18);
  border-radius: 10px; padding: 12px 16px; margin-top: 4px;
}
.mtxt .err-bubble .err-code { font-family: var(--fm); font-size: 9.5px; font-weight: 700; color: var(--red); letter-spacing: .06em; text-transform: uppercase; }
.mtxt .err-bubble .err-msg  { font-size: 13px; color: var(--tx2); line-height: 1.6; }
.mtxt .err-bubble .err-hint { font-family: var(--fm); font-size: 9px; color: var(--tx3); }

/* ─── Research Ticker — SINGLE LINE, text only ─── */
.rrow { padding: 14px 26px; animation: fu .25s ease; }
.rinner { display: flex; gap: 13px; max-width: 900px; margin: 0 auto; align-items: center; }
.rticker { flex: 1; min-width: 0; }
.rticker-line {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--fm); font-size: 11px; color: var(--tx2); letter-spacing: .01em;
}
.rtick-ico { font-size: 14px; flex-shrink: 0; line-height: 1; transition: opacity .15s ease; }
.rtick-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s ease; }

/* ─── Post-Message Actions ─── */
.macts { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.abtn  {
  display: inline-flex; align-items: center; gap: 4px; font-family: var(--fm);
  font-size: 8px; font-weight: 600; letter-spacing: .04em; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 20px; color: var(--tx3);
  transition: all .18s; text-transform: uppercase; white-space: nowrap;
}
.abtn:hover       { border-color: var(--border-b); color: var(--tx2); background: var(--blue-dim); }
.abtn.share       { border-color: rgba(29,161,242,.22); color: rgba(29,161,242,.7); }
.abtn.share:hover { background: rgba(29,161,242,.07); color: #1DA1F2; border-color: rgba(29,161,242,.4); }
.gtag       { font-family: var(--fm); font-size: 7.5px; color: var(--tx4); letter-spacing: .04em; margin-left: auto; }
.gtag strong { color: var(--blue2); }

/* ─── Input Area ─── */
.inp-area {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border);
  background: rgba(8,10,15,.97);
  backdrop-filter: blur(28px);
  flex-shrink: 0;
}
.img-pw { max-width: 870px; margin: 0 auto 10px; display: none; }
.img-pi {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--bg3); border: 1px solid var(--border-b); border-radius: var(--r2);
}
.ithumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.iname  { font-family: var(--fm); font-size: 9px; color: var(--tx2); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irm    { font-size: 11px; color: var(--tx3); cursor: pointer; transition: color .15s; margin-left: 4px; background: none; border: none; padding: 0; }
.irm:hover { color: var(--red); }
.ctxbar  { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; max-width: 870px; margin-left: auto; margin-right: auto; }
.ctxchip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--fm); font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 3px 10px; border: 1px solid; border-radius: 20px; }
.inp-wrap { position: relative; max-width: 870px; margin: 0 auto; }
.inpf {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px 96px 14px 18px; color: var(--tx);
  font-family: var(--fs); font-size: 14px; line-height: 1.55; outline: none;
  resize: none; min-height: 52px; max-height: 190px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}
.inpf::placeholder { color: var(--tx4); }
.inpf:focus {
  border-color: rgba(0,82,255,.42);
  box-shadow: 0 0 0 3px rgba(0,82,255,.07);
  background: var(--bg4);
}
.camb {
  position: absolute; right: 52px; bottom: 8px; width: 36px; height: 36px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--tx3); border: 1px solid var(--border);
  transition: all .2s; background: var(--bg4);
}
.camb:hover { border-color: var(--border-b); color: var(--tx2); }
.sndb {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff;
  box-shadow: 0 4px 14px rgba(0,82,255,.38); transition: all .2s;
}
.sndb:hover:not(:disabled) { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,82,255,.55); }
.sndb:disabled { opacity: .4; cursor: not-allowed; }
.inpfoot {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 870px; margin: 8px auto 0;
  font-family: var(--fm); font-size: 8px; color: var(--tx4); letter-spacing: .02em;
}
.inpfoot .fr a { color: var(--blue2); cursor: pointer; transition: color .15s; }
.inpfoot .fr a:hover { color: var(--tx2); }

/* ─── Modals / Overlays ─── */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s; padding: 20px;
}
.overlay.show { opacity: 1; pointer-events: all; }

/* ─── Wallet Modal ─── */
.rkm {
  background: #101218; border: 1px solid rgba(255,255,255,.07); border-radius: 24px;
  width: 100%; max-width: 700px; display: grid; grid-template-columns: 1fr 1fr;
  position: relative; overflow: hidden;
  transform: scale(.96) translateY(12px);
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.04);
}
.overlay.show .rkm { transform: scale(1) translateY(0); }

.rkl { padding: 26px 22px 24px; background: #101218; border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; }
.rk-title { font-family: var(--ff); font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--tx); margin-bottom: 18px; }
.rk-slbl  { font-family: var(--fm); font-size: 8.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--tx3); margin-bottom: 5px; padding: 0 4px; }
.rk-wlist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.rk-wi    { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 13px; cursor: pointer; transition: background .15s; border: 1px solid transparent; }
.rk-wi:hover { background: rgba(255,255,255,.05); }
.rk-wi.active { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
.rk-wico  { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rk-rainbow { background: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 35%, #6BCB77 65%, #4D96FF 100%); }
.rk-winf  { flex: 1; min-width: 0; }
.rk-wname { font-family: var(--ff); font-weight: 600; font-size: 14px; color: var(--tx); line-height: 1.3; }
.rk-wst   { font-family: var(--fm); font-size: 9.5px; color: var(--tx3); margin-top: 1px; }
.rk-wst.ok { color: var(--green); }

.rkr { padding: 34px 26px; background: #101218; display: flex; flex-direction: column; justify-content: center; }
.rkr-title { font-family: var(--ff); font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--tx); margin-bottom: 22px; text-align: center; }
.rkr-info-block { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.rkr-info-img   { width: 50px; height: 50px; flex-shrink: 0; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.rkr-info-title { font-family: var(--ff); font-weight: 700; font-size: 13px; color: var(--tx); margin-bottom: 4px; }
.rkr-info-desc  { font-family: var(--fm); font-size: 11px; color: var(--tx3); line-height: 1.55; }
.rkr-gbtn {
  width: 100%; margin-top: 10px; padding: 12px; font-family: var(--ff); font-size: 14px;
  font-weight: 700; border-radius: 14px; background: linear-gradient(135deg, #3B99FC, #006FFF);
  color: #fff; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(59,153,252,.32);
  transition: all .2s;
}
.rkr-gbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 26px rgba(59,153,252,.48); }
.rkr-learn { font-family: var(--fm); font-size: 10.5px; color: #3B99FC; margin-top: 9px; cursor: pointer; text-align: center; transition: color .15s; }
.rkr-learn:hover { color: var(--tx2); }

.modal-x {
  position: absolute; top: 14px; right: 14px; font-size: 11px; color: var(--tx3);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.09); border-radius: 50%;
  transition: all .15s; z-index: 10; background: rgba(255,255,255,.04);
}
.modal-x:hover { color: var(--tx); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }

/* WalletConnect mobile links */
.wc-mlink {
  padding: 9px 8px; background: var(--bg4); border: 1px solid var(--border);
  border-radius: 10px; color: var(--tx); font-family: var(--fm); font-size: 11.5px;
  font-weight: 600; cursor: pointer; text-align: center; transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.wc-mlink:hover, .wc-mlink:active { background: var(--bg3); border-color: rgba(0,82,255,.35); }

/* ─── Upgrade Modal ─── */
.upm {
  background: var(--bg2); border: 1px solid var(--border-s); border-radius: 24px;
  width: 100%; max-width: 680px; padding: 32px; position: relative;
  transform: scale(.96) translateY(12px);
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,.8);
}
.overlay.show .upm { transform: scale(1) translateY(0); }
.up-title    { font-family: var(--ff); font-weight: 900; font-size: 24px; letter-spacing: -.04em; margin-bottom: 6px; }
.up-title em { color: var(--blue2); font-style: normal; }
.up-sub      { font-size: 13px; color: var(--tx2); margin-bottom: 22px; }
.plans       { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan        { padding: 17px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); position: relative; overflow: hidden; }
.plan.pop    { border-color: rgba(0,82,255,.38); background: linear-gradient(135deg, rgba(0,82,255,.08), var(--bg3)); }
.plan.pop::before { content: 'MOST POPULAR'; position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; font-family: var(--fm); font-size: 6.5px; font-weight: 800; letter-spacing: .1em; padding: 3px 14px; border-radius: 0 0 8px 8px; white-space: nowrap; }
.plan.whl    { border-color: rgba(139,92,246,.28); }
.plan-ico    { font-size: 24px; margin-bottom: 8px; }
.plan-name   { font-family: var(--ff); font-weight: 800; font-size: 14px; letter-spacing: -.02em; margin-bottom: 2px; }
.plan-price  { font-family: var(--ff); font-weight: 900; font-size: 26px; letter-spacing: -.04em; }
.plan-per    { font-family: var(--fm); font-size: 8.5px; color: var(--tx3); margin-bottom: 12px; }
.plan-fts    { list-style: none; margin-bottom: 14px; }
.plan-fts li { font-size: 11px; color: var(--tx2); padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.plan-fts li::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 9.5px; flex-shrink: 0; }
.plan-cta    { width: 100%; padding: 9px; font-family: var(--ff); font-size: 11.5px; font-weight: 700; border-radius: var(--r3); cursor: pointer; transition: all .2s; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--tx); }
.plan.pop .plan-cta { background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; border-color: transparent; box-shadow: 0 4px 16px rgba(0,82,255,.32); }
.plan.whl .plan-cta { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; border-color: transparent; }
.plan-cta:hover { transform: translateY(-1px); }
.up-footer   { font-family: var(--fm); font-size: 8.5px; color: var(--tx4); text-align: center; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
.up-footer a { color: var(--blue2); }

/* ─── Payment Modal ─── */
.pay-modal {
  background: #0E1018; border: 1px solid rgba(255,255,255,.08); border-radius: 24px;
  width: 100%; max-width: 480px; padding: 0; position: relative; overflow: hidden;
  transform: scale(.96) translateY(12px);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 40px 100px rgba(0,0,0,.85);
}
.overlay.show .pay-modal { transform: scale(1) translateY(0); }

.pay-header {
  padding: 24px 26px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.pay-title { font-family: var(--ff); font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.pay-title em { color: var(--blue2); font-style: normal; }

.pay-tabs {
  display: flex; gap: 2px; padding: 18px 26px 0;
}
.pay-tab {
  flex: 1; padding: 9px; font-family: var(--ff); font-size: 12px; font-weight: 700;
  border-radius: 10px; border: 1px solid var(--border); color: var(--tx3);
  background: transparent; cursor: pointer; transition: all .18s; letter-spacing: .01em;
}
.pay-tab.active {
  background: var(--blue-dim); border-color: var(--border-b); color: var(--blue2);
}
.pay-tab:hover:not(.active) { border-color: var(--border-s); color: var(--tx2); }

.pay-body { padding: 20px 26px 26px; }

/* Plan selector inside payment */
.pay-plans { display: flex; gap: 8px; margin-bottom: 20px; }
.pay-plan {
  flex: 1; padding: 12px 10px; background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer; text-align: center; transition: all .18s;
}
.pay-plan.selected { border-color: var(--blue2); background: var(--blue-dim); }
.pay-plan:hover:not(.selected) { border-color: var(--border-s); }
.pay-plan-name  { font-family: var(--ff); font-weight: 700; font-size: 12px; color: var(--tx2); margin-bottom: 3px; }
.pay-plan-price { font-family: var(--ff); font-weight: 900; font-size: 20px; color: var(--tx); }
.pay-plan-per   { font-family: var(--fm); font-size: 8.5px; color: var(--tx3); }
.pay-plan.selected .pay-plan-name { color: var(--blue2); }
.pay-plan.selected .pay-plan-price { color: var(--tx); }

/* Crypto tab */
.pay-coin-select {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.pay-coin {
  flex: 1; padding: 8px 6px; border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--bg3); cursor: pointer; text-align: center; transition: all .18s;
  font-family: var(--fm); font-size: 10px; font-weight: 700; color: var(--tx3);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pay-coin.active { border-color: var(--blue2); color: var(--blue2); background: var(--blue-dim); }
.pay-coin-ico { font-size: 18px; line-height: 1; }

.pay-addr-box {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center;
}
.pay-addr-qr {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.pay-addr-qr img { width: 72px; height: 72px; display: block; }
.pay-addr-info { flex: 1; min-width: 0; }
.pay-addr-lbl  { font-family: var(--fm); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tx3); margin-bottom: 5px; }
.pay-addr-val  { font-family: var(--fm); font-size: 10.5px; color: var(--tx); word-break: break-all; line-height: 1.5; margin-bottom: 6px; }
.pay-copy-btn  { font-family: var(--fm); font-size: 9px; font-weight: 700; padding: 4px 11px; border: 1px solid var(--border-b); border-radius: 6px; color: var(--blue2); background: var(--blue-dim); cursor: pointer; transition: all .15s; }
.pay-copy-btn:hover { background: rgba(0,82,255,.18); }

.pay-network-note {
  display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px;
  background: rgba(0,201,122,.06); border: 1px solid rgba(0,201,122,.15); margin-bottom: 14px;
  font-family: var(--fm); font-size: 10px; color: rgba(0,201,122,.85);
}

.pay-verify { margin-top: 4px; }
.pay-verify-lbl { font-family: var(--fm); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tx3); margin-bottom: 6px; }
.pay-tx-input {
  width: 100%; padding: 11px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; font-family: var(--fm); font-size: 11px; color: var(--tx);
  outline: none; transition: border-color .2s;
}
.pay-tx-input:focus { border-color: var(--border-b); }
.pay-tx-input::placeholder { color: var(--tx4); }

/* Card tab */
.pay-card-form { display: flex; flex-direction: column; gap: 11px; }
.pay-field-lbl { font-family: var(--fm); font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tx3); margin-bottom: 4px; }
.pay-input {
  width: 100%; padding: 11px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; font-family: var(--ff); font-size: 13px; color: var(--tx);
  outline: none; transition: border-color .2s; -webkit-appearance: none;
}
.pay-input:focus { border-color: var(--border-b); box-shadow: 0 0 0 2px rgba(0,82,255,.08); }
.pay-input::placeholder { color: var(--tx4); font-size: 12px; }
.pay-row { display: flex; gap: 10px; }
.pay-row .pay-field { flex: 1; }
.pay-field { display: flex; flex-direction: column; }
.pay-card-icons { display: flex; gap: 6px; margin-bottom: 14px; }
.pay-card-ico {
  height: 26px; padding: 0 10px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; font-size: 11px; font-weight: 700;
  color: var(--tx2); font-family: var(--fm); letter-spacing: .02em;
}

.pay-submit {
  width: 100%; padding: 14px; font-family: var(--ff); font-size: 14px; font-weight: 800;
  border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: #fff; border: none; cursor: pointer; letter-spacing: .01em;
  box-shadow: 0 4px 18px rgba(0,82,255,.38); transition: all .2s; margin-top: 4px;
}
.pay-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 26px rgba(0,82,255,.52); }

.pay-secure {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--fm); font-size: 9px; color: var(--tx4); margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border);
}

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--bg4); border: 1px solid var(--border-s); border-radius: 11px;
  padding: 10px 20px; font-family: var(--fm); font-size: 11px; font-weight: 600; color: var(--tx);
  z-index: 9999; opacity: 0; transition: all .3s; display: flex; align-items: center; gap: 8px;
  white-space: nowrap; box-shadow: 0 10px 32px rgba(0,0,0,.55); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Scrim ─── */
.sb-scrim { display: none; position: fixed; inset: 0; top: var(--th); background: rgba(0,0,0,.6); z-index: 99; backdrop-filter: blur(4px); }
.sb-scrim.show { display: block; }

/* ─── Safe-area (iPhone notch / Dynamic Island) ─── */
@supports (padding: env(safe-area-inset-bottom)) {
  .inp-area  { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .topbar    { padding-top: env(safe-area-inset-top); height: calc(var(--th) + env(safe-area-inset-top)); }
}

/* ════════════════════════════════════════════════════════════
   MOBILE — Tablet & Phone ≤ 768px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sb: 288px; --th: 56px; }

  /* Topbar */
  .topbar { padding: 0 13px; gap: 8px; }
  .tb-l { gap: 8px; }
  .tb-r { gap: 6px; }
  .logo-name { font-size: 15px; }
  .logo-wrap { width: 32px; height: 32px; }
  .logo-wrap svg { width: 32px; height: 32px; }
  .live-badge { display: none; }
  .back-btn { padding: 5px 10px; font-size: 8.5px; }
  .img-btn span { display: none; }
  .img-btn { padding: 7px 9px; font-size: 14px; }
  .rk-btn { padding: 7px 12px; font-size: 12px; gap: 5px; }

  /* Sidebar drawer */
  .sidebar {
    position: fixed; top: var(--th); left: 0; bottom: 0;
    z-index: 100; transform: translateX(-105%);
    transition: transform .28s var(--ease);
    border-right: 1px solid var(--border-s);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 12px 0 50px rgba(0,0,0,.7); }
  .sb-toggle { display: flex !important; }

  /* Mode header */
  .mode-hdr { height: 44px; padding: 0 14px; }
  .mhico    { font-size: 17px; }
  .mhtitle  { font-size: 14px; }
  .mhsub    { display: none; }

  /* Welcome */
  .welcome { padding: 24px 16px 20px; }
  .w-h { font-size: clamp(22px, 6.5vw, 34px); }
  .w-p { font-size: 12.5px; margin-bottom: 20px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pcard { padding: 12px 14px 16px; border-radius: 12px; }
  .pctag { font-size: 7px; }
  .pcq   { font-size: 11.5px; }

  /* Messages */
  .msgs { -webkit-overflow-scrolling: touch; }
  .msg-row { padding: 14px 14px; }
  .msg-inner { gap: 10px; }
  .avatar { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
  .mtxt { font-size: 13.5px; line-height: 1.75; }
  .macts { flex-wrap: wrap; gap: 4px; margin-top: 9px; }
  .abtn { font-size: 7.5px; padding: 4px 10px; }

  /* Research row ticker */
  .rrow { padding: 12px 14px; }
  .rinner { gap: 10px; }
  .rticker-line { font-size: 10.5px; gap: 7px; }
  .rtick-ico { font-size: 13px; }

  /* Input */
  .inp-area { padding: 10px 12px 14px; }
  .inpf { font-size: 16px; min-height: 48px; padding: 13px 86px 13px 14px; }
  .sndb { width: 38px; height: 38px; right: 7px; bottom: 7px; }
  .camb { width: 35px; height: 35px; right: 50px; bottom: 8px; }
  .inpfoot { font-size: 7.5px; }
  .inpfoot .fl { display: none; }

  /* Modals → bottom sheet */
  .overlay { align-items: flex-end !important; padding: 0 !important; }

  .rkm {
    grid-template-columns: 1fr; max-width: 100%; width: 100%;
    max-height: 88dvh; border-radius: 22px 22px 0 0; margin: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: slideUpSheet .28s var(--ease);
  }
  .rkm::before {
    content: ''; display: block; width: 34px; height: 4px;
    background: rgba(255,255,255,.15); border-radius: 2px;
    margin: 10px auto 2px;
  }
  .rkr { display: none; }
  .rkl { padding: 16px 18px 28px; }

  .upm {
    max-width: 100%; width: 100%; border-radius: 22px 22px 0 0;
    padding: 20px 16px 28px; max-height: 90dvh; overflow-y: auto; margin: 0;
    animation: slideUpSheet .28s var(--ease);
  }
  .upm::before {
    content: ''; display: block; width: 34px; height: 4px;
    background: rgba(255,255,255,.15); border-radius: 2px;
    margin: -4px auto 14px;
  }
  .plans { grid-template-columns: 1fr; gap: 8px; }
  .up-title { font-size: 20px; }

  .pay-modal { max-width: 100%; width: 100%; border-radius: 22px 22px 0 0; animation: slideUpSheet .28s var(--ease); max-height: 92dvh; overflow-y: auto; }
  .pay-modal::before { content: ''; display: block; width: 34px; height: 4px; background: rgba(255,255,255,.15); border-radius: 2px; margin: 10px auto 0; }
  .pay-plans { flex-direction: row; }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}

/* ════════════════════════════════════════════════════════════
   SMALL PHONES ≤ 430px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 430px) {
  :root { --th: 52px; }
  .topbar { padding: 0 10px; }
  .logo-name { font-size: 13.5px; }
  .logo-wrap { width: 28px; height: 28px; }
  .logo-wrap svg { width: 28px; height: 28px; }
  .back-btn .blt { display: none; }
  .rk-btn { padding: 6px 10px; font-size: 11px; }
  .cards { grid-template-columns: 1fr; }
  .welcome { padding: 18px 14px 16px; }
  .w-h { font-size: clamp(20px, 5.8vw, 28px); }
  .msg-row { padding: 12px 12px; }
  .inpf { padding: 12px 82px 12px 13px; }
  .sndb { width: 36px; height: 36px; right: 6px; bottom: 7px; }
  .camb { right: 47px; }
}

/* ════════════════════════════════════════════════════════════
   LANDSCAPE MOBILE
   ════════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .welcome { padding: 10px 14px; }
  .w-h { font-size: 20px; }
  .w-p { display: none; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mode-hdr { height: 38px; }
  .inp-area { padding: 6px 10px 8px; }
  .inpf { min-height: 40px; font-size: 16px; }
}
