/* ============================================================
   守童灵 · Design system
   ============================================================ */
:root {
  --ink: #10292c;
  --ink-2: #29464a;
  --muted: #6d8286;
  --muted-2: #93a4a6;
  --paper: #f2f6f1;
  --paper-2: #eaf0e9;
  --card: #ffffff;
  --line: #e2eae2;
  --line-strong: #d4e0d6;
  --teal: #1e7f6f;
  --teal-deep: #155f54;
  --teal-dark: #103b36;
  --mint: #8fe3cb;
  --mint-soft: #e2f6ee;
  --amber: #e29a5c;
  --amber-soft: #fcefe2;
  --rose: #cf6468;
  --rose-soft: #fbeceb;
  --blue: #5b7db1;
  --blue-soft: #eef3fb;
  --shadow: 0 22px 48px -32px rgba(16, 41, 44, 0.4);
  --shadow-soft: 0 10px 24px -18px rgba(16, 41, 44, 0.3);
  --radius: 24px;
  --radius-sm: 16px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-y: scroll;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

::selection {
  background: var(--mint);
  color: var(--teal-dark);
}

/* scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #c9d8cd transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-thumb {
  background: #c9d8cd;
  border-radius: 99px;
}

/* ============================================================ boot */
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: radial-gradient(90% 80% at 50% 0%, #1b5749 0%, #0e2e2a 70%);
  color: #fff;
}
.boot__mark {
  width: 84px;
  height: 92px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
  animation: floaty 3s ease-in-out infinite;
}
.boot__shield {
  width: 100%;
  height: 100%;
}
.boot__name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 8px;
  padding-left: 8px;
}
.boot__dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.boot__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  animation: dot 1.2s infinite ease-in-out;
}
.boot__dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.boot__dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-5px);
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* ============================================================ auth */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
  background: #0e2e2a;
}

.auth-art {
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  color: #f2fbf7;
  background:
    radial-gradient(80% 55% at 12% 6%, rgba(143, 227, 203, 0.18) 0%, transparent 62%),
    radial-gradient(70% 55% at 90% 100%, rgba(226, 154, 92, 0.16) 0%, transparent 60%),
    linear-gradient(150deg, #17493f 0%, #103b36 45%, #0b2724 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 85%);
  pointer-events: none;
}
.auth-art::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  border: 1px solid rgba(143, 227, 203, 0.12);
  right: -220px;
  top: -180px;
  box-shadow: 0 0 0 90px rgba(143, 227, 203, 0.035),
    0 0 0 180px rgba(143, 227, 203, 0.022);
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-mark {
  width: 46px;
  height: 50px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}
.logo-mark svg {
  width: 100%;
  height: 100%;
}
.auth-brand__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
}
.auth-brand__tag {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: rgba(226, 246, 238, 0.55);
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 48px 0;
}
.auth-copy__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid rgba(143, 227, 203, 0.24);
  background: rgba(143, 227, 203, 0.08);
  color: #bff3e2;
  font-size: 12px;
  letter-spacing: 1px;
}
.auth-copy h1 {
  margin: 24px 0 18px;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 1px;
}
.auth-copy h1 em {
  font-style: normal;
  color: var(--mint);
}
.auth-copy p {
  margin: 0;
  max-width: 440px;
  color: rgba(223, 243, 235, 0.66);
  font-size: 15px;
  line-height: 1.85;
}

.auth-features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 460px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(6px);
}
.auth-feature__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(143, 227, 203, 0.12);
  color: var(--mint);
}
.auth-feature strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.auth-feature span {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: rgba(223, 243, 235, 0.5);
}

.auth-phone {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%) rotate(-4deg);
  width: 258px;
  height: 520px;
  border-radius: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
  padding: 16px;
  display: none;
}
.auth-phone__screen {
  height: 100%;
  border-radius: 30px;
  background: var(--paper);
  padding: 22px 16px;
  color: var(--ink);
  overflow: hidden;
}
.auth-phone__case {
  border-radius: 18px;
  background: linear-gradient(135deg, #1a6558, #2a947d);
  color: #fff;
  padding: 16px;
}
.auth-side {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 227, 203, 0.38), transparent 68%);
  top: -140px;
  right: -120px;
  filter: blur(10px);
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 416px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px 34px 28px;
  box-shadow: var(--shadow);
}
.auth-card__head {
  margin-bottom: 22px;
}
.auth-card__head h2 {
  margin: 0 0 6px;
  font-size: 25px;
  letter-spacing: 0.5px;
}
.auth-card__head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--teal-deep);
}
.auth-mobile-brand .logo-mark {
  width: 34px;
  height: 37px;
}

.segmented {
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: #eef3ec;
  margin-bottom: 24px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: 0.18s ease;
}
.segmented button.active {
  background: #fff;
  color: var(--teal-deep);
  box-shadow: 0 4px 12px -6px rgba(16, 41, 44, 0.3);
}

