/* ── macOS Sequoia Lock Screen & System Sheet Design ────────────────────── */
:root {
  color-scheme: dark;
  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "PingFang SC", "SUSE", "Microsoft YaHei UI", sans-serif;
  --apple-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --apple-blue: #0a84ff;
  --apple-blue-hover: #339aff;
  --apple-green: #30d158;
  --apple-red: #ff453a;
  --default-wallpaper-url: url("/assets/wallpaper-badger.jpg?v=20261201-fix2");
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --default-wallpaper-url: url("/assets/wallpaper-badger-mobile.jpg?v=20261201-fix2");
  }

  html:not([data-wallpaper="custom"]) .macos-wallpaper,
  html:not([data-wallpaper="custom"]) .macos-wallpaper__art {
    background-image: url("/assets/wallpaper-badger-mobile.jpg?v=20261201-fix2") !important;
    background-position: center 16% !important;
  }
}

html.ios-standalone {
  --safe-top: max(env(safe-area-inset-top, 0px), 26px);
}

@media (orientation: portrait) {
  html.iphone-standalone {
    --safe-top: max(env(safe-area-inset-top, 0px), 52px);
    --safe-bottom: max(env(safe-area-inset-bottom, 0px), 20px);
  }
}

html,
.macos-lockscreen {
  min-height: 100svh;
  margin: 0;
  background: #080d1c;
  color: #ffffff;
  font-family: var(--apple-font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Full-Bleed High-Res Animated Honey Badger Dawn Wallpaper ── */
.macos-wallpaper {
  position: fixed;
  inset: -18px;
  z-index: 0;
  overflow: hidden;
  background-image: var(--wallpaper-url, var(--default-wallpaper-url));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.macos-wallpaper__art {
  position: absolute;
  inset: -14px;
  background-image: var(--wallpaper-url, var(--default-wallpaper-url));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.045);
  will-change: transform;
  transition: background-image 420ms ease;
}

.badger-live-canvas {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 767px) and (orientation: portrait) {
  .macos-wallpaper,
  .macos-wallpaper__art {
    background-position: center 38%;
  }
}

.macos-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4, 8, 18, 0.28) 0%, rgba(4, 8, 18, 0.02) 32%, rgba(4, 8, 18, 0.06) 58%, rgba(4, 8, 18, 0.48) 100%);
}

/* ── Liquid Glass Optical Carrier ── */
.lg-glass {
  position: relative;
  isolation: isolate;
  background: rgba(24, 28, 42, 0.44);
  -webkit-backdrop-filter: blur(42px) saturate(190%) brightness(1.06);
  backdrop-filter: blur(42px) saturate(190%) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(0, 0, 0, 0.22),
    0 28px 72px rgba(0, 0, 0, 0.46),
    0 4px 16px rgba(0, 0, 0, 0.24);
}

.lg-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(
    165deg,
    rgba(255, 224, 166, 0.58) 0%,
    rgba(255, 255, 255, 0.16) 34%,
    rgba(255, 159, 10, 0.08) 64%,
    rgba(255, 184, 92, 0.3) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.lg-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    460px circle at var(--eg-x, 50%) var(--eg-y, 0%),
    rgba(255, 255, 255, calc(0.09 * var(--eg-boost, 0.6))),
    transparent 55%
  );
}

/* ── Top 30px macOS Translucent System Menu Bar ── */
.macos-menubar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  height: calc(36px + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 16, 28, 0.34);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  user-select: none;
}

.macos-menubar__left,
.macos-menubar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.macos-menubar__apple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.macos-menubar__apple svg {
  width: 15px;
  height: 15px;
}

.macos-menubar__item {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
}

.macos-menubar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font: 500 11.5px/1 var(--apple-font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, transform 100ms var(--ease-out);
}

.macos-menubar__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.macos-menubar__btn:active {
  transform: scale(0.96);
}

.macos-menubar__btn svg,
.macos-menubar__status svg {
  width: 14px;
  height: 14px;
}

.macos-menubar__status {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
}

