/* public/assets/css/main.css – Raum·klang Design System */
:root {
  --bg:         #07090e;
  --s1:         #0d1018;   /* surface 1 */
  --s2:         #131720;   /* surface 2 */
  --s3:         #1a2030;   /* surface 3 */
  --border:     rgba(255,255,255,.06);
  --border2:    rgba(255,255,255,.1);
  --text:       #e8e4dc;   /* warm white - eye-friendly */
  --text2:      #9aa0b0;
  --muted:      #565e70;
  --accent:     #8b9cf4;   /* lavender blue - calming */
  --accent2:    #c4a882;   /* warm gold */
  --accent3:    #7ec8a0;   /* sage green */
  --danger:     #c87070;
  --success:    #7ec8a0;
  --warning:    #c4a065;
  --glow:       rgba(139,156,244,.14);
  --header-bg:  rgba(7,9,14,.6);
  --preset-hue: 240deg;
  --r:  14px;  /* radius */
  --rs:  8px;  /* radius small */
}

[data-theme="light"] {
  --bg:        #f0ede8;
  --s1:        #fdf9f4;
  --s2:        #f5f1ec;
  --s3:        #ebe6df;
  --border:    rgba(0,0,0,.08);
  --border2:   rgba(0,0,0,.13);
  --text:      #1a1e2c;
  --text2:     #50586a;
  --muted:     #848d9d;
  --accent:    #4a5ac8;
  --accent2:   #8a6428;
  --accent3:   #2a7848;
  --danger:    #a83030;
  --success:   #2a7848;
  --warning:   #8a5c08;
  --glow:      rgba(74,90,200,.08);
  --header-bg: rgba(242,241,238,.88);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Aurora background ──────────────────────────────────────── */
#bg-aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 60% at 50% -5%,
    hsl(var(--preset-hue),50%,13%) 0%, transparent 70%);
  transition: background 3s ease; opacity: .7;
}
#bg-aurora::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 40% at 88% 110%,
    hsl(calc(var(--preset-hue) + 40deg),30%,10%) 0%, transparent 60%);
}
[data-theme="light"] #bg-aurora { opacity: .18; }

