/* ===== Couple Space ===== */
.couple-space-modal.chat-modal-overlay {
  z-index: 920;
  background: rgba(0, 0, 0, 0.58);
}

.couple-space-panel {
  width: min(392px, calc(100vw - 28px));
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(236, 102, 143, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(248, 248, 250, 0.98));
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

body.dark-mode .couple-space-panel,
body.dark-mode .couple-space-dialog,
body.dark-mode .couple-space-opened-panel {
  background:
    linear-gradient(180deg, rgba(32, 25, 31, 0.98), rgba(17, 18, 22, 0.98));
  color: #f6eef3;
}

.couple-space-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(236, 102, 143, 0.16);
}

.couple-space-title-wrap {
  min-width: 0;
}

.couple-space-title {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

.couple-space-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #7d6670;
}

body.dark-mode .couple-space-subtitle {
  color: rgba(246, 238, 243, 0.68);
}

.couple-space-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid rgba(236, 102, 143, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

body.dark-mode .couple-space-icon-btn {
  background: rgba(255, 255, 255, 0.08);
}

.couple-space-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.couple-space-role-card {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(55, 60, 72, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body.dark-mode .couple-space-role-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.couple-space-role-card:active {
  transform: scale(0.992);
}

.couple-space-role-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(236, 102, 143, 0.12);
  color: #cf315f;
}

.couple-space-role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.couple-space-role-main {
  min-width: 0;
  flex: 1;
}

.couple-space-role-name {
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.couple-space-role-meta {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #7d6670;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-mode .couple-space-role-meta {
  color: rgba(246, 238, 243, 0.66);
}

.couple-space-role-status {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 6px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
  background: rgba(55, 60, 72, 0.08);
  color: #5e6572;
}

.couple-space-role-status.active {
  background: rgba(220, 53, 92, 0.12);
  color: #cf315f;
}

.couple-space-role-status.pending {
  background: rgba(221, 151, 45, 0.14);
  color: #a76812;
}

.couple-space-role-status.rejected {
  background: rgba(88, 94, 108, 0.12);
  color: #6a7180;
}

.couple-space-empty {
  padding: 36px 16px;
  color: #7d6670;
  text-align: center;
  font-size: 13px;
}

body.dark-mode .couple-space-empty {
  color: rgba(246, 238, 243, 0.66);
}

.couple-space-dialog,
.couple-space-opened-panel {
  width: min(340px, calc(100vw - 40px));
  border: 1px solid rgba(236, 102, 143, 0.24);
  border-radius: 8px;
  background: rgba(255, 250, 252, 0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.couple-space-dialog {
  padding: 18px;
}

.couple-space-dialog-title {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}

.couple-space-dialog-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #5e4d55;
}

body.dark-mode .couple-space-dialog-text {
  color: rgba(246, 238, 243, 0.76);
}

.couple-space-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.couple-space-primary-btn,
.couple-space-secondary-btn {
  min-height: 38px;
  flex: 1;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.couple-space-primary-btn {
  background: #d93b68;
  color: #fff;
}

.couple-space-primary-btn.csp-black-btn {
  border-color: rgba(0, 0, 0, 0.82);
  background: rgba(18, 18, 18, 0.92);
  color: #fff;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.couple-space-primary-btn.csp-black-btn:active {
  background: rgba(0, 0, 0, 0.96);
}

.couple-space-secondary-btn {
  background: rgba(55, 60, 72, 0.08);
  color: inherit;
}

.couple-space-secondary-btn.danger {
  color: #8b3d44;
}

body.dark-mode .couple-space-secondary-btn {
  background: rgba(255, 255, 255, 0.08);
}

.couple-space-primary-btn.wide {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
}

.couple-space-opened-cover {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.5), transparent 34%),
    linear-gradient(135deg, #f35d82, #d93b68 48%, #333946);
}

.couple-space-opened-heart {
  position: absolute;
  top: 16px;
  right: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
}

.couple-space-opened-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
}

.couple-space-opened-avatar {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 -7px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  color: #d93b68;
  font-weight: 800;
}

.couple-space-opened-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.couple-space-opened-name {
  padding: 16px 16px 4px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
}

.couple-space-opened-meta {
  padding: 0 18px 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: #7d6670;
}

body.dark-mode .couple-space-opened-meta {
  color: rgba(246, 238, 243, 0.68);
}

.chat-couple-system-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  padding: 0 18px;
}

.chat-couple-system-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 88%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(217, 59, 104, 0.1);
  color: #a33657;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

body.dark-mode .chat-couple-system-inner {
  background: rgba(255, 120, 166, 0.14);
  color: #ffd6e5;
}

.couple-invite-card {
  width: min(245px, 64vw);
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 151, 196, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 233, 243, 0.98), rgba(255, 233, 243, 0) 42%),
    linear-gradient(180deg, rgba(255, 247, 251, 0.98), rgba(255, 235, 245, 0.96));
  box-shadow:
    0 12px 28px rgba(238, 104, 160, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  cursor: pointer;
}

body.dark-mode .couple-invite-card {
  border-color: rgba(255, 155, 199, 0.28);
  background:
    radial-gradient(circle at 18% 0%, rgba(92, 42, 64, 0.72), rgba(92, 42, 64, 0) 44%),
    linear-gradient(180deg, rgba(43, 26, 36, 0.98), rgba(30, 23, 29, 0.98));
}

.couple-invite-card.accepted {
  border-color: rgba(255, 145, 191, 0.36);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 230, 242, 0.98), rgba(255, 230, 242, 0) 42%),
    linear-gradient(180deg, rgba(255, 245, 250, 0.98), rgba(255, 232, 244, 0.96));
  box-shadow:
    0 12px 28px rgba(238, 104, 160, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.couple-invite-card.rejected {
  border-color: rgba(226, 151, 184, 0.28);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 238, 246, 0.86), rgba(255, 238, 246, 0) 42%),
    linear-gradient(180deg, rgba(255, 248, 251, 0.94), rgba(250, 239, 245, 0.92));
  box-shadow:
    0 10px 22px rgba(190, 98, 138, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  filter: saturate(0.82);
}

body.dark-mode .couple-invite-card.accepted {
  background:
    radial-gradient(circle at 18% 0%, rgba(92, 42, 64, 0.68), rgba(92, 42, 64, 0) 44%),
    linear-gradient(180deg, rgba(45, 25, 36, 0.98), rgba(31, 22, 29, 0.98));
}

body.dark-mode .couple-invite-card.rejected {
  background:
    radial-gradient(circle at 18% 0%, rgba(75, 42, 58, 0.58), rgba(75, 42, 58, 0) 44%),
    linear-gradient(180deg, rgba(37, 28, 34, 0.98), rgba(28, 24, 28, 0.98));
}

.couple-invite-top {
  display: flex;
  gap: 10px;
  padding: 12px;
}

.couple-invite-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.58), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #ff9ac4, #f45c9d);
  box-shadow: 0 8px 18px rgba(244, 92, 157, 0.22);
}

.couple-invite-card.accepted .couple-invite-icon {
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.56), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #ffaad0, #ee5f9d);
}

.couple-invite-card.rejected .couple-invite-icon {
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.46), rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #e7a9c2, #c7789c);
}

.couple-invite-body {
  min-width: 0;
  flex: 1;
}

.couple-invite-title {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  color: #2c2529;
}

body.dark-mode .couple-invite-title {
  color: #f8eef4;
}

.couple-invite-text {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #7d6670;
}

body.dark-mode .couple-invite-text {
  color: rgba(246, 238, 243, 0.68);
}

.couple-invite-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(217, 59, 104, 0.12);
  color: #9b405d;
  font-size: 12px;
}

.couple-invite-card.accepted .couple-invite-footer {
  border-top-color: rgba(255, 145, 191, 0.18);
  color: #b64673;
}

.couple-invite-card.rejected .couple-invite-footer {
  border-top-color: rgba(226, 151, 184, 0.16);
  color: #9c667b;
}

.couple-result-anim {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.12);
}

.couple-result-heart-wrap {
  position: relative;
  width: 170px;
  height: 150px;
}

.couple-result-heart {
  position: absolute;
  top: 38px;
  width: 84px;
  height: 84px;
  color: #ff4d7d;
  filter: drop-shadow(0 16px 28px rgba(170, 25, 73, 0.28));
}

.couple-result-heart.left {
  left: 22px;
  animation: coupleHeartLeft 1.3s ease both;
}

.couple-result-heart.right {
  right: 22px;
  animation: coupleHeartRight 1.3s ease both;
}

.couple-result-broken {
  width: 130px;
  height: 130px;
  color: #6b7280;
  filter: drop-shadow(0 14px 22px rgba(20, 24, 32, 0.25));
  animation: coupleBrokenHeart 1.25s ease both;
}