.field {
  margin-bottom: 15px;
}
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.field label span {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted-2);
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #f7faf6;
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #a6b5b5;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 127, 111, 0.11);
}
.field--code input {
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.field__error {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--rose);
  display: none;
}
.field.invalid input {
  border-color: var(--rose);
  background: #fff8f8;
}
.field.invalid .field__error {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px) scale(0.995);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn--primary {
  background: linear-gradient(135deg, #1f8473, #16685c);
  color: #fff;
  box-shadow: 0 14px 24px -14px rgba(21, 95, 84, 0.75);
}
.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #23907d, #176f61);
}
.btn--block {
  width: 100%;
  padding: 14px 18px;
  font-size: 14.5px;
}
.btn--ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.btn--ghost:hover:not(:disabled) {
  background: #f4f8f2;
}
.btn--soft {
  background: var(--mint-soft);
  color: var(--teal-deep);
}
.btn--soft:hover:not(:disabled) {
  background: #d5f1e7;
}
.btn--danger {
  background: var(--rose-soft);
  color: #a6464b;
}
.btn--danger:hover:not(:disabled) {
  background: #f8dedd;
}
.btn--sm {
  padding: 8px 13px;
  font-size: 12.5px;
  border-radius: 11px;
}
.btn .icon {
  width: 17px;
  height: 17px;
}

.auth-submit {
  margin-top: 6px;
}
.auth-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.7;
}
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted-2);
  font-size: 11px;
}
.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.oauth-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
}
.oauth-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  padding: 8px 10px;
}
.oauth-btn:hover {
  border-color: var(--teal);
  background: #f7fbf8;
}
.oauth-btn__logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: #07c160;
}
.oauth-btn--qq .oauth-btn__logo {
  background: #12b7f5;
}
.oauth-btn--mock .oauth-btn__logo {
  background: #6d8286;
}
.oauth-note {
  margin-top: 9px;
  text-align: center;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}
