:root {
  --bg: #fff5f5;
  --bg-end: #f8d8d8;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --pink: #d98994;
  --pink-soft: #f4c9cb;
  --purple: #eee3ec;
  --blue: #edf4f6;
  --apricot: #fff5e8;
  --text: #252a34;
  --muted: #8a8f99;
  --line: rgba(220, 150, 160, 0.28);
  --green: #8fb89a;
  --green-soft: #e5f3e0;
  --orange: #dca76d;
  --orange-soft: #fff2df;
  --red: #d9828d;
  --red-soft: #fff0f4;
  --shadow: 0 14px 34px rgba(80, 55, 70, 0.08);
  --shadow-soft: 0 8px 22px rgba(166, 112, 126, 0.10);
  --button-gradient: linear-gradient(135deg, #d98994, #c9b7d7);
  --theme-ornament: rgba(217, 137, 148, 0.16);
  --tabbar-height: 78px;
}

.theme-mist-pink {
  --bg: #fff5f5;
  --bg-end: #f8d8d8;
  --panel: rgba(255, 255, 255, 0.78);
  --pink: #d98994;
  --pink-soft: #f4c9cb;
  --purple: #eee3ec;
  --blue: #edf4f6;
  --apricot: #fff5e8;
  --line: rgba(220, 150, 160, 0.28);
  --red: #d9828d;
  --button-gradient: linear-gradient(135deg, #d98994, #c9b7d7);
  --theme-ornament: rgba(217, 137, 148, 0.16);
}

.theme-green-grape {
  --bg: #f1ffe8;
  --bg-end: #d1e4ca;
  --panel: rgba(255, 255, 245, 0.78);
  --pink: #99bf8e;
  --pink-soft: #d8f2d4;
  --purple: #d1e4ca;
  --blue: #eef8ee;
  --apricot: #fffee9;
  --line: rgba(127, 158, 120, 0.28);
  --red: #c98787;
  --button-gradient: linear-gradient(135deg, #99bf8e, #d1e4ca);
  --theme-ornament: rgba(153, 191, 142, 0.18);
}

.theme-taro-purple {
  --bg: #f7f0ff;
  --bg-end: #dcd3e8;
  --panel: rgba(255, 255, 245, 0.78);
  --pink: #b5a4cb;
  --pink-soft: #e8dff4;
  --purple: #dcd3e8;
  --blue: #f2f1f8;
  --apricot: #fffbea;
  --line: rgba(151, 131, 176, 0.28);
  --red: #cc8fa2;
  --button-gradient: linear-gradient(135deg, #b5a4cb, #efe8ae);
  --theme-ornament: rgba(181, 164, 203, 0.18);
}

.theme-fog-blue {
  --bg: #eef8fb;
  --bg-end: #c5e8ee;
  --panel: rgba(255, 255, 255, 0.78);
  --pink: #6f94c4;
  --pink-soft: #d9edf3;
  --purple: #bacbe3;
  --blue: #def1f5;
  --apricot: #f7f4e8;
  --line: rgba(111, 148, 196, 0.26);
  --red: #c98795;
  --button-gradient: linear-gradient(135deg, #6f94c4, #c5e8ee);
  --theme-ornament: rgba(111, 148, 196, 0.18);
}

.theme-milk-tea {
  --bg: #fffaf4;
  --panel: rgba(255, 255, 255, 0.88);
  --pink: #d3956b;
  --pink-soft: #fff0df;
  --purple: #f6e8d8;
  --blue: #f4eee5;
  --apricot: #ffe7d0;
  --line: #efdcca;
  --red: #e88983;
  --button-gradient: linear-gradient(135deg, #d8a878, #eca0a6);
  --theme-ornament: rgba(216, 168, 120, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: var(--koi-vh, 100svh);
  min-height: var(--koi-vh, 100svh);
  overflow: hidden;
  color: var(--text);
  background: #f6f2f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  height: var(--koi-vh, 100svh);
  min-height: var(--koi-vh, 100svh);
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  --app-max-width: 430px;
  --app-width: min(calc(100vw - 36px), var(--app-max-width));
  height: var(--koi-vh, 100svh);
  min-height: var(--koi-vh, 100svh);
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
}

.phone-frame {
  position: relative;
  width: var(--app-width);
  height: min(920px, calc(var(--koi-vh, 100svh) - 36px));
  min-height: 0;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--pink-soft) 72%, white), transparent 28%),
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--purple) 68%, white), transparent 27%),
    linear-gradient(180deg, var(--bg), var(--bg-end)),
    var(--bg);
  box-shadow: 0 26px 70px rgba(37, 42, 52, 0.14);
}

.screen {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 24px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.screen.no-tab {
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.screen.login-screen {
  padding: 0;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen.no-tab:has(.auth-login-bg) {
  padding: 0;
}

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

@media (max-width: 520px) {
  .app-shell {
    --app-width: 100vw;
    display: block;
    padding: 0;
    min-height: var(--koi-vh, 100svh);
  }

  .phone-frame {
    width: 100vw;
    height: var(--koi-vh, 100svh);
    min-height: var(--koi-vh, 100svh);
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 22px);
  }
}

.page {
  animation: page-in 160ms ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-bg {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  position: relative;
}

.auth-login-bg {
  min-height: 100%;
  height: auto;
  justify-content: flex-start;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(28px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.brand-bg::before,
.brand-bg::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.brand-bg::before {
  width: 180px;
  height: 180px;
  right: -56px;
  top: 28px;
  background: color-mix(in srgb, var(--purple) 78%, transparent);
}

.brand-bg::after {
  width: 150px;
  height: 150px;
  left: -52px;
  bottom: 96px;
  background: color-mix(in srgb, var(--pink-soft) 74%, transparent);
}

.brand-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--pink) 24%, transparent);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.splash-logo {
  margin: 0 auto 14px;
  width: 92px;
  height: 92px;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 28px 0 22px;
  text-align: center;
}

.login-brand-icon {
  width: clamp(92px, 24vw, 112px);
  height: clamp(92px, 24vw, 112px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 36px rgba(236, 132, 174, 0.18);
}

.login-brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-brand-title {
  margin: 16px 0 0;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--text);
}

.login-brand-subtitle {
  margin: 8px 0 0;
  font-size: 16px;
  color: rgba(80, 80, 95, 0.58);
}

.logo-avatar,
.login-logo,
.login-brand-icon,
.user-avatar,
.koi-app-icon,
.avatar,
.lace-avatar {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(236, 132, 174, 0.16);
}

.boot-card {
  text-align: center;
  justify-items: center;
}

.koi-loader {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 28px;
}

.koi-loader span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--button-gradient);
  animation: koi-bounce 780ms ease-in-out infinite;
  box-shadow: 0 8px 18px rgba(244, 124, 168, 0.16);
}

.koi-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.koi-loader span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes koi-bounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.58;
  }
  50% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.brand-line h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: 0;
}

