/* Lightweight responsive UI — minimal glass, low cost (no heavy blur/animations) */
:root {
  --bg0: #e8eef8;
  --bg1: #f4f7fc;
  --bg2: #eef8f4;
  --card: rgba(255, 255, 255, 0.86);
  --card-solid: #ffffff;
  --text: #1f2328;
  --muted: #5f6368;
  --line: rgba(60, 64, 67, 0.12);
  --primary: #1a73e8;
  --primary-h: #1557b0;
  --danger: #d93025;
  --ok: #188038;
  --warn: #e37400;
  --sidebar: rgba(232, 240, 254, 0.9);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.08), 0 4px 16px rgba(60, 64, 67, 0.06);
  --nav-h: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  /* soft multi-hue wash (not monochrome) — still cheap, no heavy blur */
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(700px 380px at 92% 0%, rgba(167, 139, 250, 0.12), transparent 50%),
    radial-gradient(640px 360px at 70% 100%, rgba(52, 211, 153, 0.1), transparent 55%),
    linear-gradient(165deg, var(--bg0) 0%, var(--bg1) 42%, var(--bg2) 100%);
  background-attachment: scroll;
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* Nav — light glass only on sticky bar */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--nav-h);
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .nav {
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
    backdrop-filter: blur(8px) saturate(1.1);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand a { color: inherit; text-decoration: none; }

.badge {
  font-size: 10px;
  background: #e8f0fe;
  color: var(--primary);
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 650;
}
.badge-ipv6 {
  background: linear-gradient(90deg, #34d399, #38bdf8 55%, #a78bfa);
  color: #0f172a;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.nav .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0;
  max-width: min(100%, 720px);
}
.nav .muted {
  font-size: 12px;
  margin-right: 2px;
}

/* Buttons */
.nav a.btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 1.2;
  min-height: 36px;
  touch-action: manipulation;
}
.btn:hover { background: var(--primary-h); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text) !important;
  border: 1px solid var(--line);
}
.btn.danger { background: var(--danger); }
.btn.sm { padding: 5px 11px; font-size: 12px; min-height: 32px; }

/* Cards — soft glass, fallback solid */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 14px;
}
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .card {
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
    backdrop-filter: blur(10px) saturate(1.05);
  }
}
/* reduce paint cost for long lists */
.mail-list { content-visibility: auto; contain-intrinsic-size: 1px 480px; }

h1 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13.5px; }

.grid { display: grid; gap: 14px; }
.grid.2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; font-weight: 500; }
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px; /* ≥16px avoids iOS zoom on focus for most fields; 15 ok */
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  max-width: 100%;
}
@media (max-width: 600px) {
  input, select, textarea { font-size: 16px; }
}
textarea { min-height: 140px; resize: vertical; font-family: inherit; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(26, 115, 232, 0.28);
  border-color: rgba(26, 115, 232, 0.45);
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 10px 0;
  font-size: 13.5px;
}
.flash.ok { background: #e6f4ea; color: var(--ok); }
.flash.err { background: #fce8e6; color: var(--danger); }
.flash.info { background: #e8f0fe; color: var(--primary); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
}
th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* Desktop: side + main; tablet/phone: stack */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  margin-top: 14px;
}
.side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  height: fit-content;
  box-shadow: var(--shadow);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .side {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.side a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 3px;
  font-size: 13.5px;
}
.side a:hover, .side a.active { background: var(--sidebar); color: var(--primary); }

.mail-list .row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr minmax(72px, 96px);
  gap: 8px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.mail-list .row:hover { background: rgba(248, 250, 255, 0.9); }
.mail-list .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.mail-list .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13.5px; }
.mail-list .date { color: var(--muted); font-size: 11.5px; text-align: right; }

