* {
  box-sizing: border-box;
}

:root {
  --phone-w: 393px;
  --phone-h: 852px;
  --purple: #a987ff;
  --purple-deep: #704cff;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.52);
  --faint: rgba(255, 255, 255, 0.28);
  --card: rgba(24, 24, 31, 0.72);
  --card-line: rgba(255, 255, 255, 0.10);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050506;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  padding: 0;
}

.profile-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 54% 0%, rgba(113, 84, 180, 0.25), transparent 42%),
    radial-gradient(circle at 20% 90%, rgba(65, 49, 93, 0.18), transparent 36%),
    #050506;
}

.profile-phone {
  position: relative;
  width: min(var(--phone-w), 100vw - 28px);
  height: min(var(--phone-h), 100dvh - 28px);
  overflow: hidden;
  border-radius: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #07070a;
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.66),
    inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.profile-bg {
  position: absolute;
  inset: 0;
  background-image: url("./bg-qinche.jpg");
  background-size: cover;
  background-position: center top;
  transform: scale(1.02);
  filter: saturate(0.9) contrast(1.05) brightness(0.62);
  z-index: 0;
}

.profile-bg-soft {
  filter: saturate(0.8) contrast(1.02) brightness(0.38) blur(1px);
}

.profile-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(2, 3, 7, 0.50),
      rgba(2, 3, 7, 0.68) 28%,
      rgba(2, 3, 7, 0.83) 63%,
      rgba(2, 3, 7, 0.96)
    ),
    radial-gradient(circle at 50% 27%, rgba(169, 135, 255, 0.14), transparent 32%),
    rgba(0, 0, 0, 0.18);
}

.profile-nav,
.profile-scroll,
.toast {
  position: relative;
  z-index: 2;
}

.profile-nav {
  height: 84px;
  padding:
    calc(14px + env(safe-area-inset-top))
    18px
    10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-circle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  font-size: 38px;
  line-height: 1;
  font-weight: 200;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.save-pill {
  min-width: 88px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, rgba(169, 135, 255, 0.96), rgba(111, 76, 255, 0.88));
  backdrop-filter: blur(18px);
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.22),
    0 0 22px rgba(169, 135, 255, 0.18);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.save-pill.is-dirty {
  color: rgba(222, 209, 255, 0.96);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(169, 135, 255, 0.36);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.save-check {
  color: rgba(255, 255, 255, 0.96);
  font-size: 17px;
  transform: translateY(-1px);
}

.save-pill.is-dirty .save-check {
  color: var(--purple);
}

.profile-scroll {
  height: calc(100% - 84px);
  overflow-y: auto;
  padding: 0 18px calc(18px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.profile-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.hero-card {
  text-align: center;
  padding: 2px 8px 16px;
}

.avatar-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto 20px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url("./qinche-avatar.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(196, 176, 255, 0.62);
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 30px rgba(169, 135, 255, 0.16);
}

.avatar-plus {
  position: absolute;
  right: 6px;
  bottom: 8px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(179, 145, 255, 0.88);
  background: rgba(22, 20, 31, 0.82);
  color: var(--purple);
  font-size: 32px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(169, 135, 255, 0.24);
}

.editable-line {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.editable-line input {
  width: min(280px, 100%);
  border: none;
  outline: none;
  text-align: center;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
}

.name-edit input {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: 1px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.motto-edit {
  margin-top: 10px;
}

.motto-edit input {
  font-size: 17px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.48);
}

.edit-mark {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.58);
  font-size: 20px;
  transform: rotate(-45deg);
}

.creator-line {
  margin: 22px auto 0;
  max-width: 300px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.48);
}

.creator-line span {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.creator-line p {
  margin: 0;
  font-size: 15px;
}

.creator-line strong {
  color: rgba(190, 169, 255, 0.96);
  font-weight: 650;
}

.menu-list {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

.menu-card {
  width: 100%;
  min-height: 76px;
  padding: 15px 16px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--card);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(18px);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-card-button {
  text-align: left;
  cursor: pointer;
}


.menu-card-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.menu-card-button.is-syncing {
  opacity: 0.74;
}

.menu-card-button.is-syncing .menu-text em::after {
  content: " · 同步中";
  color: rgba(169, 135, 255, 0.72);
}

.menu-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--purple);
  font-size: 25px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(169, 135, 255, 0.06);
}

.menu-text {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.menu-text strong {
  font-size: 20px;
  line-height: 1.12;
  font-weight: 520;
  color: rgba(255, 255, 255, 0.90);
}

.menu-text em {
  font-style: normal;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.42);
}

.chevron {
  color: rgba(255, 255, 255, 0.42);
  font-size: 40px;
  line-height: 1;
  font-weight: 200;
}

.switch {
  width: 62px;
  height: 34px;
  padding: 3px;
  border: none;
  border-radius: 999px;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(135deg, rgba(164, 120, 255, 1), rgba(111, 76, 255, 0.92));
  box-shadow: 0 0 18px rgba(169, 135, 255, 0.22);
  cursor: pointer;
}

.switch i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.24);
}