.brand-line p,
.subcopy,
.muted,
.meta {
  color: var(--muted);
}

.brand-line p {
  margin: 4px 0 0;
  font-size: 14px;
}

.glass-card,
.card,
.list-card,
.member-card {
  border: 1px solid rgba(243, 221, 231, 0.78);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.glass-card {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  padding: 20px;
}

.card {
  border-radius: 22px;
  padding: 15px;
  margin-bottom: 12px;
}

.list-card {
  width: 100%;
  display: block;
  min-width: 0;
  text-align: left;
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 10px;
}

.card,
.member-card,
.stat {
  min-width: 0;
}

.member-card {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 42%, transparent), color-mix(in srgb, var(--blue) 64%, transparent)),
    var(--panel);
}

.topbar {
  min-height: 46px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.topbar-title {
  min-width: 0;
  text-align: center;
}

.topbar-title h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.topbar-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn,
.back-btn {
  width: 42px;
  height: 42px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(243, 221, 231, 0.82);
  box-shadow: var(--shadow-soft);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  color: currentColor;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-lg {
  width: 23px;
  height: 23px;
}

.icon-chip {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--pink);
  background: linear-gradient(135deg, var(--pink-soft), var(--blue));
}

.avatar-img {
  overflow: hidden;
  padding: 0;
}

.avatar-img img,
.lace-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.welcome-row,
.row,
.split-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.split-row {
  justify-content: space-between;
  min-width: 0;
}

.split-row > *,
.row > * {
  min-width: 0;
}

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

.avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: var(--button-gradient);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--pink) 18%, transparent);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 18px;
  margin-bottom: 14px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(132deg, color-mix(in srgb, var(--pink-soft) 44%, var(--panel) 56%), color-mix(in srgb, var(--purple) 42%, var(--panel) 58%) 52%, color-mix(in srgb, var(--blue) 54%, var(--panel) 46%)),
    var(--panel);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--pink) 14%, transparent);
}

.hero-card::after {
  content: "K";
  position: absolute;
  right: 16px;
  top: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 92px;
  line-height: 1;
  font-weight: 900;
}

.app-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.app-header .welcome-row {
  min-width: 0;
}

.app-header .welcome-row strong,
.app-header .welcome-row .muted {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soft-banner {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 22%, rgba(255, 255, 255, 0.86), transparent 24%),
    linear-gradient(135deg, color-mix(in srgb, var(--apricot) 58%, var(--panel) 42%), color-mix(in srgb, var(--pink-soft) 42%, var(--panel) 58%));
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: var(--shadow);
}

.soft-banner span {
  color: var(--muted);
  font-size: 13px;
}

.tri-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tri-stat-grid .stat {
  min-height: 86px;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.hero-metric {
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.54);
}

.hero-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 10px;
}

.section-head h2,
.card-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.section-head small {
  color: var(--muted);
}

.stat-grid,
.quick-grid,
.module-grid,
.mini-grid {
  display: grid;
  gap: 10px;
}

.stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  min-height: 82px;
  border-radius: 20px;
  padding: 13px;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 32%, transparent), color-mix(in srgb, var(--blue) 38%, transparent)),
    color-mix(in srgb, var(--panel) 86%, white 14%);
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  box-shadow: 0 8px 18px rgba(80, 55, 70, 0.05);
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(17px, 4.8vw, 21px);
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.money-strong {
  max-width: 54%;
  text-align: right;
  white-space: nowrap;
  font-size: clamp(15px, 4vw, 21px);
  overflow-wrap: anywhere;
}