.trial-banner {
  margin: 10px 20px 0;
  padding: 9px 13px;
  border: 1px solid #f0d6b8;
  border-radius: 12px;
  background: #fff8ef;
  color: #8a5427;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.trial-banner b {
  color: #b56222;
}
.trial-banner button {
  margin-left: auto;
  border: 0;
  background: none;
  color: #b56222;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.paywall {
  min-height: 100vh;
  padding: 34px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: radial-gradient(circle at 20% 0%, #dff3ea 0, #f2f6f1 45%, #e9f1ec 100%);
}
.paywall__card {
  width: min(760px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 22px;
  box-shadow: 0 30px 60px -45px rgba(16, 59, 54, 0.55);
}
.paywall__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--teal-deep);
  font-weight: 700;
}
.paywall__brand .logo-mark {
  width: 34px;
  height: 34px;
}
.paywall__icon {
  width: 48px;
  height: 48px;
  margin: 22px 0 8px;
  border-radius: 14px;
  background: #fff2e3;
  color: #b56222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paywall h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 25px;
}
.paywall p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fbfdfb;
}
.plan-card--lifetime {
  border-color: #e9c99b;
  background: linear-gradient(160deg, #fffaf1, #fff);
}
.plan-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.plan-card__name {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}
.plan-card__badge {
  font-size: 9px;
  color: #a76722;
  background: #fff0d8;
  border-radius: 5px;
  padding: 2px 5px;
}
.plan-card__price b {
  font-size: 25px;
  color: var(--teal-deep);
}
.plan-card__price span {
  margin-left: 3px;
  font-size: 10px;
  color: var(--muted-2);
}
.plan-card__desc {
  font-size: 10.5px;
  color: var(--muted);
  min-height: 28px;
}
.plan-card .btn {
  margin-top: 5px;
  width: 100%;
}
.billing-activate {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.billing-activate label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}
.billing-activate__row {
  display: flex;
  gap: 8px;
}
.billing-activate__row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
  text-transform: uppercase;
}
.billing-activate p {
  margin: 8px 0 0;
  font-size: 10.5px;
}
.classes-box {
  text-align: center;
  padding: 10px 4px 4px;
}
.classes-box__icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #e8f6ef;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.classes-box h3 {
  margin: 0 0 4px;
  color: var(--ink);
}
.mode-choice {
  display: grid;
  gap: 10px;
}
.mode-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: #fbfdfb;
}
.mode-option:has(input:checked) {
  border-color: var(--teal);
  background: #f0faf4;
}
.mode-option input {
  margin-top: 3px;
  accent-color: var(--teal);
}
.mode-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mode-option b {
  color: var(--ink);
  font-size: 13px;
}
.mode-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.qr-pay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px;
}
.qr-pay img {
  width: 260px;
  height: 260px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.qr-pay p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.qr-pay__status {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}
.pay-methods {
  display: grid;
  gap: 9px;
}
.pay-method {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pay-method b {
  color: var(--ink);
  font-size: 14px;
}
.pay-method span {
  color: var(--muted);
  font-size: 11px;
}
.pay-method--wechat {
  border-color: #b9e8cc;
  background: #f4fcf7;
}
.pay-method--wechat b {
  color: #079447;
}
.pay-method--alipay {
  border-color: #b9dcf7;
  background: #f4faff;
}
.pay-method--alipay b {
  color: #1677c8;
}
.pay-method:hover {
  border-color: var(--teal);
}
.learning-lock {
  max-width: 620px;
  margin: 24px auto;
  text-align: center;
  padding: 34px 24px;
}
.learning-lock__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #fff2e3;
  color: #b56222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.learning-lock h2 {
  color: var(--ink);
  margin: 0 0 6px;
}
.learning-lock p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-width: 440px;
  margin: 0 auto 18px;
}
.learning-toolbar {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}
.learning-pills {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.learning-pills button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}
.learning-pills button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.learning-search {
  display: flex;
  gap: 8px;
  max-width: 420px;
}
.learning-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 12.5px;
  background: #fff;
}
.learning-count {
  color: var(--muted-2);
  font-size: 11.5px;
  margin-bottom: 10px;
}
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.learning-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.learning-card__tag {
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 700;
}
.learning-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}
.learning-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  flex: 1;
}
.learning-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.learning-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.learning-empty h3 {
  margin: 8px 0 4px;
  color: var(--ink);
}
.learning-empty p {
  margin: 0;
  font-size: 12px;
}
.auth-demo {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--teal);
}
.auth-demo button {
  border: 0;
  background: none;
  color: var(--teal);
  font-weight: 600;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-demo button:hover {
  text-decoration: underline;
}
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--rose-soft);
  border: 1px solid #f3d7d6;
  color: #a6464b;
  font-size: 11.5px;
  line-height: 1.6;
}
.auth-alert .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.auth-foot {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ============================================================ shell */
.shell {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  color: #e9f6f0;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(143, 227, 203, 0.13) 0%, transparent 55%),
    radial-gradient(100% 60% at 100% 100%, rgba(226, 154, 92, 0.09) 0%, transparent 60%),
    linear-gradient(170deg, #154a41 0%, #103b36 48%, #0c2b27 100%);
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px);
  background-size: 20px 20px;
  mask-image: linear-gradient(180deg, #000, transparent 75%);
  pointer-events: none;
}
.sidebar > * {
  position: relative;
  z-index: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px;
}
.brand .logo-mark {
  width: 40px;
  height: 44px;
}
.brand__name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 4px;
}
.brand__tag {
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 2.4px;
  color: rgba(233, 246, 240, 0.42);
}

.side-family {
  margin: 0 4px 20px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}
.side-family__label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: rgba(233, 246, 240, 0.42);
}
.side-family__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.side-family__name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-chip {
  border: 1px solid rgba(143, 227, 203, 0.22);
  background: rgba(143, 227, 203, 0.09);
  color: #b6f1df;
  font-size: 11px;
  letter-spacing: 1.4px;
  border-radius: 8px;
  padding: 4px 7px;
  font-variant-numeric: tabular-nums;
}

.side-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  margin-bottom: 9px;
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: rgba(233, 246, 240, 0.4);
}
.side-section-title button {
  border: 0;
  background: none;
  color: rgba(233, 246, 240, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 2px;
}
.side-section-title button:hover {
  color: var(--mint);
}
.side-section-title .icon {
  width: 13px;
  height: 13px;
}

.child-list {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}
.child-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
}
.child-item:hover {
  background: rgba(255, 255, 255, 0.055);
}
.child-item.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.1);
}
.child-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.child-avatar--lg {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 21px;
}
.status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2.5px solid #123832;
  background: #7d918f;
}
.status-dot.online {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(143, 227, 203, 0.14);
}
.child-meta {
  min-width: 0;
  flex: 1;
}
.child-meta__name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.child-meta__sub {
  margin-top: 3px;
  font-size: 10.5px;
  color: rgba(233, 246, 240, 0.42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unread-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: #2c1607;
  font-size: 10px;
  font-weight: 700;
}

.side-nav {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}
.side-nav__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: rgba(233, 246, 240, 0.66);
  font-size: 13px;
  text-align: left;
  transition: 0.18s ease;
  position: relative;
}
.side-nav__item .icon {
  width: 19px;
  height: 19px;
  opacity: 0.9;
}
.side-nav__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.side-nav__item.active {
  background: rgba(143, 227, 203, 0.13);
  color: #c8f7e7;
  font-weight: 600;
}
.side-nav__item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--mint);
}
.side-nav__badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--amber);
  color: #2c1607;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.side-add {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed rgba(143, 227, 203, 0.26);
  background: transparent;
  color: rgba(200, 247, 231, 0.75);
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
  transition: 0.18s ease;
}
.side-add:hover {
  background: rgba(143, 227, 203, 0.07);
  border-color: rgba(143, 227, 203, 0.45);
  color: var(--mint);
}
.side-add .icon {
  width: 15px;
  height: 15px;
}

