/* ============================================================
   LINK · Ocean-Gloss Design System — App Edition
   Mobile-app chrome: top bars, floating bottom nav, stylus FAB,
   full screens: Home(FB) · Explore(Interpals) · Chats · Profile
   ============================================================ */

:root {
  --deep-1: #010b1c;
  --aqua-2: #22d3ee;
  --mint:   #5eead4;
  --ink:      #eaf7ff;
  --ink-dim:  #9fc7dd;
  --glass-br: rgba(255, 255, 255, 0.26);
  --shadow-lg: 0 24px 60px rgba(1, 12, 32, 0.55);
  --r-lg: 24px;
  --r-md: 18px;
  --r-pill: 999px;
  --font: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--deep-1);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(34, 211, 238, 0.45); color: #02121f; }
.hidden { display: none !important; }

/* ---------- Ambient ocean ---------- */
.ocean-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 700px at 12% -10%, #0a3d66 0%, transparent 55%),
    radial-gradient(1000px 800px at 105% 110%, #0e7490 0%, transparent 55%),
    linear-gradient(160deg, #010b1c 0%, #03203f 34%, #063a5e 62%, #075f7e 82%, #0b7d95 100%);
}
.ocean-bg::after {
  content: ''; position: absolute; inset: -10%;
  background:
    radial-gradient(600px 320px at 22% 12%, rgba(94,234,212,.13), transparent 60%),
    radial-gradient(720px 420px at 82% 88%, rgba(34,211,238,.15), transparent 60%),
    radial-gradient(520px 520px at 68% 22%, rgba(59,130,246,.10), transparent 60%);
  animation: caustics 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes caustics { from { transform: translate3d(-1.5%,-2%,0) scale(1); } to { transform: translate3d(2%,3%,0) scale(1.06); } }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.blob-1 { width: 420px; height: 420px; top: -120px; right: 8%;
  background: radial-gradient(circle at 35% 35%, rgba(94,234,212,.35), rgba(6,182,212,.12) 70%);
  animation: drift 22s ease-in-out infinite alternate; }
.blob-2 { width: 520px; height: 520px; bottom: -180px; left: -120px;
  background: radial-gradient(circle at 60% 40%, rgba(34,211,238,.30), rgba(7,89,133,.10) 70%);
  animation: drift 26s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 260px; height: 260px; top: 42%; left: 52%;
  background: radial-gradient(circle at 40% 40%, rgba(59,130,246,.22), transparent 70%);
  animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,-50px) scale(1.12); } }

/* ---------- Glass + primitives ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.05) 55%, rgba(255,255,255,.02) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-br);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -8px 20px rgba(2,20,45,.15), var(--shadow-lg);
  border-radius: var(--r-lg);
}
.glass > * { position: relative; z-index: 1; }

.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 14px rgba(1,12,32,.4);
  display: block;
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #033145;
  background: linear-gradient(135deg, var(--mint), var(--aqua-2));
}

.btn-primary {
  border: 1px solid rgba(255,255,255,.4);
  border-radius: var(--r-pill);
  padding: 13px 26px;
  font-family: var(--font); font-size: 15px; font-weight: 700; letter-spacing: .02em;
  color: #03283b; cursor: pointer;
  background: linear-gradient(135deg, #7df3e4 0%, #38d9f0 45%, #1fb4e6 100%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.75), inset 0 -6px 12px rgba(3,105,161,.35), 0 12px 28px rgba(6,182,212,.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  width: 100%;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { width: auto; padding: 9px 20px; font-size: 14px; }

.btn-ghost {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--ink-dim);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.btn-ghost:hover { color: var(--ink); background: rgba(255,255,255,.16); }

.btn-link {
  background: none; border: none; padding: 6px;
  color: var(--aqua-2); font: 600 13.5px var(--font);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  color: var(--ink-dim);
  cursor: pointer; transition: all .15s ease; flex-shrink: 0;
}
.icon-btn:hover { color: var(--ink); background: rgba(255,255,255,.16); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger:hover { color: #fda4af; border-color: rgba(244,63,94,.5); background: rgba(244,63,94,.12); }
.icon-btn svg { width: 17px; height: 17px; display: block; }
.ic { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; align-items: center; justify-content: center; }
.ic svg { width: 100%; height: 100%; display: block; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: var(--ink-dim);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 8px 14px; cursor: pointer; transition: all .15s ease;
}
.chip-btn:hover { color: var(--ink); background: rgba(255,255,255,.16); }

.input {
  width: 100%;
  padding: 13px 17px;
  font-family: var(--font); font-size: 15px; color: var(--ink);
  background: rgba(3,20,42,.35);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 2px 8px rgba(1,10,28,.45), inset 0 1px 0 rgba(255,255,255,.14);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { border-radius: var(--r-md); resize: none; line-height: 1.55; }
.input::placeholder { color: rgba(210,235,245,.42); }
.input:focus {
  outline: none; border-color: rgba(94,234,212,.65);
  box-shadow: 0 0 0 3.5px rgba(34,211,238,.20), inset 0 2px 8px rgba(1,10,28,.45), inset 0 1px 0 rgba(255,255,255,.14);
}
select.input { appearance: none; cursor: pointer; }
select.input option { color: #06263f; background: #eaf7ff; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tags.center { justify-content: center; }
.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  white-space: nowrap;
}
.tag-native   { background: rgba(94,234,212,.16);  color: #a7f3e8; border-color: rgba(94,234,212,.35); }
.tag-learning { background: rgba(147,197,253,.16); color: #c3dafe; border-color: rgba(147,197,253,.35); }

.badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #03283b;
  background: linear-gradient(135deg, var(--mint), var(--aqua-2));
  box-shadow: 0 4px 10px rgba(6,182,212,.4), inset 0 1px 0 rgba(255,255,255,.6);
}

.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--aqua-2);
  animation: spin .8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-note { text-align: center; color: var(--ink-dim); font-size: 14px; padding: 28px 18px; line-height: 1.65; }
.empty-note .btn-primary, .empty-note .btn-ghost { margin-top: 14px; width: auto; }

*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }

/* ============================================================
   AUTH LAYER — sign in / sign up / waiting room
   ============================================================ */