/* ── Layout ─────────────────────────────────────────────────── */
.layout { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.2rem;
  padding-top: calc(.9rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1.2rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.2rem + env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 50;
}
.logo-link { text-decoration: none; }
.logo { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 400; letter-spacing: .14em; color: #e8e3da; }
.logo em { color: #c9ab82; font-style: italic; }
[data-theme="light"] .logo { color: #1a1f2e; }
[data-theme="light"] .logo em { color: #9a7040; }
.header-right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.header-user   { display: flex; align-items: center; gap: .5rem; }
.header-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border2); }
.header-avatar-placeholder {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.header-name { font-size: .78rem; color: var(--text2); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-select {
  padding: .22rem .42rem; border-radius: 20px; cursor: pointer; font-size: .68rem;
  letter-spacing: .06em; background: var(--s2); border: 1px solid var(--border);
  color: var(--muted); font-family: 'Outfit', sans-serif; outline: none;
  transition: border-color .15s, color .15s; appearance: none; -webkit-appearance: none;
  padding-right: 1.2rem;
  background-image: url("/assets/img/select-arrow.svg");
  background-repeat: no-repeat; background-position: right .4rem center;
}
.lang-select:hover, .lang-select:focus { border-color: var(--accent2); color: var(--accent2); }
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  background: var(--s2); border: 1px solid var(--border); color: var(--muted);
  font-size: .85rem; line-height: 1; transition: .15s; flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--accent2); color: var(--accent2); }
.btn-nav-login {
  font-size: .72rem; padding: .28rem .7rem; border-radius: 20px;
  border: 1px solid var(--border2); color: var(--text2);
  text-decoration: none; transition: .15s; white-space: nowrap;
}
.btn-nav-login:hover { border-color: var(--accent); color: var(--accent); }
.btn-nav-register {
  font-size: .72rem; padding: .28rem .7rem; border-radius: 20px;
  background: rgba(139,156,244,.14); border: 1px solid rgba(139,156,244,.35);
  color: var(--accent); text-decoration: none; transition: .15s; white-space: nowrap;
}
.btn-nav-register:hover { background: rgba(139,156,244,.25); }
.btn-logout {
  display: flex; align-items: center; padding: .3rem;
  color: var(--muted); border-radius: 6px; transition: .15s; text-decoration: none;
  background: none; border: none; cursor: pointer; font: inherit;
}
.btn-logout:hover { color: var(--danger); }
.btn-admin-link {
  font-size: .7rem; padding: .22rem .65rem; border-radius: 20px;
  border: 1px solid rgba(196,168,130,.3); color: var(--accent2); text-decoration: none;
  transition: .15s;
}
.btn-admin-link:hover { background: rgba(196,168,130,.08); }
.header-community-btn {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 500; text-decoration: none;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(196,168,130,.35);
  border-radius: 20px;
  padding: .22rem .75rem;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.header-community-btn:hover { background: rgba(196,168,130,.1); border-color: var(--accent2); }

/* ── Main content ───────────────────────────────────────────── */
.main-content {
  flex: 1; max-width: 860px; width: 100%;
  margin: 0 auto; padding: 1.2rem 1rem 4rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  text-align: center; padding: 1.4rem 1.5rem; font-size: .72rem;
  padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(1.5rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.5rem + env(safe-area-inset-right, 0px));
  color: var(--muted); border-top: 1px solid var(--border);
}
.site-footer nav {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: .5rem 1.4rem;
}
.footer-link { color: var(--muted); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: var(--accent2); }
.footer-logo-link { text-decoration: none; }
.footer-logo { font-size: .85rem; letter-spacing: .12em; }
.footer-logo-link:hover .footer-logo { opacity: .75; }

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
  padding: .7rem 1rem; border-radius: var(--rs); margin-bottom: .8rem;
  font-size: .82rem;
}
.flash-success { background: rgba(126,200,160,.1); border: 1px solid rgba(126,200,160,.25); color: var(--success); }
.flash-error   { background: rgba(200,112,112,.1); border: 1px solid rgba(200,112,112,.25); color: var(--danger); }
.alert { padding: .65rem 1rem; border-radius: var(--rs); margin-bottom: .7rem; font-size: .82rem; }
.alert-success { background: rgba(126,200,160,.1); border: 1px solid rgba(126,200,160,.25); color: var(--success); }
.alert-error   { background: rgba(200,112,112,.1); border: 1px solid rgba(200,112,112,.25); color: var(--danger); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--s1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.1rem 1.25rem; margin-bottom: .85rem;
}

/* ── Section title ──────────────────────────────────────────── */
.section-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 400;
  letter-spacing: .12em; color: var(--accent2); text-transform: uppercase;
  margin-bottom: .85rem; display: flex; align-items: center; gap: .65rem;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .95rem; border-radius: var(--rs);
  font-family: 'Outfit', sans-serif; font-size: .78rem; font-weight: 400;
  cursor: pointer; transition: .18s; border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary { background: rgba(139,156,244,.15); border-color: rgba(139,156,244,.3); color: var(--accent); }
.btn-primary:hover { background: rgba(139,156,244,.25); }
.btn-ghost   { background: none; border-color: var(--border2); color: var(--text2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger  { background: none; border-color: rgba(200,112,112,.3); color: var(--danger); }
.btn-danger:hover { background: rgba(200,112,112,.1); }
.btn-success { background: rgba(126,200,160,.1); border-color: rgba(126,200,160,.3); color: var(--success); }
.btn-warning { background: rgba(196,160,101,.1); border-color: rgba(196,160,101,.3); color: var(--warning); }

/* ── Form fields ────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: .76rem; color: var(--text2);
  letter-spacing: .06em; margin-bottom: .38rem;
}
.field input, .field textarea, .field select,
input.text-input, textarea.note-input {
  width: 100%; background: var(--s2); border: 1px solid var(--border2);
  border-radius: var(--rs); padding: .6rem .8rem; color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: .88rem; font-weight: 300;
  outline: none; transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus,
input.text-input:focus, textarea.note-input:focus { border-color: var(--accent); }
.field-error { display: block; font-size: .72rem; color: var(--danger); margin-top: .25rem; }
.field-hint  { font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.field-checkbox { display: flex; align-items: center; gap: .5rem; cursor: pointer;
  color: var(--muted); font-size: .85rem; margin: .6rem 0; }
.field-checkbox input[type="checkbox"] { accent-color: var(--accent); width: 1rem; height: 1rem; flex-shrink: 0; }
.input-large {
  width: 100%; background: var(--s2); border: 1px solid var(--border2);
  border-radius: 12px; padding: .85rem 1.1rem; color: var(--text);
  font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 300;
  outline: none; text-align: center; transition: border-color .15s;
  letter-spacing: .04em;
}
.input-large:focus { border-color: var(--accent); box-shadow: 0 0 20px var(--glow); }
.btn-submit {
  display: block; width: 100%; padding: .75rem;
  background: linear-gradient(135deg, var(--accent), #6d7fe8);
  border: none; border-radius: var(--r); color: #fff;
  font-family: 'Outfit', sans-serif; font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: .2s; letter-spacing: .06em;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(139,156,244,.3); }
.btn-large { padding: .9rem; font-size: 1rem; }
.btn-sm {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .85rem; border-radius: var(--rs);
  font-family: 'Outfit', sans-serif; font-size: .74rem; font-weight: 400;
  cursor: pointer; transition: .18s; width: 100%; justify-content: center;
  background: rgba(139,156,244,.1); border: 1px solid rgba(139,156,244,.25); color: var(--accent);
  margin-top: .45rem;
}
.btn-sm:hover { background: rgba(139,156,244,.2); }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); padding: 2rem 1rem;
}
.auth-card {
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: 20px; padding: 2.4rem 2rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.auth-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 1.6rem;
  font-weight: 400; letter-spacing: .16em; color: #e8e3da; text-align: center; margin-bottom: .3rem;
}
.auth-logo em { color: #c9ab82; font-style: italic; }
[data-theme="light"] .auth-logo { color: #1a1f2e; }
[data-theme="light"] .auth-logo em { color: #9a7040; }
.auth-sub { text-align: center; font-size: .78rem; color: var(--muted); margin-bottom: 1.6rem; letter-spacing: .04em; }
.auth-form { margin-bottom: 1rem; }
.auth-link-small { display: block; text-align: center; font-size: .74rem; color: var(--muted); margin-top: .7rem; text-decoration: none; }
.auth-link-small:hover { color: var(--accent2); }
.auth-divider {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.2rem 0; font-size: .72rem; color: var(--muted);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.oauth-btns { display: flex; flex-direction: column; gap: .55rem; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .65rem 1rem; border-radius: var(--r);
  font-family: 'Outfit', sans-serif; font-size: .82rem; font-weight: 400;
  text-decoration: none; transition: .18s; cursor: pointer;
}
.btn-google { background: rgba(66,133,244,.08); border: 1px solid rgba(66,133,244,.25); color: var(--text); }
.btn-google:hover { background: rgba(66,133,244,.15); border-color: #4285f4; }
.btn-apple  { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); color: var(--text); }
.btn-apple:hover  { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }
.btn-passkey { background: rgba(139,156,244,.08); border: 1px solid rgba(139,156,244,.25); color: var(--text); }
.btn-passkey:hover { background: rgba(139,156,244,.15); border-color: var(--accent); }
.btn-oauth--disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none; user-select: none;
}
.oauth-coming-soon {
  margin-left: auto; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase;
  background: var(--s2); color: var(--muted); border-radius: 20px;
  padding: .15rem .55rem; border: 1px solid var(--border); white-space: nowrap;
}
.auth-footer-link { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 1.2rem; }
.auth-footer-link a { color: var(--accent2); text-decoration: none; }
.auth-footer-link a:hover { text-decoration: underline; }
.auth-privacy-note { font-size: .7rem; color: var(--muted); margin-bottom: .6rem; }
.auth-privacy-note a { color: var(--accent2); }

/* ── Onboarding ─────────────────────────────────────────────── */
.onboarding-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px); padding: 2rem 1rem;
}
.onboarding-card {
  background: var(--s1); border: 1px solid var(--border2);
  border-radius: 20px; padding: 2.8rem 2rem; width: 100%; max-width: 440px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.onboarding-icon { font-size: 2.8rem; margin-bottom: .8rem; }
.onboarding-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.8rem;
  font-weight: 300; letter-spacing: .08em; margin-bottom: .5rem;
}
.onboarding-text { font-size: .84rem; color: var(--text2); margin-bottom: 1.6rem; line-height: 1.7; }
.onboarding-form .field-centered { text-align: center; }
.label-large {
  display: block; font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; font-weight: 300; color: var(--text);
  margin-bottom: .9rem; letter-spacing: .04em;
}
.skip-link { color: var(--muted); font-size: .72rem; margin-top: .5rem; }
.onboarding-features { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.feat-chip {
  background: var(--s2); border: 1px solid var(--border);
  border-radius: 20px; padding: .28rem .75rem; font-size: .7rem; color: var(--text2);
}

/* ── Player app ─────────────────────────────────────────────── */
.app-greeting {
  font-family: 'Cormorant Garamond', serif; font-size: 1.4rem;
  font-weight: 300; color: var(--text); margin-bottom: 1rem;
  letter-spacing: .05em;
}
.app-greeting em { color: var(--accent2); font-style: normal; }

/* Visualizer */
.vis-wrap {
  display: flex; justify-content: center; align-items: center;
  margin: 0 auto 2.4rem; position: relative; width: 150px; height: 150px;
}
#vis-canvas { border-radius: 50%; width: 150px; height: 150px; }
.vis-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid rgba(139,156,244,.16); animation: ring-pulse 4s ease-in-out infinite;
}
.vis-ring:nth-child(2) { inset: -18px; border-color: rgba(139,156,244,.08); animation-delay: 1.4s; }
.vis-ring:nth-child(3) { inset: -30px; border-color: rgba(139,156,244,.04); animation-delay: 2.8s; }
@keyframes ring-pulse { 0%,100%{transform:scale(1);opacity:.5;} 50%{transform:scale(1.03);opacity:1;} }

/* Play button */
.play-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .6rem 0; }
#play-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6d7fe8);
  border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; color: #fff;
  box-shadow: 0 0 28px rgba(139,156,244,.35); transition: all .2s;
}
#play-btn:hover { transform: scale(1.07); box-shadow: 0 0 40px rgba(139,156,244,.55); }
#play-btn.playing { background: linear-gradient(135deg, #9aa8f5, #b08de8); }
#status-line { font-size: .74rem; color: var(--text2); text-align: center; margin-top: .35rem; letter-spacing: .03em; }

/* Volume */
.vol-row { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; }
.vol-label { font-size: .66rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; min-width: 50px; }
input[type=range] {
  -webkit-appearance: none; flex: 1; height: 4px;
  background: var(--s2); border-radius: 4px; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(139,156,244,.4); cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--p,50%), var(--s2) var(--p,50%));
  height: 4px; border-radius: 4px;
}
.range-val { font-size: .7rem; min-width: 24px; color: var(--muted); text-align: right; }