.side-footer {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 2px;
}
.side-footer__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  background: none;
  border-radius: 10px;
  color: rgba(233, 246, 240, 0.45);
  font-size: 12px;
  text-align: left;
}
.side-footer__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}
.side-footer__item .icon {
  width: 16px;
  height: 16px;
}
.side-version {
  padding: 10px 11px 0;
  font-size: 9.5px;
  letter-spacing: 0.6px;
  color: rgba(233, 246, 240, 0.24);
}

.main {
  min-width: 0;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(143, 227, 203, 0.13) 0%, transparent 60%),
    var(--paper);
}

.mobile-top {
  display: none;
}

.content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 38px 80px;
}

/* ============================================================ page head */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 7px;
}
.eyebrow__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.page-title {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.25;
  letter-spacing: 0.3px;
  font-weight: 700;
}
.page-sub {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.page-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================ hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 26px 28px 22px;
  color: #f1fbf6;
  background:
    radial-gradient(90% 130% at 88% 8%, rgba(143, 227, 203, 0.3) 0%, transparent 48%),
    radial-gradient(70% 100% at 0% 100%, rgba(226, 154, 92, 0.16) 0%, transparent 50%),
    linear-gradient(120deg, #145a4f 0%, #1b7566 58%, #21836f 100%);
  box-shadow: 0 26px 50px -30px rgba(16, 74, 64, 0.55);
  margin-bottom: 18px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  right: -100px;
  top: -190px;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.022),
    0 0 0 140px rgba(255, 255, 255, 0.014);
}
.hero__top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.hero__id {
  min-width: 0;
  flex: 1;
}
.hero__name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.hero__device {
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(241, 251, 246, 0.57);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.hero__device .icon {
  width: 13px;
  height: 13px;
}
.hero__right {
  text-align: right;
  flex: 0 0 auto;
}
.hero__time-label {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  color: rgba(241, 251, 246, 0.55);
}
.hero__time {
  margin-top: 3px;
  font-size: clamp(30px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero__time small {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  margin-left: 3px;
  color: rgba(241, 251, 246, 0.6);
}
.hero__bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.hero__now {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  position: relative;
  flex: 0 0 auto;
}
.now-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(143, 227, 203, 0.5);
  animation: pulse-ring 2s infinite;
}
.now-dot.idle {
  background: #b9c9c5;
}
.now-dot.idle::after {
  display: none;
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
.hero__now-text {
  min-width: 0;
}
.hero__now-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: rgba(241, 251, 246, 0.5);
}
.hero__now-app {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero__stats {
  display: flex;
  gap: 18px;
}
.hero__stat {
  text-align: right;
}
.hero__stat b {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  font-size: 13px;
  font-weight: 600;
}
.hero__stat b .icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.hero__stat span {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 1px;
  color: rgba(241, 251, 246, 0.45);
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  background: rgba(143, 227, 203, 0.15);
  border: 1px solid rgba(143, 227, 203, 0.24);
  color: #c5f6e6;
}
.hero__badge.offline {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}
.hero__badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}
.hero__badge.offline .dot {
  background: #a9bab7;
}

/* ============================================================ quick */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.quick {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  transition: 0.18s ease;
  box-shadow: var(--shadow-soft);
}
.quick:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 26px -20px rgba(16, 41, 44, 0.4);
}
.quick__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--mint-soft);
  color: var(--teal-deep);
}
.quick:nth-child(2) .quick__icon {
  background: var(--amber-soft);
  color: #a9632a;
}
.quick:nth-child(3) .quick__icon {
  background: var(--blue-soft);
  color: #466795;
}
.quick:nth-child(4) .quick__icon {
  background: #f0eefb;
  color: #6a5da8;
}
.quick__icon .icon {
  width: 19px;
  height: 19px;
}
.quick b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.quick b + span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ============================================================ layout cards */
.grid {
  display: grid;
  gap: 16px;
}
.grid--2 {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}
.grid--main {
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.card--flush {
  padding: 0;
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.card__title .icon {
  width: 17px;
  height: 17px;
  color: var(--teal);
}
.card__link {
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
}
.card__link .icon {
  width: 13px;
  height: 13px;
}
.card__hint {
  font-size: 11px;
  color: var(--muted-2);
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 10.5px;
  color: var(--muted-2);
}

.section-gap {
  margin-top: 16px;
}

/* ============================================================ apps */
.app-list {
  display: grid;
  gap: 14px;
}
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.app-row__main {
  flex: 1;
  min-width: 0;
}
.app-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.app-row__name {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-row__time {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.bar {
  height: 5px;
  border-radius: 99px;
  background: #eef3ec;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6fd3b8, #2a917d);
  transition: width 0.5s ease;
}
.app-row:nth-child(2) .bar__fill {
  background: linear-gradient(90deg, #f0b985, #df9554);
}
.app-row:nth-child(3) .bar__fill {
  background: linear-gradient(90deg, #9db7dd, #607fae);
}
.app-row:nth-child(4) .bar__fill {
  background: linear-gradient(90deg, #c4b8e6, #8b7cc4);
}
.app-row:nth-child(5) .bar__fill {
  background: linear-gradient(90deg, #e9a6a9, #cf7378);
}

.app-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7faf6;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}
.app-note .icon {
  width: 15px;
  height: 15px;
  color: var(--amber);
  margin-top: 2px;
}

/* ============================================================ current app */
.current {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 2px 18px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 16px;
}
.current__icon {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: 0 12px 22px -14px rgba(16, 41, 44, 0.5);
}
.current__meta {
  min-width: 0;
}
.current__label {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  color: var(--muted-2);
}
.current__name {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.current__sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.current__spark {
  margin-left: auto;
  width: 54px;
  height: 32px;
  opacity: 0.7;
}

/* ============================================================ map */
.map-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #e7eee6;
  min-height: 210px;
}
.map-canvas {
  height: 230px;
  width: 100%;
  z-index: 0;
}
.map-canvas--full {
  height: min(58vh, 560px);
}
.map-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 24px -16px rgba(16, 41, 44, 0.5);
}
.map-overlay__meta {
  min-width: 0;
  flex: 1;
}
.map-overlay__title {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.map-overlay__sub {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-overlay .icon {
  width: 14px;
  height: 14px;
  color: var(--teal);
}
.map-empty {
  height: 230px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  background: radial-gradient(80% 80% at 50% 20%, #f5f9f1, #e9efe6);
}
.map-empty__icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--teal);
  box-shadow: var(--shadow-soft);
}
.map-empty b {
  font-size: 13px;
  color: var(--ink-2);
}
.map-empty span {
  font-size: 11px;
  color: var(--muted-2);
}
.map-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.map-card__foot a {
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.map-card__foot a .icon {
  width: 12px;
  height: 12px;
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(16, 41, 44, 0.06);
  color: var(--teal-deep);
}

.leaflet-container {
  font-family: var(--font);
  background: #e8eee5;
}
.leaflet-control-attribution {
  font-size: 8px !important;
  background: rgba(255, 255, 255, 0.7) !important;
}
.map-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e7f6f;
  border: 4px solid #fff;
  box-shadow: 0 0 0 6px rgba(30, 127, 111, 0.18), 0 6px 12px rgba(0, 0, 0, 0.25);
  position: relative;
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(30, 127, 111, 0.55);
  animation: pulse-ring 2.2s infinite;
}

/* ============================================================ usage page */
.date-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar {
  display: none;
}
.date-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 11.5px;
  white-space: nowrap;
  transition: 0.18s ease;
  flex: 0 0 auto;
}
.date-chip b {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 1px;
  font-weight: 600;
}
.date-chip.active {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 18px -12px rgba(21, 95, 84, 0.8);
}
.date-chip.active b {
  color: #fff;
}

.usage-hero {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 8px 2px 20px;
}
.ring {
  position: relative;
  width: 156px;
  height: 156px;
  margin: 0 auto;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring__track {
  fill: none;
  stroke: #eef3ec;
  stroke-width: 11;
}
.ring__value {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dasharray 0.7s ease;
}
.ring__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring__center b {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  font-size: 23px;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring__center b .ring__unit {
  display: inline;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 1px;
  letter-spacing: 0;
}
.ring__center > span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 1.3px;
  color: var(--muted-2);
}
.usage-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi {
  padding: 13px 14px;
  border-radius: 14px;
  background: #f7faf6;
  border: 1px solid #eef3ec;
}
.kpi__label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted-2);
}
.kpi__value {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.kpi__value small {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted-2);
}
.usage-insight {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  border-radius: 14px;
  background: var(--amber-soft);
  color: #8b5a2c;
  font-size: 11.5px;
  line-height: 1.6;
}
.usage-insight .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.usage-list {
  display: grid;
  gap: 15px;
}
.usage-full-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: 0.15s ease;
}
.usage-full-row:hover {
  background: #f8faf7;
  border-color: var(--line);
}
.usage-full-row .app-icon {
  width: 40px;
  height: 40px;
}
.usage-rank {
  width: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 600;
  flex: 0 0 auto;
}
.usage-bar-wrap {
  flex: 1;
  min-width: 0;
}

/* ============================================================ chat */
.chat-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 214px);
  min-height: 460px;
  padding: 0;
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.chat-head__meta {
  min-width: 0;
  flex: 1;
}
.chat-head__name {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.chat-head__sub {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.chat-head__actions {
  display: flex;
  gap: 5px;
}
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 10px;
  background:
    radial-gradient(80% 60% at 80% 0%, rgba(143, 227, 203, 0.08), transparent 65%),
    #fbfcfa;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chat-day {
  align-self: center;
  margin: 8px 0 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 41, 44, 0.06);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.5px;
}
.msg {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  max-width: 78%;
}
.msg--parent {
  align-self: flex-end;
  align-items: flex-end;
}
.msg--child {
  align-self: flex-start;
  align-items: flex-start;
}
.msg__bubble {
  padding: 10px 14px;
  border-radius: 17px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg--parent .msg__bubble {
  background: linear-gradient(135deg, #238c7a, #1a7164);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 18px -14px rgba(21, 95, 84, 0.7);
}
.msg--child .msg__bubble {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-bottom-left-radius: 5px;
}
.msg__meta {
  margin-top: 4px;
  padding: 0 3px;
  font-size: 9.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.msg__meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.msg__meta .icon {
  width: 12px;
  height: 12px;
}
.msg__meta .read {
  color: var(--teal);
}
.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--muted-2);
  padding: 30px;
}
.chat-empty__icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--mint-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}
.chat-empty b {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 5px;
}
.chat-empty span {
  font-size: 11.5px;
  line-height: 1.7;
}
.chat-notice {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 0 14px;
  font-size: 10px;
  color: var(--muted-2);
}
.chat-notice .icon {
  width: 12px;
  height: 12px;
}
.quick-chips {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
}
.quick-chips::-webkit-scrollbar {
  display: none;
}
.quick-chip {
  border: 1px solid var(--line);
  background: #f8faf7;
  color: var(--muted);
  border-radius: 99px;
  padding: 6px 11px;
  font-size: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.quick-chip:hover {
  border-color: var(--mint);
  color: var(--teal);
  background: var(--mint-soft);
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px 14px;
  background: #fff;
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line-strong);
  background: #f7faf6;
  border-radius: 15px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  height: 44px;
  max-height: 120px;
  outline: none;
}
.composer textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 127, 111, 0.1);
}
.composer .btn {
  border-radius: 13px;
  padding: 11px 14px;
}
.chat-attach-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: #f7faf6;
  color: var(--teal-deep);
  cursor: pointer;
}
.chat-attach-btn .icon {
  width: 18px;
  height: 18px;
}
.chat-attachment {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 14px 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf7;
}
.chat-attachment__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--mint-soft);
  color: var(--teal-deep);
}
.chat-attachment__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.chat-attachment__meta b {
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-attachment__meta small {
  color: var(--muted);
  font-size: 10px;
}
.chat-attachment__remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.msg-media {
  display: block;
  max-width: 100%;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}
.msg-media--image img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.msg-media--video video {
  display: block;
  max-width: 100%;
  max-height: 280px;
}
.msg-media--video a,
.msg-media--audio span {
  display: block;
  padding: 7px 10px;
  font-size: 10.5px;
  color: var(--teal-deep);
}
.msg-media--audio {
  padding: 8px;
}
.msg-media--audio audio {
  width: 100%;
}
.msg-file {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
}
.msg-file__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--mint-soft);
  color: var(--teal-deep);
}
.msg-file b {
  display: block;
  font-size: 11.5px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-file small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

/* ============================================================ account tip */
.account-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dcece2;
  background: linear-gradient(135deg, #f4fbf7, #eaf6ef);
}
.account-tip__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--teal);
  flex: 0 0 auto;
  box-shadow: var(--shadow-soft);
}
.account-tip__text {
  flex: 1;
  min-width: 0;
}
.account-tip__text b {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}
.account-tip__text span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}
.account-tip .btn {
  flex: 0 0 auto;
}

