:root {
  --bg0: #ffffff;
  --bg1: #fafafa;
  --bg2: #f5f5f5;
  --card: #ffffff;
  --card-solid: #ffffff;
  --line: #eeeeee;
  --line-strong: #e5e5e5;
  --text: #1a1a1a;
  --text-2: #666666;
  --text-3: #999999;
  --accent: #f05a25;
  --accent-2: #d94e1f;
  --accent-soft: rgba(240, 90, 37, 0.1);
  --accent-ring: rgba(240, 90, 37, 0.22);
  --mint: #f05a25;
  --warn: #f05a25;
  --danger: #e53935;
  --ok: #2e7d32;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  background: var(--bg0);
}

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

button {
  border: 0;
  cursor: pointer;
  background: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

#app {
  width: min(440px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(12px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  position: relative;
  background: var(--bg0);
}

body.in-workspace #app {
  padding-bottom: calc(60px + var(--safe-bottom));
}

body.in-workspace.editing-item #app {
  padding-bottom: calc(28px + var(--safe-bottom));
}

.app-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(440px, 100%);
  z-index: 40;
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
  padding-bottom: var(--safe-bottom);
}

body.editing-item .app-footer {
  display: none;
}

.trust-block {
  margin-top: 22px;
  padding: 16px 14px 8px;
  border-radius: var(--radius);
  background: var(--bg1);
  border: 1px solid var(--line);
}

.trust-badges {
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text-3);
  background: var(--bg1);
  border: 1px solid var(--line);
  box-sizing: border-box;
  vertical-align: middle;
}

.badge.static {
  cursor: default;
  color: var(--text-2);
  background: #ffffff;
  border-color: var(--line-strong);
}

.badge.static:first-child {
  color: var(--accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

.trust-badges .badge.static {
  min-height: 30px;
  padding: 0 14px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.trust-list {
  margin: 0;
  padding: 0 0 0 16px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.65;
}

.trust-list li {
  margin-bottom: 4px;
}

.trust-block .privacy-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-3);
  text-align: center;
}

.item-topbar {
  align-items: flex-start;
  margin-bottom: 16px;
}

.item-top-main {
  flex: 1;
  min-width: 0;
  padding: 0 4px 0 10px;
}

.item-top-main .title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
}

.item-top-main .sub {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
  line-height: 1.4;
}

#panel-item .type-segment {
  display: flex;
  padding: 3px;
  background: var(--bg2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  gap: 2px;
}

#panel-item .type-segment .badge {
  flex: 1;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#panel-item .type-segment .badge.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.item-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.item-editor {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.item-editor-section {
  padding: 18px 16px 16px;
}

.item-editor-section + .item-editor-section {
  border-top: 1px solid var(--line);
}

.item-section-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}

.item-field-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.item-field-box:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.item-title-input {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  outline: none;
  color: var(--text);
}

.item-title-input::placeholder {
  color: #c0c0c0;
  font-weight: 500;
}

.item-chain-field[hidden] {
  display: none !important;
}

.item-chain-wrap {
  position: relative;
}

.item-chain-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-3);
  pointer-events: none;
}

.item-chain-select,
.item-chain-custom {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 40px 13px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.item-chain-custom-wrap {
  margin-top: 10px;
}

.item-chain-custom-wrap[hidden] {
  display: none !important;
}

.item-chain-custom {
  padding: 13px 14px;
}

.item-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.item-content-head .item-section-label {
  margin-bottom: 0;
}

.item-content-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-content-tools[hidden] {
  display: none !important;
}

.item-tool-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-3);
  display: grid;
  place-items: center;
  font-size: 13px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.item-tool-btn:active {
  color: var(--accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

.item-tool-btn.is-success {
  color: var(--ok);
  border-color: rgba(46, 125, 50, 0.35);
  background: rgba(46, 125, 50, 0.1);
}

.item-tool-btn.is-success i {
  transform: scale(1.05);
}

.item-content-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg1);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.item-content-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: #fff;
}

.item-content {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 42vh;
  border: 0 !important;
  background: transparent !important;
  padding: 14px !important;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--text);
  resize: none;
  outline: none !important;
  box-shadow: none !important;
}

.item-content.is-masked {
  -webkit-text-security: disc;
  text-security: disc;
}

.item-content-hint {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-3);
}

