/* Giao diện "Tôi yêu Việt Nam" */
[data-theme="vietnam"] {
  --bg: #fff8f5;
  --paper: #ffffff;
  --line: #f2d4cd;
  --ink: #4a1719;
  --muted: #855250;
  --green: #c81e2b;
  --tint: #fdeae6;
  --deep: #9e1722;
}

[data-theme="vietnam"] .greeting {
  background: linear-gradient(112deg, #fde8e4, #fff6df) !important;
  border-color: #f0c2b8;
}

[data-theme="vietnam"] .balance {
  border-color: #f0c2b8;
}

[data-theme="vietnam"] .brand-mark i {
  background: #ffd84d;
}

.vn-flag {
  width: 30px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* Nút tài khoản & thanh trạng thái đồng bộ ở Sidebar */
.side-auth-btn {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--tint, #eef6f1);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}

.side-auth-btn:hover {
  filter: brightness(0.97);
}

.side-auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

[data-theme="luxury"] .side-auth-avatar {
  color: #211b0e;
}

.side-auth-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.side-auth-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-auth-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-bar {
  margin: 10px 6px 0;
  padding: 12px 4px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.sync-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sync-bar-state {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 560;
}

.sync-bar-state span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #589c78;
}

.sync-dot.synced {
  background: #16a34a;
}

.sync-dot.syncing {
  background: #0284c7;
  animation: sl-pulse 1s ease-in-out infinite;
}

.sync-dot.offline {
  background: #7c8982;
}

.sync-dot.error {
  background: #dc2626;
}

.sync-dot.pending {
  background: #d97706;
}

@keyframes sl-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.sync-mini-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sync-mini-btn:hover:not(:disabled) {
  filter: brightness(0.96);
}

.sync-mini-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.sync-time {
  font-size: 11px;
  color: var(--muted);
}

/* Banner thông báo hệ thống */
.sys-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--tint, #e8f5ee);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}

.sys-banner strong {
  display: block;
  margin-bottom: 2px;
  color: var(--deep, var(--green));
}

.sys-banner button {
  border: 0;
  background: transparent;
  padding: 4px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

/* Modal tabs, mật khẩu, thẻ thông tin */
.auth-tabs {
  display: flex;
  background: var(--tint, #eff4ef);
  padding: 4px;
  border-radius: 9px;
  margin-bottom: 14px;
  gap: 4px;
}

.auth-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--muted);
}

.auth-tabs button.active {
  background: var(--paper);
  color: var(--green);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09);
}

[data-theme="luxury"] .auth-tabs button.active {
  color: var(--deep);
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap input {
  padding-right: 44px !important;
}

.pw-toggle {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: var(--muted);
}

.pw-toggle:hover {
  background: var(--tint, #eef3ef);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 12px 0;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--green);
}

.warn-box,
.info-box {
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0;
}

.warn-box {
  background: #fff4e5;
  border: 1px solid #f4c987;
  color: #6f4208;
}

[data-theme="luxury"] .warn-box {
  background: #332712;
  border-color: #775a26;
  color: #f6d58f;
}

.info-box {
  background: var(--tint, #edf6f1);
  border: 1px solid var(--line);
  color: var(--ink);
}

.error-msg {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  margin: 10px 0;
}

[data-theme="luxury"] .error-msg {
  background: #3b1919;
  border-color: #7c3030;
  color: #fca5a5;
}

.info-card {
  border: 1px solid var(--line);
  background: var(--tint, #f5faf7);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.info-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}

.info-kv span {
  color: var(--muted);
}

.info-kv strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 8px;
}

.role-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--green);
}

.role-badge.admin {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.recovery-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  padding: 9px 6px;
  border-radius: 8px;
  background: var(--tint, #f2f7f4);
  border: 1px dashed var(--green);
  user-select: all;
}

.list-stack {
  display: grid;
  gap: 9px;
  margin: 12px 0;
  max-height: 280px;
  overflow-y: auto;
}

.list-item {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-item-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.list-item-main strong {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.list-item-main small {
  font-size: 12px;
  color: var(--muted);
}

.list-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 10px !important;
  font-size: 12.5px !important;
}

.btn-danger-fill {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #fff !important;
}

.privacy-body {
  max-height: 46dvh;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

.privacy-body h3 {
  font-size: 14.5px;
  margin: 12px 0 4px;
  color: var(--deep, var(--green));
}

.privacy-body ul {
  margin: 4px 0 8px 18px;
  padding: 0;
}

.migrate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0;
}

.migrate-table th,
.migrate-table td {
  padding: 8px 6px;
  border: 1px solid var(--line);
  text-align: left;
}

.migrate-table th {
  font-size: 12px;
}

.migrate-table td:last-child,
.migrate-table th:last-child {
  text-align: right;
}

.setting-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 600px) {
  dialog {
    width: calc(100% - 16px) !important;
  }
  #dialog-body {
    padding: 18px 15px !important;
  }
  .recovery-grid,
  .setting-grid-2 {
    grid-template-columns: 1fr;
  }
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .list-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .modal-foot {
    flex-wrap: wrap;
  }
}

/* Chuông thông báo ở Header */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.notif-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
}

.notif-bell:hover {
  background: var(--tint, #eef3ef);
}

.notif-bell .ic {
  width: 20px;
  height: 20px;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--paper, #fff);
}

/* Huy hiệu & Logo Thành viên PREMIUM */
.premium-badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1ba 0%, #e5b750 48%, #b9821f 100%);
  border: 1px solid #f5d87e;
  color: #3b2504;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.55px;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(185, 130, 31, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

.premium-badge::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -60%;
  width: 45%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-22deg);
  animation: sl-sheen 4s ease-in-out infinite;
  pointer-events: none;
}

.premium-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

[data-theme="luxury"] .premium-badge {
  box-shadow: 0 0 10px rgba(228, 199, 123, 0.35);
}

.premium-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6be63;
  background: linear-gradient(135deg, #fffaf0 0%, #fff1cc 55%, #f9df9f 100%);
  color: #462b04;
  border-radius: 14px;
  padding: 16px 14px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(185, 130, 31, 0.16);
}

[data-theme="luxury"] .premium-hero {
  background: linear-gradient(135deg, #2d2515 0%, #3d311a 55%, #2a2212 100%);
  color: #fce7a8;
  border-color: #b78d35;
}

.premium-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -50%;
  width: 40%;
  height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: skewX(-22deg);
  animation: sl-sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}

.premium-hero-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.premium-hero-emblem svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 6px rgba(185, 130, 31, 0.35));
}