.auth-view {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.auth-card { width: min(430px, 94vw); padding: 40px 36px 28px; text-align: center; }
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.brand h1 {
  font-size: 34px; font-weight: 800;
  background: linear-gradient(120deg, #eaf7ff 20%, #7df3e4 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-drop {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), 0 8px 20px rgba(6,182,212,.35);
}
.brand-drop svg { width: 24px; height: 24px; filter: drop-shadow(0 0 8px rgba(94,234,212,.6)); }
.tagline { color: var(--ink-dim); font-size: 14.5px; margin: 10px 0 26px; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: var(--r-pill);
  background: rgba(3,20,42,.4);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 2px 8px rgba(1,10,28,.4);
  margin-bottom: 20px;
}
.auth-tab {
  border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-dim);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  padding: 10px; cursor: pointer; transition: all .18s ease;
}
.auth-tab.active {
  color: #03283b;
  background: linear-gradient(135deg, var(--mint), var(--aqua-2));
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), 0 6px 16px rgba(6,182,212,.35);
}
.auth-form { display: flex; flex-direction: column; gap: 13px; text-align: left; }
.signup-extra { display: flex; flex-direction: column; gap: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-error {
  font-size: 13.5px; color: #fda4af;
  background: rgba(244,63,94,.12);
  border: 1px solid rgba(244,63,94,.35);
  border-radius: 14px; padding: 10px 14px; line-height: 1.45;
}
.auth-error.ok { color: #5eead4; background: rgba(94,234,212,.1); border-color: rgba(94,234,212,.35); }
.auth-foot { margin-top: 20px; font-size: 12px; color: rgba(159,199,221,.6); }

/* Waiting room (email confirmation) */
.wait-card { display: flex; flex-direction: column; gap: 14px; }
.wait-drop { width: 82px; height: 82px; margin: 0 auto 6px; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 0 26px rgba(34,211,238,.45)); }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.wait-card h2 { font-size: 24px; font-weight: 800; }
.wait-card p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.6; }
.wait-card strong { color: var(--mint); font-weight: 700; word-break: break-all; }
.wait-note { font-size: 12.5px; color: rgba(159,199,221,.7); min-height: 16px; }

/* ============================================================
   APP LAYER — mobile-app canvas + screens
   ============================================================ */
#app-layer {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  max-width: 660px; margin: 0 auto;
  display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.07);
  border-right: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 0 90px rgba(0,6,20,.6);
  overflow: hidden;
}
#screens { flex: 1; overflow-y: auto; position: relative; }

.screen { display: none; min-height: 100%; padding-bottom: 118px; }
.screen.active { display: block; animation: screenin .22s ease; }
@keyframes screenin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#screen-chat { padding-bottom: 0; }
#screen-chat.active { display: flex; flex-direction: column; height: 100%; }

/* Top app bar (per screen) */
.app-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(4,26,52,.78), rgba(4,26,52,.55));
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.app-bar h2 { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.bar-brand { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; }
.bar-brand svg { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(94,234,212,.5)); }
.bar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bar-title-center { position: absolute; left: 50%; transform: translateX(-50%); }