/* Preset grid */
.preset-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
.preset-btn {
  background: var(--s2); border: 1px solid var(--border); border-radius: 10px;
  padding: .6rem .4rem; cursor: pointer; transition: all .22s;
  text-align: center; color: var(--text); font-family: 'Outfit', sans-serif;
}
.preset-btn:hover { border-color: var(--accent); background: rgba(139,156,244,.06); }
.preset-btn.active { border-color: var(--accent); background: rgba(139,156,244,.12); box-shadow: 0 0 18px var(--glow); }
.p-name  { display: block; font-weight: 500; font-size: .78rem; margin-bottom: .16rem; }
.p-freq  { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .07em; }
.p-wave  { display: block; color: var(--accent); font-size: .58rem; margin-top: .1rem; }

/* Layers */
.layer-row { display: flex; align-items: center; gap: .6rem; padding: .52rem 0; border-bottom: 1px solid var(--border); }
.layer-row:last-child { border-bottom: none; }
.toggle, .tog {
  width: 36px; height: 20px; border-radius: 10px; flex-shrink: 0;
  background: var(--s3); border: 1px solid var(--border2);
  cursor: pointer; position: relative; transition: .2s;
}
.toggle.on, .tog.on { background: var(--accent); border-color: var(--accent); }
.toggle::after, .tog::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: .2s;
}
.toggle.on::after, .tog.on::after { left: 20px; }
.layer-icon, .l-icon { font-size: .95rem; flex-shrink: 0; }
.layer-name, .l-name { flex: 1; font-size: .8rem; color: var(--text2); }
.layer-slider, .l-vol { width: 80px; }