.item-actions {
  margin-top: 0;
  gap: 8px;
}

.btn-save-item {
  gap: 8px;
  min-height: 48px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.btn-save-item i {
  font-size: 14px;
}

.btn-item-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.btn-item-delete:active {
  color: var(--danger);
}

.btn-item-delete i {
  font-size: 12px;
}

body.in-workspace #screen-auth,
body.in-workspace #screen-create,
body.in-workspace #screen-recover,
body.in-workspace #screen-device-pending,
body.in-workspace #screen-vault-unlock {
  display: none !important;
}

.loading-overlay:not(.show) {
  pointer-events: none;
}

.screen {
  display: none;
  animation: fadeUp 0.35s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(240, 90, 37, 0.28);
  position: relative;
  overflow: hidden;
}

.logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 50%);
}

.logo svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  margin: 8px 0 28px;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  padding: 6px 10px;
  border-radius: 999px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 14px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.field .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(240, 90, 37, 0.28);
}

.btn-primary:active {
  background: var(--accent-2);
}

.btn-secondary {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.btn-ghost {
  color: var(--text-2);
  background: transparent;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff5c7a, #ff7a59);
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.tab.active {
  color: #fff;
  background: var(--accent);
}

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(240, 90, 37, 0.08);
  border: 1px solid rgba(240, 90, 37, 0.2);
  color: #a84a20;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.banner strong {
  color: var(--accent-2);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-link {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.topbar-link:hover,
.topbar-link:active {
  color: var(--accent);
}

.topbar-action {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}

.import-warn {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  color: #a84a20;
  background: rgba(240, 90, 37, 0.08);
  border: 1px solid rgba(240, 90, 37, 0.18);
}

.import-warn strong {
  color: var(--accent-2);
}

.topbar-action:active {
  transform: scale(0.97);
  background: rgba(240, 90, 37, 0.16);
}

.topbar .title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.topbar .sub {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 2px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-2);
  text-decoration: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn-back {
  width: 44px;
  height: 44px;
  color: var(--text);
  border-color: var(--line-strong);
  background: #ffffff;
}

.icon-btn-back i {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.icon-btn-back:active {
  background: var(--bg1);
  color: var(--accent);
  border-color: var(--accent-ring);
}

.auth-back.icon-btn-back {
  align-self: flex-start;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  text-align: left;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}

.item:active {
  background: var(--bg1);
}

.item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.item-icon.mnemonic {
  background: rgba(240, 90, 37, 0.12);
  color: var(--accent);
}

.item-icon.key {
  background: rgba(240, 90, 37, 0.08);
  color: var(--accent-2);
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-3);
}

.chev {
  color: var(--text-3);
  font-size: 18px;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}

.empty .big {
  margin-bottom: 12px;
  line-height: 0;
}

.empty .big img {
  width: 56px;
  height: 56px;
  display: inline-block;
  opacity: 0.92;
}

.empty h3 {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 17px;
}

.empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.fab-wrap {
  position: sticky;
  bottom: 0;
  padding-top: 18px;
  margin-top: 18px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, transparent, #ffffff 40%);
}

/* —— 保险箱列表：底部添加栏固定，列表可滚动 —— */
.vault-add-top {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--accent-ring);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 17px;
  transition: background 0.15s ease, transform 0.12s ease;
}

.vault-add-top:active {
  background: rgba(240, 90, 37, 0.16);
  transform: scale(0.96);
}

#panel-vault:not(.active) .vault-add-bar {
  display: none;
}

body.editing-item .vault-add-bar,
body.editing-item .vault-add-top {
  display: none !important;
}

#panel-vault.active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#panel-vault .topbar {
  flex-shrink: 0;
}

#panel-vault .vault-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
}

#panel-vault .vault-add-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
  bottom: calc(62px + var(--safe-bottom));
  z-index: 35;
  padding: 10px 0 8px;
  background: linear-gradient(180deg, rgba(245, 245, 244, 0) 0%, var(--bg0) 32%, #ffffff 100%);
  box-sizing: border-box;
  pointer-events: none;
}

#panel-vault .vault-add-btn {
  pointer-events: auto;
  width: 100%;
}

/* —— Workspace shell —— */
#screen-workspace.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 16px - var(--safe-top));
}

.workspace-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  animation: fadeUp 0.28s ease;
}

.tab-panel.active {
  display: block;
}