.family-code-box--account {
  background: linear-gradient(135deg, #f4fbf7, #eaf6ef);
}
.family-code-box__code--account {
  font-size: 22px;
  letter-spacing: 1.6px;
  word-break: break-all;
}

/* ============================================================ settings */
.settings-grid {
  display: grid;
  gap: 16px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f4ee;
}
.settings-row:last-child {
  border-bottom: 0;
}
.settings-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #f3f7f1;
  color: var(--teal);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.settings-row__icon .icon {
  width: 17px;
  height: 17px;
}
.settings-row__meta {
  flex: 1;
  min-width: 0;
}
.settings-row__meta b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}
.settings-row__meta span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
  word-break: break-all;
}
.settings-row__value {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.family-code-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 17px;
  background: linear-gradient(135deg, #f0f8f3, #e6f3ec);
  border: 1px solid #dcece2;
  margin-bottom: 6px;
}
.family-code-box__code {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}
.family-code-box__label {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 4px;
}
.device-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f4ee;
}
.device-line:last-child {
  border-bottom: 0;
}
.device-line__meta {
  flex: 1;
  min-width: 0;
}
.device-line__meta b {
  font-size: 12.5px;
  font-weight: 600;
}
.device-line__meta span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.device-line__actions {
  display: flex;
  gap: 5px;
}