/* Feature pills */
.feat-row { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .65rem; }
.feat-btn {
  padding: .3rem .7rem; border-radius: 20px; background: var(--s2);
  border: 1px solid var(--border); color: var(--muted);
  font-family: 'Outfit', sans-serif; font-size: .68rem;
  cursor: pointer; transition: .18s; display: flex; align-items: center; gap: .28rem;
  white-space: normal; height: auto; min-height: 1.8rem; text-align: left;
}
.feat-btn.active, .feat-btn.on { border-color: var(--accent2); color: var(--accent2); background: rgba(196,168,130,.07); }

/* Timer */
.timer-btns { display: flex; gap: .38rem; flex-wrap: wrap; }
.timer-btn {
  padding: .32rem .75rem; border-radius: 20px; background: var(--s2);
  border: 1px solid var(--border); color: var(--muted);
  font-family: 'Outfit', sans-serif; font-size: .72rem; cursor: pointer; transition: .18s;
}
.timer-btn.active, .timer-btn:hover { border-color: var(--accent); color: var(--accent); }
#timer-display {
  font-family: 'Cormorant Garamond', serif; font-size: 2.4rem;
  text-align: center; letter-spacing: .12em; margin: .65rem 0 .28rem;
}
.timer-bar-wrap, .tbar-wrap { height: 3px; background: var(--s2); border-radius: 3px; overflow: hidden; }
.timer-bar, .tbar { height: 100%; background: var(--accent); border-radius: 3px; width: 0%; transition: width .5s; }

/* Breath */
#breath-wrap { display: none; flex-direction: column; align-items: center; padding: 1.6rem 0 .9rem; margin-top: .5rem; border-top: 1px solid var(--border); }
#breath-circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,156,244,.22), transparent 70%);
  border: 2px solid rgba(139,156,244,.32);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; color: var(--accent); letter-spacing: .04em;
  transition: transform 4s ease-in-out, box-shadow 4s ease-in-out;
}
#breath-label { margin-top: .45rem; font-size: .63rem; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }

/* Crash settings */
#crash-settings { flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .55rem; font-size: .72rem; color: var(--muted); }
select { background: var(--s2); border: 1px solid var(--border); color: var(--text); border-radius: var(--rs); padding: .28rem .55rem; font-family: 'Outfit', sans-serif; font-size: .72rem; outline: none; cursor: pointer; }

