:root {                                   /* day — the default */
  --bg0: #eef1f8;
  --page: radial-gradient(1100px 500px at 15% -10%, #dce6ff 0%, transparent 60%),
          radial-gradient(900px 500px at 110% 15%, #f3e2ff 0%, transparent 55%),
          var(--bg0);
  --glass: rgba(255,255,255,0.72); --glass-hi: rgba(30,40,80,0.07);
  --line: rgba(25,35,70,0.13); --text: #1d2436; --muted: #5d6b84;
  --grad: linear-gradient(135deg, #5b78f0 0%, #9a55f0 55%, #f055ae 100%);
  --accent: #4f6cf0; --like: #e8447a;
  --inset: rgba(20,30,70,0.06); --float-bg: #ffffff;
  --header-bg: rgba(255,255,255,0.78);
  --shadow: 0 24px 60px rgba(60,80,160,0.18);
}
html[data-theme="dark"] {
  --bg0: #0b0f1a;
  --page: radial-gradient(1100px 500px at 15% -10%, #1b2a55 0%, transparent 60%),
          radial-gradient(900px 500px at 110% 15%, #3a1b55 0%, transparent 55%),
          var(--bg0);
  --glass: rgba(255,255,255,0.045); --glass-hi: rgba(255,255,255,0.08);
  --line: rgba(255,255,255,0.09); --text: #e8edf5; --muted: #8b98ad;
  --grad: linear-gradient(135deg, #6d8dff 0%, #b06dff 55%, #ff6dc4 100%);
  --accent: #7d9aff; --like: #ff5c8a;
  --inset: rgba(0,0,0,0.28); --float-bg: #171e2e;
  --header-bg: rgba(11,15,26,0.75);
  --shadow: 0 30px 80px rgba(0,0,0,0.5);
}
* { box-sizing: border-box; margin: 0; }
body {
  min-height: 100vh; color: var(--text);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  background-attachment: fixed;
  transition: background .25s, color .25s;
}
.hidden { display: none !important; }

/* ── auth ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card {
  width: min(400px, 94vw); text-align: center; padding: 42px 36px 34px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.logo-big { font-size: 52px; }
.auth-card h1 {
  font-size: 30px; letter-spacing: .5px; margin: 6px 0 2px;
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.tagline { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px;
  background: var(--inset); padding: 5px; border-radius: 12px; }
.auth-tabs button {
  flex: 1; padding: 9px; border: none; border-radius: 9px; cursor: pointer;
  background: none; color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.auth-tabs button.active { background: var(--glass-hi); color: var(--text); }
#auth-form { display: grid; gap: 12px; }
input, textarea {
  width: 100%; background: var(--inset); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; outline: none; transition: border-color .15s;
}
input:focus, textarea:focus { border-color: var(--accent); }
button.primary {
  border: none; border-radius: 12px; padding: 12px 22px; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14.5px;
  transition: transform .12s, box-shadow .12s;
}
button.primary:hover { transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(125,110,255,.35); }
button.primary:disabled { opacity: .5; transform: none; box-shadow: none; }
.err { color: #ff8296; font-size: 13px; min-height: 18px; }

/* ── app shell ── */
header {
  position: sticky; top: 0; z-index: 10; padding: 12px 16px;
  background: var(--header-bg); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 720px; margin: 0 auto; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: .4px; }
.brand .logo { margin-right: 4px; }
.me { display: flex; align-items: center; gap: 10px; font-weight: 600; }
button.ghost {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 13px;
}
button.ghost:hover { color: var(--text); border-color: var(--muted); }
main { max-width: 720px; margin: 26px auto 80px; padding: 0 16px;
  display: grid; gap: 18px; }

.card {
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 20px; backdrop-filter: blur(14px);
}

/* ── composer ── */
.compose-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.compose-tabs button {
  border: 1px solid var(--line); background: none; color: var(--muted);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; font-size: 13px;
  font-weight: 600;
}
.compose-tabs button.active { background: var(--glass-hi); color: var(--text);
  border-color: var(--accent); }
.composer textarea { resize: vertical; margin-top: 10px; }
#c-title { margin-top: 4px; font-weight: 700; font-size: 16px; }
.compose-actions { display: flex; align-items: center; margin-top: 12px; }
.attach { color: var(--muted); font-size: 13.5px; cursor: pointer;
  padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); }
.attach:hover { color: var(--text); border-color: var(--muted); }
.spacer { flex: 1; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  background: var(--inset); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px; color: var(--muted);
}
.chip b { color: var(--text); font-weight: 600; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip button { background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; padding: 0; }

/* ── feed ── */
.entry-note { color: var(--muted); font-size: 12.5px; margin: 0 4px 6px; }
.post { margin-bottom: 2px; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-grid;
  place-items: center; font-weight: 800; font-size: 15px; color: #fff;
  flex-shrink: 0;
}
.post-head .who { font-weight: 700; }
.post-head .when { color: var(--muted); font-size: 12px; }
.article-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .8px;
  background: var(--grad); color: #fff; padding: 2px 9px; border-radius: 999px;
  margin-left: 8px; vertical-align: 2px;
}
.post h3 { font-size: 19px; margin: 2px 0 8px; }
.post .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post .body.clamped { max-height: 130px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.read-more { background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 13px; padding: 4px 0; font-weight: 600; }

.img-grid { display: grid; gap: 6px; margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.img-grid img { width: 100%; max-height: 340px; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.file-list { display: grid; gap: 6px; margin-top: 10px; }
.file-row {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--text); background: var(--inset); border: 1px solid var(--line);
  padding: 9px 13px; border-radius: 12px; font-size: 13.5px;
}
.file-row:hover { border-color: var(--accent); }
.file-row .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.file-row .fmeta { color: var(--muted); font-size: 11.5px; margin-left: auto;
  flex-shrink: 0; }

.actions { display: flex; gap: 6px; margin-top: 12px; }
.act {
  display: inline-flex; align-items: center; gap: 7px; background: none;
  border: none; color: var(--muted); cursor: pointer; font-size: 13.5px;
  font-weight: 600; padding: 7px 14px; border-radius: 999px;
  transition: background .12s, color .12s, transform .1s;
}
.act:hover { background: var(--glass-hi); color: var(--text); }
.act:active { transform: scale(.94); }
.act.on-like { color: var(--like); }
.act.on-share { color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }
.empty .big { font-size: 40px; }

/* ── nav ── */
.main-nav { display: flex; gap: 4px; padding: 5px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: 14px; backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(20,30,70,.06); }
.main-nav button {
  display: inline-flex; align-items: center; gap: 7px; position: relative;
  border: none; background: none; color: var(--muted); cursor: pointer;
  padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  letter-spacing: .1px; transition: color .16s, background .16s, transform .1s;
}
.main-nav button svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  opacity: .9; transition: transform .16s;
}
.main-nav button:hover { color: var(--text); background: var(--glass-hi); }
.main-nav button.active {
  color: #fff; background: var(--grad);
  box-shadow: 0 4px 14px rgba(125,110,255,.35);
}
.main-nav button.active svg { transform: scale(1.05); }
.main-nav button:active { transform: translateY(1px); }
@media (max-width: 520px) {
  .main-nav button span { display: none; }     /* icons only on small screens */
  .main-nav button { padding: 9px 12px; }
}
main.wide { max-width: 720px; }

/* ── drive ── */
.drive-bar { display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 14px; }
.crumbs button { background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 14px; font-weight: 600; padding: 4px 6px;
  border-radius: 8px; }
.crumbs button:hover { background: var(--glass-hi); }
.crumbs .sep { color: var(--muted); }
.crumbs .here { color: var(--text); font-weight: 700; padding: 4px 6px; }
.drive-actions { display: flex; gap: 8px; }
.btnlike { display: inline-flex; align-items: center; cursor: pointer;
  border: 1px solid var(--line); color: var(--muted); border-radius: 10px;
  padding: 7px 14px; font-size: 13px; }
.btnlike:hover { color: var(--text); border-color: var(--muted); }

.drive-grid { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
  position: relative; background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 12px 12px; cursor: pointer;
  text-align: center; transition: transform .12s, border-color .12s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile .big { font-size: 42px; line-height: 1.2; height: 64px;
  display: grid; place-items: center; }
.tile img.thumb { width: 100%; height: 64px; object-fit: cover;
  border-radius: 10px; }
.tile .tname { font-size: 13px; font-weight: 600; margin-top: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tmeta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tile .kebab { position: absolute; top: 8px; right: 8px; background: none;
  border: none; color: var(--muted); cursor: pointer; font-size: 17px;
  padding: 2px 8px; border-radius: 8px; opacity: 0; transition: opacity .12s; }
.tile:hover .kebab { opacity: 1; }
.tile .kebab:hover { background: var(--glass-hi); color: var(--text); }
.menu {
  position: absolute; z-index: 30; min-width: 160px; padding: 6px;
  background: var(--float-bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.menu button { display: block; width: 100%; text-align: left; background: none;
  border: none; color: var(--text); padding: 9px 12px; border-radius: 8px;
  cursor: pointer; font-size: 13.5px; }
.menu button:hover { background: var(--glass-hi); }
.menu button.danger { color: #ff8296; }
.usage { color: var(--muted); font-size: 12px; text-align: right; }
.drop-hint { border: 2px dashed var(--accent); border-radius: 16px;
  padding: 26px; text-align: center; color: var(--accent); font-weight: 700; }
.drive-grid.dragging { outline: 2px dashed var(--accent);
  outline-offset: 6px; border-radius: 16px; }

/* ── modal ── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid;
  place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.modal-card { width: min(380px, 92vw); background: var(--float-bg);
  border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.modal-card h3 { margin-bottom: 12px; }
.move-list { max-height: 300px; overflow-y: auto; display: grid; gap: 4px; }
.move-list button { text-align: left; background: none; border: none;
  color: var(--text); padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-size: 14px; }
.move-list button:hover { background: var(--glass-hi); }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ── theme toggle ── */
.theme-btn {
  position: fixed; bottom: 18px; right: 18px; z-index: 100;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--glass); color: var(--text); cursor: pointer;
  font-size: 17px; backdrop-filter: blur(10px);
}
.theme-btn:hover { border-color: var(--accent); }
#app .theme-in-header { position: static; width: 36px; height: 36px; }

/* ── admin ── */
.stat-cards { display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.scard { background: var(--glass); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; }
.scard .k { font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .7px; }
.scard .v { font-size: 20px; font-weight: 750; margin-top: 3px; }
.scard .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-h { font-size: 13px; font-weight: 600; padding: 12px 16px;
  border-bottom: 1px solid var(--line); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 500;
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.admin-table tr:last-child td { border-bottom: none; }
.pill { font-size: 10.5px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; }
.pill.ok { background: rgba(60,190,120,.16); color: #2f9e63; }
.pill.off { background: rgba(230,80,90,.14); color: #d24552; }
.pill.adm { background: rgba(90,120,240,.15); color: var(--accent); }
html[data-theme="dark"] .pill.ok { color: #7de0a8; }
html[data-theme="dark"] .pill.off { color: #ff8b96; }
.mini { font-size: 12px; padding: 5px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: none; color: var(--muted);
  cursor: pointer; margin-right: 5px; }
.mini:hover { color: var(--text); border-color: var(--muted); }
.mini.danger:hover { color: #d24552; border-color: #d24552; }

/* ── post edit ── */
.post { position: relative; }
.post-kebab {
  position: absolute; top: 10px; right: 12px;
  opacity: .55; font-size: 18px; padding: 4px 10px;
  background: none; border: none; color: var(--muted);
  cursor: pointer; border-radius: 8px;
}
.post-kebab:hover { opacity: 1; background: var(--glass-hi); color: var(--text); }
.edit-box { display: grid; gap: 10px; margin-top: 8px; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Help chat ── */
main#view-help { max-width: 720px; }
.help-card { display: flex; flex-direction: column; padding: 0; height: 74vh; }
.help-log { flex: 1; overflow-y: auto; padding: 18px; display: flex;
  flex-direction: column; gap: 12px; }
.help-msg { max-width: 82%; padding: 11px 15px; border-radius: 16px;
  font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-msg.user { align-self: flex-end; background: var(--grad); color: #fff;
  border-bottom-right-radius: 5px; }
.help-msg.help { align-self: flex-start; background: var(--glass-hi);
  border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.help-msg img { max-width: 100%; border-radius: 12px; margin-top: 8px;
  display: block; cursor: pointer; }
.help-msg.typing { color: var(--muted); font-style: italic; }
.help-row { display: flex; gap: 10px; padding: 14px 16px;
  border-top: 1px solid var(--line); }
.help-row textarea { flex: 1; resize: none; max-height: 140px; }
.help-empty { color: var(--muted); text-align: center; margin: auto;
  font-size: 14px; padding: 30px; }

/* ── Help markdown ── */
.help-msg .md > div { margin: 0; }
.help-msg .md ul { margin: 4px 0 4px 2px; padding-left: 18px; }
.help-msg .md li { margin: 2px 0; }
.help-msg .md .md-h { font-weight: 700; margin: 8px 0 3px; }
.help-msg .md code { background: rgba(0,0,0,.12); padding: 1px 5px;
  border-radius: 5px; font-size: 12.5px; font-family: var(--mono); }
.help-msg .md a { color: var(--accent); }
.help-msg .md strong { font-weight: 700; }
.help-msg .md br { line-height: .5; }
.help-msg .md ol { margin: 4px 0 4px 2px; padding-left: 22px; }
.help-msg .md hr.md-hr { border: none; border-top: 1px solid var(--line);
  margin: 10px 0; }

.card-h.help-head { display: flex; align-items: center; gap: 10px; }
.card-h.help-head .hint { flex: 1; }
#help-clear { flex-shrink: 0; }

/* ── markdown in feed posts ── */
.post .body.md > div { margin: 0; }
.post .body.md ul, .post .body.md ol { margin: 5px 0 5px 2px; padding-left: 20px; }
.post .body.md li { margin: 2px 0; }
.post .body.md .md-h { font-weight: 700; margin: 9px 0 3px; font-size: 15px; }
.post .body.md strong { font-weight: 700; }
.post .body.md em { font-style: italic; }
.post .body.md code { background: var(--inset); padding: 1px 5px;
  border-radius: 5px; font-family: var(--mono); font-size: 12.5px; }
.post .body.md a { color: var(--accent); }
.post .body.md hr.md-hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.post .body.md br { line-height: .4; }

/* ── Nova thinking + typing ── */
.help-msg.thinking { display: inline-flex; align-items: center; gap: 8px; }
.think-label { color: var(--muted); font-size: 13.5px; }
.typing-dots { display: inline-flex; gap: 5px; align-items: center; padding: 2px 0; }
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: nova-bounce 1.25s infinite ease-in-out both;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes nova-bounce {
  0%, 70%, 100% { transform: translateY(0); opacity: .35; }
  35% { transform: translateY(-6px); opacity: 1; }
}
.help-msg.help img { animation: nova-fade .35s ease; }
@keyframes nova-fade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; } }

/* ══════════════ Responsive — phones, tablets, all sizes ══════════════ */

/* tablets and below */
@media (max-width: 760px) {
  main, .header-inner { max-width: 100%; }
  header { padding: 10px 12px; }
  main { padding: 0 12px; margin-top: 18px; }
}

/* phones */
@media (max-width: 560px) {
  .brand { font-size: 17px; }
  .me { gap: 6px; }
  #me-name { display: none; }               /* avatar is enough on small screens */
  .main-nav { gap: 2px; padding: 4px; border-radius: 12px; }
  .main-nav button { padding: 9px 11px; }
  .main-nav button span { display: none; }  /* icons only */
  .card { padding: 14px; border-radius: 14px; }
  .composer textarea, input, textarea { font-size: 16px; }  /* no iOS zoom-on-focus */
  .compose-actions { flex-wrap: wrap; gap: 8px; }
  .drive-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .drive-bar { flex-direction: column; align-items: stretch; }
  .drive-actions { justify-content: flex-start; flex-wrap: wrap; }
  .help-card { height: 68vh; }
  .help-msg { max-width: 90%; }
  .img-grid { grid-template-columns: 1fr 1fr; }
  .post h3 { font-size: 17px; }
  /* admin table scrolls horizontally instead of squishing */
  .card .body { overflow-x: auto; }
  .admin-table { min-width: 560px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .theme-btn { bottom: 14px; right: 14px; width: 38px; height: 38px; }
}

/* very small phones */
@media (max-width: 380px) {
  .brand .logo { margin-right: 2px; }
  .main-nav button { padding: 8px 9px; }
  .stat-cards { grid-template-columns: 1fr; }
  .img-grid { grid-template-columns: 1fr; }
}

/* landscape / large desktops: keep the comfortable 720 column, just more air */
@media (min-width: 1200px) {
  main { margin-top: 32px; }
}

/* ── refresh button + pull-to-refresh ── */
.refresh-btn {
  position: fixed; bottom: 18px; left: 18px; z-index: 100;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--glass); color: var(--text); cursor: pointer;
  backdrop-filter: blur(10px); display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
.refresh-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-btn.spinning svg { animation: rf-spin .7s linear infinite; }
@keyframes rf-spin { to { transform: rotate(360deg); } }

#pull-refresh {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%) translateY(-40px);
  z-index: 90; width: 34px; height: 34px; border-radius: 50%;
  background: var(--float-bg); border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0,0,0,.2); display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.pr-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--accent);
}
#pull-refresh.ready .pr-spinner { border-top-color: var(--accent2); }
#pull-refresh.refreshing { transform: translateX(-50%) translateY(14px) !important;
  opacity: 1 !important; }
#pull-refresh.refreshing .pr-spinner { animation: rf-spin .7s linear infinite; }
@media (max-width: 560px) { .refresh-btn { width: 40px; height: 40px; bottom: 14px; left: 14px; } }

/* ── Home "Today": weather hero + Nova news ─────────────────────────────── */
.weather-card {
  position: relative; margin-bottom: 14px; padding: 18px 20px;
  border-radius: 20px; border: 1px solid var(--line);
  background:
    radial-gradient(680px 220px at 88% -40%, rgba(120,150,255,.30), transparent 60%),
    radial-gradient(520px 260px at 0% 120%, rgba(240,120,190,.18), transparent 55%),
    var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); overflow: hidden;
}
.wx-top { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; }
.wx-place { font-weight: 700; font-size: .98rem; color: var(--text);
  letter-spacing: .1px; }
.wx-change, .wx-cancel {
  border: 1px solid var(--line); background: var(--glass-hi); color: var(--muted);
  border-radius: 999px; padding: 5px 12px; font-size: .78rem; cursor: pointer;
  font-weight: 600; transition: .15s;
}
.wx-change:hover, .wx-cancel:hover { color: var(--accent); border-color: var(--accent); }
.wx-now { display: flex; align-items: center; gap: 14px; margin: 10px 0 4px; }
.wx-icon { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.wx-main { display: flex; flex-direction: column; }
.wx-temp { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--text);
  letter-spacing: -1.5px; }
.wx-temp span { font-size: 1.1rem; font-weight: 700; color: var(--muted);
  margin-left: 2px; letter-spacing: 0; }
.wx-desc { font-size: .95rem; color: var(--muted); font-weight: 600; margin-top: 3px; }
.wx-hello { margin-left: auto; font-size: .9rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; align-self: flex-start; }
.wx-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px; }
.wx-chip { font-size: .8rem; font-weight: 600; color: var(--text);
  background: var(--glass-hi); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 11px; }
.wx-forecast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 14px; background: var(--glass-hi); }
.wx-dl { font-size: .74rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; }
.wx-di { font-size: 1.5rem; line-height: 1; }
.wx-dt { font-size: .8rem; color: var(--muted); }
.wx-dt b { color: var(--text); font-weight: 700; }
.wx-oops { color: var(--muted); font-size: .9rem; padding: 12px 2px 4px; }

/* location picker */
.weather-card.editing { background: var(--glass); }
.wx-pick-h { display: flex; align-items: center; gap: 8px; font-size: 1rem;
  color: var(--text); margin-bottom: 12px; }
.wx-pick-h .wx-cancel { margin-left: auto; }
.wx-search { display: flex; gap: 8px; }
.wx-search input { flex: 1; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--float-bg); color: var(--text);
  font-size: .95rem; outline: none; }
.wx-search input:focus { border-color: var(--accent); }
.wx-search button { padding: 0 18px; border-radius: 12px; border: none;
  background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }
.wx-results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wx-hit { text-align: left; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--glass-hi); color: var(--text);
  font-size: .92rem; font-weight: 600; cursor: pointer; transition: .14s; }
.wx-hit:hover { border-color: var(--accent); background: var(--float-bg);
  transform: translateY(-1px); }
.wx-hint { color: var(--muted); font-size: .88rem; padding: 8px 2px; }

/* Nova news */
.nova-news { margin-top: 22px; }
.nn-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; padding: 0 2px; }
.nn-title { display: flex; align-items: center; gap: 9px; }
.nn-title h3 { margin: 0; font-size: 1.12rem; font-weight: 800; color: var(--text);
  letter-spacing: -.2px; }
.nn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad);
  box-shadow: 0 0 0 4px rgba(120,150,255,.18); }
.nn-sub { font-size: .8rem; color: var(--muted); font-weight: 500; }
.nn-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.nn-card { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--glass);
  text-decoration: none; transition: .16s; position: relative; overflow: hidden; }
a.nn-card:hover { transform: translateY(-2px); border-color: var(--accent);
  box-shadow: var(--shadow); }
.nn-cat { align-self: flex-start; font-size: .72rem; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase; padding: 3px 9px;
  border-radius: 999px; color: #fff; }
.cat-world { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.cat-breaking { background: linear-gradient(135deg,#f43f5e,#e11d48); }
.cat-weather { background: linear-gradient(135deg,#38bdf8,#0ea5e9); }
.cat-science { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }
.cat-sensing { background: linear-gradient(135deg,#10b981,#059669); }
.cat-news { background: linear-gradient(135deg,#64748b,#475569); }
.nn-ct { font-weight: 700; font-size: .98rem; color: var(--text);
  line-height: 1.32; }
.nn-cs { font-size: .86rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
.nn-src { margin-top: auto; font-size: .82rem; font-weight: 700; color: var(--accent);
  padding-top: 4px; }
.nn-empty { grid-column: 1 / -1; text-align: center; color: var(--muted);
  padding: 26px 12px; font-size: .92rem; border: 1px dashed var(--line);
  border-radius: 16px; }

@media (max-width: 560px) {
  .nn-list { grid-template-columns: 1fr; }
  .wx-hello { display: none; }
  .wx-temp { font-size: 2.6rem; }
  .wx-icon { font-size: 3rem; }
}