#panel-me .me-stack,
#panel-me .trust-block {
  margin-left: 16px;
  margin-right: 16px;
}

.me-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

#panel-me .web-account-card {
  width: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* —— 我的 / 安全中心 菜单项（左侧图标） —— */
.me-menu-list {
  margin-top: 0;
}

.me-menu-item {
  gap: 14px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.me-menu-item-featured {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 70%);
}

.me-menu-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
  color: #b45309;
  background: linear-gradient(145deg, #fef3c7, #fffbeb);
  border: 1px solid #fde68a;
}

.me-menu-icon.security,
.me-menu-icon.recovery {
  color: #b45309;
  background: linear-gradient(145deg, #fef3c7, #fffbeb);
  border-color: #fde68a;
}

.me-menu-icon.devices {
  color: #c2410c;
  background: var(--accent-soft);
  border-color: var(--accent-ring);
}

.me-menu-icon.backup {
  color: var(--ok);
  background: rgba(46, 125, 50, 0.08);
  border-color: rgba(46, 125, 50, 0.18);
}

.me-menu-icon.mall {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.18);
}

.me-menu-icon.happygo {
  padding: 0;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.me-menu-icon.happygo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.me-menu-icon.share {
  color: #db2777;
  background: rgba(219, 39, 119, 0.08);
  border-color: rgba(219, 39, 119, 0.16);
}

.me-menu-icon.about {
  color: #0369a1;
  background: rgba(3, 105, 161, 0.08);
  border-color: rgba(3, 105, 161, 0.16);
}

.me-menu-icon.profile {
  color: #64748b;
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
}

/* —— 安全中心 —— */
.security-hub-page {
  padding-top: 4px;
}

.security-hub-hero {
  padding: 18px 16px 16px;
  margin-bottom: 20px;
  background: linear-gradient(160deg, #fff7ed 0%, #ffffff 55%);
  border-color: #fed7aa;
}

.security-hub-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.security-hub-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  color: #b45309;
  background: linear-gradient(145deg, #fef3c7, #fffbeb);
  border: 1px solid #fde68a;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.08);
}

.security-hub-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.security-hub-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.security-hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.security-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fed7aa;
}

.security-hub-pill i {
  font-size: 10px;
  opacity: 0.85;
}

.security-hub-section {
  margin-bottom: 20px;
}

.security-hub-section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.security-hub-list {
  margin-bottom: 0;
}

.security-hub-trust {
  margin-top: 0;
  padding: 16px 14px 10px;
}

.security-hub-badges {
  justify-content: center;
  margin-bottom: 12px;
}

.security-hub-trust-list {
  margin-bottom: 0;
}

/* —— 恢复码页 —— */
.recovery-rotate-page {
  padding-top: 4px;
}

.recovery-hero {
  padding: 18px 16px 16px;
  margin-bottom: 18px;
  background: linear-gradient(160deg, #fffbeb 0%, #ffffff 55%);
  border-color: #fde68a;
}

.recovery-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.recovery-hero-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  color: #b45309;
  background: linear-gradient(145deg, #fef3c7, #fffbeb);
  border: 1px solid #fde68a;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.08);
}

.recovery-hero-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.recovery-hero-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.recovery-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #fde68a;
}

.recovery-hero-pill i {
  font-size: 10px;
  opacity: 0.85;
}

.recovery-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
  padding: 0 4px;
}

.recovery-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.recovery-step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg1);
  border: 2px solid var(--line-strong);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.recovery-step-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  transition: color 0.2s ease;
}

.recovery-step-item.on .recovery-step-num {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.recovery-step-item.current .recovery-step-text {
  color: var(--accent);
}

.recovery-step-line {
  flex: 0 0 40px;
  height: 2px;
  margin: 0 6px 18px;
  border-radius: 1px;
  background: var(--line);
  transition: background 0.2s ease;
}

.recovery-step-line.on {
  background: var(--accent);
}

.recovery-step-panel {
  margin-bottom: 14px;
}

.recovery-step-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.recovery-save-panel {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(160deg, #fffbeb 0%, #ffffff 70%);
  border-color: #fde68a;
}

.recovery-save-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.recovery-save-label {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}

.recovery-save-panel .recovery-box {
  margin: 0 0 10px;
}

.recovery-save-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-3);
  text-align: center;
}