.partner-card {
  overflow: hidden;
}

.partner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.partner-summary span {
  min-width: 0;
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(243, 221, 231, 0.72);
}

.partner-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.partner-summary strong {
  display: block;
  margin-top: 5px;
  white-space: nowrap;
  font-size: clamp(14px, 3.6vw, 18px);
}

.partner-meta {
  margin-top: 10px;
  white-space: nowrap;
}

.income-detail-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(243, 221, 231, 0.82);
  box-shadow: 0 10px 24px rgba(80, 55, 70, 0.06);
}

.income-detail-card.penalty {
  background: rgba(255, 240, 244, 0.72);
}

.income-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.income-money-grid span {
  min-width: 0;
  border-radius: 14px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.68);
}

.income-money-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.income-money-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  white-space: nowrap;
}

.amount-preview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 202, 224, 0.9);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 248, 251, 0.98), rgba(247, 243, 255, 0.96));
  box-shadow: 0 12px 28px rgba(98, 70, 86, 0.08);
}

.amount-preview-main {
  display: grid;
  gap: 3px;
  text-align: center;
}

.amount-preview-main span,
.amount-preview-main small {
  color: var(--muted);
  font-size: 12px;
}

.amount-preview-main strong {
  color: #e55382;
  font-size: 30px;
  line-height: 1.1;
}

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

.amount-preview-grid span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(246, 224, 235, 0.78);
  font-size: 12px;
}

.amount-preview-grid strong {
  color: var(--text);
  font-size: 16px;
}

.profile-avatar-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 6px 0 10px;
}

.big-avatar {
  width: 82px;
  height: 82px;
  font-size: 32px;
  border-radius: 28px;
  box-shadow: 0 16px 32px rgba(244, 124, 168, 0.18);
}

.readonly-field {
  justify-content: flex-start;
  gap: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.real-uploader {
  display: grid;
  gap: 10px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.image-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.readonly-image-button {
  width: 100%;
  padding: 0;
  text-align: inherit;
  box-shadow: none;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-preview button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 111, 143, 0.22);
}

.image-preview > span {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.image-preview.image-error > span {
  display: grid;
}

.image-viewer-mask {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  background: rgba(32, 28, 34, 0.68);
  backdrop-filter: blur(12px);
}

.image-viewer {
  width: min(100%, 390px);
  max-height: 100%;
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 82%, white);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 58px rgba(25, 20, 30, 0.24);
}

.image-viewer-top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  color: var(--text);
}

.image-viewer-top button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.image-viewer-top strong {
  text-align: center;
}

.image-viewer-stage {
  position: relative;
  min-height: 260px;
  max-height: min(68vh, 620px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.image-viewer-stage img {
  width: 100%;
  height: 100%;
  max-height: min(68vh, 620px);
  object-fit: contain;
  display: block;
}

.image-viewer-stage img.failed {
  display: none;
}

.image-viewer-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
}

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

.image-viewer-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border-radius: 999px;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 46%, white);
  border: 1px solid var(--line);
}

.employee-card {
  overflow: hidden;
}

.employee-actions {
  flex-wrap: wrap;
  margin-top: 12px;
}

.employee-actions button {
  flex: 1 1 96px;
}

.permission-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.permission-role-chip {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(243, 221, 231, 0.82);
}

.permission-role-chip.active {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.42);
}

.permission-role-chip .icon {
  width: 20px;
  height: 20px;
}

.soft-card {
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
}

.leader-hero,
.leader-card {
  border: 1px solid rgba(243, 221, 231, 0.78);
  box-shadow: var(--shadow);
}

.leaderboard-page {
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--pink-soft) 78%, white), transparent 28%),
    radial-gradient(circle at 8% 22%, color-mix(in srgb, var(--purple) 64%, white), transparent 26%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, white), color-mix(in srgb, var(--bg-end) 78%, white));
  margin: -16px;
  padding: 16px 16px 22px;
  min-height: calc(100vh - var(--tabbar-height));
}

.dream-board {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 20px 12px 16px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 50% 7%, rgba(255, 255, 255, 0.96), transparent 23%),
    linear-gradient(180deg, color-mix(in srgb, var(--pink-soft) 42%, white), rgba(255, 255, 255, 0.86) 58%, color-mix(in srgb, var(--purple) 42%, white));
  border: 1px solid color-mix(in srgb, var(--line) 70%, white);
  box-shadow: 0 22px 46px color-mix(in srgb, var(--pink) 18%, transparent);
}

.dream-board::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 28px;
  border: 1px dashed color-mix(in srgb, var(--pink) 28%, transparent);
  pointer-events: none;
}

.dream-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  left: 50%;
  top: -52px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--pink) 18%, transparent), transparent 70%);
}

.dream-title {
  position: relative;
  text-align: center;
  z-index: 1;
}

.dream-title span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--pink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(244, 124, 168, 0.22);
}

.dream-title h1 {
  margin: 8px 0 4px;
  font-size: 26px;
  color: #c66a92;
}

.dream-title p {
  margin: 0;
  color: #9d7b8b;
  font-size: 12px;
}