.switch:not(.is-on) {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.soft-footer {
  margin: 26px 0 5px;
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.soft-footer::before,
.soft-footer::after {
  content: "◇";
  margin: 0 14px;
  color: rgba(169, 135, 255, 0.20);
}

.subpage-scroll {
  padding-top: 12px;
}

.page-title-block {
  padding: 10px 4px 20px;
}

.page-title-block h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 1px;
}

.page-title-block p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  line-height: 1.55;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.field-card {
  min-height: 84px;
  padding: 15px 16px;
  border-radius: 22px;
  display: grid;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--card);
  border: 1px solid var(--card-line);
  backdrop-filter: blur(18px);
}

.field-card span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.field-card input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.hint-card,
.empty-card,
.background-preview-card,
.ghost-upload {
  margin-top: 16px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--card);
  border: 1px solid var(--card-line);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.hint-card strong,
.empty-card h2,
.background-preview-card strong,
.ghost-upload strong {
  font-size: 18px;
  font-weight: 580;
}

.hint-card p,
.empty-card p,
.background-preview-card p,
.ghost-upload em {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  line-height: 1.55;
  font-style: normal;
}

.empty-card {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
}

.empty-icon {
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--purple);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.background-preview-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
}

.background-preview {
  width: 96px;
  height: 128px;
  border-radius: 18px;
  background-image: url("./bg-qinche.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.ghost-upload {
  width: 100%;
  min-height: 124px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  cursor: pointer;
}

.ghost-upload span {
  color: var(--purple);
  font-size: 36px;
  line-height: 1;
}

.setting-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--card);
  border: 1px solid var(--card-line);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.setting-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.setting-row + .setting-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.setting-copy strong {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 580;
}

.setting-copy em {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  line-height: 1.45;
  font-style: normal;
}

.limit-input {
  width: 86px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
  backdrop-filter: blur(12px);
}

.stat-pill {
  min-width: 86px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(222, 209, 255, 0.92);
  background: rgba(169, 135, 255, 0.10);
  border: 1px solid rgba(169, 135, 255, 0.22);
  font-size: 13px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  max-width: calc(100% - 48px);
  padding: 10px 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(12, 12, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  font-size: 13px;
  transform: translateX(-50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

@media (max-width: 600px) {
  .profile-page {
    padding: 0;
  }

  .profile-phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .profile-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* QINCHE_MESSAGE_MANAGE_V1: chat content search + favorites */
.history-search-card {
  margin: 2px 0 14px;
  padding: 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
}

.history-search-card input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  outline: none;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(4, 4, 8, 0.34);
}

.history-search-card input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.history-search-card span {
  display: block;
  margin-top: 8px;
  padding-left: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.history-result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-result-item {
  width: 100%;
  padding: 12px 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-tap-highlight-color: transparent;
}

.history-result-item.is-user {
  border-color: rgba(169, 135, 255, 0.20);
  background: rgba(111, 76, 255, 0.10);
}

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

.history-result-head strong {
  font-size: 13px;
  color: rgba(222, 209, 255, 0.92);
}

.history-result-head span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
}

.history-result-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-empty-card {
  padding: 22px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
  font-size: 13px;
}


/* QINCHE_FAVORITES_V1 */
.favorite-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.favorite-item {
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
}

.favorite-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
}

.favorite-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 12px;
}

.favorite-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.favorite-action-button {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.favorite-action-button.is-danger {
  color: rgba(255, 204, 204, 0.92);
  border-color: rgba(255, 110, 110, 0.20);
  background: rgba(255, 80, 80, 0.09);
}


/* life tools */
.period-control-card,
.period-calendar-card,
.period-note-card,
.voice-usage-hero,
.voice-stat-grid {
  margin: 14px 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(18, 18, 25, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.period-control-card,
.period-calendar-card,
.period-note-card {
  padding: 14px;
}

.compact-row {
  padding: 12px 0;
}

.compact-row + .compact-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.period-number-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.period-number-row label {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.period-number-row input,
.limit-input {
  width: 54px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  text-align: center;
  outline: none;
}

.period-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.period-month-bar button {
  width: 38px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 28px;
  line-height: 1;
}

.period-month-bar strong {
  font-size: 18px;
  letter-spacing: 0.5px;
}

.period-week-row,
.period-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.period-week-row {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 12px;
  text-align: center;
}

.period-day {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  cursor: pointer;
  position: relative;
}

.period-day.is-empty {
  border: none;
  background: transparent;
  pointer-events: none;
}

.period-day.is-period {
  background: linear-gradient(145deg, rgba(255, 128, 178, 0.92), rgba(166, 73, 124, 0.72));
  color: white;
  box-shadow: 0 0 18px rgba(255, 128, 178, 0.20);
}

.period-day.is-predicted {
  background: rgba(255, 128, 178, 0.16);
  border-style: dashed;
  border-color: rgba(255, 156, 196, 0.46);
}

.period-day.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  transform: translateX(-50%);
}

.period-day.is-selected {
  outline: 2px solid rgba(255, 255, 255, 0.54);
  outline-offset: 2px;
}

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

.period-selected-head strong {
  font-size: 17px;
}

.period-selected-head span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
}

.period-note-card textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 12px;
  outline: none;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.07);
}

.period-note-card .favorite-action-button {
  margin-top: 10px;
}

.voice-usage-hero {
  padding: 18px;
  text-align: center;
}

.voice-usage-hero span,
.voice-usage-hero em {
  display: block;
  color: rgba(255, 255, 255, 0.54);
  font-style: normal;
  font-size: 13px;
}

.voice-usage-hero strong {
  display: block;
  margin: 6px 0;
  font-size: 46px;
  line-height: 1;
  letter-spacing: 1px;
}

.voice-stat-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.voice-stat-grid div {
  min-height: 68px;
  padding: 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.voice-stat-grid strong {
  font-size: 22px;
}

.voice-stat-grid span {
  color: rgba(255, 255, 255, 0.50);
  font-size: 12px;
}

.period-month-bar button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}


/* appearance + memory fix v1 */
.hidden-file-input { display: none !important; }

.background-slot-list,
.important-memory-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.background-slot-card,
.important-memory-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(18,18,25,.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}

.background-slot-card {
  grid-template-columns: 82px 1fr;
  align-items: center;
}

.background-slot-card.is-active {
  border-color: rgba(169,135,255,.42);
  box-shadow: 0 0 24px rgba(169,135,255,.12), 0 14px 34px rgba(0,0,0,.24);
}

.background-preview {
  background-image: url("./bg-qinche.jpg");
  background-size: cover;
  background-position: center;
}

.background-slot-thumb {
  background-size: cover;
  background-position: center;
}

.background-slot-thumb {
  width: 82px;
  height: 112px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background-color: rgba(255,255,255,.06);
}

.background-slot-card strong,
.important-memory-card input {
  color: rgba(255,255,255,.94);
  font-weight: 700;
}

.background-slot-card p {
  margin: 6px 0 0;
  color: rgba(255,255,255,.50);
  font-size: 13px;
}

.background-slot-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.background-slot-actions button,
.crop-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
}

