@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Sinhala:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #030b0a;
  --surface: #08130f;
  --surface-2: #0d1e19;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .13);
  --text: #e9f6f1;
  --muted: #7d9a92;
  --g1: #8bffae;
  --g2: #1fe3a0;
  --g3: #0a9a70;
  --danger: #ff6b7a;
  --grad: linear-gradient(135deg, var(--g1), var(--g2) 55%, var(--g3));
  --radius: 18px;
  --nav-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -120px, rgba(31, 227, 160, .13), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 15px/1.58 "Nunito", "Noto Sans Sinhala", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--g2); text-decoration: none; }
:focus-visible { outline: 2px solid var(--g2); outline-offset: 2px; border-radius: 8px; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(3, 11, 10, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0; font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; font-size: 23px; letter-spacing: -.045em; color: var(--text); }
.brand img { width: 28px; height: 28px; margin-right: -8px; object-fit: contain; mix-blend-mode: lighten; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(3, 11, 10, .88);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.nav button, .nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 56px; padding: 6px 10px; border-radius: 14px;
  color: var(--muted); font-size: 11px;
}
.nav .label { display: none; }
.nav .active { color: var(--g2); }
.nav .glow-btn { color: #04120d; background: var(--grad); border-radius: 16px; padding: 10px 14px; box-shadow: 0 0 22px rgba(31, 227, 160, .35); }

.main { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 14px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px minmax(0, 640px); justify-content: center; gap: 28px; }
  .topbar { display: none; }
  .nav {
    position: sticky; top: 0; height: 100vh; padding: 28px 8px;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 6px;
    background: none; backdrop-filter: none; border: 0;
  }
  .nav .brand { padding: 0 12px 18px; }
  .nav button, .nav a { flex-direction: row; gap: 14px; font-size: 16px; padding: 12px 14px; }
  .nav .label { display: inline; }
  .nav button:hover, .nav a:hover { background: var(--surface-2); color: var(--text); }
  .nav .glow-btn { justify-content: center; margin-top: 10px; }
  .nav .spacer { flex: 1; }
  .main { padding: 22px 0 60px; }
}
.nav .brand { display: none; }
@media (min-width: 900px) { .nav .brand { display: flex; } }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
  background: var(--grad); color: #04120d; transition: transform .12s, box-shadow .2s, opacity .2s;
}
.btn:hover { box-shadow: 0 0 24px rgba(31, 227, 160, .35); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; color: var(--muted); transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.on { color: var(--g2); }
.icon-btn.on svg { fill: var(--g2); }
.icon { display: inline-flex; width: 20px; height: 20px; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--g2); box-shadow: 0 0 0 3px rgba(31, 227, 160, .15); }
textarea { resize: none; min-height: 52px; }
.hint { font-size: 12px; color: var(--muted); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Avatar ---------- */
.av {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-weight: 900; color: #04120d; background: var(--grad); text-transform: uppercase; letter-spacing: -.035em;
}
.av.a1 { background: linear-gradient(135deg, #b6ff8b, #1fe3a0); }
.av.a2 { background: linear-gradient(135deg, #8bffe1, #0fb5a0); }
.av.a3 { background: linear-gradient(135deg, #d4ff8b, #5fd16a); }
.av.a4 { background: linear-gradient(135deg, #8bffc4, #11a77a); }
.av.a5 { background: linear-gradient(135deg, #a0ffd0, #3fdc9a); }
.av.sm { width: 32px; height: 32px; font-size: 13px; }
.av.lg { width: 84px; height: 84px; font-size: 32px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 410px; padding: 28px 24px; }
.auth-logo { display: grid; justify-items: center; text-align: center; margin-bottom: 18px; }
.auth-logo img { width: 112px; height: 112px; mix-blend-mode: lighten; }
.auth-logo h1 { font-family: "Fredoka", "Nunito", sans-serif; font-size: 36px; font-weight: 600; letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-logo p { color: var(--muted); font-size: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 18px; border-radius: 999px; background: var(--surface-2); }
.tabs button { padding: 8px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--bg); color: var(--g2); box-shadow: 0 0 0 1px var(--line-strong); }
.linkish { color: var(--g2); font-size: 13px; }

/* ---------- Composer ---------- */
.composer { padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 14px; }
.composer textarea { background: transparent; border: 0; padding: 8px 0; font-size: 16px; }
.composer textarea:focus { box-shadow: none; }
.composer-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.composer-foot .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.preview { position: relative; margin-top: 6px; }
.preview img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; }
.preview .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .6); color: #fff; }

/* ---------- Glows ---------- */
.tray { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 4px; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.glow-item { flex: none; display: grid; justify-items: center; gap: 6px; width: 66px; color: var(--text); font-size: 12px; }
.glow-item span.name { max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ring { padding: 2.5px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 16px rgba(31, 227, 160, .3); }
.ring.add { background: var(--line-strong); box-shadow: none; }
.ring .in { padding: 2px; border-radius: 50%; background: var(--bg); display: grid; }
.ring .av { width: 52px; height: 52px; }
.add-av { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); color: var(--g2); }

.viewer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(0, 0, 0, .92); }
.viewer-card {
  position: relative; width: min(94vw, 420px); height: min(86vh, 740px); border-radius: 22px; overflow: hidden;
  display: grid; align-content: center; justify-items: center; padding: 28px; text-align: center;
  background: radial-gradient(circle at 30% 20%, #0f3b2e, #04100c 70%); border: 1px solid var(--line-strong);
}
.viewer-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewer-card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 28%, transparent 60%, rgba(0, 0, 0, .65)); }
.viewer-text { position: relative; font-size: 24px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.viewer-top { position: absolute; top: 14px; left: 14px; right: 14px; display: grid; gap: 10px; z-index: 2; }
.segs { display: flex; gap: 4px; }
.seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.seg .bar { height: 100%; background: var(--g1); transform: scaleX(0); transform-origin: left; }
.seg.done .bar { transform: scaleX(1); }
.seg.active .bar { animation: fill 5s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.viewer-user { display: flex; align-items: center; gap: 10px; text-align: left; }
.viewer-user .grow { flex: 1; }
.viewer-user small { color: rgba(255, 255, 255, .7); }
.tap { position: absolute; top: 70px; bottom: 0; width: 40%; z-index: 1; }
.tap.l { left: 0; } .tap.r { right: 0; }

/* ---------- Posts ---------- */
.list { display: grid; gap: 12px; }
.post { padding: 14px 14px 8px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .who { min-width: 0; flex: 1; }
.post-head .nm { font-family: "Nunito", "Noto Sans Sinhala", sans-serif; font-weight: 900; letter-spacing: -.018em; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head .sub { font-size: 13px; color: var(--muted); }
.post-text { margin: 10px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; font-weight: 500; letter-spacing: -.008em; }
.post-img { display: block; width: 100%; max-height: 560px; object-fit: cover; border-radius: 14px; margin: 10px 0 4px; background: var(--surface-2); }
.actions { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.actions .icon-btn { font-size: 13px; }
.actions .push { margin-left: auto; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 36px; z-index: 10; min-width: 160px; padding: 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; }
.menu-pop button:hover { background: rgba(255, 255, 255, .06); }
.menu-pop .danger { color: var(--danger); }

.comments { border-top: 1px solid var(--line); margin-top: 8px; padding: 12px 0 8px; display: grid; gap: 12px; }
.comment { display: flex; gap: 10px; }
.comment .body { min-width: 0; flex: 1; }
.comment .bubble { background: var(--surface-2); padding: 8px 12px; border-radius: 14px; }
.comment .bubble b { display: block; font-size: 13px; }
.comment .bubble p { overflow-wrap: anywhere; white-space: pre-wrap; }
.comment .meta { font-size: 12px; color: var(--muted); padding: 2px 6px; display: flex; gap: 10px; }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form input { border-radius: 999px; }

.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty .big { font-size: 36px; }
.more { margin: 16px auto; display: flex; }

/* ---------- Profile ---------- */
.profile { padding: 22px; display: grid; gap: 14px; justify-items: start; margin-bottom: 14px; }
.profile-top { display: flex; align-items: center; gap: 16px; width: 100%; }
.profile h2 { font-size: 22px; letter-spacing: -.02em; }
.profile .bio { overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- Modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); }
.modal { width: 100%; max-width: 440px; padding: 20px; }
.modal h3 { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
#toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: 92vw; }
.toast { padding: 10px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: pop .22s ease-out; }
.toast.err { border-color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 900px) { #toasts { bottom: 30px; } }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Social features ---------- */
.av[src] { object-fit: cover; }
.profile-counts { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.feed-tabs { justify-content: center; margin: 8px 0 14px; }
.feed-tabs .active-tab { color: var(--g2); border-color: var(--g2); }
.repost-note { color: var(--muted); font-size: 13px; margin-top: 10px; }
.convo-row, .room-row, .notification { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--text); text-align: left; }
.convo-row span { display: grid; }
.convo-row small, .notification small { display: block; color: var(--muted); font-size: 12px; }
.room-create { display: grid; gap: 8px; padding: 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.room-row { display: grid; gap: 4px; }
.room-row p { color: var(--muted); }
.chat { margin-top: 12px; padding: 14px; display: grid; gap: 12px; }
.chat-header { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.chat-messages { min-height: 220px; max-height: 58vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.chat-bubble { align-self: flex-start; max-width: 84%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); overflow-wrap: anywhere; }
.chat-bubble.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(31, 227, 160, .16); }
.chat-bubble p { white-space: pre-wrap; }
.chat-bubble small { color: var(--muted); font-size: 11px; }
.chat-compose { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.chat-compose input { min-width: 0; flex: 1; border-radius: 999px; }
.notification { width: 100%; border: 1px solid var(--line); cursor: pointer; }
.notification.unread { border-color: rgba(31, 227, 160, .45); background: var(--surface-2); }
.report-card { padding: 14px; }
.report-card small { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .nav { justify-content: space-evenly; overflow-x: auto; }
  .nav button, .nav a { min-width: 46px; padding-left: 5px; padding-right: 5px; }
}


/* ---------- Yangle premium polish: themes, settings and motion ---------- */
:root { --shadow-soft: 0 18px 55px rgba(0,0,0,.18); }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7f6;
  --surface: rgba(255,255,255,.88);
  --surface-2: #e8f1ef;
  --line: rgba(16,52,45,.09);
  --line-strong: rgba(16,52,45,.16);
  --text: #132c28;
  --muted: #657d77;
  --g1: #9bf4c4;
  --g2: #159b73;
  --g3: #087d5b;
  --danger: #c83f58;
}
html[data-theme="light"] body {
  background: radial-gradient(900px 480px at 50% -120px, rgba(21,155,115,.10), transparent 70%), var(--bg);
}
html[data-theme="light"] .topbar { background: rgba(248,252,251,.82); }
html[data-theme="light"] .nav { background: rgba(248,252,251,.9); }
html[data-theme="light"] .nav .glow-btn { color: #fff; }
html[data-theme="light"] .btn { color: #063c2b; }
html[data-theme="light"] .btn.ghost { color: var(--text); }
html[data-theme="light"] .menu-pop { box-shadow: 0 12px 40px rgba(23,57,49,.14); }
html[data-theme="light"] .modal-bg { background: rgba(15,39,34,.30); }
html[data-theme="light"] .viewer { background: rgba(12,25,22,.92); }
html[data-theme="light"] .toast { box-shadow: 0 10px 30px rgba(23,57,49,.12); }
.card { box-shadow: var(--shadow-soft); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.post:hover { border-color: var(--line-strong); }
.post-head .av { flex: 0 0 auto; }
.brand img { mix-blend-mode: normal; filter: drop-shadow(0 2px 8px rgba(31,227,160,.14)); }
.settings-page { display: grid; gap: 14px; }
.settings-page h1 { font-family: "Fredoka", "Nunito", sans-serif; font-size: clamp(30px, 6vw, 38px); font-weight: 600; letter-spacing: -.035em; }
.settings-section { padding: 18px; display: grid; gap: 12px; }
.settings-section h2 { font-family: "Fredoka", "Nunito", sans-serif; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.theme-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.theme-choice { display: grid; gap: 10px; min-width: 0; text-align: left; padding: 10px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface-2); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.theme-choice:hover { transform: translateY(-2px); }
.theme-choice.selected { border-color: var(--g2); box-shadow: 0 0 0 2px color-mix(in srgb,var(--g2) 18%,transparent), 0 8px 24px rgba(21,155,115,.10); }
.theme-choice > span:last-child { display: grid; gap: 3px; }
.theme-choice small { font-size: 11px; line-height: 1.35; color: var(--muted); }
.theme-preview { height: 84px; border-radius: 10px; border: 1px solid var(--line-strong); }
.dark-preview { background: radial-gradient(circle at 80% 10%,#174c3a,#08130f 60%); }
.light-preview { background: radial-gradient(circle at 80% 10%,#c7f6df,#fff 60%); }
.back-link { width: fit-content; padding: 5px 0; }
.profile-actions { justify-content: flex-start; flex-wrap: wrap; }
.nav .glow-btn { position: relative; isolation: isolate; }
.nav .glow-btn::before { content: ""; position: absolute; inset: -5px; z-index: -1; border-radius: 19px; background: var(--grad); opacity: .22; filter: blur(10px); }
@media (max-width: 899px) {
  .nav a[data-nav="#/ylink"] { display: none; }
  .nav button, .nav a { min-width: 48px; }
  .settings-section { padding: 15px; }
  .theme-options { gap: 8px; }
  .theme-preview { height: 68px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn, .glow-item, .nav a, .nav button { transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease; }
  .nav .glow-btn { animation: glow-breathe 3.4s ease-in-out infinite; }
  @keyframes glow-breathe { 0%,100% { box-shadow: 0 0 18px rgba(31,227,160,.24); } 50% { box-shadow: 0 0 30px rgba(31,227,160,.42); } }
}

/* Reaction picker: desktop hover + touch long-press */
.reaction-wrap { position: relative; display: inline-flex; align-items: center; }
.reaction-trigger { gap: 6px; }
.reaction-face { display: inline-grid; place-items: center; min-width: 20px; font-size: 18px; line-height: 1; transition: transform .16s ease; }
.reaction-trigger.on .reaction-face { transform: scale(1.08); }
.reaction-picker { position: absolute; z-index: 25; left: -4px; bottom: calc(100% + 8px); display: flex; gap: 3px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 34px rgba(0,0,0,.24); backdrop-filter: blur(18px); transform-origin: 20% 100%; animation: reaction-pop .16s cubic-bezier(.2,.8,.2,1); }
.reaction-picker[hidden] { display: none !important; }
.reaction-option { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; transition: transform .15s ease, background .15s ease; }
.reaction-option:hover, .reaction-option:focus-visible { background: var(--surface-2); transform: translateY(-5px) scale(1.18); }
@keyframes reaction-pop { from { opacity: 0; transform: translateY(5px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
html[data-theme="light"] .reaction-picker { box-shadow: 0 12px 34px rgba(21,53,45,.16); }
@media (max-width: 899px) { .reaction-option { width: 39px; height: 39px; font-size: 23px; } }


/* YANGLE mobile navigation: five fixed destinations with Glows perfectly centred. */
@media (max-width: 899px) {
  .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    justify-content: initial;
    gap: 0;
    overflow: visible;
    padding-left: max(4px, env(safe-area-inset-left));
    padding-right: max(4px, env(safe-area-inset-right));
  }
  .nav > a[data-nav="#/"] { grid-column: 1; grid-row: 1; }
  .nav > a[data-nav="#/notifications"] { grid-column: 2; grid-row: 1; }
  .nav > .glow-btn { grid-column: 3; grid-row: 1; justify-self: center; align-self: center; width: 48px; height: 48px; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 17px; }
  .nav > a[data-nav="#/inbox"] { grid-column: 4; grid-row: 1; }
  .nav > a[data-nav="#/me"] { grid-column: 5; grid-row: 1; }
  .nav > a[data-nav="#/ylink"], .nav > .spacer { display: none !important; }
  .nav > a[data-nav="#/"], .nav > a[data-nav="#/notifications"], .nav > a[data-nav="#/inbox"], .nav > a[data-nav="#/me"] {
    min-width: 0; width: 100%; height: 54px; padding: 5px 0; justify-content: center; gap: 3px;
  }
  .nav .label { display: block; font-size: 10px; line-height: 1.15; }
  .nav .glow-btn .label { display: none; }
  .nav .glow-btn .icon { width: 23px; height: 23px; }
}


/* ---------- YANGLE signature: rounded display type + aurora palettes ---------- */
:root { --display-font: "Fredoka", "Nunito", sans-serif; --body-font: "Nunito", "Noto Sans Sinhala", sans-serif; --user-font-scale: 1; }
body { font-family: var(--body-font); font-size: calc(15px * var(--user-font-scale)); }
h1, h2, h3, .viewer-text, .auth-logo h1 { font-family: var(--display-font); }
button, input, textarea { font-family: var(--body-font); }
.brand span { font-family: var(--display-font); font-weight: 600; }
.post-text { font-family: var(--body-font); }
.header-create {
  flex: none; margin-left: auto; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 16px;
  color: #06110e; background: var(--grad);
  box-shadow: 0 5px 22px color-mix(in srgb, var(--g2) 26%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.header-create .icon { width: 23px; height: 23px; }
.header-create:hover { transform: rotate(8deg) scale(1.04); box-shadow: 0 8px 28px color-mix(in srgb, var(--g2) 36%, transparent); }
.composer { border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 90%, var(--g2) 10%), var(--surface)); }
.composer textarea { font-family: var(--body-font); font-size: 16px; }
html[data-palette="ocean"] { --g1:#8be9ff; --g2:#3b82f6; --g3:#6d5dfc; --grad:linear-gradient(135deg,#8be9ff 0%,#3b82f6 52%,#9b5cff 100%); }
html[data-palette="aurora"] { --g1:#a7ffdf; --g2:#45e0bd; --g3:#9274ff; --grad:linear-gradient(135deg,#a7ffdf 0%,#45e0bd 45%,#9274ff 100%); }
html[data-palette="sunset"] { --g1:#ffd18a; --g2:#ff7b9c; --g3:#a66bff; --grad:linear-gradient(135deg,#ffd18a 0%,#ff7b9c 50%,#a66bff 100%); }
html[data-palette="berry"] { --g1:#ffb3e6; --g2:#d66bff; --g3:#7c6cff; --grad:linear-gradient(135deg,#ffb3e6 0%,#d66bff 52%,#7c6cff 100%); }
html[data-palette="ember"] { --g1:#ffe08a; --g2:#ff9a4d; --g3:#ff5577; --grad:linear-gradient(135deg,#ffe08a 0%,#ff9a4d 52%,#ff5577 100%); }
html[data-palette="mint"] { --g1:#b7ffcf; --g2:#31d9a0; --g3:#079b91; --grad:linear-gradient(135deg,#b7ffcf 0%,#31d9a0 52%,#079b91 100%); }
html[data-theme="light"][data-palette="ocean"] { --g1:#7dd3fc; --g2:#2563eb; --g3:#7c3aed; }
html[data-theme="light"][data-palette="aurora"] { --g1:#99f6e4; --g2:#0d9488; --g3:#7c3aed; }
html[data-theme="light"][data-palette="sunset"] { --g1:#fed7aa; --g2:#f43f5e; --g3:#9333ea; }
html[data-theme="light"][data-palette="berry"] { --g1:#f5d0fe; --g2:#c026d3; --g3:#6d28d9; }
html[data-theme="light"][data-palette="ember"] { --g1:#fde68a; --g2:#ea580c; --g3:#e11d48; }
html[data-theme="light"][data-palette="mint"] { --g1:#bbf7d0; --g2:#059669; --g3:#0f766e; }
html[data-palette="ocean"] .composer, html[data-palette="aurora"] .composer, html[data-palette="sunset"] .composer,
html[data-palette="berry"] .composer, html[data-palette="ember"] .composer, html[data-palette="mint"] .composer {
  border-color: color-mix(in srgb, var(--g2) 24%, var(--line));
}
html[data-palette="ocean"] .nav .active, html[data-palette="aurora"] .nav .active, html[data-palette="sunset"] .nav .active,
html[data-palette="berry"] .nav .active, html[data-palette="ember"] .nav .active, html[data-palette="mint"] .nav .active { color: var(--g2); }
html[data-theme="light"] .header-create { color: #fff; }
@media (min-width: 900px) {
  .topbar { display: none; }
}


/* YANGLE appearance controls */
.palette-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.palette-choice { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; text-align: left; padding: 11px; border-radius: 17px; border: 1px solid var(--line-strong); background: var(--surface-2); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.palette-choice:hover { transform: translateY(-2px); }
.palette-choice.selected { border-color: var(--g2); box-shadow: 0 0 0 2px color-mix(in srgb,var(--g2) 20%,transparent); }
.palette-swatch { width: 42px; height: 42px; display: block; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18),0 5px 14px rgba(0,0,0,.12); }
.palette-choice > span:last-child { display: grid; gap: 3px; }
.palette-choice b, .custom-colour-row b { font-size: 13px; font-weight: 900; }
.palette-choice small, .custom-colour-row small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.custom-colour-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.custom-colour-row > span { display: grid; gap: 3px; }
.custom-colour-row input[type="color"] { width: 52px; height: 42px; padding: 3px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.font-scale-row { display: flex; align-items: center; gap: 12px; }
.font-scale-row > span:first-child { font-family: var(--display-font); font-size: 22px; font-weight: 600; }
.font-scale-row input { min-width: 0; flex: 1; accent-color: var(--g2); }
.scale-value { min-width: 44px; text-align: right; color: var(--g2); font-weight: 900; font-size: 13px; }
@media (max-width: 380px) {
  .palette-grid { grid-template-columns: 1fr; }
  .palette-choice { grid-template-columns: 38px minmax(0,1fr); }
  .palette-swatch { width: 38px; height: 38px; }
}


/* ---------- YANGLE One UI-inspired navigation (original design) ---------- */
:root { --nav-h: 76px; }
.nav {
  gap: 2px;
  padding-left: max(8px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -10px 32px rgba(0,0,0,.12);
}
.nav button, .nav a {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  gap: 5px;
  padding: 8px 3px 7px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  transition: color .22s ease, background .22s ease, transform .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav button .icon, .nav a .icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  transition: transform .22s ease;
}
.nav .active {
  color: var(--text);
  background: color-mix(in srgb, var(--g2) 10%, var(--surface));
}
.nav .active::before {
  content: "";
  position: absolute;
  inset: 5px 8px auto;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--g2) 19%, transparent);
  z-index: 0;
}
.nav .active .icon, .nav .active .label { position: relative; z-index: 1; }
.nav .active .icon { transform: translateY(-1px) scale(1.06); color: var(--g2); }
.nav .label { display: block; white-space: nowrap; }
.nav .brand { display: none; }
.nav .glow-btn { flex: 1 1 0; margin: 0; padding: 8px 3px 7px; color: var(--text); background: transparent; box-shadow: none; }
.nav .glow-btn .icon { width: 21px; height: 21px; }
.nav .glow-btn:active, .nav a:active { transform: scale(.94); }
html[data-theme="light"] .nav { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.main { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }

.section-heading { display: grid; gap: 5px; margin: 8px 2px 18px; }
.section-heading h1 { font-size: clamp(30px, 7vw, 38px); letter-spacing: -.055em; line-height: 1.1; }
.section-heading h2 { font-size: 21px; letter-spacing: -.035em; }
.eyebrow { color: var(--g2); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.nest-feature {
  display: flex; align-items: center; gap: 13px; padding: 17px;
  color: var(--text); border-color: color-mix(in srgb, var(--g2) 24%, var(--line));
  background: linear-gradient(125deg, color-mix(in srgb, var(--g2) 12%, var(--surface)), var(--surface) 68%);
}
.nest-feature-icon, .nest-placeholder-icon {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 17px; color: var(--g2);
  background: color-mix(in srgb, var(--g2) 13%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--g2) 18%, var(--line));
}
.nest-feature-icon .icon { width: 23px; height: 23px; }
.nest-feature-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.nest-feature-copy b { font-size: 17px; }
.nest-feature-copy small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.nest-feature-arrow { color: var(--muted); }
.nest-section { margin-top: 27px; }
.nest-placeholder { padding: 24px 18px; display: grid; justify-items: start; gap: 10px; }
.nest-placeholder p { color: var(--muted); font-size: 14px; }
.nest-placeholder-icon { width: 54px; height: 54px; border-radius: 19px; }
.nest-placeholder-icon .icon { width: 25px; height: 25px; }
.nest-placeholder .coming-soon { font-size: 10px; letter-spacing: .12em; font-weight: 900; color: var(--g2); padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--g2) 12%, transparent); }
.glow-create { margin-top: 8px; }
@media (min-width: 900px) {
  :root { --nav-h: 62px; }
  .nav { padding: 28px 8px; gap: 8px; box-shadow: none; }
  .nav button, .nav a { flex: 0 0 auto; min-width: 0; justify-content: flex-start; padding: 13px 15px; border-radius: 18px; font-size: 15px; }
  .nav .active::before { inset: 6px auto 6px 7px; width: 42px; height: auto; }
  .nav .active .icon { margin-left: 7px; }
  .nav .brand { display: flex; }
  .nav .glow-btn { justify-content: flex-start; margin-top: 0; }
  .nav .spacer { flex: 1; }
}
@media (max-width: 360px) {
  .nav button, .nav a { font-size: 9px; }
  .nav .active::before { inset-left: 5px; inset-right: 5px; }
}


/* ---------- Refined YANGLE typography and crisp navigation icons ---------- */
:root {
  --display-font: "Outfit", "Noto Sans Sinhala", sans-serif;
  --body-font: "Inter", "Noto Sans Sinhala", sans-serif;
}
html { font-family: var(--body-font); font-feature-settings: "ss01" on; }
body { font-family: var(--body-font); letter-spacing: -.012em; }
h1, h2, h3, .viewer-text, .auth-logo h1, .section-heading h1, .section-heading h2 {
  font-family: var(--display-font);
  letter-spacing: -.04em;
  font-weight: 700;
}
p, .hint, .muted, .bio, .post-text, .comment .body, input, textarea, button {
  font-family: var(--body-font);
}
.brand, .brand span, .settings-page h1, .settings-section h2 {
  font-family: var(--display-font);
}
.nav .icon, .nav .icon svg, .nest-feature-icon .icon svg, .nest-placeholder-icon .icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.nav .icon svg { overflow: visible; }
.nav a, .nav button { letter-spacing: -.025em; }
.nav .label { font-weight: 750; }
.section-heading h1 { font-size: clamp(32px, 7vw, 40px); }
.section-heading .hint { line-height: 1.55; }


/* YANGLE Glows: discovery-first, vertical moment cards */
.glows-page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
}
.glows-add {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #06150f;
  background: var(--grad);
  box-shadow: 0 8px 26px rgba(31, 227, 160, .17);
}
.glows-add .icon, .glows-add svg { width: 22px; height: 22px; }
.glows-title h1 { font-size: clamp(30px, 7vw, 38px); line-height: 1.05; }
.glows-title .hint { font-size: 12px; margin-top: 4px; }
.glows-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.035);
}
.glows-tabs button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 13px;
  color: var(--muted);
  font-weight: 750;
}
.glows-tabs button.active-tab {
  color: var(--text);
  background: rgba(31,227,160,.12);
  box-shadow: inset 0 0 0 1px rgba(31,227,160,.13);
}
.glows-discovery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.glow-discovery-card {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: linear-gradient(145deg, #17372c, #0b1713 72%);
  isolation: isolate;
}
.glow-discovery-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.glow-discovery-text-bg {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(31,227,160,.22), transparent 55%), linear-gradient(145deg,#17372c,#08120e);
  z-index: -2;
}
.glow-discovery-text-bg span { font-size: 30px; color: var(--g1); }
.glow-discovery-text-bg p { font-size: clamp(20px, 5vw, 28px); font-weight: 800; line-height: 1.25; }
.glow-discovery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.03) 25%, rgba(0,0,0,.82) 100%);
}
.glow-discovery-author { display: flex; align-items: center; gap: 10px; }
.glow-discovery-author > div:last-child { display: grid; gap: 1px; }
.glow-discovery-author b { font-size: 14px; }
.glow-discovery-author small { font-size: 11px; color: rgba(255,255,255,.7); }
.glow-discovery-caption { font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.glow-discovery-actions { display: flex; gap: 8px; }
.glow-discovery-actions .btn { flex: 1; justify-content: center; }
@media (min-width: 700px) {
  .glows-discovery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glow-discovery-card { min-height: 420px; }
}


/* Compact thought composer on Home */
.thought-composer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin: 0 0 16px;
  border-radius: 20px;
}
.thought-composer > .avatar { flex: 0 0 36px; width: 36px; height: 36px; }
.thought-composer > div { flex: 1; min-width: 0; }
.thought-composer textarea {
  min-height: 38px;
  max-height: 72px;
  padding: 8px 2px;
  border: 0;
  resize: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
}
.thought-composer .preview { margin: 6px 0; }
.thought-composer .composer-foot { display: flex; align-items: center; gap: 7px; margin-top: 2px; }
.thought-composer .composer-foot > button[aria-label="Add image"] { width: 30px; height: 30px; }
.thought-composer .count { margin-left: auto; font-size: 10px; opacity: .58; }
.thought-composer .thought-plus {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 12px;
}
.thought-composer .thought-plus .icon, .thought-composer .thought-plus svg { width: 17px; height: 17px; }


/* Full-screen post viewer and share actions */
.post.card { cursor: pointer; }
.post-viewer {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(2, 6, 5, .94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.post-viewer-content {
  width: min(100%, 760px); max-height: 100%;
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
  overflow-y: auto; padding: 6px 0 12px;
}
.post-viewer-image {
  display: block; width: 100%; max-height: min(70vh, 760px);
  object-fit: contain; border-radius: 18px; background: #050807;
}
.post-viewer-info { display: grid; gap: 14px; }
.post-viewer-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.post-viewer-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.post-viewer-actions .btn { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 13px; }
.post-viewer-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 14px;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.17); border-radius: 50%;
  background: rgba(20,25,23,.78); color: white; font-size: 30px; z-index: 2;
}
@media (min-width: 700px) {
  .post-viewer-content { max-height: 92vh; }
  .post-viewer-actions { grid-template-columns: repeat(4, minmax(0,1fr)); }
}


.shared-post-link { display: inline-flex; margin-top: 4px; padding: 7px 11px; border-radius: 10px; background: rgba(31,227,160,.12); font-weight: 750; text-decoration: none; }


/* ME dashboard and visible YANGLE roadmap */
.me-dashboard { display: grid; gap: 14px; margin: 4px 0 20px; }
.me-section-title { font-size: 19px; letter-spacing: -.025em; margin: 0 2px 2px; }
.me-space-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.me-space-tile { position: relative; min-width: 0; display: grid; align-content: start; gap: 8px; padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(145deg,var(--surface-2),var(--surface)); color: var(--text); text-decoration: none; box-shadow: var(--shadow-soft); transition: transform .18s ease,border-color .18s ease; }
.me-space-tile:active { transform: scale(.98); }
.me-space-tile:hover { border-color: var(--line-strong); }
.me-space-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--g2); background: color-mix(in srgb,var(--g2) 12%,transparent); }
.me-space-icon svg { width: 19px; height: 19px; }
 /* Keep YANGLE space icons centered consistently across browsers. */
.me-space-icon { align-items: center; justify-content: center; place-items: center; }
.me-space-icon > .icon,
.nest-feature-icon > .icon,
.nest-placeholder-icon > .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  line-height: 0;
}
.me-space-icon > .icon svg,
.nest-feature-icon > .icon svg,
.nest-placeholder-icon > .icon svg {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  flex: 0 0 auto;
}
.me-space-tile b { font-size: 15px; }
.me-space-tile small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.roadmap-mini { width: fit-content; padding: 3px 7px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 10px; }
.me-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.me-shortcut { min-width: 0; display: grid; justify-items: start; gap: 7px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 15px; color: var(--text); background: var(--surface); text-align: left; }
.me-shortcut svg { width: 19px; height: 19px; color: var(--g2); }
.me-shortcut span { font-size: 12px; font-weight: 700; }
.me-shortcut small { font-size: 10px; color: var(--muted); }
.me-roadmap { padding: 16px; display: grid; gap: 12px; }
.me-roadmap-head h2 { font-size: 20px; letter-spacing: -.03em; }
.me-roadmap-head .eyebrow { color: var(--g2); font-size: 10px; font-weight: 800; letter-spacing: .14em; margin-bottom: 4px; }
.me-roadmap-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.me-roadmap-list { display: grid; gap: 0; }
.me-roadmap-item { display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 9px; padding: 13px 0; border-top: 1px solid var(--line); align-items: start; }
.roadmap-dot { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 800; }
.roadmap-dot.building { color: var(--g2); background: color-mix(in srgb,var(--g2) 14%,transparent); }
.me-roadmap-item > div { min-width: 0; }
.me-roadmap-item b { display: block; font-size: 13px; line-height: 1.35; }
.me-roadmap-item p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.roadmap-status { grid-column: 2; justify-self: start; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.roadmap-status.building { color: var(--g2); border-color: color-mix(in srgb,var(--g2) 35%,var(--line)); }
@media (min-width: 650px) {
  .me-space-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .me-roadmap-item { grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; }
  .roadmap-status { grid-column: auto; }
}


/* One-month roadmap grouping */
.roadmap-week { display: grid; gap: 5px; }
.roadmap-week-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; padding: 12px 0 3px; }
.roadmap-week-head span { color: var(--g2); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.roadmap-week-head b { font-size: 14px; }
.roadmap-week .me-roadmap-list { padding-left: 2px; }
.roadmap-week + .roadmap-week { margin-top: 5px; }


/* Fix Me-page space icons and keep Glows highlight names beneath their rings. */
.me-space-tile {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: start;
}
.me-space-tile .me-space-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}
.me-space-tile .me-space-icon > .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.me-space-tile .me-space-icon > .icon svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0;
}
.tray .glow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 66px;
  min-width: 66px;
  padding: 0;
  text-align: center;
  line-height: normal;
}
.tray .glow-item > .ring {
  order: 0;
  display: block;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  box-sizing: border-box;
  margin: 0 auto;
}
.tray .glow-item > .ring > .in {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.tray .glow-item > .ring .av,
.tray .glow-item > .ring .add-av {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  margin: 0;
}
.tray .glow-item > .name {
  order: 1;
  display: block;
  position: static;
  width: 100%;
  max-width: 66px;
  margin: 0;
  padding: 0;
  text-align: center;
  line-height: 1.25;
}