.macos-menubar__clock {
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── macOS Lock Screen Stage (Hero Clock Top + Enlarged User Pod Bottom) ── */
.lockscreen-stage {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding:
    calc(68px + var(--safe-top))
    20px
    calc(46px + var(--safe-bottom));
}

.lockscreen-stage--centered {
  justify-content: center;
  padding-top: calc(52px + var(--safe-top));
}

/* Signature macOS Sonoma/Sequoia Rounded Lock Screen Clock */
.lockscreen-clock-group {
  text-align: center;
  user-select: none;
  animation: lock-enter 520ms var(--ease-out) backwards;
}

.lockscreen-date {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.lockscreen-time {
  font-family: var(--apple-rounded);
  font-size: clamp(78px, 10.8vw, 118px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 12%, rgba(255, 255, 255, 0.76) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 32px rgba(0, 0, 0, 0.32));
}

/* ── Enlarged Bottom-Center macOS Liquid Glass Login Pod ── */
.lockscreen-pod {
  width: min(100%, 468px);
  padding: 34px 36px 28px;
  border-radius: 32px;
  touch-action: pan-y;
  animation: pod-enter 460ms var(--ease-out) backwards;
}

@keyframes lock-enter {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes pod-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Phone Landscape & Compact Mobile Compatibility */
@media (max-height: 560px) and (orientation: landscape) {
  .lockscreen-stage {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: calc(38px + env(safe-area-inset-top)) 20px calc(18px + env(safe-area-inset-bottom));
  }
  .lockscreen-time {
    font-size: clamp(48px, 8vw, 72px);
  }
  .lockscreen-pod {
    padding: 20px 24px 18px;
    max-width: 390px;
  }
}

@media (pointer: coarse) {
  .lockscreen-pod,
  .macos-window-sheet,
  .lockscreen-clock-group {
    animation: none !important;
    transform: none !important;
  }

  .lockscreen-pod input,
  .lockscreen-pod select,
  .lockscreen-pod textarea,
  .macos-window-sheet input,
  .macos-window-sheet select,
  .macos-window-sheet textarea {
    font-size: 16px !important;
  }
}

.lockscreen-avatar-wrap {
  text-align: center;
  margin-bottom: 18px;
}

/* ── Honey Badger ("平头哥") Animated Minimalist Cartoon Mascot ── */
.badger-mount {
  display: flex;
  justify-content: center;
  margin-top: -12px;
  margin-bottom: 4px;
}

.badger-stage {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.badger-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-height: 26px;
  margin-bottom: 2px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 0.5px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  max-width: min(88vw, 336px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background-color 200ms ease, border-color 200ms ease;
}

.badger-bubble.is-pop {
  background: rgba(10, 132, 255, 0.34);
  border-color: rgba(100, 210, 255, 0.65);
}

.badger-svg {
  overflow: visible;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}

.badger-body-group {
  transform-origin: 90px 115px;
  animation: badger-breathe 3.4s ease-in-out infinite;
}

.badger-eyes {
  transform-origin: 90px 81px;
  animation: badger-blink 4.6s infinite;
}

.badger-ear--left {
  transform-origin: 45px 68px;
  animation: badger-ear-twitch 6.2s ease-in-out infinite;
}

.badger-ear--right {
  transform-origin: 135px 68px;
}

.badger-face-track {
  transition: transform 140ms ease-out;
}

.badger-paw {
  transition: transform 280ms cubic-bezier(0.22, 1.28, 0.36, 1);
}

.badger-paw--left {
  transform-origin: 55px 125px;
}

.badger-paw--right {
  transform-origin: 125px 125px;
}

/* Password Shy Mode: Both chubby paws spring up to cover eyes! */
.badger-stage[data-mood="shy"] .badger-paw--left {
  transform: translate(8px, -38px) rotate(26deg);
}

.badger-stage[data-mood="shy"] .badger-paw--right {
  transform: translate(-8px, -38px) rotate(-26deg);
}

/* Password Peek Mode: Right paw lowers slightly to peek with one eye! */
.badger-stage[data-mood="peek"] .badger-paw--left {
  transform: translate(8px, -38px) rotate(26deg);
}

.badger-stage[data-mood="peek"] .badger-paw--right {
  transform: translate(-2px, -16px) rotate(-10deg);
}

/* Cheer Bounce on Click / Submit */
.badger-stage.is-cheering .badger-body-group,
.badger-stage[data-mood="rush"] .badger-body-group {
  animation: badger-cheer 520ms cubic-bezier(0.22, 1.35, 0.36, 1);
}

/* Error Surprise */
.badger-stage[data-mood="oops"] .badger-brow--left {
  transform: translateY(-3px);
}
.badger-stage[data-mood="oops"] .badger-brow--right {
  transform: translateY(-3px);
}

@keyframes badger-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.015); }
}

@keyframes badger-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes badger-ear-twitch {
  0%, 84%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(-9deg); }
  92% { transform: rotate(4deg); }
}

@keyframes badger-cheer {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-10px) scale(1.06) rotate(-2deg); }
  70% { transform: translateY(2px) scale(0.98) rotate(2deg); }
  100% { transform: translateY(0) scale(1); }
}

/* Value Feature Tags under IP Title */
.badger-feature-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.badger-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .badger-body-group,
  .badger-eyes,
  .badger-ear--left {
    animation: none !important;
  }
}