.recovery-confirm-panel {
  padding: 16px;
  margin-bottom: 14px;
}

.recovery-confirm-panel .stack {
  margin-top: 4px;
}

.recovery-trust {
  margin-top: 4px;
  padding: 16px 14px 10px;
}

.recovery-trust-list {
  margin-bottom: 0;
}

.recovery-rotate-page .recovery-box {
  margin: 0;
}

.recovery-rotate-page #btnRecoveryCopy {
  margin: 0;
  white-space: nowrap;
}

.security-inline-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  vertical-align: baseline;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 4px 8px 6px;
  background: transparent;
  border-top: 0;
}

.tabbar-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  border-radius: 10px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 4px 2px;
  background: transparent;
  transition: color 0.18s ease;
}

.tabbar-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 24px;
}

.tabbar-icon {
  display: block;
  width: 32px;
  height: 22px;
  color: #b0b0b0;
  transition: color 0.18s ease;
}

.tabbar-icon * {
  vector-effect: non-scaling-stroke;
}

.tabbar-label {
  line-height: 1.2;
}

.tabbar-item.active {
  color: var(--accent);
  font-weight: 600;
  background: transparent;
  box-shadow: none;
}

.tabbar-item.active .tabbar-icon {
  color: var(--accent);
}

.tabbar-item.active .tabbar-dot {
  display: none;
}

.tabbar-item:active:not(.active) {
  opacity: 0.7;
}

.tabbar-dot {
  position: absolute;
  top: -1px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #ffffff;
  pointer-events: none;
}

.tabbar-item.has-dot:not(.active) {
  color: var(--text);
}

.tabbar-item[hidden] {
  display: none !important;
}

.banner-mint {
  background: var(--accent-soft);
  border-color: var(--accent-ring);
  color: #a84a20;
}

.banner-mint strong {
  color: var(--accent-2);
}

.module-grid {
  display: block;
}

.discover-wrap {
  margin-top: 4px;
}

/* —— 发现页主题色 —— */
#panel-discover .topbar .sub::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

.discover-panel {
  display: grid;
  gap: 18px;
}

.discover-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.discover-section-bar {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.discover-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}

.discover-section-tag {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
}

.discover-section-soon .discover-section-bar {
  background: var(--line-strong);
}

.discover-section-soon .discover-section-title {
  color: var(--text-2);
}

.discover-menu {
  position: relative;
  border-radius: 14px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(240, 90, 37, 0.08);
}

.discover-menu-muted {
  border-top-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.discover-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 16px 6px 14px;
  background: none;
  border: 0;
  color: var(--text);
  transition: background 0.15s, transform 0.12s;
}

.discover-cell:not(.soon) .discover-cell-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-ring);
}

.discover-cell:not(.soon):active {
  background: var(--accent-soft);
  transform: scale(0.97);
}

.discover-cell:not(.soon) .discover-cell-label {
  color: var(--text);
  font-weight: 600;
}

.discover-cell:not(:nth-child(4n))::after {
  content: '';
  position: absolute;
  right: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: var(--line-strong);
}

.discover-cell.soon {
  opacity: 0.72;
}

.discover-cell.soon:active {
  background: var(--bg2);
  transform: scale(0.97);
}

.discover-cell.soon .discover-cell-icon {
  color: var(--text-3);
  background: var(--bg1);
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
}

.discover-cell-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text-2);
}

.discover-cell-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discover-cell-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.discover-section {
  margin: 0;
}

.discover-menu .settings-item {
  border-radius: 0;
}

.discover-menu .settings-item:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.discover-menu .settings-item:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* 旧版模块卡片（保留兼容） */
.module-card {
  text-align: left;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: var(--shadow);
}

.module-card:active {
  background: var(--bg1);
}

.module-card.soon {
  opacity: 0.72;
}

.module-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}

.module-icon.mint,
.module-icon.violet,
.module-icon.warn {
  background: var(--accent-soft);
  color: var(--accent);
}

.module-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.module-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
}

.module-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.module-tag.soon {
  color: var(--text-3);
  background: var(--bg1);
  border-color: var(--line);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(240, 90, 37, 0.25);
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
}

.profile-section-label {
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
}

.profile-recovery-card {
  padding: 14px 16px;
  margin-bottom: 8px;
}

.profile-recovery-card .hint {
  margin: 0 0 12px;
}