/* ============================================================ empty states */
.empty-card {
  text-align: center;
  padding: 40px 24px;
}
.empty-card__icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--teal);
}
.empty-card__icon .icon {
  width: 27px;
  height: 27px;
}
.empty-card b {
  display: block;
  font-size: 14.5px;
  margin-bottom: 6px;
}
.empty-card p {
  margin: 0 auto 18px;
  max-width: 330px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.empty-card .btn {
  margin: 0 auto;
}

/* pair prompt inside overview */
.pair-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 26px;
  background:
    radial-gradient(70% 100% at 100% 0%, rgba(226, 154, 92, 0.14), transparent 60%),
    linear-gradient(135deg, #fffdf9, #fbf7ee);
  border: 1px solid #efe3cf;
  margin-bottom: 18px;
}
.pair-card__head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
}
.pair-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: #fff;
  color: var(--amber);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
}
.pair-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.pair-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.pair-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pair-inline__code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #7b5327;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px dashed #e2c9a4;
  border-radius: 12px;
  padding: 8px 13px;
}
.pair-steps {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.pair-step {
  display: flex;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}
.pair-step b {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #fff;
  color: #a46a2c;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex: 0 0 auto;
}

/* ============================================================ modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 32, 29, 0.48);
  backdrop-filter: blur(7px);
  animation: fade-in 0.2s ease;
}
.modal {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
  padding: 26px;
  animation: modal-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.modal--wide {
  max-width: 560px;
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.modal__title {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.4px;
}
.modal__sub {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
}
.modal__close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
}
.modal__close:hover {
  background: #f5f8f3;
}
.modal__close .icon {
  width: 16px;
  height: 16px;
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.pair-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 16px;
  align-items: start;
}
.pair-network {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pair-network .date-chip {
  padding: 8px 12px;
}
.pair-network-hint {
  margin: -6px 0 14px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: #8b5a2c;
  font-size: 10.5px;
  line-height: 1.6;
}
.pair-qr {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
  background: #fff;
}
.pair-qr__canvas {
  width: 144px;
  height: 144px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}
.pair-qr__canvas svg {
  width: 100%;
  height: 100%;
}
.pair-qr__label {
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--muted-2);
  line-height: 1.5;
}
.pair-code-card {
  border: 1px dashed #cfe3d6;
  border-radius: 18px;
  background: linear-gradient(160deg, #f3faf6, #eaf6ef);
  padding: 16px;
  text-align: center;
}
.pair-code-card__label {
  font-size: 9.5px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.pair-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}
.pair-expire {
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.pair-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7faf6;
  border: 1px solid #eef3ec;
  font-size: 11.5px;
  color: var(--muted);
}
.pair-progress__dots {
  display: flex;
  gap: 4px;
}
.pair-progress__dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: dot 1.2s infinite ease-in-out;
}
.pair-progress__dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.pair-progress__dots span:nth-child(3) {
  animation-delay: 0.3s;
}
.pair-success {
  text-align: center;
  padding: 16px 8px 4px;
}
.pair-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--mint-soft);
  color: var(--teal);
  animation: pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.pair-success__icon .icon {
  width: 34px;
  height: 34px;
}
.pair-success h3 {
  margin: 0 0 6px;
  font-size: 19px;
}
.pair-success p {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.install-steps {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}
.install-step {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.install-step__num {
  width: 23px;
  height: 23px;
  border-radius: 8px;
  background: var(--mint-soft);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  flex: 0 0 auto;
}
.install-step__text {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
  padding-top: 2px;
}
.install-step__text b {
  color: var(--ink-2);
}

/* ============================================================ tabbar mobile */
.tabbar {
  display: none;
}

/* ============================================================ toast */
#toast-root {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 13px;
  background: rgba(16, 41, 44, 0.94);
  color: #f1fbf6;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  animation: toast-in 0.25s ease;
  max-width: 100%;
}
.toast .icon {
  width: 15px;
  height: 15px;
  color: var(--mint);
  flex: 0 0 auto;
}
.toast--error .icon {
  color: #ffb3b3;
}
.toast--amber .icon {
  color: var(--amber);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ============================================================ skeleton */
.skeleton {
  background: linear-gradient(90deg, #edf2ea 25%, #f6f9f4 37%, #edf2ea 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ============================================================ responsive */
@media (min-width: 1380px) {
  .auth-phone {
    display: block;
  }
  .auth-art {
    padding-right: 320px;
  }
}

@media (max-width: 1080px) {
  .grid--2,
  .grid--main {
    grid-template-columns: minmax(0, 1fr);
  }
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content {
    padding: 28px 26px 76px;
  }
}

@media (max-width: 960px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding-top: 0;
  }
  .mobile-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(242, 246, 241, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(226, 234, 226, 0.8);
  }
  .mobile-top .logo-mark {
    width: 27px;
    height: 30px;
  }
  .mobile-top__name {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
  }
  .mobile-top__family {
    flex: 1;
    text-align: right;
    font-size: 10.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-top__btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--ink-2);
  }
  .mobile-top__btn .icon {
    width: 17px;
    height: 17px;
  }
  .content {
    padding: 18px 16px 104px;
  }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .tabbar__item {
    flex: 1;
    border: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    color: var(--muted-2);
    font-size: 9.5px;
    position: relative;
  }
  .tabbar__item .icon {
    width: 21px;
    height: 21px;
  }
  .tabbar__item.active {
    color: var(--teal);
    font-weight: 600;
  }
  .tabbar__item.active::after {
    content: "";
    position: absolute;
    top: 0;
    width: 18px;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: var(--teal);
  }
  .tabbar__badge {
    position: absolute;
    top: 2px;
    left: 50%;
    margin-left: 6px;
    min-width: 15px;
    height: 15px;
    border-radius: 99px;
    background: var(--amber);
    color: #2c1607;
    font-size: 8.5px;
    font-weight: 700;
    display: grid;
    place-items: center;
    padding: 0 4px;
  }
  .chat-card {
    height: calc(100dvh - 214px);
    min-height: 400px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head__actions .btn span {
    display: none;
  }
}

@media (max-width: 760px) {
  .auth {
    grid-template-columns: 1fr;
    background: var(--paper);
  }
  .auth-art {
    display: none;
  }
  .auth-side {
    padding: 22px 16px 30px;
    align-items: flex-start;
    min-height: 100vh;
  }
  .auth-side::before {
    width: 260px;
    height: 260px;
    top: -120px;
  }
  .auth-card {
    max-width: 430px;
    padding: 26px 22px 22px;
    border-radius: 24px;
    box-shadow: 0 20px 50px -34px rgba(16, 41, 44, 0.5);
  }
  .auth-mobile-brand {
    display: flex;
  }
  .auth-card__head h2 {
    font-size: 22px;
  }
  .auth-foot {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 15px 13px 100px;
  }
  .account-tip {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .account-tip__text {
    flex: 1 1 calc(100% - 52px);
  }
  .account-tip .btn {
    width: 100%;
  }
  .device-line {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .device-line__meta {
    flex: 1 1 calc(100% - 50px);
  }
  .device-line__meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .device-line__actions {
    width: 100%;
    justify-content: flex-end;
  }
  .hero__badge {
    display: none;
  }
  .hero__name {
    white-space: nowrap;
  }
  .hero__time {
    font-size: 26px;
  }
  .hero__time small {
    font-size: 11px;
  }
  .page-title {
    font-size: 22px;
  }
  .hero {
    padding: 20px 18px 16px;
    border-radius: 24px;
  }
  .hero__top {
    margin-bottom: 18px;
  }
  .hero__name {
    font-size: 18px;
  }
  .hero__time {
    font-size: 29px;
  }
  .hero__bottom {
    gap: 10px;
  }
  .hero__stats {
    gap: 13px;
  }
  .hero__stat b {
    font-size: 12px;
  }
  .hero__stat span {
    font-size: 8.5px;
  }
  .quick {
    padding: 11px;
    gap: 9px;
    border-radius: 15px;
  }
  .quick__icon {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }
  .quick b {
    font-size: 11.5px;
  }
  .quick span {
    font-size: 9.5px;
  }
  .card {
    padding: 17px;
    border-radius: 20px;
  }
  .card__head {
    margin-bottom: 13px;
  }
  .usage-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ring {
    width: 146px;
    height: 146px;
  }
  .pair-layout {
    grid-template-columns: 1fr;
  }
  .pair-qr {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px;
  }
  .pair-qr__canvas {
    width: 108px;
    height: 108px;
    margin: 0;
    flex: 0 0 auto;
  }
  .pair-qr__label {
    margin-top: 0;
    font-size: 10px;
    line-height: 1.6;
  }
  .pair-code {
    font-size: 27px;
    letter-spacing: 3px;
  }
  .modal {
    padding: 21px;
    border-radius: 24px;
  }
  .modal-backdrop {
    padding: 12px;
    align-items: end;
  }
  .modal {
    max-height: calc(100dvh - 24px);
    border-radius: 24px 24px 18px 18px;
  }
  .chat-scroll {
    padding: 16px 13px 8px;
  }
  .composer {
    padding: 9px 11px 11px;
  }
  .composer .btn span {
    display: none;
  }
  .composer .btn {
    padding: 11px 13px;
  }
  .msg {
    max-width: 86%;
  }
  .map-canvas {
    height: 210px;
  }
  .map-canvas--full {
    height: 46vh;
  }
  #toast-root {
    bottom: 86px;
  }
  .page-head__actions .btn span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
