:root {
  color-scheme: dark;
  --bg: #0c162c;
  --card: #1c2a41;
  --card2: #15233a;
  --line: #32415a;
  --text: #edf3ff;
  --muted: #8292ad;
  --blue: #80b3ff;
  --pink: #ffb4b8;
  --danger: #ff8d95;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #070d1a;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.desktop-layout {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  gap: 54px;
  align-items: center;
}
.hidden {
  display: none !important;
}
.phone-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 80px #0008;
}
.product-intro {
  max-width: 560px;
  padding: 42px 8px;
}
.intro-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.intro-brand img {
  width: 50px;
  height: 50px;
  border-radius: 15px;
}
.intro-brand span,
.intro-brand strong {
  display: block;
}
.intro-brand span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.16em;
}
.intro-brand strong {
  margin-top: 2px;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.intro-kicker {
  margin: 38px 0 10px;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.product-intro > h1 {
  margin: 0;
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.intro-lead {
  max-width: 510px;
  margin: 22px 0 28px;
  color: #a4b2c8;
  font-size: 16px;
  line-height: 1.75;
}
.intro-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.intro-features article {
  display: flex;
  gap: 12px;
  min-height: 126px;
  padding: 17px;
  border: 1px solid #273750;
  border-radius: 17px;
  background: #101a2b;
}
.intro-features article > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}
.intro-features h2 {
  margin: 0 0 7px;
  font-size: 15px;
}
.intro-features p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
}
.intro-actions .install-action {
  margin: 0;
}
.intro-actions a {
  color: #9db7dc;
  font-size: 13px;
  text-decoration: none;
}
.intro-actions a:hover {
  color: white;
}
.intro-foot {
  margin: 24px 0 0;
  color: #617089;
  font-size: 12px;
}
.mini-nav {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
}
.mini-title {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 18px;
}
.head-actions {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.head-actions > span {
  display: none;
}
.capsule {
  color: var(--text);
  background: #101b30;
  border: 1px solid #56647a;
  border-radius: 18px;
  padding: 7px 11px;
  font-size: 12px;
}
.unlock-card {
  width: calc(100% - 40px);
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 32px 26px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 20px 60px #0003;
}
.unlock-logo {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  object-fit: cover;
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 22px 0 7px;
}
.unlock-card h1 {
  font-size: 27px;
  margin: 0 0 10px;
}
.unlock-card > p {
  color: var(--muted);
  line-height: 1.65;
}
.unlock-card .local-note {
  margin: 12px 0 0;
  text-align: center;
  color: #9fb0c8;
  font-size: 12px;
}
.text-action {
  display: block;
  margin: 8px auto 0;
  padding: 7px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
}
.install-action {
  margin-top: 10px;
}
.unlock-card label,
dialog label,
.generator-card > label {
  display: block;
  color: #aebbd0;
  font-size: 13px;
  margin: 16px 0 6px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #101c31;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
}
textarea {
  min-height: 78px;
  resize: vertical;
}
.primary,
.ghost,
.danger,
.round-add {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
}
.primary {
  background: #3175e8;
  color: white;
}
.ghost {
  background: #263650;
  color: #dce7f8;
  border: 1px solid #3a4b66;
}
.danger {
  background: #512a35;
  color: #ffbdc1;
}
.wide {
  width: 100%;
  display: block;
  text-align: center;
}
.app-view {
  min-height: calc(100dvh - 64px);
  padding-bottom: 88px;
}
.brandbar {
  height: 105px;
  display: flex;
  align-items: center;
  padding: 18px 25px;
  position: relative;
}
.brandbar > img {
  width: 57px;
  height: 57px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 14px #0004;
}
.brandbar > div:not(.more-menu) {
  margin-left: 16px;
}
.brandbar h1 {
  font-size: 36px;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.08em;
}
.brandbar p {
  margin: 7px 0 0;
  color: var(--muted);
  letter-spacing: 0.22em;
  font-size: 13px;
}
.more {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #cbd7eb;
  font-size: 25px;
  letter-spacing: 2px;
}
.more-menu {
  position: absolute;
  z-index: 20;
  right: 20px;
  top: 72px;
  background: #233149;
  border: 1px solid #40506b;
  border-radius: 14px;
  min-width: 170px;
  padding: 6px;
  box-shadow: 0 14px 40px #0007;
}
.more-menu button,
.more-menu a {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 12px;
  text-decoration: none;
  border-radius: 9px;
}
.more-menu button:hover,
.more-menu a:hover {
  background: #34435b;
}
.pane {
  padding: 8px 25px 30px;
  min-height: calc(100dvh - 257px);
}
.otp-pane {
  position: relative;
}
.otp-toolbar {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.otp-toolbar input {
  flex: 1;
}
.otp-toolbar select {
  width: 112px;
}
.token-grid {
  display: grid;
  gap: 14px;
}
.token {
  background: var(--card);
  border-radius: 17px;
  padding: 20px;
  min-height: 112px;
  box-shadow: 0 7px 20px #03071455;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
}
.token:has(.progress i[style*="width:1"]) {
  box-shadow: 0 7px 24px #6a293b40;
}
.token-top {
  display: flex;
  justify-content: space-between;
  grid-row: 1/3;
  align-items: center;
}
.token-top h3 {
  font-size: 19px;
  margin: 0 0 4px;
}
.token-top small {
  font-size: 14px;
  color: #91a1ba;
}
.token-top > div:last-child {
  position: absolute;
  right: 12px;
  top: 9px;
  opacity: 0;
  transition: 0.2s;
}
.token:hover .token-top > div:last-child {
  opacity: 1;
}
.icon-small,
.icon {
  background: transparent;
  border: 0;
  color: #9aacbf;
  font-size: 17px;
}
.code {
  grid-column: 2;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--blue);
  cursor: pointer;
  align-self: end;
  margin-left: 18px;
  white-space: nowrap;
}
.progress {
  grid-column: 2;
  width: 54px;
  height: 4px;
  background: #3b4b65;
  border-radius: 3px;
  justify-self: end;
  margin-top: 9px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--blue);
}
.token > small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  margin-top: 4px;
}
.gesture-tip {
  text-align: center;
  color: #66758d;
  font-size: 14px;
  margin: 24px 0;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 70px 20px;
}
.empty > div {
  font-size: 42px;
}
.empty h2 {
  font-size: 18px;
  color: #a7b5ca;
}
.empty p {
  font-size: 14px;
}
.otp-empty {
  padding-top: 95px;
}
.clock-icon {
  width: 68px;
  height: 68px;
  margin: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #152c4d;
  color: var(--blue);
}
.fab {
  position: fixed;
  bottom: 98px;
  left: calc(50% + min(230px, 44vw) - 64px);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: #397fea;
  color: white;
  font-size: 28px;
  box-shadow: 0 9px 28px #0007;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
}
.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.round-add {
  background: #2c72e6;
  color: white;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  font-size: 22px;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.list {
  display: grid;
  gap: 12px;
}
.password-row,
.settings-list article {
  background: var(--card);
  border-radius: 16px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.password-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.password-row h3,
.settings-list h3 {
  margin: 0 0 5px;
}
.password-row p,
.settings-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.row-actions button {
  font-size: 11px;
  padding: 7px;
}
.tool-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  color: var(--text);
  padding: 16px;
  text-align: left;
  margin-top: 14px;
}
.tool-entry span:nth-child(2) {
  flex: 1;
}
.tool-entry b,
.tool-entry small {
  display: block;
}
.tool-entry small {
  color: var(--muted);
  margin-top: 4px;
}
.tool-entry i {
  font-size: 28px;
  color: var(--muted);
}
.tool-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #292f52;
  color: #aeb5ff;
  font-style: normal;
  flex: 0 0 auto;
}
.tool-icon.blue {
  background: #193d64;
  color: #7eb8ff;
}
.tool-icon.orange {
  background: #533822;
  color: #ffc17a;
}
.tool-icon.teal {
  background: #183f42;
  color: #75d9d4;
}
.tool-icon.purple {
  background: #3c3156;
  color: #c7aaff;
}
.settings-list {
  display: grid;
  gap: 12px;
}
.settings-list article > div {
  flex: 1;
}
.settings-list select {
  width: auto;
}
.button-row {
  display: flex !important;
  gap: 6px !important;
}
.file-label {
  display: inline-block;
  font-size: 13px;
}
.file-label input {
  display: none;
}
.generator-card {
  background: var(--card);
  padding: 20px;
  border-radius: 18px;
}
.qr-tool-card,
.qr-result,
.qr-history {
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--card);
}
.qr-tool-card label {
  display: block;
  color: #aebbd0;
  font-size: 13px;
}
.qr-tool-card textarea {
  margin-top: 8px;
  min-height: 100px;
}
.qr-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.qr-count .text-action {
  margin: 0;
}
.qr-tool-card .scan-label {
  margin-top: 12px;
}
.qr-result canvas {
  display: block;
  width: min(100%, 330px);
  height: auto;
  margin: 0 auto 12px;
  border-radius: 12px;
}
.qr-result > p {
  max-height: 64px;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.qr-history-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.qr-history-item > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #193d64;
  color: var(--blue);
  font-size: 11px;
}
.qr-history-item > div {
  min-width: 0;
  flex: 1;
}
.qr-history-item b,
.qr-history-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-history-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.qr-history-item i {
  color: var(--muted);
  font-size: 22px;
}
.generated {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111d31;
  padding: 12px;
  border-radius: 13px;
}
.generated code {
  overflow-wrap: anywhere;
  flex: 1;
  color: #a9caff;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checks input {
  width: auto;
}
.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 82px;
  background: #0c162cef;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.tabbar button {
  border: 0;
  background: transparent;
  color: #72829c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tabbar button span {
  font-size: 25px;
}
.tabbar button b {
  font-size: 12px;
  font-weight: 500;
}
.tabbar button.active {
  color: var(--blue);
}
.message {
  min-height: 18px;
  color: #ffb2b2;
  font-size: 13px;
}
.floating-message {
  position: fixed;
  z-index: 30;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #17243b;
  padding: 8px 12px;
  border-radius: 12px;
  min-height: 0;
}
.floating-message:empty {
  display: none;
}
dialog {
  width: min(92vw, 440px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #41506b;
  border-radius: 22px;
  background: #152239;
  color: var(--text);
  padding: 22px;
  box-shadow: 0 30px 100px #000a;
}
dialog::backdrop {
  background: #030712bb;
}
.optional-login-note {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: #173354;
  border: 1px solid #285481;
}
.optional-login-note strong {
  color: #b9d6ff;
}
.optional-login-note p {
  margin: 7px 0 0;
  color: #9fb0c8;
  font-size: 13px;
  line-height: 1.55;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head .icon {
  font-size: 26px;
}
.or {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.inline {
  display: flex;
  gap: 8px;
}
.link-button {
  text-decoration: none;
  margin: 16px 0;
}
.scan-label {
  border: 1px dashed #52617a;
  padding: 12px;
  border-radius: 12px;
}
.scan-label input {
  border: 0;
  padding: 8px 0;
}
.back-tools {
  border: 0;
  background: transparent;
  color: var(--blue);
}
@media (max-width: 520px) {
  .mini-title {
    font-size: 15px;
  }
  .capsule {
    padding: 6px 8px;
  }
  .brandbar {
    padding-left: 22px;
    padding-right: 22px;
  }
  .pane {
    padding-left: 18px;
    padding-right: 18px;
  }
  .code {
    font-size: 20px;
  }
  .token {
    padding: 17px;
  }
  .fab {
    left: auto;
    right: 22px;
  }
  .row-actions {
    max-width: 130px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .phone-shell {
    box-shadow: none;
  }
}
@media (max-width: 900px) {
  .desktop-layout {
    display: block;
  }
  .product-intro {
    width: min(100% - 36px, 560px);
    margin: 0 auto;
    padding: 54px 0 70px;
  }
  .product-intro > h1 {
    font-size: 38px;
  }
}
@media (max-width: 520px) {
  .intro-features {
    grid-template-columns: 1fr;
  }
  .intro-features article {
    min-height: 0;
  }
}
@media (display-mode: standalone) {
  body {
    padding: 0;
  }
  .desktop-layout {
    display: block;
  }
  .product-intro {
    display: none;
  }
}
@media (min-width: 700px) {
  body {
    padding: 22px;
  }
  .phone-shell {
    width: min(100%, 480px);
    min-height: calc(100dvh - 44px);
    border-radius: 35px;
    overflow: hidden;
    border: 1px solid #2d3a52;
  }
  .app-view {
    min-height: calc(100dvh - 108px);
  }
  .tabbar {
    position: absolute;
  }
}

/* 更接近小程序原始密度：桌面端保持一部手机的视觉尺寸。 */
@media (min-width: 521px) {
  .mini-nav {
    height: 56px;
  }
  .mini-title {
    font-size: 16px;
  }
  .capsule {
    padding: 6px 10px;
    font-size: 11px;
  }
  .app-view {
    min-height: calc(100dvh - 100px);
  }
  .brandbar {
    height: 92px;
    padding: 14px 22px;
  }
  .brandbar > img {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }
  .brandbar h1 {
    font-size: 31px;
  }
  .brandbar p {
    font-size: 12px;
  }
  .pane {
    padding: 6px 22px 26px;
  }
  .token-grid {
    gap: 11px;
  }
  .token {
    min-height: 98px;
    padding: 16px;
    border-radius: 15px;
  }
  .token-top h3 {
    font-size: 17px;
  }
  .token-top small {
    font-size: 13px;
  }
  .code {
    font-size: 21px;
  }
  .tabbar {
    height: 74px;
  }
  .tabbar button span {
    font-size: 22px;
  }
  .unlock-card {
    max-width: 380px;
    padding: 26px 23px;
  }
}

/* 明亮主题：保留蓝色品牌与原有层级，只调整表面和文字对比。 */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fb;
  --card: #ffffff;
  --card2: #f8faff;
  --line: #d8e1ee;
  --text: #172033;
  --muted: #697990;
  --blue: #2767cf;
  --pink: #b94856;
  --danger: #c43f4e;
}
html[data-theme="light"],
html[data-theme="light"] body {
  background: #e9eef6;
}
html[data-theme="light"] .phone-shell {
  box-shadow: 0 20px 70px #64748b26;
}
html[data-theme="light"] .intro-lead {
  color: #52647e;
}
html[data-theme="light"] .intro-features article {
  border-color: #d7e0ed;
  background: #f8faff;
}
html[data-theme="light"] .intro-actions a {
  color: #42618c;
}
html[data-theme="light"] .intro-actions a:hover,
html[data-theme="light"] .more {
  color: #172033;
}
html[data-theme="light"] .intro-foot,
html[data-theme="light"] .gesture-tip {
  color: #6d7c92;
}
html[data-theme="light"] .capsule,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .generated {
  background: #ffffff;
}
html[data-theme="light"] .capsule {
  border-color: #c6d2e2;
}
html[data-theme="light"] .unlock-card,
html[data-theme="light"] .token {
  box-shadow: 0 12px 34px #64748b1c;
}
html[data-theme="light"] .unlock-card label,
html[data-theme="light"] dialog label,
html[data-theme="light"] .generator-card > label,
html[data-theme="light"] .qr-tool-card label,
html[data-theme="light"] .unlock-card .local-note {
  color: #5f7089;
}
html[data-theme="light"] .ghost {
  border-color: #ccd7e5;
  background: #eef3f9;
  color: #263750;
}
html[data-theme="light"] .danger {
  background: #fff0f1;
  color: #b72f40;
}
html[data-theme="light"] .more-menu {
  border-color: #d6dfeb;
  background: #ffffff;
  box-shadow: 0 16px 38px #52647e2b;
}
html[data-theme="light"] .more-menu button:hover,
html[data-theme="light"] .more-menu a:hover {
  background: #edf3fb;
}
html[data-theme="light"] .token-top small,
html[data-theme="light"] .icon-small,
html[data-theme="light"] .icon {
  color: #65758b;
}
html[data-theme="light"] .progress {
  background: #dbe4ef;
}
html[data-theme="light"] .empty h2 {
  color: #53647c;
}
html[data-theme="light"] .clock-icon {
  background: #e2edfc;
}
html[data-theme="light"] .tool-icon {
  background: #ececfc;
  color: #5759be;
}
html[data-theme="light"] .tool-icon.blue,
html[data-theme="light"] .qr-history-item > span {
  background: #e3efff;
  color: #2465c4;
}
html[data-theme="light"] .tool-icon.orange {
  background: #fff0dc;
  color: #b76415;
}
html[data-theme="light"] .tool-icon.teal {
  background: #def4f2;
  color: #167b78;
}
html[data-theme="light"] .tool-icon.purple {
  background: #eee8fb;
  color: #7554b3;
}
html[data-theme="light"] .tabbar {
  background: #f3f6fbf2;
}
html[data-theme="light"] .tabbar button {
  color: #74839a;
}
html[data-theme="light"] .floating-message {
  background: #ffffff;
  box-shadow: 0 8px 24px #64748b2b;
}
html[data-theme="light"] dialog {
  border-color: #d4deeb;
  background: #ffffff;
  box-shadow: 0 28px 80px #33415538;
}
html[data-theme="light"] dialog::backdrop {
  background: #33415566;
}
html[data-theme="light"] .optional-login-note {
  border-color: #bed8fa;
  background: #eaf3ff;
}
html[data-theme="light"] .optional-login-note strong {
  color: #1d55a4;
}
html[data-theme="light"] .optional-login-note p {
  color: #526681;
}
html[data-theme="light"] .scan-label {
  border-color: #aebed2;
}
@media (min-width: 700px) {
  html[data-theme="light"] .phone-shell {
    border-color: #d6dfeb;
  }
}