.podium-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.08fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 6px;
  margin-top: 20px;
}

.podium {
  min-width: 0;
  position: relative;
  text-align: center;
  border-radius: 24px;
  padding: 12px 6px;
  background: color-mix(in srgb, var(--panel) 84%, white 16%);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: var(--shadow-soft);
}

.podium-1 {
  transform: translateY(-8px);
  padding-top: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 5%, color-mix(in srgb, white 88%, var(--apricot) 12%), transparent 35%),
    linear-gradient(180deg, color-mix(in srgb, var(--apricot) 72%, white 28%), color-mix(in srgb, var(--pink-soft) 34%, var(--panel) 66%) 58%, color-mix(in srgb, var(--panel) 84%, white 16%));
  border-color: color-mix(in srgb, var(--orange) 34%, var(--line));
  box-shadow: 0 18px 32px color-mix(in srgb, var(--pink) 18%, transparent), 0 0 0 5px color-mix(in srgb, var(--pink-soft) 52%, transparent);
}

.podium-1::before,
.podium-1::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.podium-1::before {
  width: 82px;
  height: 82px;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.94), rgba(255, 216, 128, 0.22), transparent 70%);
}

.podium-1::after {
  inset: 8px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--orange) 22%, transparent);
}

.royal-board {
  background:
    radial-gradient(circle at 50% 2%, color-mix(in srgb, white 90%, var(--panel) 10%), transparent 20%),
    radial-gradient(circle at 50% 24%, color-mix(in srgb, var(--orange-soft) 42%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--pink-soft) 30%, var(--panel) 70%), color-mix(in srgb, var(--panel) 82%, white 18%) 56%, color-mix(in srgb, var(--purple) 38%, var(--panel) 62%));
}

.royal-rays {
  position: absolute;
  width: 220px;
  height: 220px;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  background: conic-gradient(from 0deg, transparent 0 8deg, rgba(255, 216, 128, 0.22) 8deg 14deg, transparent 14deg 28deg);
  opacity: 0.72;
  pointer-events: none;
}

.royal-crown {
  position: absolute;
  left: 50%;
  top: 5px;
  transform: translateX(-50%);
  z-index: 2;
  width: 30px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #e0a239;
  filter: drop-shadow(0 5px 8px rgba(224, 162, 57, 0.22));
}

.podium-aura {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.72), transparent 22%),
    radial-gradient(circle at 78% 18%, var(--theme-ornament), transparent 24%);
  pointer-events: none;
}

.lace-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 999px;
  color: #c66a92;
  font-weight: 900;
  font-size: 21px;
  background:
    radial-gradient(circle, #fff 48%, transparent 50%),
    repeating-conic-gradient(from 10deg, color-mix(in srgb, var(--pink-soft) 72%, white) 0 10deg, #fff 10deg 20deg);
  border: 1px solid color-mix(in srgb, var(--pink) 26%, transparent);
}

.podium-1 .lace-avatar {
  width: clamp(76px, 19vw, 86px);
  height: clamp(76px, 19vw, 86px);
  font-size: clamp(24px, 6vw, 28px);
  margin-bottom: 6px;
}

.lace-avatar.small {
  width: 42px;
  height: 42px;
  margin: 0;
  font-size: 16px;
}

.rank-ribbon {
  display: inline-block;
  min-width: 58px;
  border-radius: 999px;
  padding: 4px 9px;
  color: color-mix(in srgb, var(--pink) 76%, var(--text));
  background: color-mix(in srgb, var(--pink-soft) 30%, transparent);
  border: 0;
  font-weight: 800;
  font-size: 12px;
}

.podium strong,
.podium small {
  position: relative;
  z-index: 1;
  display: block;
}

.podium strong {
  margin-top: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium small {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(10px, 2.7vw, 11px);
  white-space: nowrap;
}

.podium-hint {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  padding: 5px 6px;
  border-radius: 999px;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 26%, transparent);
  border: 0;
  box-shadow: none;
  font-size: clamp(10px, 2.7vw, 11px);
  font-weight: 800;
}

@media (max-width: 380px) {
  .dream-board {
    padding-inline: 9px;
  }

  .podium-row {
    gap: 5px;
  }

  .podium strong {
    font-size: 13px;
  }

  .honor-row em {
    font-size: 10px;
    padding-inline: 6px;
  }
}

@media (max-width: 520px) {
  .leaderboard-page {
    margin: -14px;
    padding: 14px 14px 22px;
  }
}

.leader-list-card {
  display: grid;
  grid-template-columns: 54px 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-radius: 24px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 214, 232, 0.78);
  box-shadow: 0 10px 24px rgba(80, 55, 70, 0.07);
}

.rank-dot {
  border-radius: 999px;
  padding: 6px 8px;
  text-align: center;
  color: color-mix(in srgb, var(--pink) 78%, var(--text));
  background: color-mix(in srgb, var(--pink-soft) 32%, transparent);
  font-weight: 800;
  font-size: 12px;
}

.leader-info {
  min-width: 0;
}

.leader-info strong,
.leader-info span,
.leader-info small {
  display: block;
  min-width: 0;
}