@keyframes coupleHeartLeft {
  0% { opacity: 0; transform: translate(-46px, 18px) scale(0.62) rotate(-18deg); }
  45% { opacity: 1; transform: translate(10px, 0) scale(1.05) rotate(-8deg); }
  100% { opacity: 0; transform: translate(18px, -10px) scale(1.18) rotate(-8deg); }
}

@keyframes coupleHeartRight {
  0% { opacity: 0; transform: translate(46px, 18px) scale(0.62) rotate(18deg); }
  45% { opacity: 1; transform: translate(-10px, 0) scale(1.05) rotate(8deg); }
  100% { opacity: 0; transform: translate(-18px, -10px) scale(1.18) rotate(8deg); }
}

@keyframes coupleBrokenHeart {
  0% { opacity: 0; transform: translateY(18px) scale(0.7); }
  18% { opacity: 1; transform: translateY(0) scale(1.05); }
  38% { transform: translateX(-8px) rotate(-6deg); }
  52% { transform: translateX(8px) rotate(6deg); }
  68% { transform: translateX(-4px) rotate(-3deg); }
  100% { opacity: 0; transform: translateY(12px) scale(0.88); }
}

/* ===== Couple Space Page ===== */
.couple-space-page {
  position: fixed;
  inset: 0;
  z-index: 930;
  pointer-events: none;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.24s ease, opacity 0.18s ease;
  background: #f8f9fb;
  color: #20232b;
}

.couple-space-page.active {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}

.couple-space-page-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8f9fb 0%, #fbfcfe 48%, #f7f9fc 100%);
}

.csp-topbar {
  height: calc(56px + env(safe-area-inset-top, 0px));
  flex: 0 0 calc(56px + env(safe-area-inset-top, 0px));
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(45, 52, 68, 0.08);
}

.csp-top-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.csp-top-icon:active {
  background: rgba(42, 50, 68, 0.08);
}

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

.csp-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.csp-subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: #70798a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-fixed-zone {
  position: relative;
  flex: 0 0 auto;
  padding-bottom: 62px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0));
}

.csp-hero-bg {
  position: relative;
  height: 168px;
  overflow: hidden;
  cursor: pointer;
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.72) 0 8%, transparent 20%),
    radial-gradient(circle at 82% 28%, rgba(162, 218, 232, 0.82) 0 12%, transparent 29%),
    linear-gradient(135deg, #f6a5bb 0%, #f5d883 46%, #88c9d9 100%);
}

.csp-hero-bg:focus-visible {
  outline: 2px solid rgba(126, 201, 216, 0.86);
  outline-offset: -3px;
}

.csp-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.csp-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 20, 35, 0.04), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(110deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 18px);
}

.csp-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 100%, rgba(255,255,255,0.74), rgba(255,255,255,0) 55%);
}

.csp-cover-widget {
  --csp-disc-size: 98px;
  --csp-disc-half: 49px;
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 12px;
  z-index: 2;
  display: block;
  height: 104px;
}

.csp-cover-card,
.csp-vinyl-card {
  position: relative;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  color: inherit;
}

.csp-cover-card {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  right: var(--csp-disc-half);
  bottom: 0;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(245,248,252,0.74)),
    linear-gradient(135deg, rgba(240, 136, 166, 0.24), rgba(120, 200, 216, 0.24));
  box-shadow:
    0 18px 42px rgba(43, 48, 60, 0.24),
    0 5px 14px rgba(43, 48, 60, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.csp-cover-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csp-cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 32, 0.02), rgba(20, 24, 32, 0.42));
}

.csp-cover-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(55, 63, 78, 0.56);
  font-size: 12px;
  font-weight: 750;
}

.csp-cover-names,
.csp-cover-days {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.36);
}

.csp-cover-names {
  top: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 850;
}

.csp-cover-names span {
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-cover-names i {
  color: #fff1f6;
  font-style: normal;
  font-size: 11px;
}

.csp-cover-days {
  bottom: 16px;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

.csp-vinyl-card {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 3;
  width: var(--csp-disc-size);
  height: var(--csp-disc-size);
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  background: transparent;
  overflow: visible;
}

.csp-vinyl-disc {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.58), rgba(255,255,255,0.16) 52%, rgba(132, 205, 220, 0.18)),
    rgba(255,255,255,0.16);
  backdrop-filter: blur(14px) saturate(1.18);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  box-shadow:
    0 18px 34px rgba(42, 48, 62, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    inset 0 -10px 24px rgba(255, 255, 255, 0.1);
  animation: cspVinylSpin 8s linear infinite;
}

.csp-vinyl-disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.58), transparent 38%, rgba(255,255,255,0.12) 58%, transparent 72%),
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.54), transparent 20%);
  pointer-events: none;
}

.csp-vinyl-ring {
  display: none;
}

.csp-vinyl-disc img {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
}

.csp-vinyl-placeholder {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  color: #6f7786;
  font-size: 11px;
  font-weight: 800;
}

@keyframes cspVinylSpin {
  to { transform: rotate(360deg); }
}

.csp-content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 94px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.couple-space-page.csp-home-active .csp-tab.active,
.couple-space-page.csp-home-active .csp-heart-tab.active {
  color: #111;
}

.couple-space-page.csp-home-active .csp-heart-tab {
  background: #f6f6f3;
  border: 1px solid rgba(17, 17, 17, 0.14);
}

.csp-content.csp-home-tab {
  background-color: #f7f7f4;
}

.couple-space-page.csp-memory-reading .csp-topbar,
.couple-space-page.csp-memory-reading .csp-fixed-zone,
.couple-space-page.csp-memory-reading .csp-bottom-nav {
  display: none;
}

.couple-space-page.csp-memory-reading .couple-space-page-shell,
.couple-space-page.csp-memory-reading .csp-content {
  background:
    linear-gradient(180deg, #f5f5f3 0%, #eeeeeb 100%);
}

.couple-space-page.csp-memory-reading .csp-content {
  padding: 0;
  overflow: hidden;
}

.csp-content.csp-home-bg-active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.16);
}

.csp-home-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 18px;
  color: #111;
}

.csp-home-stage {
  width: min(100%, 360px);
  min-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 6px 34px;
}

.csp-home-checkin-btn {
  width: min(224px, 100%);
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.csp-home-checkin-btn span {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 850;
}

.csp-home-checkin-btn em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
}

.csp-home-checkin-btn:active {
  transform: translateY(1px);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.1);
}

.csp-home-checkin-btn.checked {
  background: #fff;
  color: #111;
  cursor: default;
  box-shadow: none;
}

.csp-home-checkin-btn.error {
  border-style: dashed;
  background: #fff;
  color: #111;
  cursor: default;
  box-shadow: none;
}

.csp-home-checkin-btn.checked em {
  color: rgba(17, 17, 17, 0.54);
}

.csp-home-checkin-btn.error em {
  color: rgba(17, 17, 17, 0.66);
  overflow-wrap: anywhere;
}

.csp-home-checkin-btn:disabled {
  opacity: 1;
}

.csp-home-message-block {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.csp-home-message-title,
.csp-home-message-label {
  color: rgba(17, 17, 17, 0.56);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.csp-home-message-value {
  max-width: 100%;
  color: #050505;
  font-size: 64px;
  line-height: 0.95;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.csp-home-stat-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.csp-home-stat-card {
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.csp-home-stat-card span {
  max-width: 100%;
  color: #090909;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.csp-home-stat-card em {
  color: rgba(17, 17, 17, 0.58);
  font-size: 12px;
  line-height: 1.15;
  font-style: normal;
  font-weight: 800;
}

.csp-home-stat-card strong {
  margin-top: 8px;
  color: rgba(17, 17, 17, 0.72);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-heart-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #171717;
}

.csp-heart-summary-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.52)),
    linear-gradient(135deg, rgba(253, 221, 229, 0.58), rgba(216, 243, 247, 0.46));
  box-shadow:
    0 18px 42px rgba(79, 88, 108, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
}

.csp-heart-kicker {
  color: #777f8f;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 850;
  text-transform: uppercase;
}

.csp-heart-title {
  color: #303746;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-heart-hours {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #15171d;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
}

.csp-heart-hours span {
  color: #596273;
  font-size: 15px;
  font-weight: 850;
}

.csp-heart-glass-btn {
  min-width: 172px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 244, 250, 0.76));
  color: #252b35;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
  box-shadow:
    0 14px 26px rgba(63, 72, 90, 0.16),
    inset 0 1px 0 #fff,
    inset 0 -8px 16px rgba(190, 199, 214, 0.22);
  cursor: pointer;
}

.csp-heart-glass-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 8px 16px rgba(63, 72, 90, 0.14),
    inset 0 1px 0 #fff,
    inset 0 -6px 12px rgba(190, 199, 214, 0.2);
}