.background-slot-actions button:disabled {
  opacity: .42;
}

.important-memory-card input,
.important-memory-card textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  outline: none;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.07);
}

.important-memory-card input {
  min-height: 42px;
  padding: 0 12px;
  font-size: 15px;
}

.important-memory-card textarea {
  min-height: 88px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

.important-memory-meta {
  text-align: right;
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

.memory-tip-card .favorite-action-button,
.imported-history-card .favorite-action-button {
  margin-top: 12px;
}

.crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(14px);
}

.crop-box {
  width: min(340px, 100%);
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(20,20,28,.96);
  box-shadow: 0 24px 80px rgba(0,0,0,.46);
}

.crop-box h2 {
  margin: 0 0 14px;
  color: rgba(255,255,255,.94);
  font-size: 20px;
}

.crop-canvas {
  display: block;
  margin: 0 auto;
  border-radius: 22px;
  background: #050506;
  touch-action: none;
}

.crop-canvas.is-circle {
  border-radius: 50%;
}

.crop-range {
  width: 100%;
  margin: 16px 0;
}

.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.crop-actions .is-primary {
  background: linear-gradient(135deg, rgba(169,135,255,.96), rgba(111,76,255,.88));
  color: white;
}


/* profile-memory-appearance-v2 */
.background-section-block h2 {
  margin: 18px 2px 10px;
  font-size: 18px;
  color: rgba(255,255,255,.88);
}

.background-slot-thumb {
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(169,135,255,.92);
  font-size: 34px;
  overflow: hidden;
}

.background-slot-thumb.has-image .background-plus {
  display: none;
}

.background-plus {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(169,135,255,.38);
  background: rgba(169,135,255,.10);
}

.background-slot-copy {
  min-width: 0;
}

.background-slot-actions button:last-child:not(:disabled) {
  border-color: rgba(169,135,255,.34);
  color: rgba(226,216,255,.96);
}

.important-memory-editor {
  margin-top: 12px;
}

.important-memory-title {
  display: block;
  font-size: 17px;
  color: rgba(255,255,255,.94);
}

.important-memory-content {
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
  word-break: break-word;
}

.important-memory-actions {
  display: flex;
  gap: 8px;
}

.memory-panel-card {
  margin: 14px 0;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(24,24,31,.70);
  backdrop-filter: blur(18px);
}

.memory-panel-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.memory-panel-card p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.52);
  line-height: 1.55;
}

.compact-upload {
  min-height: 120px;
  margin: 0 0 12px;
}

.memory-status-line {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
}

.memory-status-line em {
  color: rgba(255,255,255,.46);
  font-style: normal;
  font-size: 13px;
}

.export-button-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.export-custom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.export-custom-row label {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,.54);
  font-size: 12px;
}

.export-custom-row input {
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.07);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.70);
  backdrop-filter: blur(14px);
}

.confirm-box {
  width: min(320px, 100%);
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(24,24,31,.96);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.confirm-box p {
  margin: 0 0 16px;
  color: rgba(255,255,255,.90);
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-actions button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
}

.confirm-actions .is-danger {
  border-color: rgba(255,102,128,.28);
  background: rgba(255,78,110,.16);
  color: rgba(255,202,210,.96);
}