.leader-info span,
.leader-info small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-inspire {
  margin: 14px 0 4px;
  text-align: center;
  color: color-mix(in srgb, var(--pink) 78%, var(--text));
  font-weight: 800;
}

.leader-slogan,
.leader-progress-card,
.leader-task-card,
.crown-history {
  box-shadow: 0 10px 26px rgba(80, 55, 70, 0.07);
}

.leader-slogan {
  margin-bottom: 12px;
  padding: 8px 4px;
  border-radius: 999px;
  text-align: center;
  color: var(--pink);
  font-weight: 900;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pink-soft) 42%, transparent), color-mix(in srgb, var(--purple) 38%, transparent), color-mix(in srgb, var(--pink-soft) 32%, transparent));
  border: 0;
  box-shadow: none;
}

.leader-progress-card,
.leader-task-card {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, white 12%);
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 24px;
}

.leader-rank-entry {
  width: 100%;
  min-height: 48px;
  margin: 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 18px;
  color: color-mix(in srgb, var(--pink) 78%, var(--text));
  background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 26%, var(--panel) 74%), color-mix(in srgb, var(--purple) 26%, var(--panel) 74%));
  font-weight: 900;
}

.leader-action-strip {
  margin: 0 0 14px;
}

.leader-list-card.mine {
  border-color: color-mix(in srgb, var(--pink) 44%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 32%, var(--panel) 68%), color-mix(in srgb, var(--purple) 26%, var(--panel) 74%));
}

.leader-list-card.rank-context-card.empty {
  opacity: 0.78;
}

.rank-context-card .rank-dot {
  color: color-mix(in srgb, var(--pink) 65%, var(--text));
  background: color-mix(in srgb, var(--purple) 38%, transparent);
}

.rank-context-card.mine .rank-dot {
  color: color-mix(in srgb, var(--pink) 78%, var(--text));
  background: color-mix(in srgb, var(--pink-soft) 38%, transparent);
}

.leader-rank-list {
  padding-bottom: 18px;
}

.realtime-rank-card {
  grid-template-columns: 60px 42px minmax(0, 1fr);
  scroll-margin: 92px;
}

.realtime-rank-card.public-top {
  background: linear-gradient(135deg, rgba(255, 250, 253, 0.96), rgba(246, 242, 255, 0.9));
  border-color: rgba(255, 204, 224, 0.9);
}

.realtime-rank-card.mine {
  position: relative;
  border-color: rgba(255, 111, 158, 0.92);
  background: linear-gradient(135deg, rgba(255, 239, 247, 0.98), rgba(242, 237, 255, 0.98));
  box-shadow: 0 16px 32px rgba(198, 95, 139, 0.16);
}

.realtime-rank-card.mine::after {
  content: "✦";
  position: absolute;
  right: 14px;
  top: 10px;
  color: var(--pink);
  font-size: 15px;
}

.realtime-rank-card.secret {
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(226, 220, 232, 0.72);
}

.mystery-avatar {
  color: #a69aaa;
  background: linear-gradient(135deg, rgba(246, 242, 255, 0.92), rgba(255, 245, 249, 0.9));
}

.mine-label {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  color: #c65f8b;
  background: rgba(255, 226, 238, 0.92);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.mine-gap {
  margin-top: 3px;
  color: #c65f8b !important;
  font-weight: 900;
}

.leader-progress-card p {
  margin: 0;
  color: #6f5c68;
  line-height: 1.58;
}

.crown-barrage-track {
  height: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  pointer-events: none;
}

.crown-barrage-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  padding: 4px 10px;
  border-radius: 999px;
  color: #c66a92;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 122, 171, 0.28);
  background: transparent;
  animation: barrageMove 16s linear infinite;
}

.crown-barrage-content .icon {
  width: 16px;
  height: 16px;
}

@keyframes barrageMove {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-110%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crown-barrage-content {
    animation: none;
    transform: none;
  }
}

.crown-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--pink);
  background: var(--pink-soft);
}

.honor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.honor-row em {
  border-radius: 999px;
  padding: 3px 7px;
  color: color-mix(in srgb, var(--pink) 76%, var(--text));
  background: color-mix(in srgb, var(--pink-soft) 26%, transparent);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-row i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(242, 236, 255, 0.86);
}

.task-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--button-gradient);
}

.crown-history {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 22px;
}

.crown-history small,
.crown-history em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.leader-hero {
  border-radius: 28px;
  padding: 18px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.86), transparent 32%),
    linear-gradient(135deg, rgba(255, 234, 243, 0.92), rgba(242, 236, 255, 0.72));
}

.leader-hero h1 {
  margin: 10px 0 4px;
  font-size: 27px;
}

.leader-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.leader-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.rank-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: var(--button-gradient);
}

.leader-card h2 {
  margin: 5px 0 2px;
  font-size: 23px;
}

.leader-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.leader-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.leader-metrics span {
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 249, 251, 0.78);
}

.leader-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.leader-metrics b {
  display: block;
  margin-top: 4px;
  white-space: nowrap;
}

.member-card strong,
.hero-card h1,
.stat strong {
  white-space: nowrap;
}

.stat small,
.meta {
  font-size: 12px;
}

.quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick,
.module {
  min-height: 82px;
  padding: 10px 6px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border-radius: 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(243, 221, 231, 0.82);
  box-shadow: 0 9px 20px rgba(80, 55, 70, 0.05);
  font-size: 12px;
}

.role-card {
  border-radius: 24px;
  padding: 14px;
  margin: 0;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(243, 221, 231, 0.72);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.role-option {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(243, 221, 231, 0.86);
  box-shadow: 0 8px 18px rgba(80, 55, 70, 0.04);
}

.role-option .icon-chip {
  width: 34px;
  height: 34px;
  border-radius: 13px;
}

.role-option strong {
  font-size: 12px;
}

.role-option small {
  display: none;
}

.role-option.active {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.42);
  box-shadow: 0 10px 22px rgba(244, 124, 168, 0.12);
}

.login-role-wrap {
  position: relative;
  z-index: 4;
}

.login-role-trigger {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(243, 221, 231, 0.95);
}

.login-role-trigger .icon {
  transition: transform 160ms ease;
}

.login-role-trigger.open .icon {
  transform: rotate(90deg);
}

.login-role-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel-strong) 88%, var(--panel) 12%);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  box-shadow: 0 16px 36px rgba(80, 55, 70, 0.12);
}

.login-role-menu button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 15px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 86%, white 14%);
  text-align: left;
}

.login-role-menu button.selected {
  color: var(--pink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 38%, var(--panel) 62%), color-mix(in srgb, var(--purple) 34%, var(--panel) 66%));
}

.login-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-link-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 18px;
  color: var(--pink);
  background: color-mix(in srgb, var(--panel) 88%, white 12%);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--pink) 8%, transparent);
}

.theme-grid {
  display: grid;
  gap: 12px;
}

.theme-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.theme-card.active {
  border-color: color-mix(in srgb, var(--pink) 38%, transparent);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--pink) 14%, transparent);
}

.theme-card strong {
  font-size: 17px;
}

.theme-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.theme-preview {
  height: 88px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.theme-preview span {
  position: absolute;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 22px rgba(80, 55, 70, 0.08);
}

.theme-preview span:nth-child(1) {
  width: 48%;
  height: 44px;
  left: 12px;
  top: 12px;
}

.theme-preview span:nth-child(2) {
  width: 30%;
  height: 44px;
  right: 12px;
  top: 12px;
}

.theme-preview span:nth-child(3) {
  width: calc(100% - 24px);
  height: 16px;
  left: 12px;
  bottom: 12px;
}

.theme-card-mist-pink .theme-preview {
  background: linear-gradient(135deg, #fff5f5, #ffe4e4 46%, #f8d8d8);
}

.theme-card-green-grape .theme-preview {
  background: linear-gradient(135deg, #f1ffe8, #fffee9 46%, #d1e4ca);
}

.theme-card-taro-purple .theme-preview {
  background: linear-gradient(135deg, #f7f0ff, #fffbea 46%, #dcd3e8);
}

.theme-card-fog-blue .theme-preview {
  background: linear-gradient(135deg, #eef8fb, #def1f5 46%, #c5e8ee);
}

.theme-card-milk-tea .theme-preview {
  background: linear-gradient(135deg, #fffaf4, #fff0df 46%, #ffe4d0);
}

.theme-chips {
  display: flex;
  gap: 7px;
}

.theme-chips i {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 12px rgba(80, 55, 70, 0.08);
}

.theme-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 9px;
}

.pending-home-card {
  position: relative;
  overflow: hidden;
  text-align: left;
}

.pending-home-card.has-pending {
  background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 36%, var(--panel) 64%), color-mix(in srgb, var(--purple) 32%, var(--panel) 68%));
  border-color: color-mix(in srgb, var(--pink) 34%, var(--line));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--pink) 15%, transparent);
}

.pending-home-card.has-pending::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 111, 143, 0.12);
}

.pending-home-card.is-clear {
  opacity: 0.72;
}

.pending-hero {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 38%, var(--panel) 62%), color-mix(in srgb, var(--blue) 45%, var(--panel) 55%));
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  box-shadow: var(--shadow);
}

.pending-hero > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--pink);
  background: rgba(255, 255, 255, 0.76);
}

.pending-hero strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.pending-hero small,
.pending-hero p {
  margin: 0;
  color: var(--muted);
}

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

.pending-card {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border-radius: 22px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(243, 221, 231, 0.82);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.pending-card.hot b {
  color: var(--pink);
  font-size: 24px;
}

.pending-card.quiet {
  opacity: 0.68;
  box-shadow: none;
}

.pending-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.role-switch-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 12px 0 4px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.role-switch-row::-webkit-scrollbar {
  display: none;
}

.role-switch-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(243, 221, 231, 0.8);
}

.role-switch-row button.active {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.35);
}

.task-row {
  width: 100%;
  min-height: 46px;
  padding: 5px 0;
  color: var(--text);
  background: transparent;
  border-bottom: 1px solid rgba(243, 221, 231, 0.58);
}

.task-row:last-child {
  border-bottom: 0;
}

.notice-line {
  width: 100%;
  padding: 13px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(243, 221, 231, 0.78);
  box-shadow: var(--shadow);
  text-align: left;
}