.csp-heart-glass-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #d84f77;
  background: rgba(216, 79, 119, 0.1);
}

.csp-heart-glass-icon svg {
  width: 16px;
  height: 16px;
}

.csp-heart-role-card,
.csp-heart-session-list {
  border: 1px solid rgba(55, 60, 72, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.csp-heart-role-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.csp-heart-role-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f4f6f8;
  color: #7b8493;
  font-size: 18px;
  font-weight: 850;
}

.csp-heart-role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csp-heart-role-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.csp-heart-role-copy strong {
  overflow: hidden;
  color: #242832;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-heart-role-copy span,
.csp-heart-session-empty {
  color: #758092;
  font-size: 12px;
  line-height: 1.35;
}

.csp-heart-session-list {
  padding: 6px 12px;
}

.csp-heart-session-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(55, 60, 72, 0.08);
}

.csp-heart-session-row:last-child {
  border-bottom: 0;
}

.csp-heart-session-row span {
  color: #303746;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

.csp-heart-session-row em {
  min-width: 0;
  color: #7d8797;
  font-size: 12px;
  line-height: 1.25;
  font-style: normal;
  text-align: right;
}

.csp-heart-session-empty {
  padding: 12px 0;
  text-align: center;
}

#coupleSpaceCompanionModal {
  z-index: 990;
}

.csp-companion-modal-panel {
  width: min(420px, calc(100vw - 28px));
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(55, 60, 72, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.csp-companion-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.csp-companion-modal-subtitle {
  margin-top: 3px;
  color: #778193;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.csp-companion-form {
  min-height: 0;
  overflow-y: auto;
  padding: 10px 2px 0;
}

.csp-companion-custom-row {
  display: none;
}

.csp-companion-custom-row.active {
  display: block;
}

.csp-companion-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.csp-companion-textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.5;
}

.csp-companion-switch {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #303746;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
  cursor: pointer;
}

.csp-companion-switch input {
  width: 18px;
  height: 18px;
  accent-color: #d84f77;
}

.csp-companion-switch input:disabled + span {
  color: #9aa3b2;
}

.csp-companion-asset-note {
  margin-top: 7px;
  color: #778193;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.couple-space-page.csp-companion-running .csp-topbar,
.couple-space-page.csp-companion-running .csp-fixed-zone,
.couple-space-page.csp-companion-running .csp-bottom-nav {
  display: none;
}

.couple-space-page.csp-companion-running .csp-content {
  padding: 0;
  overflow: hidden;
  min-height: 100%;
}

.csp-companion-focus {
  --csp-companion-progress: 0deg;
  position: relative;
  min-height: 100%;
  height: 100%;
  color: #fff;
  background-color: #171a20;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.72)),
    var(--csp-companion-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.csp-companion-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    rgba(16, 18, 24, 0.16);
  pointer-events: none;
}

.csp-companion-shell {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.csp-companion-head {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.csp-companion-head > span {
  display: none;
}

.csp-companion-end-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.csp-companion-end-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.csp-companion-end-btn svg {
  width: 14px;
  height: 14px;
}

.csp-companion-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 0;
}

.csp-companion-ring {
  width: min(58vw, 228px);
  aspect-ratio: 1 / 1;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.34) 0 61%, transparent 62%),
    conic-gradient(#fff var(--csp-companion-progress), rgba(255, 255, 255, 0.22) 0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 16px 34px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
}

.csp-companion-avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 -16px 22px rgba(0, 0, 0, 0.08);
  color: #2f333b;
  font-size: 68px;
  font-weight: 900;
}

.csp-companion-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csp-companion-timer {
  position: absolute;
  left: 50%;
  top: calc(50% + min(29vw, 114px) + 18px);
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transform: translateX(-50%);
}

.csp-companion-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(50% + min(29vw, 114px) + 20px);
  width: min(82vw, 380px);
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.csp-companion-bubble.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.csp-companion-bubble-inner {
  max-height: min(28vh, 150px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1d2430;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  backdrop-filter: blur(18px);
}

.csp-calendar-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #171717;
}

.csp-calendar-card,
.csp-calendar-editor,
.csp-calendar-date-detail {
  border: 1px solid rgba(25, 25, 25, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.csp-calendar-card {
  padding: 12px;
}

.csp-calendar-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.csp-calendar-title-wrap {
  min-width: 0;
}

.csp-calendar-kicker {
  color: #777;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.csp-calendar-title {
  margin-top: 2px;
  color: #151515;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-calendar-refresh {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.csp-calendar-refresh svg {
  width: 19px;
  height: 19px;
}

.csp-calendar-refresh:active {
  background: rgba(0, 0, 0, 0.06);
}

.csp-calendar-refresh.is-loading svg {
  animation: cspCalendarSpin 0.8s linear infinite;
}

.csp-calendar-weekdays,
.csp-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.csp-calendar-weekdays {
  margin-bottom: 6px;
  color: #757575;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.csp-calendar-grid {
  gap: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}

.csp-calendar-blank,
.csp-calendar-day {
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
}

.csp-calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 5px;
  color: #1f1f1f;
  cursor: pointer;
}

.csp-calendar-day.past,
.csp-calendar-day.future {
  color: #9a9a9a;
  background: #fafafa;
}

.csp-calendar-day.today {
  background: #f2f2f2;
  box-shadow: inset 0 0 0 2px #111;
}

.csp-calendar-day.selected {
  color: #111;
  background: #f7f0df;
  box-shadow: inset 0 0 0 2px #b58b3b;
}

.csp-calendar-number {
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.csp-calendar-stickers {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.csp-calendar-mini-sticker {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.csp-mood-picker {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.csp-mood-picker.active {
  display: block;
}

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

.csp-mood-picker-item {
  min-width: 0;
  min-height: 74px;
  display: grid;
  grid-template-rows: 46px auto;
  gap: 5px;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.csp-mood-picker-item img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
}

.csp-mood-picker-item span {
  max-width: 100%;
  padding: 0 4px;
  color: #666;
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-calendar-editor {
  padding: 12px;
}

.csp-calendar-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #666;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.csp-calendar-editor-head strong {
  color: #222;
  font-size: 12px;
}

.csp-mood-textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #1d1d1d;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.csp-mood-textarea:focus,
.csp-mood-image-url:focus {
  border-color: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.csp-mood-image-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 8px;
}

.csp-mood-image-url {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  color: #1d1d1d;
  font-size: 13px;
  outline: none;
}

.csp-mood-tool-btn {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 0 10px;
  background: #111;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.csp-mood-tool-btn.file {
  background: #fff;
  color: #111;
}

.csp-mood-submit-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-mood-submit-btn:active {
  transform: scale(0.992);
}

.csp-calendar-sent-state {
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #555;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
}

.csp-calendar-date-detail {
  padding: 12px;
}

.csp-calendar-date-detail-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.csp-calendar-date-detail-head div {
  min-width: 0;
}

.csp-calendar-date-detail-head span {
  display: block;
  color: #777;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.csp-calendar-date-detail-head strong {
  display: block;
  margin-top: 2px;
  color: #151515;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-calendar-date-detail-head button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: #222;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.csp-calendar-date-detail-head button:active {
  background: rgba(0, 0, 0, 0.1);
}

.csp-mood-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.csp-mood-empty {
  padding: 18px 12px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #777;
  text-align: center;
  font-size: 12px;
}

.csp-mood-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.csp-mood-card-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  color: #444;
  font-size: 15px;
  font-weight: 850;
}

.csp-mood-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csp-mood-card-body {
  min-width: 0;
  flex: 1;
}

.csp-mood-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-bottom: 7px;
}

.csp-mood-card-meta strong {
  min-width: 0;
  color: #151515;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-mood-card-meta span {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  padding: 2px 6px;
  color: #666;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.csp-mood-card-sticker-row {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  margin-bottom: 7px;
  color: #666;
  font-size: 12px;
  line-height: 1.2;
}

.csp-mood-card-sticker-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-mood-card-sticker {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  object-fit: cover;
}

.csp-mood-card-text {
  color: #202020;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.csp-mood-card-image {
  display: block;
  width: 100%;
  max-height: 220px;
  margin-top: 9px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  object-fit: cover;
  background: #f5f5f5;
}

.csp-mood-card-image-desc {
  margin-top: 9px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.04), transparent 44%),
    #f7f7f7;
  color: #444;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@keyframes cspCalendarSpin {
  to { transform: rotate(360deg); }
}

.csp-whisper-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.csp-whisper-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #6f7786;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}

.csp-whisper-divider span {
  height: 1px;
  background: linear-gradient(90deg, rgba(112, 121, 138, 0), rgba(112, 121, 138, 0.36), rgba(112, 121, 138, 0));
}

.csp-whisper-board {
  position: relative;
  min-height: min(62vh, 520px);
  border-radius: 8px;
  overflow: hidden;
  --csp-whisper-board-bg: none;
  border: 1px solid rgba(188, 162, 121, 0.32);
  background-color: #fbfaf6;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0.22)),
    var(--csp-whisper-board-bg),
    linear-gradient(112deg, rgba(196, 166, 121, 0.13) 0%, rgba(255,255,255,0) 34% 68%, rgba(188, 156, 112, 0.1) 100%),
    linear-gradient(135deg, #fffef9 0%, #f3ede2 46%, #fffaf0 100%);
  background-size: 100% 100%, cover, 100% 100%, 100% 100%;
  background-position: center;
  box-shadow:
    0 16px 34px rgba(83, 64, 43, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.82),
    inset 0 -12px 24px rgba(136, 109, 70, 0.06);
}

.csp-whisper-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(96deg, rgba(183, 151, 105, 0.1), transparent 24%, rgba(217, 196, 158, 0.08) 48%, transparent 76%, rgba(166, 134, 93, 0.08)),
    radial-gradient(ellipse at 18% 24%, rgba(185, 152, 106, 0.12), transparent 30%),
    radial-gradient(ellipse at 76% 66%, rgba(169, 137, 96, 0.1), transparent 34%);
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.csp-whisper-board-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.csp-whisper-history-btn,
.csp-whisper-action-btn {
  border: 1px solid rgba(174, 136, 86, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.38), rgba(255,255,255,0) 42%, rgba(130, 93, 46, 0.08)),
    linear-gradient(180deg, #fff2d3 0%, #edd0a0 55%, #dcb87d 100%);
  color: #654015;
  box-shadow:
    0 6px 12px rgba(102, 74, 38, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.58),
    inset 0 -2px 0 rgba(132, 88, 40, 0.12);
  cursor: pointer;
  pointer-events: auto;
}

.csp-whisper-history-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.csp-whisper-history-btn svg {
  width: 16px;
  height: 16px;
}

.csp-whisper-board-actions {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.csp-whisper-clip {
  width: 14px;
  height: 26px;
  display: block;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #f6dfb1, #d8b276);
  box-shadow:
    0 5px 8px rgba(101, 73, 36, 0.16),
    inset 0 -2px 0 rgba(141, 94, 38, 0.12);
  transform: translateY(-5px) rotate(-3deg);
}

.csp-whisper-clip.small {
  height: 22px;
  transform: translateY(-3px) rotate(4deg);
}

.csp-whisper-action-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.csp-whisper-action-btn svg {
  width: 18px;
  height: 18px;
}

.csp-whisper-action-btn.is-loading svg {
  animation: cspCalendarSpin 0.8s linear infinite;
}

.csp-whisper-action-btn:active,
.csp-whisper-history-btn:active {
  transform: scale(0.96);
}

.csp-whisper-note-layer {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 54px;
  bottom: 12px;
}

.csp-whisper-loading,
.csp-whisper-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(70, 50, 30, 0.58);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
  text-align: center;
}

.csp-whisper-note {
  --note-width: clamp(108px, 34vw, 138px);
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: var(--note-width);
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  border: 0;
  border-radius: 4px;
  padding: 18px 10px 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,250,248,0.98));
  color: #28231d;
  text-align: left;
  cursor: grab;
  touch-action: none;
  transform: rotate(var(--rot));
  box-shadow:
    0 9px 18px rgba(75, 56, 37, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.csp-whisper-note.dragging {
  cursor: grabbing;
  z-index: 20 !important;
  box-shadow:
    0 15px 28px rgba(75, 56, 37, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.csp-whisper-note-pin {
  position: absolute;
  left: 50%;
  top: -9px;
  width: 34px;
  height: 16px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.42), rgba(255,255,255,0) 48%),
    linear-gradient(180deg, #f5dcad, #d3aa6b);
  box-shadow: 0 4px 7px rgba(101, 72, 35, 0.18);
  transform: translateX(-50%) rotate(-2deg);
}

.csp-whisper-note-date {
  color: #77716b;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
}

.csp-whisper-note-sender {
  color: #111;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-whisper-note-text {
  color: #302b25;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.csp-whisper-note.user {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,252,252,0.98));
}

.csp-whisper-modal {
  z-index: 990;
}

.csp-whisper-modal-panel,
.csp-whisper-history-panel,
.csp-whisper-detail-card {
  transform: scale(0.92) translateY(8px);
  transition: transform 0.22s cubic-bezier(.25,.46,.45,.94);
}

.csp-whisper-modal.active .csp-whisper-modal-panel,
.csp-whisper-modal.active .csp-whisper-history-panel,
.csp-whisper-modal.active .csp-whisper-detail-card {
  transform: scale(1) translateY(0);
}

.csp-whisper-modal-panel,
.csp-whisper-history-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(82vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid rgba(55, 60, 72, 0.12);
  background: rgba(255,255,255,0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
}

.csp-whisper-modal-panel {
  padding: 16px;
}

.csp-whisper-history-panel {
  padding: 14px;
}

.csp-whisper-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.csp-whisper-modal-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-whisper-composer-textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid rgba(55, 60, 72, 0.14);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  color: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
}

.csp-whisper-composer-textarea:focus {
  border-color: rgba(126, 201, 216, 0.72);
  box-shadow: 0 0 0 3px rgba(126, 201, 216, 0.16);
}

.csp-whisper-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.csp-whisper-detail-card {
  position: relative;
  width: min(330px, calc(100vw - 44px));
  max-height: min(78vh, 560px);
  overflow-y: auto;
  border-radius: 6px;
  padding: 24px 18px 18px;
  background: #fff;
  color: #202020;
  box-shadow: 0 28px 72px rgba(0,0,0,0.36);
}

.csp-whisper-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(30, 34, 42, 0.06);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.csp-whisper-detail-date {
  color: #7a7a7a;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 750;
}

.csp-whisper-detail-sender {
  margin-top: 8px;
  color: #111;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 850;
}

.csp-whisper-detail-text {
  margin-top: 14px;
  color: #222;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.csp-whisper-detail-actions {
  display: flex;
  margin-top: 18px;
}

.csp-whisper-detail-delete {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(206, 67, 67, 0.22);
  border-radius: 8px;
  background: rgba(206, 67, 67, 0.08);
  color: #b42323;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-whisper-detail-delete svg {
  width: 15px;
  height: 15px;
}

.csp-whisper-detail-delete:disabled {
  opacity: 0.58;
  cursor: default;
}

.csp-whisper-history-list {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 2px;
}

.csp-whisper-history-card {
  width: 100%;
  display: block;
  border: 1px solid rgba(55, 60, 72, 0.12);
  border-radius: 8px;
  padding: 11px;
  background: rgba(248, 249, 250, 0.96);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.csp-whisper-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.csp-whisper-history-meta strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-whisper-history-meta em {
  flex: 0 0 auto;
  color: #7b8290;
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 750;
}

.csp-whisper-history-text {
  display: -webkit-box;
  margin-top: 7px;
  color: #404653;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.csp-whisper-history-empty {
  padding: 28px 12px;
  color: #7b8290;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.csp-whisper-history-load {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-whisper-history-load:disabled {
  opacity: 0.62;
  cursor: default;
}

.csp-letters-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #171717;
}

.csp-letters-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.csp-letters-title-block {
  min-width: 0;
}

.csp-letters-kicker {
  color: #777;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.csp-letters-title {
  margin-top: 2px;
  color: #151515;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-letter-action-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.csp-letter-action-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.csp-letter-action-btn svg {
  width: 18px;
  height: 18px;
}

.csp-letter-action-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.csp-letter-action-btn.is-loading svg {
  animation: cspCalendarSpin 0.8s linear infinite;
}

.csp-letter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

.csp-letter-empty {
  grid-column: 1 / -1;
  padding: 42px 12px;
  color: #7b8290;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.csp-letter-envelope {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.42 / 1;
  min-height: 118px;
  border: 0;
  background: transparent;
  color: #171717;
  cursor: pointer;
  perspective: 520px;
  transition: transform 0.22s ease;
}

.csp-letter-envelope:active {
  transform: translateY(1px) scale(0.992);
}

.csp-letter-envelope:disabled {
  cursor: default;
}

.csp-letter-envelope-date,
.csp-letter-envelope-sender {
  position: absolute;
  z-index: 4;
  left: 12px;
  right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.csp-letter-envelope-date {
  top: 11px;
  color: #777;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
}

.csp-letter-envelope-sender {
  bottom: 13px;
  color: #111;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  text-align: right;
}

.csp-letter-envelope-back,
.csp-letter-envelope-paper,
.csp-letter-envelope-flap {
  position: absolute;
  pointer-events: none;
}

.csp-letter-envelope-back {
  left: 4px;
  right: 4px;
  bottom: 8px;
  height: 70%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(245,245,245,0.98));
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.96);
}

.csp-letter-envelope-paper {
  left: 18px;
  right: 18px;
  top: 34px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 5px;
  background: #fff;
  transform: translateY(18px);
  transition: transform 0.28s ease;
}

.csp-letter-envelope-flap {
  left: 4px;
  right: 4px;
  top: 36px;
  height: 58%;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,242,242,0.98));
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
  transition: transform 0.28s ease;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08);
}

.csp-letter-envelope-heart {
  position: absolute;
  left: 50%;
  top: 61%;
  z-index: 5;
  color: #111;
  font-size: 21px;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.csp-letter-envelope.is-opening {
  transform: translateY(-2px);
}

.csp-letter-envelope.is-opening .csp-letter-envelope-paper {
  transform: translateY(-8px);
}

.csp-letter-envelope.is-opening .csp-letter-envelope-flap {
  transform: rotateX(176deg);
}

.csp-letter-history-load {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-letter-history-load:disabled {
  opacity: 0.62;
  cursor: default;
}

.csp-letter-modal {
  z-index: 990;
}

.csp-letter-modal-panel,
.csp-letter-detail-card {
  opacity: 0;
  transform: scale(0.98) translateY(8px);
  transition:
    opacity 0.14s ease,
    transform 0.16s cubic-bezier(.25,.46,.45,.94);
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.csp-letter-modal.active .csp-letter-modal-panel,
.csp-letter-modal.active .csp-letter-detail-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.csp-letter-modal-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(82vh, 680px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(55, 60, 72, 0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
}

.csp-letter-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.csp-letter-modal-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-letter-composer-textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid rgba(55, 60, 72, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: inherit;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.csp-letter-composer-textarea:focus {
  border-color: rgba(126, 201, 216, 0.72);
  box-shadow: 0 0 0 3px rgba(126, 201, 216, 0.16);
}

.csp-letter-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.csp-letter-detail-card {
  position: relative;
  width: min(370px, calc(100vw - 34px));
  max-height: min(80vh, 640px);
  overflow-y: auto;
  border-radius: 8px;
  padding: 24px 20px 18px;
  background:
    linear-gradient(180deg, #fff 0%, #fff 92%, #f7f7f7 100%);
  color: #202020;
  box-shadow: 0 28px 72px rgba(0,0,0,0.36);
}

.csp-letter-detail-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  pointer-events: none;
}

.csp-letter-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(30, 34, 42, 0.06);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.csp-letter-detail-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 32px;
  color: #686868;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
}

.csp-letter-detail-content {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  color: #202020;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: normal;
}

.csp-letter-detail-actions {
  position: relative;
  z-index: 1;
  display: flex;
  margin-top: 22px;
}

.csp-letter-detail-delete {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(206, 67, 67, 0.22);
  border-radius: 8px;
  background: rgba(206, 67, 67, 0.08);
  color: #b42323;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-letter-detail-delete svg {
  width: 15px;
  height: 15px;
}

.csp-letter-detail-delete:disabled {
  opacity: 0.58;
  cursor: default;
}

.csp-moments-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #171717;
}

.csp-moments-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.csp-moments-title-block {
  min-width: 0;
}

.csp-moments-kicker {
  color: #777;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.csp-moments-title {
  margin-top: 2px;
  color: #151515;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-moment-action-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.csp-moment-action-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.csp-moment-action-btn svg {
  width: 18px;
  height: 18px;
}

.csp-moment-action-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.csp-moment-action-btn.is-loading svg {
  animation: cspCalendarSpin 0.8s linear infinite;
}

.csp-moment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.csp-moment-empty {
  padding: 42px 12px;
  color: #7b8290;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.csp-moment-card {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(31, 38, 52, 0.09);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(30, 36, 48, 0.07);
}

.csp-moment-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
}

.csp-moment-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(31, 38, 52, 0.08);
  background: #f4f6f8;
  color: #111;
  font-size: 15px;
  line-height: 1;
  font-weight: 850;
}

.csp-moment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csp-moment-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.csp-moment-meta strong {
  min-width: 0;
  color: #151515;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-moment-meta span {
  color: #7a8290;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
}

.csp-moment-delete {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a3f3f;
  cursor: pointer;
}

.csp-moment-delete svg {
  width: 16px;
  height: 16px;
}

.csp-moment-delete:active {
  background: rgba(154, 63, 63, 0.08);
}

.csp-moment-text {
  margin-top: 11px;
  color: #252a33;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.csp-moment-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.csp-moment-comment-btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(31, 38, 52, 0.12);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(247, 248, 250, 0.92);
  color: #343b48;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-moment-comment-btn svg {
  width: 14px;
  height: 14px;
}

.csp-moment-comment-btn:active {
  background: rgba(31, 38, 52, 0.08);
}

.csp-moment-comments {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(246, 247, 249, 0.92);
}

.csp-moment-comment {
  color: #333a46;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.csp-moment-comment-author {
  margin-right: 5px;
  color: #151515;
  font-weight: 850;
}

.csp-moment-comment-text {
  color: inherit;
}

.csp-moment-history-load {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.csp-moment-history-load:disabled {
  opacity: 0.62;
  cursor: default;
}

.csp-moment-modal {
  z-index: 990;
}

.csp-moment-modal-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(82vh, 680px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(55, 60, 72, 0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.22s cubic-bezier(.25,.46,.45,.94);
}

.csp-moment-modal.active .csp-moment-modal-panel {
  transform: scale(1) translateY(0);
}

.csp-moment-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.csp-moment-modal-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-moment-composer-textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid rgba(55, 60, 72, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: inherit;
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.csp-moment-composer-textarea:focus {
  border-color: rgba(126, 201, 216, 0.72);
  box-shadow: 0 0 0 3px rgba(126, 201, 216, 0.16);
}

.csp-moment-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.csp-memories-page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #171717;
}

.csp-memories-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.csp-memories-title-block {
  min-width: 0;
}

.csp-memories-kicker {
  color: #777;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.csp-memories-title {
  margin-top: 2px;
  color: #151515;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.csp-memory-action-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.csp-memory-action-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.csp-memory-action-btn svg {
  width: 18px;
  height: 18px;
}

.csp-memory-action-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.csp-memory-action-btn:disabled {
  opacity: 0.58;
  cursor: default;
}

.csp-memory-action-btn.is-loading svg {
  animation: cspCalendarSpin 0.8s linear infinite;
}

.csp-memory-stage {
  display: grid;
  place-items: center;
  padding: 14px 0 4px;
}

.csp-memory-book-cover {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: #f8f3e7;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 12%),
    linear-gradient(135deg, #171717 0%, #0f0f10 58%, #050506 100%);
  box-shadow:
    0 28px 54px rgba(0, 0, 0, 0.25),
    0 8px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.13);
  transform-origin: left center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.csp-memory-book-cover:active {
  transform: translateY(1px) scale(0.992);
}

.csp-memory-book-cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(248, 243, 231, 0.2);
  border-radius: 6px;
  pointer-events: none;
}

.csp-memory-book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42px;
  border-right: 1px solid rgba(248, 243, 231, 0.13);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.28));
}

.csp-memory-book-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 34px 46px 30px 64px;
  text-align: center;
}

.csp-memory-book-korean {
  color: rgba(248, 243, 231, 0.64);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

.csp-memory-book-label strong {
  max-width: 100%;
  color: #fffaf0;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.csp-memory-book-label em {
  color: rgba(248, 243, 231, 0.78);
  font-size: 13px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 750;
}

.csp-memory-book-corner {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-right: 1px solid rgba(248, 243, 231, 0.32);
  border-bottom: 1px solid rgba(248, 243, 231, 0.32);
  border-radius: 0 0 6px 0;
}

.csp-memory-latest {
  min-height: 72px;
}

.csp-memory-latest-card,
.csp-memory-empty {
  border: 1px solid rgba(31, 38, 52, 0.09);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(30, 36, 48, 0.07);
}

.csp-memory-empty {
  color: #7b8290;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.csp-memory-latest-date {
  color: #7a8290;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.csp-memory-latest-title {
  margin-top: 4px;
  color: #151515;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 850;
}

.csp-memory-latest-text {
  margin-top: 7px;
  color: #3f4652;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.csp-memory-reader-modal {
  z-index: 995;
  background: rgba(0, 0, 0, 0.64);
}

.csp-memory-reader-page-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background:
    linear-gradient(180deg, #f5f5f3 0%, #eeeeeb 100%);
}

.csp-memory-reader-panel {
  width: min(940px, calc(100vw - 24px));
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(245, 246, 248, 0.98);
  color: #171717;
  box-shadow: 0 30px 80px rgba(0,0,0,0.42);
}

.csp-memory-reader-page-view .csp-memory-reader-panel {
  width: 100%;
  height: 100%;
  max-height: none;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f5f5f3;
  color: #171717;
  box-shadow: none;
}

.csp-memory-reader-top {
  height: 38px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

.csp-memory-reader-page-view .csp-memory-reader-top {
  height: calc(58px + env(safe-area-inset-top, 0px));
  flex: 0 0 calc(58px + env(safe-area-inset-top, 0px));
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  border-bottom: 1px solid rgba(20, 22, 26, 0.08);
  background: rgba(245, 245, 243, 0.94);
}

.csp-memory-reader-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(30, 34, 42, 0.06);
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.csp-memory-reader-title {
  min-width: 0;
  text-align: center;
  color: #151515;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csp-memory-reader-index {
  display: grid;
  place-items: center;
  color: #777;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.csp-memory-reader-book {
  position: relative;
  width: min(100%, calc((92vh - 78px) * 4 / 3));
  aspect-ratio: 4 / 3;
  align-self: center;
  min-height: 0;
  border-radius: 8px;
  padding: 12px 46px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.22), rgba(255,255,255,0.08) 50%, rgba(0,0,0,0.12)),
    #111;
  box-shadow:
    0 26px 62px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.13);
  transform-origin: left center;
}