.page-pad { padding: 12px 14px 4px; }
.section-title {
  padding: 18px 16px 4px;
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-dim);
}

/* Search */
.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-dim); pointer-events: none;
}
.search-wrap .input { padding: 11px 14px 11px 40px; font-size: 14px; }

/* ============================================================
   HOME — Facebook-style newsfeed
   ============================================================ */
.composer-teaser {
  margin: 14px 12px 4px;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  cursor: pointer; text-align: left; width: calc(100% - 24px);
  color: inherit; font-family: var(--font); font-size: 15px;
  transition: filter .15s ease, transform .15s ease;
}
.composer-teaser:hover { filter: brightness(1.12); }
.composer-teaser:active { transform: scale(.99); }
.teaser-text { flex: 1; color: rgba(210,235,245,.5); }
.composer-teaser .ic { color: var(--aqua-2); width: 20px; height: 20px; }

.new-posts-pill {
  position: sticky; top: 62px; z-index: 9;
  display: block; margin: 10px auto 0;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: var(--r-pill); padding: 10px 20px;
  font-family: var(--font); font-size: 13.5px; font-weight: 700; color: #03283b;
  background: linear-gradient(135deg, #7df3e4, #38d9f0);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(6,182,212,.45), inset 0 1.5px 0 rgba(255,255,255,.65);
  animation: screenin .25s ease;
}
.new-posts-pill:hover { filter: brightness(1.07); }

.feed-list { display: flex; flex-direction: column; gap: 12px; padding: 12px; }

.post { padding: 16px 16px 12px; transition: opacity .24s ease, transform .24s ease; }
.post.fade-out { opacity: 0; transform: scale(.97); }
.post-head { display: flex; align-items: flex-start; gap: 11px; }
.post-head-meta { min-width: 0; flex: 1; }
.post-username {
  background: none; border: none; padding: 0;
  font-family: var(--font); font-size: 15.5px; font-weight: 800; color: var(--ink);
  cursor: default; text-align: left; line-height: 1.2;
}
.post-username.linkable { cursor: pointer; }
.post-username.linkable:hover { text-decoration: underline; text-decoration-color: rgba(94,234,212,.7); }
.post-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.post-time { font-size: 12px; color: var(--ink-dim); white-space: nowrap; }

.post-content { margin-top: 10px; font-size: 15px; line-height: 1.6; color: #f2fbff; word-break: break-word; }
.post-image {
  margin-top: 12px; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 24px rgba(1,12,32,.4);
}
.post-image img { display: block; width: 100%; max-height: 440px; object-fit: cover; }

.post-actions {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.like-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  padding: 8px 16px; cursor: pointer; transition: all .16s ease;
}
.like-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.like-btn.liked { color: #fb7185; border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.12); text-shadow: 0 0 12px rgba(251,113,133,.5); }
.like-btn.pop .ic { animation: pop .32s ease; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.like-count { min-width: 4px; }

.empty-feed { text-align: center; padding: 44px 20px; }
.empty-feed h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.empty-feed p { color: var(--ink-dim); font-size: 14.5px; }
.feed-loading { padding: 18px; }
#feed-sentinel { height: 2px; }

/* ============================================================
   EXPLORE + MESSAGES — row lists (Interpals / Messenger style)
   ============================================================ */
.card-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.person-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 24px rgba(1,12,32,.3);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.person-row:hover { border-color: rgba(94,234,212,.4); transform: translateY(-1px); }
.person-row:active { transform: scale(.99); }
.person-meta { flex: 1; min-width: 0; }
.person-name { font-weight: 800; font-size: 15px; }
.person-sub {
  font-size: 12.5px; color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.person-sub.has-unread { color: #a7f3e8; font-weight: 600; }
.person-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.person-time { font-size: 11px; color: var(--ink-dim); }

/* ============================================================
   CHAT screen
   ============================================================ */
#screen-chat .app-bar { gap: 8px; padding: 10px 12px; }
.chat-userlink {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  text-align: left; min-width: 0; flex: 1;
  padding: 4px; border-radius: 14px; color: inherit;
  font-family: var(--font);
}
.chat-userlink:hover { background: rgba(255,255,255,.06); }
.ch-name { font-weight: 800; font-size: 15.5px; line-height: 1.15; }
.ch-meta { min-width: 0; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column;
}
.chat-hint {
  align-self: center; margin: auto;
  padding: 12px 22px; border-radius: var(--r-pill);
  color: var(--ink-dim); font-size: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
}
.bubble-row { display: flex; margin: 4px 0; animation: bubble-in .22s ease; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.bubble-row.me { justify-content: flex-end; }
.bubble {
  max-width: min(78%, 560px);
  padding: 10px 14px 7px;
  font-size: 15px; line-height: 1.5; word-break: break-word;
  position: relative;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 -6px 12px rgba(1,14,34,.12), 0 10px 22px rgba(1,14,34,.35);
}
.bubble.me {
  background: linear-gradient(135deg, rgba(125,243,228,.92), rgba(46,200,240,.88));
  color: #03303f;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 20px 20px 6px 20px;
}
.bubble.them {
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(224,244,255,.72));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #06263f;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px 20px 20px 6px;
}
.bubble-meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: 10.5px; margin-top: 2px; opacity: .62; font-weight: 600; }
.ticks { letter-spacing: -3px; font-weight: 800; opacity: .55; margin-left: 2px; }
.ticks.read { color: #0369a1; opacity: 1; text-shadow: 0 0 6px rgba(94,234,212,.8); }

.chat-composer {
  display: flex; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(4,26,52,.6), rgba(4,26,52,.25));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,.1);
}
.send-btn {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(135deg, #7df3e4, #1fb4e6);
  color: #03283b; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.7), inset 0 -5px 10px rgba(3,105,161,.35), 0 10px 22px rgba(6,182,212,.4);
  transition: transform .14s ease, filter .14s ease;
}
.send-btn:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.07); }
.send-btn:active { transform: scale(.94); }
.send-btn .ic { width: 21px; height: 21px; margin-left: -2px; }

/* ============================================================
   PROFILE screens
   ============================================================ */
.profile-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
  padding: 28px 16px 8px;
}
.profile-hero .avatar {
  border-width: 2.5px;
  box-shadow: 0 0 0 4px rgba(94,234,212,.15), 0 16px 36px rgba(1,12,32,.55);
}
.pf-name { font-size: 23px; font-weight: 800; }
.pf-handle { color: var(--ink-dim); font-size: 13.5px; margin-top: -6px; }
.pf-bio { color: var(--ink-dim); font-size: 14px; max-width: 420px; line-height: 1.55; }
.hero-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }

.stats-row { display: flex; gap: 10px; margin: 16px 14px 0; }
.stat-card { flex: 1; padding: 13px 8px; text-align: center; border-radius: var(--r-md); overflow: hidden; }
.stat-num { font-size: 20px; font-weight: 800; }
.stat-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-dim); margin-top: 2px; }