.premium-hero h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
  color: inherit;
}

.premium-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  text-align: left;
  font-size: 12px;
}

.premium-perks span {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(185, 130, 31, 0.25);
  border-radius: 7px;
  padding: 5px 8px;
}

[data-theme="luxury"] .premium-perks span {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(228, 199, 123, 0.3);
}

@keyframes sl-sheen {
  0%, 60% { left: -60%; }
  100% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
  .premium-badge::after,
  .premium-hero::after {
    animation: none;
    display: none;
  }
}

/* Hộp thư thông báo & banner cập nhật APK */
.notif-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 11px 12px;
  display: grid;
  gap: 6px;
}

.notif-card.unread {
  border-left: 4px solid var(--green);
  background: var(--tint, #f4faf6);
}

.notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.notif-tag-direct {
  background: #ede9fe;
  color: #5b21b6;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.notif-tag-global {
  background: var(--tint, #e6f3ec);
  color: var(--deep, var(--green));
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.notif-tag-important {
  background: #fee2e2;
  color: #b91c1c;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.apk-update-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(120deg, var(--tint, #e8f5ee), var(--paper, #fff));
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 14px;
  font-size: 13.5px;
}

.apk-update-banner strong {
  color: var(--deep, var(--green));
  display: block;
}

@media (max-width: 620px) {
  .header-actions {
    gap: 2px;
  }
  .profile.bare #book-name {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #header-premium-slot .premium-badge {
    font-size: 9.5px;
    padding: 1px 5px;
  }
  .premium-perks {
    grid-template-columns: 1fr;
  }
}

/* Thương hiệu "Quản Gia Tài Chính" & nút Hồ sơ thống nhất trên Header */
.brand {
  margin: 24px 16px 28px !important;
  gap: 10px !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.35px !important;
}

.brand-mark {
  flex-shrink: 0;
}

.brand-title {
  display: block;
  min-width: 0;
}

.header-profile-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 7px !important;
  padding: 4px 10px 4px 4px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: var(--paper) !important;
  max-width: 265px;
  min-width: 0;
}

.header-profile-btn:hover {
  background: var(--tint, #f1f5f1) !important;
}

.header-profile-btn > span {
  display: inline-flex !important;
  align-items: center;
}

#header-premium-slot:empty {
  display: none !important;
}

.header-avatar {
  width: 30px !important;
  height: 30px !important;
  justify-content: center;
  font-size: 11.5px !important;
  flex-shrink: 0;
}

.header-avatar.logged-in {
  background: var(--green) !important;
  color: #fff !important;
  border-color: var(--green) !important;
  font-weight: 700;
}

[data-theme="luxury"] .header-avatar.logged-in {
  color: #211b0e !important;
}

.header-user-name {
  font-size: 13px;
  font-weight: 620;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

@media (max-width: 620px) {
  #shell > header {
    padding: 0 10px !important;
    gap: 6px !important;
  }
  .header-profile-btn {
    padding: 3px 8px 3px 3px !important;
    gap: 5px !important;
    max-width: 215px;
  }
  .header-avatar {
    width: 27px !important;
    height: 27px !important;
    font-size: 10.5px !important;
  }
  .header-user-name {
    font-size: 12.5px;
    max-width: 92px;
  }
}

@media (max-width: 390px) {
  .header-user-name {
    max-width: 68px;
  }
  #header-premium-slot .premium-badge {
    padding: 1px 4px;
    font-size: 9px;
    letter-spacing: 0.25px;
  }
  #header-premium-slot .premium-badge svg {
    width: 10px;
    height: 10px;
  }
}


