/* =========================================================
   关于本机 · local PWA
   Design canvas: 440 × 956 pt (the reference iPhone screen)
   ========================================================= */

@font-face {
  font-family: "SF Pro Text";
  src: local("SF Pro Text"), url("assets/fonts/SF-Pro-Text-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Text";
  src: local("SF Pro Text"), url("assets/fonts/SF-Pro-Text-Semibold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PingFang SC";
  src: local("PingFang SC"), url("assets/fonts/PingFangSC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PingFang SC";
  src: local("PingFang SC"), url("assets/fonts/PingFangSC-Semibold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas-w: 440px;
  --canvas-h: 956px;
  --bg: #f3f2f7;
  --card: #ffffff;
  --ink: #000000;
  --muted: #8e8e93;
  --muted-2: #6c6c70;
  --separator: #e9e9e9;
  --chevron: #c7c7cc;
  --blue: #007aff;
  --blue-dark: #0066d6;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff3b30;
  --nav-h: 86px;
  --row-h: 57.33px;
  --side: 20px;
  --card-radius: 26px;
  --font: "SF Pro Text", "PingFang SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f3f2f7;
}

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

button,
input,
select,
textarea {
  font-family: var(--font);
  font-size: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.7);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  inset: 0;
  background: #f3f2f7;
  overflow: hidden;
}
.ambient::after {
  display: none;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.device-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 458px;
  height: 974px;
  transform: translate(-50%, -50%);
}

.device-shell {
  width: 458px;
  height: 974px;
  padding: 9px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: center center;
  will-change: transform;
}

.device {
  position: relative;
  width: var(--canvas-w);
  height: var(--canvas-h);
  overflow: hidden;
  border-radius: 54px;
  background: var(--bg);
  isolation: isolate;
}

.screen-page {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--bg);
}
.screen-page.is-active {
  display: block;
}

/* ======================= Navigation ======================= */
.nav-header {
  position: absolute;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(243, 242, 247, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}
.nav-back {
  position: absolute;
  left: 19px;
  top: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111114;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.045),
    0 2px 8px rgba(0, 0, 0, 0.055);
  transition: transform 0.15s ease, background 0.15s ease;
}
.nav-back:active {
  transform: scale(0.94);
  background: rgba(238, 238, 242, 0.94);
}
.nav-back svg {
  width: 12.5px;
  height: 20px;
  display: block;
  transform: translate(-1.5px, -0.5px);
}
.nav-back path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-title {
  position: absolute;
  top: 25px;
  left: 100px;
  right: 100px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-text-btn {
  position: absolute;
  right: 20px;
  top: 25px;
  height: 44px;
  padding: 0 2px;
  color: var(--blue);
  font-size: 16px;
  line-height: 44px;
}
/* ======================= Shared groups ======================= */
.group {
  margin: 0 var(--side);
  overflow: hidden;
  background: var(--card);
  border-radius: var(--card-radius);
}
.group-gap {
  margin-top: 35px;
}

.row {
  position: relative;
  width: 100%;
  min-height: var(--row-h);
  height: var(--row-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  text-align: left;
}
.row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 0.5px;
  background: var(--separator);
  transform: scaleY(0.75);
  transform-origin: bottom;
}
.row.has-chevron {
  padding-right: 20px;
}
.row-label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 62%;
  font-size: 17px;
  line-height: 22px;
  font-weight: 400;
  letter-spacing: -0.18px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-value {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  padding-left: 12px;
  max-width: 67%;
  font-size: 17px;
  line-height: 22px;
  font-weight: 400;
  letter-spacing: -0.16px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.chevron {
  flex: none;
  width: 7px;
  height: 12px;
  margin-left: 12px;
  color: var(--chevron);
}
.chevron path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.row-static .chevron {
  margin-left: auto;
}
.section-label {
  margin: 31.5px var(--side) 6.5px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  letter-spacing: 0.1px;
  color: var(--muted);
}
.section-label span {
  display: inline-block;
}

/* Editable affordance: intentionally invisible at rest to preserve the iOS look */
.about-page.is-editing [data-edit-key],
.battery-page.is-editing [data-edit-key] {
  cursor: pointer;
}
.about-page.is-editing [data-edit-key] .row-value,
.about-page.is-editing .section-label span,
.battery-page.is-editing [data-edit-key] .row-value,
.battery-page.is-editing .battery-note [data-edit-key] {
  transition: color 0.16s ease;
}
@media (hover: hover) {
  .about-page.is-editing [data-edit-key]:hover,
  .battery-page.is-editing .row[data-edit-key]:hover {
    background: rgba(0, 122, 255, 0.035);
  }
  .about-page.is-editing [data-edit-key]:hover .row-value,
  .battery-page.is-editing [data-edit-key]:hover .row-value,
  .battery-page.is-editing .battery-note [data-edit-key]:hover {
    color: var(--blue);
  }
}
.about-page.is-editing [data-edit-key]:active,
.battery-page.is-editing .row[data-edit-key]:active {
  background: rgba(0, 122, 255, 0.055);
}

/* ======================= About ======================= */
.about-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 98px;
  padding-bottom: 30px;
  scrollbar-width: none;
}
.about-scroll::-webkit-scrollbar,
.page-scroll::-webkit-scrollbar,
.settings-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.about-end-space {
  height: 72px;
}

/* ======================= Battery health ======================= */
.battery-scroll {
  padding-top: 108px;
}
.battery-note {
  margin: 9px 40px 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: -0.04px;
}
.battery-note [data-edit-key] {
  border-radius: 4px;
}
.battery-link {
  color: var(--blue);
}
.battery-end-space {
  height: 80px;
}

/* ======================= Settings ======================= */
.settings-header {
  position: absolute;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: rgba(243, 242, 247, 0.84);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}
.settings-header h1 {
  position: absolute;
  left: 20px;
  top: 28px;
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: -0.85px;
}
.settings-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 104px 0 30px;
  scrollbar-width: none;
}

.profile-card {
  height: 84px;
  padding: 15px 17px 15px 16px;
  display: flex;
  align-items: center;
}
.profile-avatar {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  background:
    radial-gradient(120% 120% at 20% 0%, #ffd0a8 0%, #ff9f8d 38%, #e877a9 70%, #b66cd9 100%);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.profile-copy {
  margin-left: 13px;
  min-width: 0;
  flex: 1;
}
.profile-name {
  font-size: 20px;
  line-height: 25px;
  font-weight: 500;
  letter-spacing: -0.35px;
}
.profile-card .chevron {
  margin-left: 8px;
}

.permission-card {
  margin-top: 24px;
  padding: 19px 19px 18px;
}
.permission-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}
.permission-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0a84ff, #0060df);
  box-shadow: 0 4px 12px rgba(0, 100, 255, 0.22);
}
.permission-icon.is-active {
  background: linear-gradient(160deg, #37d567, #1aaa49);
  box-shadow: 0 4px 12px rgba(40, 190, 90, 0.2);
}
.permission-icon svg {
  width: 25px;
  height: 25px;
  color: #fff;
}
.permission-icon path,
.permission-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.permission-copy {
  display: block;
  min-width: 0;
  flex: 1;
}
.permission-title {
  display: block;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.25px;
}
.permission-badge {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: #707077;
  background: #f0f0f3;
}
.permission-badge.is-active {
  color: #16853a;
  background: rgba(52, 199, 89, 0.13);
}
.permission-action {
  width: 100%;
  height: 45px;
  margin-top: 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--blue);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.15s ease;
}
.permission-action:active {
  background: var(--blue-dark);
  transform: scale(0.985);
}
.permission-countdown {
  margin-top: 17px;
  font-size: 34px;
  line-height: 41px;
  font-weight: 600;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.permission-countdown.is-long {
  font-size: 27px;
  letter-spacing: -0.7px;
}
.permission-actions {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}
.permission-actions button {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}
.permission-actions .secondary {
  color: var(--blue);
  background: rgba(0, 122, 255, 0.09);
}
.permission-actions .secondary:active {
  background: rgba(0, 122, 255, 0.15);
}
.permission-actions .primary {
  color: #fff;
  background: var(--blue);
}
.permission-actions .primary:active {
  background: var(--blue-dark);
}

.settings-group {
  margin-top: 24px;
}
.row-button {
  background: transparent;
}
.row-button:active {
  background: #f2f2f5;
}
.row-label.destructive {
  color: var(--red);
}
.mini-icon {
  flex: none;
  width: 29px;
  height: 29px;
  margin-right: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.install-icon {
  background: linear-gradient(160deg, #5e9cff, #0a6cff);
}
.mini-icon svg {
  width: 18px;
  height: 18px;
}
.install-icon path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-end-space {
  height: 50px;
}

/* ======================= Page scroll (redeem) ======================= */
.page-scroll {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 98px;
  padding-bottom: 30px;
  scrollbar-width: none;
}

/* ======================= Redeem ======================= */
.redeem-card {
  margin: 12px 20px 0;
  padding: 25px 20px 20px;
  background: var(--card);
  border-radius: var(--card-radius);
  text-align: center;
}
.redeem-art {
  width: 66px;
  height: 66px;
  margin: 0 auto 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(120% 120% at 20% 0%, #66b2ff 0%, #0a84ff 45%, #005bd4 100%);
  box-shadow: 0 8px 22px rgba(0, 106, 255, 0.23);
}
.redeem-art.is-success {
  background: radial-gradient(120% 120% at 20% 0%, #76e697 0%, #30c95b 45%, #189a3d 100%);
  box-shadow: 0 8px 22px rgba(45, 190, 90, 0.22);
}
.redeem-art svg {
  width: 35px;
  height: 35px;
}
.redeem-art path,
.redeem-art circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.redeem-art.is-success path {
  stroke-width: 2.4;
}
.redeem-title {
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.redeem-sub {
  max-width: 315px;
  margin: 7px auto 0;
  font-size: 13.5px;
  line-height: 20px;
  color: var(--muted);
  letter-spacing: -0.06px;
}
.code-field-wrap {
  position: relative;
  margin-top: 20px;
}
.code-input {
  width: 100%;
  height: 55px;
  padding: 0 14px;
  border: 1px solid #dddde2;
  border-radius: 14px;
  background: #fafafc;
  text-align: center;
  font-size: 19px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 1.6px;
  font-variant-numeric: tabular-nums;
  outline: none;
  text-transform: uppercase;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.code-input::placeholder {
  color: #b8b8bf;
  font-size: 15px;
  letter-spacing: 1.15px;
  font-weight: 400;
}
.code-input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(0, 122, 255, 0.1);
}
.redeem-submit {
  width: 100%;
  height: 49px;
  margin-top: 13px;
  border-radius: 14px;
  color: #fff;
  background: var(--blue);
  font-size: 16.5px;
  font-weight: 500;
  transition: background 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}
.redeem-submit:active:not(:disabled) {
  transform: scale(0.985);
  background: var(--blue-dark);
}
.redeem-submit:disabled {
  background: #b9dcff;
  color: rgba(255, 255, 255, 0.9);
  cursor: default;
}
.redeem-error {
  margin: 10px 3px 0;
  font-size: 12.5px;
  line-height: 17px;
  color: var(--red);
  text-align: left;
}
.shake {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.redeem-info {
  margin: 20px 20px 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}
.info-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 5px 0;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--muted-2);
}
.info-row svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: #9b9ba1;
}
.info-row path,
.info-row circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.redeem-end-space {
  height: 30px;
}

.redeem-active-card {
  margin: 12px 20px 0;
  padding: 25px 20px 20px;
  background: var(--card);
  border-radius: var(--card-radius);
  text-align: center;
}
.active-code-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  max-width: 100%;
  margin-top: 12px;
  padding: 0 11px;
  border-radius: 9px;
  background: #f2f2f5;
  color: #6c6c70;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.active-countdown-label {
  margin-top: 22px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.7px;
  color: var(--muted);
}
.active-countdown {
  margin-top: 3px;
  font-size: 42px;
  line-height: 50px;
  font-weight: 600;
  letter-spacing: -1.8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.active-countdown.is-long {
  font-size: 33px;
  letter-spacing: -1.2px;
}
.active-expiry {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--muted);
}
.active-progress {
  position: relative;
  height: 6px;
  margin: 19px 2px 0;
  border-radius: 4px;
  overflow: hidden;
  background: #ededf0;
}
.active-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #34c759, #62d97d);
  transition: width 0.8s linear;
}
.active-meta-grid {
  display: flex;
  margin-top: 19px;
  padding: 13px 0;
  border-top: 0.5px solid var(--separator);
  border-bottom: 0.5px solid var(--separator);
}
.active-meta-grid > div {
  flex: 1;
}
.active-meta-grid > div + div {
  border-left: 0.5px solid var(--separator);
}
.active-meta-key {
  font-size: 11.5px;
  line-height: 15px;
  color: var(--muted);
}
.active-meta-value {
  margin-top: 3px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
}
.redeem-active-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.redeem-active-actions button {
  flex: 1;
  height: 44px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 500;
}
.redeem-active-actions .ghost {
  color: var(--blue);
  background: rgba(0, 122, 255, 0.09);
}
.redeem-active-actions .solid {
  color: #fff;
  background: var(--blue);
}
.redeem-note {
  margin: 16px 36px 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 17px;
  color: #a2a2a8;
}

/* ======================= Overlay / alerts / sheet ======================= */
.overlay-root {
  position: absolute;
  z-index: 500;
  inset: 0;
  pointer-events: none;
}
.overlay-root:not(:empty) {
  pointer-events: auto;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: overlay-in 0.18s ease;
}
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.alert {
  width: 300px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(250, 250, 252, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  text-align: center;
  animation: alert-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes alert-in {
  from { transform: scale(1.08); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.alert-heading {
  padding: 20px 20px 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.alert-message {
  padding: 5px 20px 17px;
  font-size: 13px;
  line-height: 18px;
  color: #66666c;
  letter-spacing: -0.05px;
}
.alert-input-wrap {
  padding: 0 16px 17px;
}
.alert-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d6d6db;
  border-radius: 9px;
  background: #fff;
  text-align: center;
  font-size: 17px;
  letter-spacing: 2px;
  outline: none;
}
.alert-input:focus {
  border-color: var(--blue);
}
.alert-error {
  padding: 0 17px 13px;
  margin-top: -8px;
  text-align: left;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--red);
}
.alert-actions {
  display: flex;
  border-top: 0.5px solid #d7d7db;
}
.alert-actions button {
  flex: 1;
  height: 45px;
  color: var(--blue);
  font-size: 17px;
}
.alert-actions button + button {
  border-left: 0.5px solid #d7d7db;
}
.alert-actions button.bold {
  font-weight: 600;
}
.alert-actions button.destructive {
  color: var(--red);
}
.alert-actions button:active {
  background: rgba(0, 0, 0, 0.045);
}

.overlay.sheet-overlay {
  align-items: flex-end;
  padding: 0;
  background: rgba(0, 0, 0, 0.3);
}
.sheet {
  width: 100%;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.19);
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.85, 0.25, 1);
  padding-bottom: 20px;
}
@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-grabber {
  width: 36px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: #d3d3d7;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 10px;
}
.sheet-head h2 {
  font-size: 18px;
  line-height: 23px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.sheet-head button {
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
}
.sheet-sub {
  margin: -4px 20px 10px;
  font-size: 11.5px;
  line-height: 16px;
  color: var(--muted);
}
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 20px 4px;
  -webkit-overflow-scrolling: touch;
}
.sheet-footer {
  padding: 12px 20px 4px;
  background: linear-gradient(to bottom, rgba(243, 242, 247, 0), var(--bg) 35%);
}
.sheet-save {
  width: 100%;
  height: 47px;
  border-radius: 14px;
  color: #fff;
  background: var(--blue);
  font-size: 16px;
  font-weight: 500;
}
.sheet-save:disabled {
  background: #b8d9fb;
}
.edit-group {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.edit-group-title {
  padding: 13px 15px 2px;
  font-size: 11px;
  line-height: 15px;
  color: var(--muted);
}
.edit-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 7px 14px;
  position: relative;
}
.edit-field + .edit-field::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 0.5px;
  background: var(--separator);
}
.edit-field label {
  flex: none;
  width: 92px;
  font-size: 14px;
  line-height: 18px;
  color: #303034;
}
.edit-field input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f5f5f8;
  font-size: 14px;
  color: #111;
  outline: none;
}
.edit-field input:focus {
  background: #fff;
  box-shadow: 0 0 0 2.5px rgba(0, 122, 255, 0.17);
}
.edit-locked-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 2px 13px;
  font-size: 11.5px;
  line-height: 16px;
  color: #9b6a00;
}
.edit-locked-note svg {
  flex: none;
  width: 13px;
  height: 13px;
}

/* ======================= Toast ======================= */
.toast {
  position: absolute;
  z-index: 700;
  left: 50%;
  bottom: 90px;
  min-width: 150px;
  max-width: calc(100% - 64px);
  padding: 10px 16px;
  border-radius: 15px;
  color: #fff;
  background: rgba(32, 32, 35, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.23);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ======================= Installed PWA ======================= */
.is-standalone .nav-header {
  height: 60px;
}
.is-standalone .nav-back {
  top: 8px;
  width: 44px;
  height: 44px;
}
.is-standalone .nav-title {
  top: 0;
  height: 60px;
}
.is-standalone .nav-text-btn {
  top: 8px;
  height: 44px;
  line-height: 44px;
}
.is-standalone .about-scroll {
  padding-top: 72px;
}
.is-standalone .settings-header {
  height: 68px;
}
.is-standalone .settings-header h1 {
  top: 9px;
}
.is-standalone .settings-scroll {
  padding-top: 82px;
}
.is-standalone .page-scroll {
  padding-top: 72px;
}
.is-standalone .battery-scroll {
  padding-top: 82px;
}

/* ======================= Responsive ======================= */
@media (max-width: 560px) {
  .ambient {
    background: var(--bg);
  }
  .ambient::after {
    display: none;
  }
  .device-slot {
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    transform: none;
  }
  .device-shell {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none !important;
  }
  .device {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

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