/* POKE EXCHANGE base stylesheet. Strict CSP: no inline styles anywhere.
   Feature areas add their own sheets (catalogue.css, market.css,
   collection.css, admin.css) and reuse the tokens and components here. */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --ink: #16192b;
  --muted: #5f6478;
  --line: #e2e5ee;
  --accent: #f5b800;
  --accent-ink: #1b1400;
  --accent-soft: #fff4cc;
  --blue: #2f5fe0;
  --blue-soft: #e5ecfd;
  --red: #d64550;
  --red-soft: #fde8ea;
  --green: #1f9d55;
  --green-soft: #e3f6ec;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 25, 43, 0.06), 0 8px 24px rgba(22, 25, 43, 0.06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4em; font-weight: 600; }
.lead { font-size: 1.1rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.section { padding: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.link { font-weight: 600; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; color: var(--muted); text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.price { font-weight: 700; color: var(--ink); }

/* Navigation */
.nav { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; }
.nav-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: 0.04em; text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand-text small { display: block; font-weight: 500; letter-spacing: 0.1em; font-size: 0.65rem; color: rgba(255, 255, 255, 0.7); }
.nav-logo { width: 26px; height: 34px; border-radius: 4px; background: var(--accent); box-shadow: inset 0 10px 0 var(--ink), inset 0 12px 0 var(--accent); }
.nav-search { display: flex; gap: 6px; flex: 1 1 260px; max-width: 460px; }
.nav-search input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-search input::placeholder { color: rgba(255, 255, 255, 0.55); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links > a, .nav-user { color: rgba(255, 255, 255, 0.85); padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }
.nav-links > a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.nav-links > a.is-active { color: var(--accent); }
.nav-links > a.btn { color: var(--accent-ink); }
.nav-sell { color: var(--accent) !important; }
.nav-bell { position: relative; }
.nav-badge { position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff; font-size: 0.65rem; border-radius: 999px; padding: 1px 5px; font-weight: 700; }
.nav-lang { border: 1px solid rgba(255, 255, 255, 0.3); }
.nav-signout button { color: rgba(255, 255, 255, 0.8); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-left: auto; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-search { order: 3; flex-basis: 100%; max-width: none; margin-bottom: 8px; }
  .nav-links { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .nav-links.is-open { display: flex; }
  .nav-links > a, .nav-user, .nav-signout { width: 100%; }
}

.demo-banner { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 0.85rem; font-weight: 600; padding: 6px 12px; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; transition: transform 0.05s ease, background 0.15s ease; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffc61a; }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #262a45; }
.btn-ghost { background: transparent; color: inherit; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.nav .btn-ghost { border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fbd5d9; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.form { display: grid; gap: 14px; }
.form h2 { margin-top: 6px; }
.field { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.field em { font-weight: 400; font-style: normal; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.input, .select, .textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: var(--surface); color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.textarea { resize: vertical; min-height: 80px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.inline-form { display: inline; }

/* Notices and badges */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; border: 1px solid transparent; }
.notice-ok { background: var(--green-soft); color: #14603a; border-color: #bfe8d0; }
.notice-error { background: var(--red-soft); color: #8c1f2a; border-color: #f3c3c8; }
.notice-info { background: var(--blue-soft); color: #1d3b8f; border-color: #c7d5fa; }
.notice.is-fading { opacity: 0; transition: opacity 0.6s ease; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-warn { background: var(--accent-soft); color: #7a5a00; }
.badge-error { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-nm { background: var(--green-soft); color: var(--green); }
.badge-lp { background: #eaf7d9; color: #4a7a10; }
.badge-mp { background: var(--accent-soft); color: #7a5a00; }
.badge-hp { background: #fde9d6; color: #a04d00; }
.badge-dmg { background: var(--red-soft); color: var(--red); }
.badge-graded { background: var(--ink); color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.pill.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }

/* Avatars: twelve hue buckets keep CSP-safe colouring */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; color: #fff; background: #777; flex: none; }
.avatar-sm { width: 26px; height: 26px; font-size: 0.75rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.hue-0 { background: #e0563a; } .hue-1 { background: #e08a2a; } .hue-2 { background: #c9a227; } .hue-3 { background: #6faa2b; }
.hue-4 { background: #2a9d63; } .hue-5 { background: #1f9a9a; } .hue-6 { background: #2f7fd6; } .hue-7 { background: #4b5fd9; }
.hue-8 { background: #7a4fd0; } .hue-9 { background: #b04ac0; } .hue-10 { background: #d64580; } .hue-11 { background: #7b8794; }

/* Hero and stats */
.hero { display: grid; gap: 28px; padding: 40px 0 20px; grid-template-columns: 1.4fr 1fr; align-items: center; }
.hero-copy h1 { font-size: clamp(1.9rem, 3vw + 1rem, 3rem); }
.hero-search { display: flex; gap: 8px; margin: 18px 0 12px; }
.hero-search input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); font: inherit; background: var(--surface); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat dt { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stat dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } }

/* Card tiles */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; box-shadow: var(--shadow); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(22, 25, 43, 0.12); }
.card-tile-art { position: relative; aspect-ratio: 245 / 337; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.card-tile-art img { width: 100%; height: 100%; object-fit: contain; }
.card-tile-placeholder { font-size: 2.4rem; font-weight: 800; color: var(--muted); }
.card-tile-badge { position: absolute; top: 8px; left: 8px; background: rgba(22, 25, 43, 0.85); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.card-tile-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.card-tile-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tile-meta { font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tile-price { font-size: 0.95rem; margin-top: 4px; }
.grid-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.set-tile { display: grid; gap: 3px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: inherit; box-shadow: var(--shadow); font-size: 0.82rem; min-width: 0; }
.set-tile:hover { text-decoration: none; transform: translateY(-2px); }
.set-tile-logo { display: flex; align-items: center; justify-content: center; height: 56px; margin-bottom: 6px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 10px; }
.set-tile-logo img { max-height: 44px; width: auto; max-width: 100%; object-fit: contain; margin: 0; }
.set-tile-logo-text { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.08em; color: var(--muted); }
.set-tile-name { font-weight: 700; font-size: 0.95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-tile-meta { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .grid-sets { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Home page: one swipeable row instead of a tall stack. */
  .grid-sets-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .grid-sets-scroll::-webkit-scrollbar { display: none; }
  .grid-sets-scroll .set-tile { flex: 0 0 156px; scroll-snap-align: start; }
}

/* Steps, lists, tables */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 56px; position: relative; display: grid; gap: 4px; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps span { color: var(--muted); font-size: 0.9rem; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.list-item.is-unread { border-left: 4px solid var(--accent); }
.list-item p { margin: 4px 0; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: 0.92rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.two-col { display: grid; gap: 24px; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.auth-card { max-width: 440px; }
.card-suggest { position: absolute; z-index: 20; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 320px; overflow: auto; width: min(100%, 480px); }
.card-suggest-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 6px; }
.card-suggest-item:hover { background: var(--surface-2); }
.card-suggest-item img { width: 36px; height: 50px; object-fit: contain; border-radius: 3px; background: var(--surface-2); }
.field.has-suggest { position: relative; }

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0; font-size: 0.85rem; }
.footer-inner { display: grid; gap: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; }
.footer-disclaimer { font-size: 0.78rem; margin: 0; }

/* ---- Mobile app shell (PWA): compact header, bottom tab bar, safe areas ---- */
.nav-mobile-actions { display: none; }
.nav-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 0.85rem; text-decoration: none; }
.nav-icon-btn:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }
.nav-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon-btn.is-active { background: rgba(255, 255, 255, 0.12); color: var(--accent); }
.nav-lang-mobile { border: 1px solid rgba(255, 255, 255, 0.3); width: 36px; height: 36px; font-size: 0.8rem; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .nav-toggle, .nav-links { display: none !important; }
  .nav-mobile-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .nav-inner { min-height: 56px; padding: 12px 16px 12px; row-gap: 12px; }
  .nav-search { order: 3; flex-basis: 100%; max-width: none; margin-bottom: 0; }
  .nav-search input { padding: 10px 14px; }
  /* Tables never squeeze into one-character columns on phones: they scroll
     sideways, or stack into label/value rows when marked .table-stack. */
  .table-wrap .table th, .table-wrap .table td { white-space: nowrap; }
  .table-wrap .table-stack { display: block; border: 0; background: none; }
  .table-wrap .table-stack thead { display: none; }
  .table-wrap .table-stack tbody { display: grid; gap: 10px; }
  .table-wrap .table-stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .table-wrap .table-stack td { display: block; border: 0; padding: 0; white-space: normal; }
  .table-wrap .table-stack td::before { content: attr(data-label); display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
  .table-wrap .table-stack td:not([data-label])::before { display: none; }
  .table-wrap .table-stack td.stack-full { grid-column: 1 / -1; }
  .table-wrap .table-stack td.stack-action { grid-column: 1 / -1; padding-top: 4px; }
  .table-wrap .table-stack td.stack-action .btn { width: 100%; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding: 8px 4px; min-height: 58px; font-size: 0.68rem; font-weight: 600; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.is-active { color: var(--ink); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar-sell-icon { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-top: -22px; border: 4px solid var(--bg); box-shadow: 0 6px 16px rgba(245, 184, 0, 0.45); }
  .tabbar-sell-icon svg { width: 26px; height: 26px; stroke-width: 2.5; }
  .tabbar-sell.is-active .tabbar-sell-icon { background: var(--ink); color: var(--accent); }
  .tabbar-avatar-wrap { position: relative; display: inline-flex; }
  .tabbar-avatar-wrap .avatar { width: 26px; height: 26px; font-size: 0.75rem; }
  .tabbar-badge { position: absolute; top: -6px; right: -10px; background: var(--red); color: #fff; font-size: 0.6rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
  .footer { padding: 20px 0 12px; margin-top: 24px; }
  .hero { padding-top: 16px; }
  .section { padding: 20px 0; }
  .demo-banner { font-size: 0.75rem; padding: 4px 10px; }
  .hero-search { display: none; } /* the sticky header search already covers phones */
  .hero { padding-top: 28px; gap: 20px; }
  .hero-copy h1 { font-size: 1.7rem; margin-bottom: 0.4em; }
  .lead { font-size: 0.98rem; }
  .eyebrow { font-size: 0.7rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
  .section-head { margin-bottom: 10px; }
  .stat { padding: 12px 14px; }
  .stat dd { font-size: 1.35rem; }
  .steps li { padding: 14px 14px 14px 50px; }
  .steps li::before { left: 12px; top: 12px; width: 26px; height: 26px; font-size: 0.85rem; }
  .btn { padding: 9px 15px; font-size: 0.92rem; }
}
/* Chinese headings: no wide tracking, balanced line breaks. */
html[lang="zh-Hans"] .eyebrow { letter-spacing: 0.05em; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2 { letter-spacing: 0; }
h1, h2, .hero-copy h1 { text-wrap: balance; }
/* Installed (standalone) mode: respect the notch and drop browser-style chrome. */
@media (display-mode: standalone) {
  .nav { padding-top: env(safe-area-inset-top, 0px); }
  .footer-links { display: none; }
}
.install-banner { position: fixed; left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); z-index: 55; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 10px 12px; box-shadow: 0 10px 30px rgba(22, 25, 43, 0.35); }
.install-banner[hidden] { display: none; }
.install-banner-text { flex: 1; display: grid; font-size: 0.85rem; line-height: 1.3; }
.install-banner .muted { color: rgba(255, 255, 255, 0.7); }
.install-banner .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
@media (min-width: 861px) { .install-banner { display: none !important; } }

/* Me hub */
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.me-head h1 { margin: 0; font-size: 1.4rem; }
.me-head p { margin: 2px 0; }
.me-rep { font-size: 0.9rem; color: var(--muted); }
.me-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.me-tile { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: inherit; box-shadow: var(--shadow); font-size: 0.85rem; }
.me-tile:hover { text-decoration: none; transform: translateY(-1px); }
.me-icon { font-size: 1.4rem; }
.me-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.offline { text-align: center; padding-top: 60px; }