.lockscreen-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.32);
}

.lockscreen-avatar svg {
  width: 34px;
  height: 34px;
}

.lockscreen-avatar--sm {
  width: 48px;
  height: 48px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #339aff 0%, #0066db 100%);
  border: 0;
}

.lockscreen-avatar--sm svg {
  width: 24px;
  height: 24px;
}

.lockscreen-avatar-wrap h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.lockscreen-hint {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  letter-spacing: -0.005em;
}

/* ── Enlarged macOS Frosted Capsule Inputs ── */
.lockscreen-form {
  display: grid;
  gap: 14px;
}

.macos-capsule-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.34),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.16);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.macos-capsule-field:focus-within {
  background: rgba(12, 18, 32, 0.66);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.38),
    inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.capsule-lead-icon {
  width: 20px;
  height: 20px;
  margin-left: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.65);
}

.macos-capsule-field input {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  height: auto;
  line-height: normal;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 18px 0 12px;
  background: transparent;
  color: #ffffff;
  font-size: 16.5px;
  letter-spacing: -0.006em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.macos-capsule-field--password input {
  padding-right: 98px;
}

.macos-capsule-field input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.capsule-icon-btn {
  position: absolute;
  right: 52px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, transform 100ms var(--ease-out);
}

.capsule-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.capsule-icon-btn:active {
  transform: scale(0.92);
}

.capsule-icon-btn .icon {
  width: 18px;
  height: 18px;
}

/* Iconic macOS Circular Unlock Button Inside Password Capsule */
.capsule-submit-btn {
  position: absolute;
  right: 7px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #0b132b;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition:
    background-color 150ms ease,
    transform 120ms var(--ease-out),
    opacity 150ms ease;
}

.capsule-submit-btn:hover:not(:disabled) {
  background: #ffffff;
}

.capsule-submit-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.capsule-submit-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.capsule-submit-arrow {
  width: 19px;
  height: 19px;
}

/* Bottom Pill Options Inside Pod */
.lockscreen-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 0 6px;
  font-size: 13.5px;
}

.macos-Check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  user-select: none;
}

.macos-Check-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.macos-switch-mini {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background-color 180ms ease;
}

.macos-switch-mini i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 200ms var(--ease-out);
}

.macos-Check-pill input:checked + .macos-switch-mini {
  background: var(--apple-green);
}

.macos-Check-pill input:checked + .macos-switch-mini i {
  transform: translateX(14px);
}

.lockscreen-action-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  text-decoration: none;
  transition: color 140ms ease;
}

.lockscreen-action-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ── macOS System Preference Sheet (Register & Password Change) ── */
.macos-window-sheet {
  width: min(100%, 510px);
  border-radius: 22px;
  overflow: hidden;
  animation: pod-enter 440ms var(--ease-out) backwards;
}

.macos-sheet-titlebar {
  display: flex;
  height: 40px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
}

.traffic-lights {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.traffic-lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}