.notice-card {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  margin-bottom: 10px;
  border-radius: 20px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(243, 221, 231, 0.8);
  box-shadow: 0 10px 24px rgba(80, 55, 70, 0.05);
}

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

.addon-grid.one-col {
  grid-template-columns: 1fr;
}

.addon-chip {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(243, 221, 231, 0.82);
}

.addon-chip.active {
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.35);
}

.addon-chip span,
.addon-chip small {
  color: var(--muted);
  font-size: 12px;
}

.addon-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 7px;
}

.addon-controls button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--pink);
  background: rgba(255, 234, 243, 0.9);
  border: 1px solid rgba(244, 124, 168, 0.2);
  font-weight: 900;
}

.addon-controls span {
  min-width: 18px;
  text-align: center;
  color: var(--text);
  font-weight: 800;
}

.active-select {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.32);
}

.module {
  min-height: 92px;
  font-size: 13px;
}

.quick .icon-chip,
.module .icon-chip {
  width: 36px;
  height: 36px;
}

.primary,
.secondary,
.danger,
.plain {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 16px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--button-gradient);
  box-shadow: 0 13px 24px rgba(244, 124, 168, 0.23);
}

.primary:disabled {
  opacity: 0.72;
}

.secondary {
  color: var(--pink);
  background: var(--pink-soft);
  border: 1px solid rgba(244, 124, 168, 0.18);
}

.danger {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(255, 111, 143, 0.18);
}

.plain {
  min-height: 36px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
}

.full-btn {
  width: 100%;
}

.sticky-actions {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 4px 0 2px;
  background: transparent;
}

.search-box {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 88%, white 12%);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  box-shadow: 0 8px 18px rgba(80, 55, 70, 0.04);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-clear {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 24%, transparent);
}

.search-clear svg {
  width: 15px;
  height: 15px;
}

.tabs,
.filter-row,
.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar,
.filter-row::-webkit-scrollbar,
.category-row::-webkit-scrollbar {
  display: none;
}

.report-status-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.report-status-tabs .tab-pill {
  min-width: 0;
  padding: 0 5px;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
}

.pill,
.tab-pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(243, 221, 231, 0.88);
}

.pill.active,
.tab-pill.active {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.26);
}

.date-popover {
  position: absolute;
  z-index: 24;
  width: 160px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(243, 221, 231, 0.9);
  box-shadow: 0 16px 34px rgba(37, 42, 52, 0.14);
  backdrop-filter: blur(16px);
}

.date-popover button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--pink-soft);
}

.date-popover button.selected,
.picker-option.selected {
  color: var(--pink);
  background: var(--pink-soft);
  border-color: rgba(244, 124, 168, 0.32);
}

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
  overflow: visible;
}

.pending-report-card {
  width: 100%;
  text-align: left;
}

.pending-card-link {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 700;
}

.pending-card-link .icon {
  width: 16px;
  height: 16px;
}

.tag-pink {
  color: #d75787;
  background: var(--pink-soft);
}

.tag-purple {
  color: #7f66d4;
  background: var(--purple);
}

.tag-blue {
  color: #4e84c7;
  background: var(--blue);
}

.tag-orange {
  color: #c77825;
  background: var(--orange-soft);
}

.tag-green {
  color: #368b62;
  background: var(--green-soft);
}

.tag-red {
  color: #d95a76;
  background: var(--red-soft);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 111, 143, 0.12);
}

.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.field {
  display: grid;
  gap: 7px;
}

.field-missing .field-label {
  color: #e55382;
}

.field-missing .input-wrap,
.field-missing .select-wrap {
  border-color: rgba(238, 88, 134, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 111, 158, 0.13);
}

.field-label {
  font-size: 13px;
  color: var(--muted);
}

.input-wrap,
.select-wrap {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.input-wrap.error {
  border-color: var(--red);
  background: var(--red-soft);
}

.input-wrap input,
.input-wrap textarea,
.input-wrap select,
.select-wrap input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.input-wrap select {
  appearance: none;
}

.input-wrap textarea {
  min-height: 92px;
  resize: none;
  padding: 13px 0;
  line-height: 1.55;
}

.error-text {
  color: var(--red);
  font-size: 12px;
}

.form-card {
  display: grid;
  gap: 13px;
  border-radius: 24px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(243, 221, 231, 0.84);
  box-shadow: var(--shadow);
}

.upload-box {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 20px;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(255, 234, 243, 0.72), rgba(237, 246, 255, 0.66));
  border: 1px dashed rgba(244, 124, 168, 0.34);
}

.tabbar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 1000;
  width: var(--app-width);
  transform: translateX(-50%);
  height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(243, 221, 231, 0.88);
  box-shadow: 0 -10px 26px rgba(37, 42, 52, 0.06);
  backdrop-filter: blur(18px);
}

.tabbar.hidden {
  display: none;
}