.csp-memory-reader-page-view .csp-memory-reader-book {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  aspect-ratio: auto;
  align-self: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.csp-memory-reader-book.is-opening {
  animation: cspMemoryBookOpen 0.42s cubic-bezier(.2,.72,.2,1) both;
}

@keyframes cspMemoryBookOpen {
  0% { opacity: 0; transform: perspective(900px) rotateY(-24deg) scale(0.94); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0) scale(1); }
}

.csp-memory-reader-page {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.csp-memory-reader-page-view .csp-memory-reader-page {
  height: 100%;
}

.csp-memory-page-sheet {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.05), rgba(255,255,255,0) 10%),
    linear-gradient(180deg, #fffdf8 0%, #f7f4ec 100%);
  color: #1d1d1d;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.08),
    inset 18px 0 28px rgba(0,0,0,0.06);
}

.csp-memory-reader-page-view .csp-memory-page-sheet {
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0) 12%),
    linear-gradient(180deg, #fffdf8 0%, #f7f5ee 100%);
  box-shadow: none;
}

.csp-memory-page-scroll {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.csp-memory-reader-page-view .csp-memory-page-scroll {
  padding: 22px 20px 46px;
}

.csp-memory-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.csp-memory-page-head span,
.csp-memory-page-head em,
.csp-memory-section-label {
  color: #777;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  font-style: normal;
}

.csp-memory-page-head h3 {
  margin: 3px 0 0;
  color: #171717;
  font-size: 22px;
  line-height: 1.18;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.csp-memory-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.csp-memory-reader-page-view .csp-memory-page-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 4px;
}

.csp-memory-section {
  min-width: 0;
  border: 1px solid rgba(30, 34, 42, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.68);
}

.csp-memory-reader-page-view .csp-memory-section {
  border: 0;
  border-bottom: 1px solid rgba(30, 34, 42, 0.08);
  border-radius: 0;
  padding: 14px 0;
  background: transparent;
}

.csp-memory-reader-page-view .csp-memory-section:last-child {
  border-bottom: 0;
}

.csp-memory-section-label {
  margin-bottom: 7px;
}

.csp-memory-chat-shot,
.csp-memory-scene-section {
  grid-row: span 2;
}

.csp-memory-phone {
  overflow: hidden;
  border: 1px solid rgba(30, 34, 42, 0.1);
  border-radius: 8px;
  background: #f2f4f5;
}

.csp-memory-phone-top {
  height: 28px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(30, 34, 42, 0.08);
  background: rgba(255,255,255,0.82);
  color: #20242c;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.csp-memory-phone-body {
  max-height: 210px;
  overflow-y: auto;
  padding: 9px;
}

.csp-memory-chat-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-bottom: 8px;
}