.mail-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  font-size: 14px;
  background: rgba(250, 250, 250, 0.9);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--line);
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef0f3;
  color: var(--muted);
  margin: 0 4px 4px 0;
}
.tag.ok { background: #e6f4ea; color: var(--ok); }
.tag.warn { background: #fef7e0; color: var(--warn); }
.tag.bad { background: #fce8e6; color: var(--danger); }

.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0b57d0 55%, #174ea6 100%);
  color: #fff;
  border-radius: 16px;
  padding: clamp(18px, 4vw, 28px);
  margin-top: 12px;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.18);
}
.hero h1 { color: #fff; margin-bottom: 6px; }
.hero .muted { color: rgba(210, 227, 252, 0.95); }
.hero .btn { background: #fff; color: #174ea6 !important; }
.hero .btn.secondary {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4);
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.kpi { font-size: clamp(1.4rem, 4vw, 1.85rem); font-weight: 700; }
.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding-bottom: 8px;
}

/* Turnstile scale on narrow screens */
.cf-turnstile { margin-top: 8px; max-width: 100%; overflow: hidden; }

/* Tablet */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
  }
  .side .muted { width: 100%; margin-bottom: 4px; }
  .side a {
    display: inline-flex;
    margin: 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
  }
  .side hr { display: none; }
  .mail-list .row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .mail-list .from { grid-column: 1; }
  .mail-list .date { grid-column: 2; grid-row: 1; }
  .mail-list .subj { grid-column: 1 / -1; grid-row: 2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Phone */
@media (max-width: 600px) {
  .wrap { padding: 12px 12px 32px; }
  .nav {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 8px;
  }
  .brand { justify-content: space-between; }
  .nav .actions {
    justify-content: flex-start;
    max-width: none;
  }
  .nav .actions .muted {
    width: 100%;
    margin: 0 0 2px;
  }
  .card { padding: 14px; margin-top: 12px; border-radius: 12px; }
  .btn, .nav a.btn { flex: 0 1 auto; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { white-space: nowrap; }
  th:nth-child(n+4), td:nth-child(n+4) { /* keep compact */ }
  .hero { border-radius: 14px; }
  /* slightly less blur on phones if supported — cheaper */
  .nav, .card, .side {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* Desktop wide */
@media (min-width: 1100px) {
  .wrap { padding-top: 20px; }
}

/* ========== Auth (login / register) ========== */
.auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  position: relative;
  overflow-x: hidden;
}
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26,115,232,.35), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(11,87,208,.28), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(23,78,166,.22), transparent 55%),
    linear-gradient(160deg, #0b1f44 0%, #123a7a 42%, #1a56b0 100%);
}
.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .45;
  pointer-events: none;
}
.auth-center {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 16px;
  justify-content: center;
}
.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  font-size: 22px;
}
.auth-title {
  font-family: "Noto Serif SC", "ZCOOL XiaoWei", "Songti SC", serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.auth-sub {
  font-size: 12px;
  opacity: .78;
  margin-top: 2px;
}
.auth-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(8, 28, 70, .28);
  padding: 26px 24px 22px;
}
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .auth-card {
    background: rgba(255,255,255,.86);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    backdrop-filter: blur(12px) saturate(1.1);
  }
}
.auth-h {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.35rem;
  font-family: "Noto Serif SC", "ZCOOL XiaoWei", serif;
  letter-spacing: .06em;
}
.auth-desc {
  text-align: center;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
}
.auth-form label { margin-top: 12px; }
.auth-form input {
  font-size: 16px;
  border-radius: 11px;
  padding: 12px 13px;
}
.auth-submit {
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
  font-size: 15px;
  letter-spacing: .2em;
  border-radius: 999px;
}
.auth-switch {
  text-align: center;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--muted);
}
/* 特殊字体跳转链接 */
.auth-link {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", "STSong", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #0b57d0 !important;
  text-decoration: none !important;
  border-bottom: 2px solid rgba(11, 87, 208, .35);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.auth-link:hover {
  color: #174ea6 !important;
  border-bottom-color: #174ea6;
}
.auth-flash { margin: 0 0 12px; }
.auth-foot {
  text-align: center;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  margin-top: 16px;
}
.auth-card .cf-turnstile { display: flex; justify-content: center; margin-top: 10px; }
.turnstile-wrap { margin-top: 8px; text-align: center; }
.turnstile-hint { font-size: 12px; margin: 0 0 8px; }
.btn.is-gated, .btn:disabled.is-gated {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

@media (max-width: 480px) {
  .auth-card { padding: 22px 16px 18px; border-radius: 16px; }
  .auth-title { font-size: 1.25rem; }
  .auth-link { font-size: 1.05rem; }
}

/* top feedback banner — colorful horizontal strip */
.top-banner,
.feedback-strip {
  background: linear-gradient(90deg, #0e7490 0%, #2563eb 45%, #7c3aed 100%);
  color: #e0f2fe;
  text-align: center;
  font-size: 12.5px;
  padding: 8px 12px;
  line-height: 1.45;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.top-banner a,
.feedback-strip a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav-ico { font-style: normal; margin-right: 2px; }

/* Colored glass nav chips (desktop + mobile) */
.nav .btn.nav-b {
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  backdrop-filter: blur(10px) saturate(1.25);
}
.nav .btn.nav-b .nav-ico-wrap {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.nav .btn.nav-b .nav-ico { margin: 0; font-style: normal; }
.nav .btn.nav-b .nav-lbl { font-weight: 650; }

/* each item: soft multi-stop gradient + glass, not flat blue */
.nav .btn.nav-inbox {
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(224, 242, 254, 0.78) 45%, rgba(219, 234, 254, 0.88));
  color: #1e40af !important;
  border-color: rgba(147, 197, 253, 0.55);
}
.nav .btn.nav-inbox .nav-ico-wrap {
  background: linear-gradient(145deg, #93c5fd, #60a5fa 55%, #38bdf8);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.nav .btn.nav-box {
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), rgba(220, 252, 231, 0.78) 50%, rgba(209, 250, 229, 0.9));
  color: #166534 !important;
  border-color: rgba(134, 239, 172, 0.55);
}
.nav .btn.nav-box .nav-ico-wrap {
  background: linear-gradient(145deg, #6ee7b7, #34d399 50%, #2dd4bf);
}

.nav .btn.nav-me {
  background: linear-gradient(145deg, rgba(245, 243, 255, 0.92), rgba(237, 233, 254, 0.8) 50%, rgba(233, 213, 255, 0.88));
  color: #5b21b6 !important;
  border-color: rgba(196, 181, 253, 0.55);
}
.nav .btn.nav-me .nav-ico-wrap {
  background: linear-gradient(145deg, #c4b5fd, #a78bfa 50%, #818cf8);
}

.nav .btn.nav-gift {
  background: linear-gradient(145deg, rgba(255, 247, 237, 0.94), rgba(255, 237, 213, 0.8) 50%, rgba(254, 215, 170, 0.85));
  color: #9a3412 !important;
  border-color: rgba(253, 186, 116, 0.55);
}
.nav .btn.nav-gift .nav-ico-wrap {
  background: linear-gradient(145deg, #fdba74, #fb923c 45%, #f472b6);
}

.nav .btn.nav-help {
  background: linear-gradient(145deg, rgba(236, 254, 255, 0.94), rgba(207, 250, 254, 0.8) 50%, rgba(165, 243, 252, 0.88));
  color: #0e7490 !important;
  border-color: rgba(103, 232, 249, 0.5);
}
.nav .btn.nav-help .nav-ico-wrap {
  background: linear-gradient(145deg, #67e8f9, #22d3ee 45%, #2dd4bf);
}

.nav .btn.nav-bell {
  background: linear-gradient(145deg, rgba(254, 252, 232, 0.94), rgba(254, 249, 195, 0.8) 50%, rgba(253, 230, 138, 0.88));
  color: #854d0e !important;
  border-color: rgba(253, 224, 71, 0.5);
}
.nav .btn.nav-bell .nav-ico-wrap {
  background: linear-gradient(145deg, #fde047, #fbbf24 50%, #f59e0b);
}

.nav .btn.nav-out {
  background: linear-gradient(145deg, rgba(255, 241, 242, 0.94), rgba(255, 228, 230, 0.82) 50%, rgba(254, 205, 211, 0.9));
  color: #9f1239 !important;
  border-color: rgba(253, 164, 175, 0.55);
}
.nav .btn.nav-out .nav-ico-wrap {
  background: linear-gradient(145deg, #fda4af, #fb7185 50%, #f43f5e);
}

.nav .btn.nav-b:hover {
  text-decoration: none !important;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
@media (hover: hover) {
  .nav .btn.nav-b:hover { transform: translateY(-1px); }
}
@media (max-width: 600px) {
  .nav .btn.nav-b {
    padding: 6px 10px 6px 8px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .nav .btn.nav-b .nav-ico-wrap {
    width: 20px; height: 20px; border-radius: 7px; font-size: 12px;
  }
}
@supports not ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .nav .btn.nav-b { /* solid-ish fallback */ opacity: 1; }
}

.compose-wrap { max-width: 720px; margin: 0 auto; }
.compose-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px;
}
.compose-card { margin-top: 0; }
.compose-title { margin-bottom: 4px; }
.compose-form textarea { min-height: 220px; }
.compose-actions { margin-top: 16px; }

.reward-panel {
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.profile-card h1 { margin-bottom: 8px; }

.side a .nav-ico, .side a { font-size: 13.5px; }


/* ========== Horizontal strips (IPv6 / feedback) ========== */
.strip-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}
.strip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}
.strip-pill.soft {
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.strip-text { font-size: 12.5px; line-height: 1.45; }
.strip-text .dot-sep { margin: 0 4px; opacity: 0.7; }

.ipv6-strip {
  background:
    linear-gradient(90deg, rgba(52, 211, 153, 0.12), transparent 30%, transparent 70%, rgba(56, 189, 248, 0.12)),
    linear-gradient(90deg, #0f172a 0%, #134e4a 28%, #1e3a5f 55%, #312e81 78%, #0f172a 100%);
  color: #bae6fd;
  padding: 9px 12px;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
.ipv6-strip .strip-pill {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.35), rgba(56, 189, 248, 0.28));
  border-color: rgba(167, 243, 208, 0.45);
  color: #ecfdf5;
}
.ipv6-strip b { color: #fff; }
.ipv6-strip .dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.28), 0 0 10px rgba(52, 211, 153, 0.55);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25), 0 0 8px rgba(52, 211, 153, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.15), 0 0 14px rgba(52, 211, 153, 0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .ipv6-strip .dot { animation: none; }
}

/* ========== Rules modal first visit ========== */
.rules-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.58);
}
.rules-modal.is-hidden { display: none !important; }
.rules-dialog {
  width: min(540px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  padding: 18px 18px 16px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.rules-hero-bar {
  height: 5px;
  margin: -18px -18px 14px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #34d399, #38bdf8 35%, #818cf8 65%, #f472b6);
}
.rules-dialog h2 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 3.5vw, 1.28rem);
  letter-spacing: 0.02em;
  padding-right: 28px;
}
.rules-dialog .close-x {
  position: absolute; top: 14px; right: 12px;
  border: 0; background: #f1f5f9; font-size: 20px;
  cursor: pointer; color: #64748b; line-height: 1;
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
}
.rules-dialog .close-x:hover { background: #e2e8f0; color: #0f172a; }
.rules-section {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.rules-section.rs-ipv6 {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border-color: #a7f3d0;
}
.rules-section.rs-ipv6 h3 { color: #047857; }
.rules-section.rs-ops {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-color: #bfdbfe;
}
.rules-section.rs-ops h3 { color: #1d4ed8; }
.rules-section.rs-warn {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-color: #fed7aa;
}
.rules-section.rs-warn h3 { color: #c2410c; }
.rules-section.rs-feedback {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border-color: #ddd6fe;
}
.rules-section.rs-feedback h3 { color: #6d28d9; }
.rules-section h3 {
  margin: 0 0 6px; font-size: 13.5px;
}
.rules-section ul {
  margin: 0; padding-left: 18px; color: #475569;
  font-size: 13px; line-height: 1.7;
}
.rules-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; justify-content: flex-end;
}
.rules-note {
  font-size: 12px; color: #64748b; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid #e2e8f0;
}

/* ========== Site announce board (multi-color cards) ========== */
.notice-board,
.site-announce {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    linear-gradient(90deg, #dbeafe, #d1fae5 40%, #fde68a 70%, #fbcfe8);
  background-blend-mode: normal;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}
.site-announce::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, #34d399, #38bdf8, #818cf8, #f472b6, #fbbf24);
}
.notice-board h3,
.site-announce h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.notice-board.ipv6-board {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4 55%, #ecfeff);
  border-color: #a7f3d0;
}
.notice-board.ipv6-board h3 { color: #047857; }
.notice-board.ipv6-board::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #34d399, #2dd4bf, #38bdf8);
}

.nb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
  flex-wrap: wrap;
}
.nb-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nb-ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #dbeafe, #e0e7ff);
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}
.nb-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}
.nb-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #2563eb;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  text-decoration: none !important;
}
.nb-link:hover { background: #dbeafe; }

.announce-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.announce-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  padding: 12px 12px 12px;
  min-height: 96px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
@media (hover: hover) {
  .announce-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }
}
.announce-card .ac-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
}
.announce-card .ac-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.announce-card h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.announce-card p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
}
.announce-card a { font-weight: 600; }

.ac-ipv6 .ac-bar { background: linear-gradient(180deg, #34d399, #0d9488); }
.ac-ipv6 .ac-tag { background: #d1fae5; color: #047857; }
.ac-ipv6 { background: linear-gradient(160deg, #fff, #f0fdf4); border-color: #bbf7d0; }

.ac-quota .ac-bar { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.ac-quota .ac-tag { background: #dbeafe; color: #1d4ed8; }
.ac-quota { background: linear-gradient(160deg, #fff, #eff6ff); border-color: #bfdbfe; }

.ac-rules .ac-bar { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
.ac-rules .ac-tag { background: #ede9fe; color: #6d28d9; }
.ac-rules { background: linear-gradient(160deg, #fff, #f5f3ff); border-color: #ddd6fe; }

.ac-legal .ac-bar { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.ac-legal .ac-tag { background: #fef3c7; color: #b45309; }
.ac-legal { background: linear-gradient(160deg, #fff, #fffbeb); border-color: #fde68a; }

/* legacy list (if any remain) */
.announce-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.7;
  font-size: 13.5px;
  color: #475569;
}
.announce-list li {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}
.announce-list li:last-child { border-bottom: 0; }
.announce-list .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  margin-right: 4px;
  vertical-align: 1px;
}
.announce-list .tag.ok { background: #d1fae5; color: #047857; }
.announce-list .tag.warn { background: #fef3c7; color: #b45309; }

/* ========== Help center ========== */
.help-page h2,
.help-h {
  font-size: 1.05rem;
  margin: 22px 0 10px;
  letter-spacing: 0.01em;
  padding: 8px 12px;
  border-radius: 10px;
  border-left: 4px solid #94a3b8;
  background: #f8fafc;
}
.help-h-ops {
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
  color: #1e40af;
}
.help-h-warn {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, #fffbeb, #f8fafc);
  color: #b45309;
}
.help-h-fb {
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, #f5f3ff, #f8fafc);
  color: #6d28d9;
}
.help-list {
  margin: 0 0 8px;
  padding-left: 1.2em;
  color: #475569;
  line-height: 1.8;
  font-size: 14px;
}
.help-list.warn-list li { margin: 2px 0; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.help-tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.help-tile::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
}
.help-tile.ht-blue {
  background: linear-gradient(165deg, #fff, #eff6ff);
  border-color: #bfdbfe;
}
.help-tile.ht-blue::before { background: linear-gradient(90deg, #3b82f6, #38bdf8); }
.help-tile.ht-blue .hi { background: #dbeafe; }
.help-tile.ht-violet {
  background: linear-gradient(165deg, #fff, #f5f3ff);
  border-color: #ddd6fe;
}
.help-tile.ht-violet::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.help-tile.ht-violet .hi { background: #ede9fe; }
.help-tile.ht-amber {
  background: linear-gradient(165deg, #fff, #fffbeb);
  border-color: #fde68a;
}
.help-tile.ht-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.help-tile.ht-amber .hi { background: #fef3c7; }
.help-tile.ht-rose {
  background: linear-gradient(165deg, #fff, #fff1f2);
  border-color: #fecdd3;
}
.help-tile.ht-rose::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.help-tile.ht-rose .hi { background: #ffe4e6; }
.help-tile .hi {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: #e8f0fe; font-size: 20px; margin-bottom: 8px;
}
.help-tile h3 { margin: 0 0 6px; font-size: 15px; }
.help-tile p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

.broadcast-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.broadcast-item:last-child { border-bottom: 0; }

.auth-logo-img {
  width: 40px; height: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
  flex-shrink: 0;
}

/* Responsive helpers */
.hide-xs { }
.hide-sm { }

/* Tablet: 2-col announce */
@media (max-width: 900px) {
  .announce-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .strip-text { font-size: 12px; }
}

/* Phone */
@media (max-width: 600px) {
  .ipv6-strip,
  .feedback-strip,
  .top-banner {
    padding: 8px 10px;
  }
  .strip-inner {
    gap: 6px 8px;
    justify-content: flex-start;
    text-align: left;
  }
  .strip-pill { font-size: 10.5px; padding: 2px 8px; }
  .strip-text { font-size: 11.5px; flex: 1; min-width: 0; }
  .hide-xs { display: none !important; }
  .hide-sm { display: none !important; }

  .announce-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .site-announce.compact .announce-grid {
    grid-template-columns: 1fr;
  }
  .announce-card {
    min-height: 0;
    padding: 10px;
    border-radius: 12px;
  }
  .announce-card h4 { font-size: 13px; }
  .announce-card p { font-size: 12px; }

  .nb-head { margin-bottom: 10px; }
  .nb-ico { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
  .nb-link { width: 100%; text-align: center; }

  .nav .btn.nav-b {
    padding: 6px 10px;
    min-height: 34px;
  }
  .nav .btn.nav-b .nav-lbl {
    /* keep labels on phone for clarity; if crowded, still wrap via nav flex */
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .help-h { font-size: 0.98rem; padding: 8px 10px; }
  .rules-dialog {
    padding: 16px 14px 14px;
    border-radius: 16px;
    max-height: min(90vh, 100%);
  }
  .rules-hero-bar { margin: -16px -14px 12px; border-radius: 16px 16px 0 0; }
  .rules-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .rules-actions .btn { width: 100%; justify-content: center; }
}

/* Very small phones: stack announce to 1 col for readability */
@media (max-width: 380px) {
  .announce-grid { grid-template-columns: 1fr; }
  .nav .btn.nav-b .nav-lbl { /* keep */ }
}

/* Desktop wide polish */
@media (min-width: 1100px) {
  .announce-grid { gap: 12px; }
  .announce-card { min-height: 108px; padding: 14px; }
  .strip-text { font-size: 13px; }
}

/* admin modern extras */
.admin-modern h1 { letter-spacing: .02em; }
.admin-search { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.admin-table { width:100%; border-collapse:collapse; font-size:13px; }
.admin-table th { background:#f1f5f9; }
.group-pill {
  display:inline-block; background:#dbeafe; color:#1d4ed8;
  border-radius:999px; padding:2px 8px; font-weight:700; font-size:12px;
}
.quota-bar {
  height: 8px; background:#e2e8f0; border-radius:999px; overflow:hidden;
  min-width:72px; margin-bottom:3px;
}
.quota-fill { height:100%; background:linear-gradient(90deg,#34d399,#3b82f6); border-radius:999px; }
.risk-row { background:#fff7ed; }
.table-wrap { overflow-x:auto; }

/* ===== Admin shell (isolated from /mail user UI) ===== */
.admin-shell {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0px, #0f172a 120px, #f1f5f9 120px, #f8fafc 100%);
  color: #0f172a;
}
.admin-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f766e 140%);
  color: #e2e8f0;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.28);
}
.admin-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 8px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc !important;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: .02em;
}
.admin-brand img {
  border-radius: 6px;
  background: rgba(255,255,255,.92);
  padding: 2px;
}
.admin-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
}
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-chip {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
}
.admin-top-actions .btn.secondary {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
  color: #f8fafc;
}
.admin-top-actions .btn.secondary:hover {
  background: rgba(255,255,255,.16);
}
.admin-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px 12px;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: thin;
}
.admin-nav-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none !important;
  color: #e2e8f0 !important;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  font-weight: 650;
  transition: background .15s, transform .15s, border-color .15s;
}
.admin-nav-item .ani { font-style: normal; line-height: 1; }
.admin-nav-item:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}
.admin-nav-item.active {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  color: #0f172a !important;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.admin-wrap {
  padding-top: 18px;
  padding-bottom: 40px;
}
.admin-body > h1:first-child { margin-top: 4px; }
.admin-footer {
  opacity: .75;
  font-size: 12.5px;
}
.admin-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.admin-quick .aq {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none !important;
  color: #0f172a !important;
  font-weight: 700;
  font-size: 13.5px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.55)),
    linear-gradient(135deg, #dbeafe, #ede9fe);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .15s, box-shadow .15s;
}
.admin-quick .aq span { font-size: 16px; line-height: 1; }
.admin-quick .aq:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}
.admin-login-card code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}
@media (max-width: 640px) {
  .admin-chip { display: none; }
  .admin-nav-item { padding: 7px 10px; font-size: 12.5px; }
  .admin-nav-item .anl { max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- 2026-07-24 UI: compact nav + rewards tabs + mail search ---- */
.nav .actions {
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.nav .btn.nav-compose {
  background: linear-gradient(135deg, #1a73e8, #174ea6);
  color: #fff;
  border: none;
}
.nav .btn.nav-compose .nav-lbl { color: #fff; }
.nav-more {
  position: relative;
  display: inline-block;
}
.nav-more > summary {
  list-style: none;
  cursor: pointer;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line, #e0e3e7);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-more-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}
.nav-more-menu a:hover { background: #f1f3f4; }
.nav-more-menu a.nav-more-out { color: #c5221f; }

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 12px;
  border-bottom: 1px solid var(--line, #e0e3e7);
  padding-bottom: 8px;
}
.tabs .tab {
  border: 1px solid transparent;
  background: #f1f3f4;
  color: #3c4043;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.tabs .tab.active {
  background: #e8f0fe;
  color: #174ea6;
  border-color: #aecbfa;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.invite-code {
  font-size: 22px;
  letter-spacing: 2px;
  font-family: ui-monospace, monospace;
}
.invite-link { font-size: 13px; }
.invite-graph {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .invite-graph { grid-template-columns: 1fr; }
}
.ig-block {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px 14px;
}
.ig-block h3 { margin: 0 0 8px; font-size: 14px; }
.invitee-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
}

.mail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.mail-search {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1 1 220px;
  max-width: 420px;
}
.mail-search input {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.mail-list .row.unread .from,
.mail-list .row.unread .subj {
  font-weight: 700;
  color: #202124;
}
.mail-list .row.unread {
  background: linear-gradient(90deg, #e8f0fe 0, transparent 48px);
}
.side a.side-compose {
  background: #e8f0fe;
  color: #174ea6;
  font-weight: 700;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .nav .btn.nav-b .nav-lbl { font-size: 11px; }
  .mail-toolbar { align-items: stretch; flex-direction: column; }
  .mail-search { max-width: none; }
}

/* ---- layout polish + quota meter + notices (2026-07-24n) ---- */
.page-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 16px;
}
.page-hero h1 { margin: 0 0 6px; letter-spacing: -0.02em; }
.page-hero-side { min-width: 220px; flex: 0 1 280px; }

.section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1f2937;
}

/* Quota progress meter */
.quota-meter {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.quota-meter.compact { padding: 10px 12px; border-radius: 12px; }
.quota-meter-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.quota-meter-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.quota-meter-num { font-size: 14px; color: #0f172a; }
.quota-meter-num b { font-size: 16px; }
.quota-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.quota-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background 0.25s ease;
  min-width: 0;
}
.quota-fill.q-low { background: linear-gradient(90deg, #34d399, #10b981); }
.quota-fill.q-mid { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.quota-fill.q-high { background: linear-gradient(90deg, #fb923c, #f97316); }
.quota-fill.q-crit { background: linear-gradient(90deg, #f97316, #ef4444); }
.quota-meter-hint { font-size: 11px; margin-top: 6px; }

/* Notices */
.notice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 860px) {
  .notice-layout { grid-template-columns: 1fr; }
}
.broadcast-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15,23,42,0.03);
}
.broadcast-card .bc-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}
.broadcast-card h3 { margin: 0; font-size: 16px; }
.broadcast-card .bc-body {
  white-space: pre-wrap;
  line-height: 1.65;
  color: #334155;
  font-size: 14px;
}
.side-links { display: flex; flex-direction: column; gap: 6px; }
.side-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 14px;
}
.side-links a:hover { background: #e8f0fe; border-color: #c5d8fc; }
.side-note { margin-top: 14px; font-size: 12px; line-height: 1.6; }
.empty-state {
  text-align: center;
  padding: 36px 16px 28px;
}
.empty-state .empty-ico { font-size: 36px; margin-bottom: 8px; }
.empty-state p { margin: 4px 0; }

/* slightly richer wrap cards */
.user-shell .wrap > .card,
.user-shell .wrap .card {
  border-radius: 16px;
}
.user-shell .nav {
  backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(255,255,255,0.92);
}
.claim-invite-panel {
  border: 1px dashed #93c5fd;
  background: linear-gradient(160deg, #eff6ff, #fff);
}

/* 通知栏前置 + 未读小红点 */
.nav .btn.nav-bell {
  position: relative;
  order: 0;
}
.nav-ico-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px #fff;
  animation: nav-dot-pulse 1.6s ease-in-out infinite;
}
.nav-dot-num {
  display: inline-block;
  margin-left: 3px;
  min-width: 16px;
  padding: 0 5px;
  height: 16px;
  line-height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}
.nav .btn.nav-bell.has-dot {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff5f5, #fff);
}
@keyframes nav-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

/* profile / rebind */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 820px) {
  .profile-grid { grid-template-columns: 1fr; }
}
.rebind-rules {
  margin: 8px 0 14px;
  padding-left: 18px;
  line-height: 1.7;
  font-size: 13px;
}
.rebind-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px) {
  .rebind-steps { grid-template-columns: 1fr; }
}
.rebind-step {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fafbfc;
  opacity: 0.72;
}
.rebind-step.active {
  opacity: 1;
  background: linear-gradient(165deg, #fff, #f0f7ff);
  border-color: #bfdbfe;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.06);
}
.rebind-step.done {
  opacity: 1;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.rebind-step h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.turnstile-hint-warn { color: #b45309 !important; }
.turnstile-wrap { margin: 10px 0 12px; }