/* ============================================================
   COMPOSE + EDIT screens
   ============================================================ */
.bar-post { width: auto; padding: 9px 22px; font-size: 14px; }
.compose-body { padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.compose-head { display: flex; gap: 11px; align-items: center; font-weight: 800; font-size: 15.5px; }
.compose-area { min-height: 190px; font-size: 16px; border-radius: 20px; }

.form-pad { padding: 16px 14px; display: flex; flex-direction: column; }
.lbl {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.ep-avatar-row { display: flex; align-items: center; gap: 12px; }
.ep-avatar-row .input { flex: 1; }

/* ============================================================
   FLOATING BOTTOM NAV + stylus FAB
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(636px, calc(100% - 20px));
  z-index: 40;
  display: flex; align-items: center; justify-content: space-around;
  padding: 9px 8px;
  border-radius: 28px;
  overflow: visible;
}
.bottom-nav::before { border-radius: 28px; }
.nav-item {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none;
  color: var(--ink-dim);
  font-family: var(--font);
  padding: 6px 2px; cursor: pointer;
  border-radius: 16px;
  transition: color .15s ease, transform .15s ease;
}
.nav-item:active { transform: scale(.92); }
.nav-item.active { color: var(--mint); text-shadow: 0 0 14px rgba(94,234,212,.55); }
.nav-item .ic { width: 22px; height: 22px; }
.nav-item .lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-item .badge { position: absolute; top: -3px; right: calc(50% - 24px); }

.nav-fab {
  width: 58px; height: 58px;
  margin: -34px 4px 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.55);
  background: linear-gradient(135deg, #7df3e4, #1fb4e6);
  color: #03283b; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.75), inset 0 -6px 12px rgba(3,105,161,.35), 0 16px 34px rgba(6,182,212,.55);
  transition: transform .18s ease, filter .18s ease;
}
.nav-fab:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.06); }
.nav-fab:active { transform: scale(.93); }
.nav-fab .ic { width: 24px; height: 24px; }

/* Toast */
.toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(18px);
  z-index: 100;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.07));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 16px 40px rgba(1,12,32,.5);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 660px) {
  #app-layer { border: none; box-shadow: none; max-width: none; }
}