.settings-list {
  display: grid;
  gap: 8px;
}

.settings-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  box-shadow: var(--shadow);
}

.settings-item-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.settings-item-main {
  flex: 1;
  min-width: 0;
}

.settings-item-badge {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.web-account-card {
  display: block;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  box-shadow: var(--shadow);
  text-align: left;
  color: var(--text);
}

.web-account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.web-account-label {
  font-size: 13px;
  font-weight: 600;
  color: #9a3412;
}

.web-account-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.web-account-balance {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: #c2410c;
  margin-bottom: 6px;
}

.web-account-meta {
  font-size: 12px;
  color: #9a3412;
  opacity: 0.85;
}

.share-page {
  padding-top: 8px;
}

.share-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.share-qr-wrap canvas {
  display: block;
  border-radius: 8px;
}

.share-actions {
  margin-bottom: 16px;
}

.share-rules {
  padding: 14px 16px;
}

.share-rules-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.share-rules-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
}

.share-rules-list li + li {
  margin-top: 6px;
}

.web-summary {
  padding: 18px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: #fed7aa;
}

.web-summary-label {
  font-size: 13px;
  color: #9a3412;
  font-weight: 600;
}

.web-summary-balance {
  margin: 8px 0 6px;
  font-size: 36px;
  font-weight: 800;
  color: #c2410c;
  line-height: 1.1;
}

.web-summary-stats {
  font-size: 12px;
  color: #9a3412;
}

.web-ledger-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.web-ledger-list {
  display: grid;
  gap: 8px;
}

.web-ledger-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.web-ledger-main {
  min-width: 0;
  flex: 1;
}