/* Wellness grid */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pain-row { display: flex; align-items: center; gap: .55rem; margin: .38rem 0; }
.pain-lbl { font-size: .67rem; color: var(--muted); min-width: 45px; }
.pain-val { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--accent); min-width: 20px; text-align: center; }
.mood-emojis { display: flex; gap: .38rem; justify-content: center; flex-wrap: wrap; margin: .38rem 0; }
.mood-btn { font-size: 1.4rem; cursor: pointer; padding: .22rem; border-radius: 8px; border: 2px solid transparent; background: none; transition: .13s; }
.mood-btn:hover, .mood-btn.selected { border-color: var(--accent); background: var(--s2); }
textarea.note-input { resize: none; min-height: 48px; }

/* Entry lists */
.entry-list { list-style: none; margin-top: .55rem; max-height: 150px; overflow-y: auto; }
.entry-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: .36rem .55rem; background: var(--s2); border-radius: 6px;
  margin-bottom: .26rem; font-size: .7rem; color: var(--text2); gap: .5rem;
}
.entry-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .8rem; flex-shrink: 0; padding: .1rem; }
.entry-del:hover { color: var(--danger); }
.comment-report-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .75rem; flex-shrink: 0; padding: .1rem; opacity: .4; transition: opacity .15s, color .15s; }
.comment-report-btn:hover { opacity: 1; color: #c4a065; }
.comment-report-btn:disabled { opacity: .35; cursor: default; }
.delta { font-weight: 500; }
.delta.better { color: var(--accent3); }
.delta.worse  { color: var(--danger); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin-bottom: .8rem; }
.stat-card { background: var(--s2); border: 1px solid var(--border); border-radius: 10px; padding: .75rem; text-align: center; }
.stat-val { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; color: var(--accent); }
.stat-lbl { font-size: .62rem; color: var(--muted); letter-spacing: .06em; margin-top: .18rem; }

/* Favorites */
.fav-save-row { display: flex; gap: .5rem; margin-bottom: .65rem; }
.fav-item { display: flex; align-items: center; gap: .55rem; background: var(--s2); border-radius: 8px; padding: .48rem .75rem; margin-bottom: .38rem; font-size: .73rem; }
.fav-name { flex: 1; color: var(--text); }
.fav-meta { font-size: .63rem; color: var(--muted); white-space: nowrap; }

/* Support */
.support-card {
  background: linear-gradient(135deg, rgba(196,168,130,.07), rgba(139,156,244,.07));
  border: 1px solid var(--border2); border-radius: var(--r);
  padding: 1.2rem 1.4rem; text-align: center; margin-bottom: .85rem;
}
.support-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--accent2); margin-bottom: .38rem; }
.support-text { font-size: .8rem; color: var(--text2); margin-bottom: .8rem; line-height: 1.7; }
.bmc-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.4rem; border-radius: 24px;
  background: linear-gradient(135deg,#fdd835,#ff8f00);
  color: #000; font-family: 'Outfit', sans-serif; font-weight: 500; font-size: .84rem;
  text-decoration: none; transition: .18s; box-shadow: 0 4px 20px rgba(255,140,0,.18);
}
.bmc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(255,140,0,.28); }

/* Crash warning */
#crash-warn {
  display: none; position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  background: #180e0e; border: 1px solid #9a3838; border-radius: var(--r);
  padding: .9rem 1.4rem; z-index: 200; font-size: .78rem; color: #c87070;
  box-shadow: 0 4px 30px rgba(150,56,56,.3); text-align: center; min-width: 260px;
}
#crash-warn button {
  margin-top: .45rem; width: 100%; background: rgba(150,56,56,.2);
  border: 1px solid #9a3838; color: #c87070; border-radius: 6px;
  padding: .32rem; cursor: pointer; font-size: .7rem;
}

/* Toast */
#toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%) translateY(60px);
  background: var(--s2); border: 1px solid var(--border2); border-radius: 20px;
  padding: .48rem 1.1rem; font-size: .74rem; color: var(--text2);
  z-index: 300; transition: transform .25s, opacity .25s; opacity: 0;
  white-space: nowrap; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Heartbeat dot */
.hb-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--danger);
  display: inline-block; opacity: 0; vertical-align: middle;
  animation: hb 1s ease-in-out infinite;
}
@keyframes hb { 0%,100%{opacity:0;transform:scale(.8);} 50%{opacity:1;transform:scale(1.3);} }