/* ================= CHUỖI NGÀY GHI CHÉP (STREAK) ================= */
#streak-overview-slot:empty,
#streak-chip-slot:empty {
  display: none !important;
}

.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.streak-chip:hover {
  transform: translateY(-1px);
}

.streak-chip.lit {
  border-color: rgba(249, 115, 22, 0.45);
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.92), rgba(254, 215, 170, 0.85));
  color: #9a3412;
}

.streak-chip.pending {
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(254, 243, 199, 0.55);
  color: #92400e;
}

.streak-chip.off {
  opacity: 0.85;
  color: var(--muted);
}

[data-theme="luxury"] .streak-chip.lit {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.35), rgba(245, 158, 11, 0.25));
  border-color: rgba(251, 191, 36, 0.5);
  color: #fde68a;
}

[data-theme="luxury"] .streak-chip.pending {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(245, 158, 11, 0.38);
  color: #fcd34d;
}

.streak-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.streak-card.lit {
  border-color: rgba(249, 115, 22, 0.38);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 237, 213, 0.72));
}

.streak-card.pending {
  border-color: rgba(217, 119, 6, 0.34);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(254, 243, 199, 0.55));
}

.streak-card.off {
  background: var(--tint, rgba(0, 0, 0, 0.02));
}

[data-theme="luxury"] .streak-card.lit {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.32), rgba(245, 158, 11, 0.14));
  border-color: rgba(251, 191, 36, 0.42);
}

[data-theme="luxury"] .streak-card.pending {
  background: linear-gradient(135deg, rgba(92, 45, 12, 0.25), rgba(217, 119, 6, 0.12));
  border-color: rgba(245, 158, 11, 0.35);
}

.streak-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.streak-flame {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(249, 115, 22, 0.12);
}

.streak-flame.lit {
  animation: sl-flame 1.9s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.45));
}

.streak-flame.off {
  filter: grayscale(1);
  opacity: 0.6;
  background: rgba(120, 120, 120, 0.12);
}

@keyframes sl-flame {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .streak-flame.lit {
    animation: none;
  }
}

.streak-copy {
  min-width: 0;
}

.streak-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.streak-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.streak-best {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

@media (max-width: 600px) {
  .streak-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 12px;
  }
  .streak-best {
    align-self: flex-start;
  }
}

/* ================= THỜI TIẾT MỞ RỘNG & TÌM KIẾM ================= */
.weather-search-wrap {
  margin-bottom: 10px;
}

#weather-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
}

.weather-list-scroll {
  max-height: 44dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.weather-group-title {
  font-size: 11.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--muted);
  margin: 10px 0 6px;
}

/* ================= HỖ TRỢ & GÓP Ý ================= */
.side-support-btn {
  width: 100%;
  margin-top: 6px;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-box {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--tint, rgba(0, 0, 0, 0.025));
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.55;
}

.diag-box strong {
  color: var(--ink);
}

.hello-tools .streak-chip {
  height: 28px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 12px;
}

/* ================= SAFE AREA PWA iOS / ANDROID ================= */
@supports (padding-top: env(safe-area-inset-top)) {
  #shell > header {
    padding-top: env(safe-area-inset-top);
    height: calc(68px + env(safe-area-inset-top));
  }
  @media (max-width: 720px) {
    #shell > header {
      height: calc(55px + env(safe-area-inset-top));
    }
  }
  @media (max-width: 620px) {
    #shell > header {
      height: calc(44px + env(safe-area-inset-top));
    }
  }
  #sidebar {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  main {
    padding-bottom: calc(35px + env(safe-area-inset-bottom));
  }
}