.web-ledger-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.web-ledger-remark {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.web-ledger-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

.web-ledger-delta {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.web-ledger-delta.plus {
  color: #16a34a;
}

.web-ledger-delta.minus {
  color: #dc2626;
}

.settings-item.danger {
  color: var(--danger);
}

.btn-logout {
  width: 100%;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(229, 57, 53, 0.28);
  background: #fff;
  color: var(--danger);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn-logout:active {
  background: rgba(229, 57, 53, 0.06);
}

.btn-logout i {
  font-size: 14px;
  opacity: 0.9;
}

.settings-val {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.result-block {
  margin-top: 14px;
}

.result-card {
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.result-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.result-row:first-of-type {
  border-top: 0;
}

.result-row .k {
  color: var(--text-3);
  flex-shrink: 0;
}

.result-row .v {
  color: var(--text);
  text-align: right;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 12px;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.score-pill.ok {
  background: rgba(46, 125, 50, 0.1);
  color: var(--ok);
}

.score-pill.warn {
  background: var(--accent-soft);
  color: var(--accent);
}

.score-pill.danger {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

.findings {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.finding {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg1);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
}

.about-lines p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.about-lines strong {
  color: var(--text);
}

/* —— 关于 WeBox —— */
.about-page {
  padding-top: 4px;
}

.about-hero {
  padding: 18px 16px 16px;
  margin-bottom: 20px;
  background: linear-gradient(160deg, #fff7ed 0%, #ffffff 55%);
  border-color: #fed7aa;
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.about-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.about-logo img,
.about-logo svg {
  width: 52px;
  height: 52px;
  display: block;
}

.about-name {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-tagline {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.about-intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-section {
  margin-bottom: 22px;
}

.about-section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.about-feature-list {
  display: grid;
  gap: 10px;
}

.about-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
}

.about-feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.about-feature-icon.vault {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}

.about-feature-icon.org {
  color: #6d28d9;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
}

.about-feature-icon.web {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.about-feature-icon.backup {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.about-feature-body {
  min-width: 0;
}

.about-feature-body h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.about-feature-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.about-security {
  padding: 14px 16px;
}

.about-security-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-security-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.about-security-list li + li {
  margin-top: 10px;
}

.about-security-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.about-security-list strong {
  color: var(--text);
  font-weight: 600;
}

.about-principles {
  display: grid;
  gap: 10px;
}

.about-principle-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.about-principle-num {
  flex-shrink: 0;
  width: 28px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1.4;
}

.about-principle-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  color: var(--text);
}

.about-principle-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
}

.about-footer {
  margin-top: 8px;
  padding: 18px 0 8px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.about-version {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.about-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.about-copy {
  margin: 0;
  font-size: 11px;
}

.guest-card {
  padding: 28px 20px;
  margin-top: 8px;
}

.guest-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.guest-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  color: var(--accent);
}

.guest-slogan {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.35;
}

.guest-slogan span:first-child {
  color: var(--accent);
}

.recovery-box {
  background: var(--bg1);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  word-break: break-word;
  color: var(--text);
  margin: 12px 0 8px;
}

.recovery-box.recovery-code {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  line-height: 1.4;
  padding: 22px 16px;
  color: var(--accent);
  border-style: solid;
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.step-dot.on {
  background: var(--accent);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal-mask.show {
  display: flex;
}

.sheet {
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px 20px 16px 16px;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  box-shadow: var(--shadow-lg);
  animation: sheetIn 0.28s ease;
  max-height: min(88dvh, 720px);
  overflow: auto;
}

.sheet.sheet-compact {
  border-radius: 18px;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  max-height: min(70dvh, 480px);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sheet-head-text {
  min-width: 0;
  flex: 1;
}

.sheet-head-text h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-meta {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-3);
}

.sheet-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 13px;
}

@keyframes sheetIn {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.sheet h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.sheet .desc {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 16px;
}

.secret-view {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  user-select: text;
  -webkit-user-select: text;
  max-height: 40vh;
  overflow: auto;
}

.btn-mini {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg1);
  border: 1px solid var(--line);
}

.btn-mini.danger {
  color: var(--danger);
  background: rgba(229, 57, 53, 0.08);
  border-color: rgba(229, 57, 53, 0.2);
}

.settings-list + .card,
.card select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 14px;
  outline: none;
  color: inherit;
  appearance: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 80;
  max-width: min(360px, calc(100% - 32px));
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  display: none;
  place-items: center;
  z-index: 90;
  padding: 24px;
}

.loading-overlay.show {
  display: grid;
}

.loader-card {
  width: min(300px, 100%);
  text-align: center;
  padding: 28px 22px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.ring {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.loader-card p {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}

.chip-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.chip.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
  margin: 12px 0 4px;
}

.check-row input {
  margin-top: 3px;
}

.linkish {
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}

.muted {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
}

.hr {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg1);
  color: var(--text-3);
}

.chain-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  font-weight: 600;
}

/* —— 子页面（账户设置、关于等） —— */
.sub-page {
  padding: 0 16px calc(24px + var(--safe-bottom));
  max-width: 560px;
  margin: 0 auto;
}

/* —— 数据备份页 —— */
.backup-page {
  padding: 0 16px calc(24px + var(--safe-bottom));
  max-width: 560px;
  margin: 0 auto;
}

.backup-actions {
  margin: 0 0 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.backup-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.backup-actions-row .btn {
  margin: 0;
  min-height: 44px;
  font-size: 14px;
}

.backup-meta {
  text-align: center;
  margin: 10px 0 0;
  font-size: 11px;
}

.backup-lead {
  margin: 6px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-3);
}

.backup-guide {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.backup-guide-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.backup-fold {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  margin-bottom: 8px;
  overflow: hidden;
}

.backup-fold summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.backup-fold summary::-webkit-details-marker {
  display: none;
}

.backup-fold summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-top: -3px;
}

.backup-fold[open] summary::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.backup-fold[open] summary {
  border-bottom: 1px solid var(--line);
}

.backup-tips {
  margin: 0;
  padding: 10px 14px 12px 30px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
}

.backup-tips.plain,
.backup-tips.warn {
  list-style: disc;
  padding-left: 28px;
}

.backup-tips.warn {
  color: #d4b48a;
}

.backup-tips b {
  color: var(--text);
  font-weight: 600;
}

.backup-tips code,
.backup-dl code,
.backup-note code {
  font-family: var(--mono);
  font-size: 11px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--bg1);
  color: var(--accent);
}

.backup-dl {
  margin: 0;
  padding: 10px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.backup-dl > div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 8px;
  align-items: baseline;
}

.backup-dl dt {
  margin: 0;
}

.backup-dl dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}

.backup-note {
  margin: 0 14px 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--accent);
}

/* —— 保险箱 / 编辑 / 备份：主题色同步 —— */
#panel-vault .btn-primary,
#panel-item .btn-primary,
#panel-backup .btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240, 90, 37, 0.28);
}

#panel-vault .btn-primary:active,
#panel-item .btn-primary:active,
#panel-backup .btn-primary:active {
  background: var(--accent-2);
}

#panel-vault .empty .big img {
  opacity: 1;
}

#panel-item .item-editor.card {
  border-color: var(--line);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

#panel-backup .btn-secondary {
  border-color: var(--line-strong);
  color: var(--text);
}

#panel-backup .btn-secondary:active {
  background: var(--bg1);
}

/* —— HappyGo 商城订单（列表页） —— */
#panel-mall-orders.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#panel-mall-orders .item-topbar {
  align-items: center;
  flex-shrink: 0;
}

#panel-mall-orders .item-top-main .title {
  margin-bottom: 2px;
}