/* Tab navigation */
.tab-nav { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .35rem; margin-bottom: .9rem; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: .38rem .85rem; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
  background: var(--s2); border: 1px solid var(--border); color: var(--muted);
  font-family: 'Outfit', sans-serif; font-size: .73rem; cursor: pointer; transition: .18s;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { background: rgba(139,156,244,.12); border-color: var(--accent); color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 3px; }

/* ── ADMIN STYLES ────────────────────────────────────────────── */
.admin-body { background: var(--bg); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 200px; flex-shrink: 0; background: var(--s1);
  border-right: 1px solid var(--border); padding: 1.4rem 1rem;
  display: flex; flex-direction: column; gap: .3rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.2rem; padding-bottom: .8rem; border-bottom: 1px solid var(--border); }
.admin-badge { font-size: .62rem; background: rgba(196,168,130,.15); border: 1px solid rgba(196,168,130,.3); color: var(--accent2); border-radius: 10px; padding: .1rem .5rem; }
.admin-nav { display: flex; flex-direction: column; gap: .25rem; }
.admin-nav-link {
  padding: .5rem .7rem; border-radius: var(--rs); font-size: .78rem; color: var(--muted);
  text-decoration: none; transition: .15s; display: block;
  background: none; border: none; cursor: pointer; font: inherit; width: 100%; text-align: left;
}
.admin-nav-link:hover, .admin-nav-link.active { background: var(--s2); color: var(--text2); }
.admin-logout { margin-top: auto; color: var(--danger) !important; }
.admin-main { flex: 1; padding: 1.4rem 1.6rem; max-width: 1100px; }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; flex-wrap: wrap; gap: .6rem; }
.admin-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; letter-spacing: .08em; color: var(--text); margin-bottom: .9rem; }
.admin-back { font-size: .76rem; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: .6rem; }
.admin-back:hover { color: var(--accent2); }
.admin-card { background: var(--s1); border: 1px solid var(--border); border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: .9rem; }
.admin-card-title { font-size: .85rem; color: var(--text2); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .7rem; font-weight: 400; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: .6rem; margin-bottom: .9rem; }
.admin-stat { background: var(--s1); border: 1px solid var(--border); border-radius: var(--r); padding: .8rem; text-align: center; }
.admin-stat-val { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; color: var(--accent); }
.admin-stat-lbl { font-size: .65rem; color: var(--muted); margin-top: .15rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.admin-table th { text-align: left; padding: .4rem .5rem; color: var(--muted); font-weight: 400; font-size: .7rem; border-bottom: 1px solid var(--border); letter-spacing: .06em; text-transform: uppercase; }
.admin-table td { padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.03); color: var(--text2); vertical-align: middle; }
.admin-table-full { width: 100%; }
.admin-link { color: var(--accent); text-decoration: none; font-size: .72rem; }
.admin-link:hover { text-decoration: underline; }
.row-banned td { opacity: .5; }
.badge { display: inline-block; padding: .12rem .5rem; border-radius: 10px; font-size: .65rem; }
.badge-google { background: rgba(66,133,244,.15); color: #4285f4; }
.badge-apple  { background: rgba(255,255,255,.08); color: var(--text2); }
.badge-email  { background: rgba(139,156,244,.12); color: var(--accent); }
.badge-sec    { display:inline-block; padding:.1rem .4rem; border-radius:8px; font-size:.62rem; background:rgba(126,211,133,.12); color:#7ed385; border:1px solid rgba(126,211,133,.25); margin-right:.2rem; }
.admin-search-form { display: flex; gap: .5rem; }
.admin-search-input { background: var(--s2); border: 1px solid var(--border2); border-radius: var(--rs); padding: .38rem .7rem; color: var(--text); font-family: 'Outfit', sans-serif; font-size: .78rem; outline: none; }
.admin-search-input:focus { border-color: var(--accent); }
.admin-pagination { display: flex; gap: .3rem; margin-top: .8rem; }
.page-btn { padding: .3rem .65rem; border-radius: 6px; background: var(--s2); border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-size: .74rem; }
.page-btn.active { border-color: var(--accent); color: var(--accent); }
.admin-dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem .8rem; font-size: .8rem; }
.admin-dl dt { color: var(--muted); }
.admin-dl dd { color: var(--text2); }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .8rem; }
.admin-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .preset-grid    { grid-template-columns: repeat(2,1fr); }
  .stats-grid     { grid-template-columns: repeat(2,1fr); }
  .grid2          { grid-template-columns: 1fr; }
  .auth-card      { padding: 1.8rem 1.2rem; }
  .onboarding-card{ padding: 2rem 1.2rem; }
  .admin-layout   { flex-direction: column; }
  .admin-sidebar  { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: .7rem; }
  .admin-nav      { flex-direction: row; flex-wrap: wrap; }
  .admin-main     { padding: .9rem; }
  .admin-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .preset-grid { grid-template-columns: repeat(2,1fr); }
  .header-name { display: none; }
  /* Hide lang select on small screens when guest CTAs are present */
  .header-right:has(.btn-nav-login) .lang-select { display: none; }
}

/* ── Password strength meter ────────────────────────────────── */
.pw-strength { margin-top: .45rem; }
.pw-bars { display: flex; gap: 4px; margin-bottom: .25rem; }
.pw-bar {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--border2); transition: background .2s;
}
.pw-bar.pw-s1 { background: var(--danger); }
.pw-bar.pw-s2 { background: var(--warning); }
.pw-bar.pw-s3 { background: var(--accent); }
.pw-bar.pw-s4 { background: var(--success); }
.pw-label { font-size: .68rem; color: var(--muted); }