.tl-red { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green { background: #28c840; }
.titlebar-spacer { width: 52px; }

.macos-sheet-body {
  padding: 26px 28px 28px;
}

.macos-sheet-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.macos-sheet-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.macos-sheet-hero p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.48;
}

/* macOS Inset Grouped Form Rows */
.macos-form-card {
  border-radius: 14px;
  background: rgba(10, 14, 26, 0.44);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.macos-form-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.macos-form-row:first-child {
  border-top: 0;
}

.macos-form-row label {
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 500;
}

.macos-form-row input {
  width: 100%;
  height: 46px;
  line-height: normal;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0 4px;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.macos-form-row input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.macos-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.macos-sheet-actions--spread {
  justify-content: space-between;
  flex-wrap: wrap;
}

.macos-btn {
  display: inline-flex;
  min-height: 38px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 0;
  font: 500 13.5px/1 var(--apple-font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 140ms ease, opacity 140ms ease;
}

.macos-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.macos-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.macos-btn--primary {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 4px 12px rgba(10, 132, 255, 0.34);
}

.macos-btn--primary:hover:not(:disabled) {
  background: var(--apple-blue-hover);
}

.macos-btn--secondary {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.macos-btn--secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Post-Registration Avatar Setup Card ── */
.avatar-setup-step[hidden] {
  display: none !important;
}

.avatar-setup-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(10, 14, 26, 0.44);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
}

.avatar-upload-ring {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  padding: 0;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, #5ac8fa 0%, #0a84ff 100%);
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.35);
  transition: transform 140ms var(--ease-out), border-color 140ms ease;
}

.avatar-upload-ring:hover {
  border-color: #ffffff;
  transform: scale(1.03);
}

.avatar-upload-ring:active {
  transform: scale(0.97);
}

.avatar-upload-preview {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
}

.avatar-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-upload-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 4px 0;
  background: rgba(8, 12, 22, 0.68);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.avatar-setup-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.avatar-setup-copy strong {
  font-size: 15.5px;
  font-weight: 600;
  color: #ffffff;
}

.avatar-setup-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12.5px;
  line-height: 1.5;
}

.avatar-setup-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.avatar-file-status {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

/* Status Banner */
.form-message {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(255, 69, 58, 0.24);
  border: 0.5px solid rgba(255, 69, 58, 0.45);
  color: #ffd2cf;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
}

.form-message[data-tone="success"],
.form-message[data-type="success"] {
  background: rgba(48, 209, 88, 0.22);
  border-color: rgba(48, 209, 88, 0.45);
  color: #c8f9d4;
}

/* ── Mobile Portrait Lockscreen: Dual Honey Badger Showcase (Scenic Top-Center + Centered Cartoon Mascot Pod Bottom) ── */
@media (max-width: 767px) and (orientation: portrait) {
  .macos-menubar__item {
    display: none;
  }

  .login-page.console-page .lockscreen-stage {
    min-height: 100svh;
    min-height: 100dvh;
    justify-content: space-between;
    gap: 8px;
    padding:
      calc(40px + var(--safe-top))
      14px
      calc(12px + var(--safe-bottom));
  }

  /* Compact clock at very top so middle scenic Honey Badger (y = 18%..48%) shines unobstructed */
  .login-page.console-page .lockscreen-date {
    font-size: 13px;
    margin-bottom: 1px;
  }

  .login-page.console-page .lockscreen-time {
    font-size: clamp(40px, 11.5vw, 50px);
    line-height: 0.94;
  }

  /* Translucent Honey Badger IP Pod nestled in the dark mountain base (y = 52%..96%) */
  .login-page.console-page .lockscreen-pod {
    width: 100%;
    max-width: 420px;
    padding: 14px 18px 15px;
    border-radius: 26px;
    background: rgba(12, 18, 34, 0.58);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
  }

  .login-page.console-page .lockscreen-avatar-wrap {
    text-align: center;
    margin-bottom: 10px;
  }

  /* Centered animated cartoon Honey Badger perched right on top of the mobile login card! */
  .login-page.console-page .badger-mount {
    margin-top: -42px;
    margin-bottom: 2px;
  }

  .login-page.console-page .badger-svg {
    width: 92px;
    height: 74px;
  }

  .login-page.console-page .badger-bubble {
    font-size: 11.5px;
    padding: 0 11px;
    min-height: 24px;
    max-height: 24px;
    margin-bottom: 2px;
    max-width: 86vw;
  }

  .login-page.console-page #signin-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(95deg, #ffffff 0%, #ffe6b3 70%, #ffb340 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .login-page.console-page .lockscreen-hint {
    margin: 3px 0 0;
    font-size: 12px;
    color: rgba(255, 244, 220, 0.84);
  }

  .login-page.console-page .badger-feature-tags {
    margin-top: 7px;
    gap: 5px;
  }

  .login-page.console-page .badger-tag {
    font-size: 10.5px;
    padding: 2px 8px;
  }

  .login-page.console-page .lockscreen-form {
    gap: 8px;
  }

  .login-page.console-page .macos-capsule-field {
    height: 45px;
  }

  .login-page.console-page .macos-capsule-field input {
    font-size: 16px;
  }

  .login-page.console-page .lockscreen-options {
    margin-top: 2px;
    font-size: 12.5px;
  }

  /* Register & Password-Change Sheets on Mobile Portrait */
  .lockscreen-stage--centered {
    justify-content: flex-end;
    padding:
      calc(46px + var(--safe-top))
      12px
      calc(12px + var(--safe-bottom));
  }

  .macos-window-sheet {
    border-radius: 24px;
    background: rgba(12, 18, 34, 0.66);
  }

  .macos-sheet-body {
    padding: 16px 16px 18px;
  }

  .macos-window-sheet .badger-svg {
    width: 88px;
    height: 70px;
  }

  .macos-form-row {
    min-height: 44px;
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .macos-form-row input {
    font-size: 16px;
  }

  .macos-btn {
    min-height: 42px;
    font-size: 14px;
  }

  .avatar-setup-card {
    flex-direction: column;
    text-align: center;
  }

  .avatar-setup-controls {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lockscreen-clock-group,
  .lockscreen-pod,
  .macos-window-sheet {
    animation: none !important;
  }
  .lg-glass::after {
    display: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .lg-glass,
  .macos-menubar {
    background: #1c1c24;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