.csp-memory-chat-row.role {
  align-items: flex-end;
}

.csp-memory-chat-meta {
  display: flex;
  gap: 5px;
  color: #8a909a;
  font-size: 9px;
  line-height: 1.2;
}

.csp-memory-chat-bubble {
  max-width: 82%;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: #222832;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 10px rgba(30, 36, 48, 0.06);
}

.csp-memory-chat-row.role .csp-memory-chat-bubble {
  background: #111;
  color: #fff;
}

.csp-memory-chat-empty {
  padding: 18px 8px;
  color: #8a909a;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.csp-memory-paper-text,
.csp-memory-truth-text {
  margin: 0;
  color: #252a33;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.csp-memory-truth-text {
  font-weight: 650;
}

.csp-memory-real-photo,
.csp-memory-desc-photo {
  min-height: 138px;
  border-radius: 8px;
  overflow: hidden;
}

.csp-memory-real-photo img {
  width: 100%;
  height: 100%;
  min-height: 138px;
  display: block;
  object-fit: cover;
}

.csp-memory-desc-photo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.64), rgba(255,255,255,0.1)),
    linear-gradient(135deg, #e6e0d3 0%, #cbd8d2 58%, #f1eee6 100%);
  color: #1f2524;
}

.csp-memory-desc-photo span {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 850;
  color: rgba(31,37,36,0.58);
}