.tabbar button {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.tabbar button.active {
  color: var(--pink);
  background: transparent;
}

.tabbar .badge {
  position: absolute;
  top: 5px;
  right: 15px;
}

.customer-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drawer-mask,
.dialog-mask {
  position: absolute;
  inset: 0;
  z-index: 1100;
  background: rgba(37, 42, 52, 0.24);
}

.drawer-mask {
  display: grid;
  align-items: end;
}

.drawer {
  max-height: 78%;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--bg);
  box-shadow: 0 -18px 42px rgba(37, 42, 52, 0.16);
}

.dialog-mask {
  display: grid;
  place-items: center;
  padding: 24px;
}

.dialog {
  width: 100%;
  max-width: 340px;
  border-radius: 26px;
  padding: 18px;
  background: var(--bg);
  box-shadow: 0 20px 60px rgba(37, 42, 52, 0.22);
}

.dialog p {
  white-space: pre-wrap;
}

.toast {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(102px + env(safe-area-inset-bottom));
  z-index: 30;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 17px;
  color: #fff;
  background: rgba(37, 42, 52, 0.92);
  text-align: center;
}

.skeleton {
  height: 82px;
  border-radius: 20px;
  background: linear-gradient(90deg, #fff 22%, #ffeef5 42%, #fff 60%);
  background-size: 260% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to {
    background-position: -260% 0;
  }
}

.empty-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-art {
  width: 86px;
  height: 70px;
  margin: 0 auto 12px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--pink-soft), var(--blue));
  position: relative;
}

.empty-art::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -8px;
  height: 16px;
  border-radius: 999px;
  background: rgba(244, 124, 168, 0.16);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
}

.timeline-item::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--pink);
  box-shadow: 0 0 0 4px var(--pink-soft);
}

.notice-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
}

@media (max-width: 520px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--bg);
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .tabbar {
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
  }
}

@media (min-width: 700px) {
  .app-shell {
    --app-max-width: 640px;
    --app-width: min(calc(100vw - 36px), var(--app-max-width));
  }

  .quick-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-grid,
  .stat-grid,
  .tri-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat strong {
    font-size: 18px;
  }
}

.playbook-hero {
  margin: 12px 0 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.86), transparent 32%),
    linear-gradient(135deg, var(--panel), var(--pink-soft));
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
}

.playbook-hero h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.playbook-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.playbook-hero > strong {
  align-self: center;
  min-width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--pink);
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(255, 255, 255, .72);
  font-size: 24px;
}

.playbook-tabs {
  margin: 12px 0;
}

.playbook-adminbar {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.playbook-adminbar > .primary {
  width: 100%;
}

.playbook-admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.playbook-list {
  display: grid;
  gap: 12px;
}

.playbook-card {
  width: 100%;
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--text);
}

.playbook-thumb {
  width: 88px;
  height: 96px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink-soft), var(--blue));
  color: var(--pink);
}

.playbook-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playbook-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.playbook-info strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbook-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playbook-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.playbook-tags i {
  font-style: normal;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 68%, white);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
}

.playbook-manage-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.playbook-manage-row em {
  font-style: normal;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 70%, white);
  font-size: 12px;
  font-weight: 700;
}

.playbook-detail-card {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.playbook-detail-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink-soft), var(--blue));
  color: var(--pink);
}

.playbook-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playbook-detail-body {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.playbook-detail-body h2 {
  margin: 0;
  font-size: 22px;
}

.playbook-detail-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.playbook-price {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--pink);
  background: color-mix(in srgb, var(--pink-soft) 72%, white);
  font-weight: 800;
}

.playbook-form-page .form-card {
  display: grid;
  gap: 12px;
  padding-bottom: 92px;
}

.playbook-upload-grid {
  display: grid;
  gap: 12px;
}

.playbook-form-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.playbook-form-image {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.playbook-form-image.cover {
  border-color: color-mix(in srgb, var(--pink) 48%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink-soft) 52%, transparent);
}

.playbook-form-image > button:first-child {
  border: 0;
  padding: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink-soft), var(--blue));
}

.playbook-form-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playbook-form-image > span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.playbook-form-image .row {
  gap: 6px;
}

.playbook-form-image .row button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.switch-row {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.52);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.switch-row input {
  width: 42px;
  height: 24px;
  accent-color: var(--pink);
}

@media (max-width: 420px) {
  .playbook-card {
    grid-template-columns: 78px minmax(0, 1fr) 18px;
  }

  .playbook-thumb {
    width: 78px;
    height: 88px;
  }

  .playbook-form-images {
    grid-template-columns: 1fr;
  }
}



/* 2.36.23: stable iPhone dynamic viewport and full-height login canvas */
@media (max-width: 520px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: #fff5f5;
    overflow: hidden;
  }

  .app-shell,
  .phone-frame {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden;
    background:
      radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--pink-soft) 72%, white), transparent 28%),
      radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--purple) 68%, white), transparent 27%),
      linear-gradient(180deg, var(--bg), var(--bg-end)),
      var(--bg);
  }

  .screen,
  .screen.login-screen {
    width: 100%;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    background: transparent;
  }

  .auth-login-bg {
    width: 100%;
    min-height: 100dvh !important;
    height: auto !important;
    padding-bottom: calc(44px + env(safe-area-inset-bottom)) !important;
  }

  .auth-login-bg > .glass-card,
  .login-brand {
    flex: 0 0 auto;
  }
}