#panel-mall-orders .topbar-action {
  align-self: center;
  margin-top: 0;
}

#panel-mall-orders .mall-orders-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 calc(8px + var(--safe-bottom));
}

#panel-mall-orders .mall-orders-lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

#panel-mall-orders .mall-orders-list-host {
  flex: 1;
  min-height: 0;
}

#panel-mall-orders .mall-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

#panel-mall-orders .mall-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#panel-mall-orders .mall-row-tap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  padding: 14px 4px 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#panel-mall-orders .mall-row-tap:active {
  background: var(--bg1);
}

#panel-mall-orders .mall-row-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

#panel-mall-orders .mall-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

#panel-mall-orders .mall-row-name {
  display: block;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-mall-orders .mall-row-desc {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-mall-orders .mall-row-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#panel-mall-orders .mall-row-fetch {
  flex-shrink: 0;
  align-self: center;
  width: auto;
  min-width: 68px;
  height: 36px;
  margin-right: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(240, 90, 37, 0.22);
  cursor: pointer;
}

#panel-mall-orders .mall-row-fetch:active {
  transform: scale(0.97);
  background: var(--accent-2);
}

#panel-mall-orders .mall-row-fetch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#panel-mall-orders .mall-orders-empty {
  padding: 48px 20px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#panel-mall-orders .mall-orders-empty-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}

#panel-mall-orders .mall-orders-empty-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

#panel-mall-orders .mall-orders-empty-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

#panel-mall-orders .mall-orders-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 32%);
}

#panel-mall-orders .mall-orders-fetch-all {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--text-2);
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
  cursor: pointer;
}

#panel-mall-orders .mall-orders-fetch-all:active {
  background: var(--bg1);
  transform: scale(0.99);
}

#panel-mall-orders .mall-orders-auto-hint {
  flex-shrink: 0;
  margin: 0;
  padding: 0 4px 4px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-3);
}

.mall-link-detail-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mall-link-del-top {
  flex-shrink: 0;
  align-self: center;
  font-size: 13px;
  color: #b91c1c;
  background: none;
  border: none;
  padding: 4px 0;
}

#panel-mall-link .item-topbar {
  align-items: center;
}

#panel-mall-link .item-top-main .title {
  margin-bottom: 2px;
}

.mall-link-empty {
  padding: 20px 16px;
  text-align: center;
}

.mall-link-card {
  padding: 14px 16px 16px;
}

.mall-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
}

.mall-link-head .btn-text {
  font-size: 13px;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 4px 0;
}

.mall-link-field {
  margin-bottom: 10px;
}

.mall-link-wallet {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}

.mall-link-wallet.is-missing {
  border-color: #fca5a5;
  color: #b91c1c;
}

.mall-link-store-filter,
.mall-link-store-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 15px;
  background: #fff;
}

.mall-link-store-filter {
  margin-bottom: 8px;
}

.mall-link-store-filter:disabled,
.mall-link-store-select:disabled {
  background: var(--bg1);
  color: var(--text-3);
}

.mall-link-load-stores {
  width: 100%;
  margin-top: 8px;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.mall-link-load-more {
  width: 100%;
  margin-top: 10px;
}

.mall-link-end {
  margin: 10px 0 0;
  font-size: 12px;
  text-align: center;
}

.mall-link-store {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 15px;
}

.mall-link-query {
  width: 100%;
  margin-top: 4px;
}

.mall-link-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mall-link-result-meta {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
}

.mall-link-result .mall-order-list {
  gap: 8px;
}

.mall-link-result .mall-order-card {
  box-shadow: none;
  border: 1px solid var(--line);
}

.mall-order-meta {
  margin: 10px 0 0;
  font-size: 12px;
}

.mall-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mall-order-empty {
  padding: 24px 16px;
  text-align: center;
}

.mall-order-card {
  padding: 0;
  overflow: hidden;
}

.mall-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
}