.csp-memory-desc-photo strong {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.csp-memory-desc-photo p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.csp-memory-scene-frame {
  width: 100%;
  height: 178px;
  display: block;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.csp-memory-reader-loading {
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fffdf8;
  color: #777;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.csp-memory-reader-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: #f7f2e8;
  transform: translateY(-50%);
  cursor: pointer;
}

.csp-memory-reader-nav svg {
  width: 20px;
  height: 20px;
}

.csp-memory-reader-nav.newer {
  left: 7px;
}

.csp-memory-reader-nav.older {
  right: 7px;
}

.csp-memory-reader-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.csp-memory-reader-page-view .csp-memory-reader-nav {
  width: 32px;
  height: 48px;
  background: rgba(20, 22, 26, 0.07);
  color: #2a2d33;
  box-shadow: none;
}

.csp-memory-reader-page-view .csp-memory-reader-nav:active {
  background: rgba(20, 22, 26, 0.12);
}

.csp-memory-reader-page-view .csp-memory-reader-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.csp-placeholder-page {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #778193;
  text-align: center;
}

.csp-placeholder-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(126, 201, 216, 0.16);
  color: #668996;
  font-size: 20px;
  font-weight: 850;
}

.csp-placeholder-icon svg {
  width: 27px;
  height: 27px;
}

.csp-placeholder-title {
  color: #303746;
  font-size: 16px;
  font-weight: 850;
}

.csp-placeholder-text {
  font-size: 12px;
}

.csp-bottom-nav {
  position: relative;
  height: calc(70px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 calc(70px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(45, 52, 68, 0.08);
}

.csp-tab,
.csp-heart-tab {
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  color: #717b8d;
  cursor: pointer;
}

.csp-tab {
  display: grid;
  place-items: center;
}

.csp-tab-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.csp-tab-icon svg {
  width: 22px;
  height: 22px;
}

.csp-tab.active {
  color: #d75c7b;
}

.csp-heart-tab {
  position: relative;
  top: -20px;
  justify-self: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #aeb5c2;
  background:
    radial-gradient(circle at 32% 25%, #fff, #eef1f6 45%, #b9c0cc 100%);
  box-shadow: 0 10px 26px rgba(80, 86, 100, 0.22);
}

.csp-heart-tab.active {
  color: #8e96a4;
  transform: translateY(-1px) scale(1.03);
}

#coupleSpaceSettingsModal,
#coupleSpaceImageModal {
  z-index: 980;
}

.couple-space-settings-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(55, 60, 72, 0.12);
  background: rgba(255,255,255,0.98);
  color: #22242a;
  box-shadow: 0 26px 70px rgba(0,0,0,0.34);
}

.couple-space-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.couple-space-icon-btn.bare {
  border: 0;
  background: transparent;
}

.couple-space-settings-body {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 2px 0;
}

.csp-field-label {
  display: block;
  margin: 12px 0 6px;
  color: #596273;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.csp-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(55, 60, 72, 0.14);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(247,249,252,0.88);
  color: inherit;
  font-size: 14px;
  outline: none;
}

.csp-input:focus {
  border-color: rgba(126, 201, 216, 0.72);
  box-shadow: 0 0 0 3px rgba(126, 201, 216, 0.16);
}

.csp-settings-image-btn {
  display: block;
  width: 100%;
  margin-bottom: 4px;
}

.csp-url-upload-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.csp-url-upload-row .csp-input {
  min-width: 0;
  flex: 1;
}

.csp-url-apply-btn {
  flex: 0 0 82px;
}

.csp-home-bg-file-label {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
}

.csp-api-details {
  margin-top: 14px;
  border-top: 1px solid rgba(55, 60, 72, 0.1);
  padding-top: 12px;
}

.csp-api-details summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 850;
}

.csp-api-note {
  margin-top: 8px;
  color: #778193;
  font-size: 12px;
  line-height: 1.45;
}

.csp-api-model-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.csp-api-model-row .csp-input {
  min-width: 0;
  flex: 1;
}

.csp-fetch-models-btn {
  flex: 0 0 86px;
  min-height: 40px;
}

.csp-model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.csp-model-list button {
  max-width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(126, 201, 216, 0.16);
  color: #476c78;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.csp-model-list button.active {
  background: rgba(217, 59, 104, 0.13);
  color: #bd3f61;
}

.csp-image-dialog .csp-input {
  margin-top: 12px;
}

.csp-image-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.csp-file-label {
  display: grid;
  place-items: center;
  text-align: center;
}

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

body.dark-mode .couple-space-page {
  background: #12141a;
  color: #f4f6fb;
}

body.dark-mode .couple-space-page-shell {
  background:
    linear-gradient(180deg, #151821 0%, #201820 48%, #111821 100%);
}

body.dark-mode .csp-content.csp-home-tab {
  background-color: #101010;
}

body.dark-mode .csp-content.csp-home-bg-active::before {
  background: rgba(0, 0, 0, 0.18);
}

body.dark-mode .csp-home-page {
  color: #f4f4f1;
}

body.dark-mode .csp-home-checkin-btn {
  border-color: rgba(244, 244, 241, 0.88);
  background: #f4f4f1;
  color: #111;
  box-shadow: none;
}

body.dark-mode .csp-home-checkin-btn em {
  color: rgba(17, 17, 17, 0.56);
}

body.dark-mode .csp-home-checkin-btn.checked {
  background: transparent;
  color: #f4f4f1;
}

body.dark-mode .csp-home-checkin-btn.error {
  border-color: rgba(244, 244, 241, 0.62);
  background: transparent;
  color: #f4f4f1;
}

body.dark-mode .csp-home-checkin-btn.checked em,
body.dark-mode .csp-home-checkin-btn.error em,
body.dark-mode .csp-home-message-title,
body.dark-mode .csp-home-message-label,
body.dark-mode .csp-home-stat-card em,
body.dark-mode .csp-home-stat-card strong {
  color: rgba(244, 244, 241, 0.62);
}

body.dark-mode .csp-home-message-value,
body.dark-mode .csp-home-stat-card span {
  color: #fff;
}

body.dark-mode .csp-home-stat-card {
  border-color: rgba(244, 244, 241, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .couple-space-page.csp-home-active .csp-tab.active,
body.dark-mode .couple-space-page.csp-home-active .csp-heart-tab.active {
  color: #f4f4f1;
}

body.dark-mode .couple-space-page.csp-home-active .csp-heart-tab {
  background: #151515;
  border: 1px solid rgba(244, 244, 241, 0.18);
}

body.dark-mode .csp-topbar,
body.dark-mode .csp-bottom-nav {
  background: rgba(20, 22, 28, 0.9);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .csp-subtitle,
body.dark-mode .csp-placeholder-page,
body.dark-mode .csp-api-note {
  color: rgba(244,246,251,0.62);
}

body.dark-mode .csp-placeholder-title {
  color: #f4f6fb;
}

body.dark-mode .couple-space-settings-panel {
  border-color: rgba(255,255,255,0.1);
  background: rgba(25,27,34,0.98);
  color: #f4f6fb;
}

body.dark-mode .couple-space-primary-btn.csp-black-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dark-mode .csp-input {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
}

body.dark-mode .csp-field-label {
  color: rgba(244,246,251,0.72);
}

body.dark-mode .csp-api-details {
  border-top-color: rgba(255,255,255,0.08);
}

body.dark-mode .csp-calendar-page {
  color: #f2f2f2;
}

body.dark-mode .csp-calendar-card,
body.dark-mode .csp-calendar-editor,
body.dark-mode .csp-calendar-date-detail,
body.dark-mode .csp-calendar-sent-state,
body.dark-mode .csp-mood-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(22, 22, 24, 0.94);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

body.dark-mode .csp-calendar-title,
body.dark-mode .csp-calendar-refresh,
body.dark-mode .csp-calendar-editor-head strong,
body.dark-mode .csp-calendar-date-detail-head strong,
body.dark-mode .csp-mood-card-meta strong,
body.dark-mode .csp-mood-card-text {
  color: #f3f3f3;
}

body.dark-mode .csp-calendar-kicker,
body.dark-mode .csp-calendar-weekdays,
body.dark-mode .csp-calendar-editor-head,
body.dark-mode .csp-calendar-date-detail-head span,
body.dark-mode .csp-calendar-sent-state,
body.dark-mode .csp-mood-card-meta span,
body.dark-mode .csp-mood-card-sticker-row,
body.dark-mode .csp-mood-empty {
  color: rgba(243, 243, 243, 0.62);
}

body.dark-mode .csp-calendar-grid,
body.dark-mode .csp-calendar-blank,
body.dark-mode .csp-calendar-day,
body.dark-mode .csp-calendar-mini-sticker,
body.dark-mode .csp-mood-picker,
body.dark-mode .csp-mood-picker-item,
body.dark-mode .csp-mood-textarea,
body.dark-mode .csp-mood-image-url,
body.dark-mode .csp-mood-card-avatar,
body.dark-mode .csp-mood-card-meta span,
body.dark-mode .csp-mood-card-sticker,
body.dark-mode .csp-mood-card-image,
body.dark-mode .csp-mood-card-image-desc,
body.dark-mode .csp-calendar-sent-state,
body.dark-mode .csp-mood-empty {
  border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .csp-calendar-day,
body.dark-mode .csp-mood-picker-item,
body.dark-mode .csp-mood-textarea,
body.dark-mode .csp-mood-image-url {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f3f3;
}

body.dark-mode .csp-calendar-day.past,
body.dark-mode .csp-calendar-day.future {
  background: rgba(255, 255, 255, 0.035);
  color: rgba(243, 243, 243, 0.38);
}

body.dark-mode .csp-calendar-day.today {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 2px #fff;
}

body.dark-mode .csp-calendar-day.selected {
  color: #f7f0df;
  background: rgba(181, 139, 59, 0.18);
  box-shadow: inset 0 0 0 2px #b58b3b;
}

body.dark-mode .csp-calendar-date-detail-head button {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f3f3;
}

body.dark-mode .csp-calendar-mini-sticker,
body.dark-mode .csp-mood-card-avatar,
body.dark-mode .csp-mood-card-image,
body.dark-mode .csp-mood-card-image-desc,
body.dark-mode .csp-mood-empty {
  background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .csp-mood-tool-btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: #f2f2f2;
  color: #111;
}

body.dark-mode .csp-mood-submit-btn {
  background: #f2f2f2;
  color: #111;
}

body.dark-mode .csp-mood-tool-btn.file {
  background: transparent;
  color: #f2f2f2;
}

body.dark-mode .csp-whisper-divider {
  color: rgba(244,246,251,0.62);
}

body.dark-mode .csp-whisper-board {
  border-color: rgba(222, 202, 166, 0.28);
  background-color: #fbfaf6;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.66), rgba(255,255,255,0.24)),
    var(--csp-whisper-board-bg),
    linear-gradient(112deg, rgba(196, 166, 121, 0.13) 0%, rgba(255,255,255,0) 34% 68%, rgba(188, 156, 112, 0.1) 100%),
    linear-gradient(135deg, #fffef9 0%, #f3ede2 46%, #fffaf0 100%);
  box-shadow:
    0 16px 34px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.78);
}

body.dark-mode .csp-whisper-history-btn,
body.dark-mode .csp-whisper-action-btn {
  border-color: rgba(174, 136, 86, 0.42);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.38), rgba(255,255,255,0) 42%, rgba(130, 93, 46, 0.08)),
    linear-gradient(180deg, #fff2d3 0%, #edd0a0 55%, #dcb87d 100%);
  color: #654015;
}

body.dark-mode .csp-whisper-loading,
body.dark-mode .csp-whisper-empty {
  color: rgba(63, 48, 33, 0.58);
}

body.dark-mode .csp-whisper-note {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,246,244,0.98));
  color: #24211d;
}

body.dark-mode .csp-whisper-modal-panel,
body.dark-mode .csp-whisper-history-panel {
  border-color: rgba(255,255,255,0.1);
  background: rgba(25,27,34,0.98);
  color: #f4f6fb;
}

body.dark-mode .csp-whisper-composer-textarea,
body.dark-mode .csp-whisper-history-card {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f4f6fb;
}

body.dark-mode .csp-whisper-history-text,
body.dark-mode .csp-whisper-history-meta em,
body.dark-mode .csp-whisper-history-empty {
  color: rgba(244,246,251,0.66);
}

body.dark-mode .csp-whisper-detail-card {
  background: #f7f7f4;
  color: #202020;
}

body.dark-mode .csp-letters-page,
body.dark-mode .csp-letters-title,
body.dark-mode .csp-letter-action-btn {
  color: #f3f3f3;
}

body.dark-mode .csp-letters-kicker,
body.dark-mode .csp-letter-empty {
  color: rgba(244,246,251,0.62);
}

body.dark-mode .csp-letter-action-tag {
  border-color: rgba(255,255,255,0.12);
  background: rgba(25,27,34,0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

body.dark-mode .csp-letter-action-btn:active {
  background: rgba(255,255,255,0.08);
}

body.dark-mode .csp-letter-modal-panel {
  border-color: rgba(255,255,255,0.1);
  background: rgba(25,27,34,0.98);
  color: #f4f6fb;
}

body.dark-mode .csp-letter-composer-textarea {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f4f6fb;
}

body.dark-mode .csp-letter-detail-card {
  background: #f7f7f4;
  color: #202020;
}

body.dark-mode .csp-moments-page,
body.dark-mode .csp-moments-title,
body.dark-mode .csp-moment-action-btn {
  color: #f3f3f3;
}

body.dark-mode .csp-moments-kicker,
body.dark-mode .csp-moment-empty,
body.dark-mode .csp-moment-meta span {
  color: rgba(244,246,251,0.62);
}

body.dark-mode .csp-moment-action-tag {
  border-color: rgba(255,255,255,0.12);
  background: rgba(25,27,34,0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

body.dark-mode .csp-moment-action-btn:active {
  background: rgba(255,255,255,0.08);
}

body.dark-mode .csp-moment-card,
body.dark-mode .csp-moment-modal-panel {
  border-color: rgba(255,255,255,0.1);
  background: rgba(25,27,34,0.96);
  color: #f4f6fb;
}

body.dark-mode .csp-moment-meta strong,
body.dark-mode .csp-moment-text,
body.dark-mode .csp-moment-comment-author {
  color: #f4f6fb;
}

body.dark-mode .csp-moment-avatar {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.08);
  color: #f4f6fb;
}

body.dark-mode .csp-moment-comments {
  background: rgba(255,255,255,0.07);
}

body.dark-mode .csp-moment-comment {
  color: rgba(244,246,251,0.76);
}

body.dark-mode .csp-moment-comment-btn {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(244,246,251,0.86);
}

body.dark-mode .csp-moment-comment-btn:active {
  background: rgba(255,255,255,0.1);
}

body.dark-mode .csp-moment-composer-textarea {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f4f6fb;
}

body.dark-mode .csp-memories-page,
body.dark-mode .csp-memories-title,
body.dark-mode .csp-memory-action-btn {
  color: #f3f3f3;
}

body.dark-mode .csp-memories-kicker,
body.dark-mode .csp-memory-empty,
body.dark-mode .csp-memory-latest-date {
  color: rgba(244,246,251,0.62);
}

body.dark-mode .csp-memory-action-tag {
  border-color: rgba(255,255,255,0.12);
  background: rgba(25,27,34,0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

body.dark-mode .csp-memory-action-btn:active {
  background: rgba(255,255,255,0.08);
}

body.dark-mode .csp-memory-latest-card,
body.dark-mode .csp-memory-empty {
  border-color: rgba(255,255,255,0.1);
  background: rgba(25,27,34,0.96);
  color: #f4f6fb;
}

body.dark-mode .csp-memory-latest-title {
  color: #f4f6fb;
}

body.dark-mode .csp-memory-latest-text {
  color: rgba(244,246,251,0.76);
}

body.dark-mode .csp-memory-reader-panel {
  border-color: rgba(255,255,255,0.12);
  background: rgba(25,27,34,0.98);
  color: #f4f6fb;
}

body.dark-mode .csp-memory-reader-title {
  color: #f4f6fb;
}

body.dark-mode .csp-memory-reader-icon {
  background: rgba(255,255,255,0.08);
}

body.dark-mode .csp-memory-reader-page-view,
body.dark-mode .csp-memory-reader-page-view .csp-memory-reader-panel {
  background:
    linear-gradient(180deg, #f5f5f3 0%, #eeeeeb 100%);
  color: #171717;
}

body.dark-mode .csp-memory-reader-page-view .csp-memory-reader-top {
  border-bottom-color: rgba(20, 22, 26, 0.08);
  background: rgba(245, 245, 243, 0.94);
}

body.dark-mode .csp-memory-reader-page-view .csp-memory-reader-title {
  color: #151515;
}

body.dark-mode .csp-memory-reader-page-view .csp-memory-reader-icon {
  background: rgba(30, 34, 42, 0.06);
  color: #171717;
}

body.dark-mode .csp-memory-reader-page-view .csp-memory-reader-index {
  color: #777;
}

body.dark-mode .csp-heart-page,
body.dark-mode .csp-heart-title {
  color: #f3f3f3;
}

body.dark-mode .csp-heart-summary-card {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(28, 30, 38, 0.88), rgba(28, 30, 38, 0.68)),
    linear-gradient(135deg, rgba(216, 79, 119, 0.2), rgba(126, 201, 216, 0.16));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .csp-heart-hours {
  color: #fff;
}

body.dark-mode .csp-heart-hours span,
body.dark-mode .csp-heart-kicker,
body.dark-mode .csp-heart-role-copy span,
body.dark-mode .csp-heart-session-empty,
body.dark-mode .csp-heart-session-row em,
body.dark-mode .csp-companion-modal-subtitle,
body.dark-mode .csp-companion-asset-note {
  color: rgba(244, 246, 251, 0.62);
}

body.dark-mode .csp-heart-role-card,
body.dark-mode .csp-heart-session-list,
body.dark-mode .csp-companion-modal-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(25, 27, 34, 0.96);
  color: #f4f6fb;
}

body.dark-mode .csp-heart-role-copy strong,
body.dark-mode .csp-heart-session-row span,
body.dark-mode .csp-companion-switch {
  color: #f4f6fb;
}

body.dark-mode .csp-heart-role-avatar {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f6fb;
}

body.dark-mode .csp-heart-session-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 360px) {
  .csp-cover-widget {
    --csp-disc-size: 88px;
    --csp-disc-half: 44px;
    left: 4px;
    right: 4px;
    height: 96px;
  }

  .csp-vinyl-disc {
    width: 100%;
    height: 100%;
  }

  .csp-cover-names {
    font-size: 13px;
  }

  .csp-tab-icon svg {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 720px) {
  .csp-memory-reader-panel {
    width: calc(100vw - 14px);
    padding: 8px;
  }

  .csp-memory-reader-book {
    width: 100%;
    padding: 10px 38px;
  }

  .csp-memory-page-scroll {
    padding: 12px;
  }

  .csp-memory-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .csp-memory-chat-shot,
  .csp-memory-scene-section {
    grid-row: auto;
  }

  .csp-memory-phone-body {
    max-height: 170px;
  }

  .csp-memory-scene-frame {
    height: 150px;
  }
}

@media (max-width: 420px) {
  .csp-heart-summary-card {
    min-height: 230px;
    padding: 20px 14px;
  }

  .csp-heart-hours {
    font-size: 42px;
  }

  .csp-companion-two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .csp-companion-shell {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .csp-companion-head {
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
  }

  .csp-companion-ring {
    width: min(64vw, 206px);
  }

  .csp-companion-timer {
    top: calc(50% + min(32vw, 103px) + 16px);
    font-size: 34px;
  }

  .csp-companion-bubble {
    bottom: calc(50% + min(32vw, 103px) + 18px);
    width: min(86vw, 340px);
  }

  .csp-companion-bubble-inner {
    max-height: 132px;
    font-size: 13px;
  }

  .csp-memory-book-cover {
    width: min(100%, 360px);
  }

  .csp-memory-book-spine {
    width: 34px;
  }

  .csp-memory-book-label {
    padding: 28px 34px 26px 52px;
  }

  .csp-memory-book-label strong {
    font-size: 24px;
  }

  .csp-memory-reader-book {
    padding: 8px 32px;
  }

  .csp-memory-reader-nav {
    width: 28px;
    height: 48px;
  }

  .csp-memory-reader-nav.newer {
    left: 3px;
  }

  .csp-memory-reader-nav.older {
    right: 3px;
  }
}

@media (max-width: 360px) {
  .csp-memory-book-label strong {
    font-size: 21px;
  }

  .csp-memory-page-head h3 {
    font-size: 18px;
  }
}