/* ── CSV export link ─────────────────────────────────────────── */
.btn-export {
  display: inline-block; margin-top: .6rem;
  font-size: .68rem; color: var(--muted);
  text-decoration: none; letter-spacing: .04em;
  padding: .2rem .5rem; border-radius: var(--rs);
  border: 1px solid var(--border); transition: .15s;
}
.btn-export:hover { color: var(--accent2); border-color: var(--accent2); }

/* ── Mobile nav ──────────────────────────────────────────────── */
.mob-nav {
  display: none; align-items: center; gap: .45rem;
}
.mob-nav-profile {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; text-decoration: none; border-radius: 50%;
  flex-shrink: 0;
}
.mob-nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border2);
}
.mob-nav-avatar-ph {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--s2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--text2); font-weight: 600;
}
.mob-nav-profile--guest svg { color: var(--muted); }
.mob-community-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  color: var(--muted); text-decoration: none; transition: .15s;
}
.mob-community-btn:hover { color: var(--accent2); }
.mob-menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  background: none; border: 1px solid var(--border); color: var(--text2);
  transition: .15s; flex-shrink: 0;
}
.mob-menu-btn:hover { border-color: var(--accent2); color: var(--accent2); }

/* Mobile menu overlay */
.mob-menu {
  position: fixed; inset: 0; z-index: 300;
  pointer-events: none; visibility: hidden;
}
.mob-menu.open { pointer-events: all; visibility: visible; }
.mob-menu-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  opacity: 0; transition: opacity .22s;
}
.mob-menu.open .mob-menu-backdrop { opacity: 1; }
.mob-menu-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(280px, 82vw);
  background: var(--s1); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .22s ease;
  z-index: 1;
}
.mob-menu.open .mob-menu-panel { transform: translateX(0); }
.mob-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mob-menu-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1.1rem; padding: .3rem;
  line-height: 1; transition: .15s; border-radius: 6px;
}
.mob-menu-close:hover { color: var(--text2); background: var(--s2); }
.mob-menu-list {
  display: flex; flex-direction: column; flex: 1; overflow-y: auto;
}
.mob-menu-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1.2rem; font-size: .88rem; color: var(--text2);
  text-decoration: none; transition: background .12s;
  background: none; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; font: inherit; width: 100%;
}
.mob-menu-item:hover { background: var(--s2); color: var(--accent2); }
.mob-menu-icon {
  width: 1.1rem; height: 1.1rem; font-size: .85rem; flex-shrink: 0;
  display: inline-block; vertical-align: middle;
}
.mob-menu-logout { color: var(--danger); }
.mob-menu-logout:hover { background: rgba(220,80,80,.07); color: var(--danger); }
.mob-menu-register { color: var(--accent); }
.mob-menu-lang {
  padding: .85rem 1.2rem; display: flex; align-items: center; gap: .8rem;
  border-bottom: 1px solid var(--border);
}
.mob-menu-lang-label { font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* Show mobile nav, hide desktop header-right on small screens */
@media (max-width: 640px) {
  .header-right { display: none !important; }
  .mob-nav { display: flex; }
}

/* ── Error pages (404, 500) ──────────────────────────────────── */
.err-page { max-width: 440px; margin: 5rem auto; text-align: center; padding: 0 1rem; }
.err-code  { font-family: 'Cormorant Garamond', serif; font-size: 5rem; color: var(--s3); font-weight: 300; line-height: 1; }
.err-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; color: var(--text); margin: .5rem 0 .8rem; }
.err-desc  { font-size: .82rem; color: var(--text2); line-height: 1.7; margin-bottom: 1.5rem; }
.err-btn   { display: inline-block; padding: .55rem 1.4rem; background: rgba(143,160,245,.14); border: 1px solid rgba(143,160,245,.3); border-radius: 8px; color: var(--accent); text-decoration: none; font-size: .82rem; }

/* ── Empty states ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.empty-state .empty-icon { font-size: 1.8rem; margin-bottom: .5rem; opacity: .5; }

/* ── Phosphor icon sprite ────────────────────────────────────── */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.13em;
    flex-shrink: 0;
    pointer-events: none;
}
.icon-xs  { width: .75em;  height: .75em;  }
.icon-sm  { width: .875em; height: .875em; }
.icon-lg  { width: 1.25em; height: 1.25em; }
.icon-xl  { width: 1.5em;  height: 1.5em;  }
.icon-2x  { width: 2em;    height: 2em;    }

/* ── Beta badge ──────────────────────────────────────────────── */
.beta-badge {
    display: inline-block;
    font-size: .55rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent2);
    border: 1px solid var(--accent2);
    border-radius: 4px;
    padding: .1em .4em;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: .4rem;
    opacity: .85;
}