.mall-order-no {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-3);
}

.mall-order-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
}

.mall-order-items {
  padding: 0 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mall-order-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mall-order-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg1);
  flex-shrink: 0;
}

.mall-order-thumb.ph {
  background: var(--bg1);
}

.mall-order-item-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mall-order-item-qty {
  font-size: 12px;
  color: var(--text-3);
}

.mall-order-form {
  margin: 0 14px 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg1);
}

.mall-order-form-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  font-size: 12px;
  line-height: 1.5;
}

.mall-order-form-row span:first-child {
  color: var(--text-3);
  flex-shrink: 0;
}

.mall-order-form-row span:last-child {
  text-align: right;
  word-break: break-all;
  color: var(--text-2);
}

.mall-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}

.mall-order-foot strong {
  font-size: 14px;
  color: var(--accent);
}

.hg-wallet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

.hg-wallet-pick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.hg-wallet-pick-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg1);
  font-size: 18px;
}

.hg-wallet-pick-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hg-wallet-pick-body strong {
  font-size: 15px;
  color: var(--text);
}

.hg-wallet-pick-body span {
  font-size: 12px;
  color: var(--text-3);
}

/* 授权设备页 */
.devices-page {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.devices-hero {
  padding: 18px 16px 16px;
  margin-bottom: 0;
  background: linear-gradient(160deg, #fff7ed 0%, #ffffff 55%);
  border-color: #fed7aa;
}

.devices-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.devices-hero-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  color: #c2410c;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  box-shadow: 0 2px 8px rgba(240, 90, 37, 0.08);
}

.devices-hero-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.devices-hero-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.devices-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.devices-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fed7aa;
}

.devices-hero-pill i {
  font-size: 10px;
  opacity: 0.85;
}

.devices-pending-block {
  padding: 16px;
  background: linear-gradient(160deg, #fffbeb 0%, #ffffff 70%);
  border-color: #fde68a;
}

.devices-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.devices-pending-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.devices-pending-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.devices-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.devices-pending-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.device-pending-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.device-pending-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.device-pending-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
  color: #c2410c;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
}

.device-pending-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-pending-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.device-pending-meta {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
}

.device-pending-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg1);
  border: 1px dashed var(--line-strong);
}

.device-pending-code-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.device-pending-code-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.device-pending-approve {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.devices-pending-tip {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.devices-code-details {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}

.devices-code-details summary {
  cursor: pointer;
  color: var(--text-2);
  font-weight: 500;
  padding: 4px 0;
  list-style: none;
}

.devices-code-details summary::-webkit-details-marker {
  display: none;
}

.devices-code-details summary::before {
  content: '▸ ';
  color: var(--text-3);
}

.devices-code-details[open] summary::before {
  content: '▾ ';
}

.devices-code-details[open] .devices-code-field {
  margin-top: 10px;
}

.devices-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.devices-code-row input {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.devices-all-section {
  margin-bottom: 0;
}

.devices-list {
  display: grid;
  gap: 10px;
}

.device-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.device-row.device-row-no-action {
  grid-template-columns: 40px minmax(0, 1fr);
}

.device-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-3);
  background: var(--bg1);
  border: 1px solid var(--line);
}

.device-row-icon.is-trusted {
  color: #c2410c;
  background: var(--accent-soft);
  border-color: var(--accent-ring);
}

.device-row.is-current {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.device-row.is-current .device-row-icon {
  color: #c2410c;
  background: var(--accent-soft);
  border-color: var(--accent-ring);
}

.device-row.is-revoked {
  opacity: 0.55;
}

.device-row-main {
  min-width: 0;
  overflow: hidden;
}

.device-row-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.device-row-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
}

.device-row-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: break-word;
}

.device-row-main strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  word-break: normal;
  overflow-wrap: break-word;
}

.device-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.device-revoke {
  flex-shrink: 0;
}

.devices-trust {
  margin-top: 0;
  padding: 16px 14px 10px;
}

.devices-limit-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.device-pending-approve:disabled,
.devices-code-row .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.devices-trust-list {
  margin-bottom: 0;
}