/* ── Feedback floating button ────────────────────────────────── */
.fb-trigger {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1rem;
    background: var(--s3);
    border: 1px solid var(--border2);
    border-radius: 20px;
    color: var(--text2);
    font-family: 'Outfit', sans-serif;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
    transition: background .15s, color .15s, transform .1s;
}
.fb-trigger:hover { background: var(--s4); color: var(--text); transform: translateY(-1px); }
.fb-trigger-label { line-height: 1; }
@media (max-width:500px) {
    .fb-trigger { bottom: 5rem; right: 1rem; padding: .55rem .75rem; }
    .fb-trigger-label { display: none; }
}

/* ── Feedback modal ──────────────────────────────────────────── */
.fb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    align-items: flex-end;
    justify-content: flex-end;
}
.fb-modal.fb-open { display: flex; }
.fb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}
.fb-modal-panel {
    position: relative;
    z-index: 1;
    background: var(--s2);
    border: 1px solid var(--border2);
    border-radius: 16px 16px 4px 4px;
    padding: 1.2rem 1.4rem 1.4rem;
    width: min(420px, 100vw - 2rem);
    margin: 1rem 1.4rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    display: flex;
    flex-direction: column;
    gap: .75rem;
    animation: fb-slide-up .18s ease-out;
}
@keyframes fb-slide-up { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@media (max-width:500px) { .fb-modal-panel { margin: .5rem; border-radius: 14px; } }
.fb-modal-head { display: flex; align-items: center; justify-content: space-between; }
.fb-modal-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--text); }
.fb-modal-close { background: none; border: none; color: var(--muted); cursor: pointer; padding: .2rem; border-radius: 6px; line-height: 0; }
.fb-modal-close:hover { color: var(--text); }
.fb-type-tabs { display: flex; gap: .4rem; }
.fb-type-btn {
    flex: 1;
    padding: .4rem .6rem;
    background: var(--s1);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--text2);
    font-family: 'Outfit', sans-serif;
    font-size: .78rem;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.fb-type-btn.active { background: var(--accent2); border-color: var(--accent2); color: #07090e; font-weight: 600; }
.fb-textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    background: var(--s1);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: .7rem .8rem;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: .82rem;
    line-height: 1.5;
    outline: none;
    box-sizing: border-box;
}
.fb-textarea:focus { border-color: var(--accent2); }
.fb-email {
    width: 100%;
    background: var(--s1);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: .55rem .8rem;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: .82rem;
    outline: none;
    box-sizing: border-box;
}
.fb-email:focus { border-color: var(--accent2); }
.fb-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.fb-result { font-size: .78rem; line-height: 1.4; }
.fb-result--ok    { color: var(--accent); }
.fb-result--error { color: var(--rose); }

/* ── Admin feedback view ─────────────────────────────────────── */
.badge-feedback { display: inline-block; font-size: .68rem; padding: .15em .5em; border-radius: 5px; font-weight: 600; white-space: nowrap; }
.badge-bug   { background: rgba(239,68,68,.15); color: #f87171; }
.badge-idea  { background: rgba(99,179,237,.12); color: #63b3ed; }
.badge-new-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3em; height: 1.3em; background: var(--rose); color: #fff; border-radius: 99px; font-size: .65rem; font-weight: 700; padding: 0 .3em; margin-left: .3rem; vertical-align: middle; }
.feedback-row--new td { background: rgba(var(--accent2-rgb, 212,175,55),.04); }
.feedback-msg { font-size: .82rem; color: var(--text); line-height: 1.4; cursor: pointer; }
.feedback-msg:hover { color: var(--accent2); }
.feedback-url { font-size: .68rem; color: var(--muted); margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

/* ── PWA Install Banner ──────────────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1.1rem;
  padding-bottom: calc(.9rem + env(safe-area-inset-bottom, 0px));
  background: var(--s1); border-top: 1px solid var(--border2);
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  animation: pwa-slide-up .32s ease;
}
.pwa-banner--hiding { animation: pwa-slide-down .32s ease forwards; }
@keyframes pwa-slide-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pwa-slide-down { from { transform: translateY(0); }   to { transform: translateY(100%); } }
.pwa-banner__icon { color: var(--accent); flex-shrink: 0; }
.pwa-banner__text { flex: 1; font-size: .78rem; line-height: 1.4; min-width: 0; }
.pwa-banner__text strong { display: block; color: var(--text); font-weight: 500; margin-bottom: .1rem; }
.pwa-banner__text span   { color: var(--muted); }
.pwa-banner__text b      { color: var(--text2); font-weight: 500; }
.pwa-banner__install {
  flex-shrink: 0; background: var(--accent); border: none; border-radius: 7px;
  color: #fff; cursor: pointer; font-family: 'Outfit', sans-serif;
  font-size: .76rem; font-weight: 500; padding: .38rem .85rem;
  white-space: nowrap; transition: opacity .15s;
}
.pwa-banner__install:hover { opacity: .85; }
.pwa-banner__close {
  flex-shrink: 0; background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: .9rem; padding: .25rem .3rem; border-radius: 5px;
}
.pwa-banner__close:hover { color: var(--text); }
