@font-face {
  font-family: "LiuYuHei70";
  src: url("https://pic5.fukit.cn/autoupload/iHX6zeT8nny6uZ3OAS1fANiO_OyvX7mIgxFBfDMDErs/20260426/YOj3/Fxye-%E6%9E%B3%E4%B8%8E%E9%BB%91_70.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "GHomeNoteHand";
  src: url("https://cissiexu0214-fontdatabase.static.hf.space/a1.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "SparklingDigits";
  src: url("./assets/sparkling-digits.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0030-0039;
}

:root {
  --app-vvh: 100svh;
  --paper: #f5e4e8;
  --ink: #3f3a3d;
  --muted: #b7aaae;
  --line: rgba(255, 255, 255, 0.72);
  --soft: #fbf6f7;
  --rose: #ad6278;
  --rose-deep: #98566b;
  --accent: #ad6278;
  --accent-soft: #f8e9ee;
  --user: #ffffff;
  --bottom-nav-space: 118px;
  --ui-display: "LiuYuHei70", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --note-font: "GHomeNoteHand", "LXGW WenKai", "Kaiti SC", "STKaiti", "PingFang SC", "Hiragino Sans GB", serif;
  --em-emphasis-color: #ffe7a3;
  --em-outline: rgba(40, 10, 30, 0.95);
  --em-emphasis-glow: 0 0 5px rgba(255, 215, 0, 0.38), 0 0 11px rgba(255, 126, 179, 0.22);
  font-family: "Avenir Next", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.56), transparent 18rem),
    radial-gradient(circle at 88% 18%, rgba(255, 247, 250, 0.68), transparent 20rem),
    linear-gradient(180deg, #f2dfe4 0%, #efd8df 45%, #f7ebee 100%);
}

html[data-app-theme="night"] {
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 79, 163, 0.10), transparent 18rem),
    radial-gradient(circle at 88% 18%, rgba(173, 98, 120, 0.12), transparent 20rem),
    linear-gradient(180deg, #0c0a0f 0%, #110b13 48%, #151016 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.56), transparent 18rem),
    radial-gradient(circle at 88% 18%, rgba(255, 247, 250, 0.68), transparent 20rem),
    linear-gradient(180deg, #f2dfe4 0%, #efd8df 45%, #f7ebee 100%);
}

html,
body,
#app {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#app {
  min-height: 100dvh;
}

body[data-view] {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%);
}

body[data-view][data-app-theme="night"] {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 79, 163, 0.1), transparent 30%),
    radial-gradient(circle at 0 72%, rgba(210, 187, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
}

body[data-view="chat"][data-chat-theme="day"] {
  background:
    radial-gradient(circle at 84% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 4% 86%, rgba(170, 135, 210, 0.07), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%);
}

body[data-view="chat"][data-chat-theme="night"] {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 79, 163, 0.10), transparent 30%),
    radial-gradient(circle at 0 72%, rgba(210, 187, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
}

body[data-view]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: inherit;
}

body[data-view] #app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  background: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: 100%;
  min-height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  overflow-x: clip;
}

.top-card {
  position: sticky;
  top: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 16px 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: rgba(255, 252, 252, 0.64);
  box-shadow: 0 18px 56px rgba(138, 91, 103, 0.08);
  backdrop-filter: blur(22px);
}

.top-card.center-title {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
}

.top-card.center-title .brand {
  justify-content: center;
}

.top-card.center-title .subtle {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand.no-dot {
  justify-content: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #70a6d9;
  box-shadow: 0 0 0 8px rgba(112, 166, 217, 0.14);
}

.subtle {
  color: var(--muted);
  font-size: 14px;
}

.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.primary-card,
.module-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(48, 42, 34, 0.07);
  transition: transform 160ms ease, border-color 160ms ease;
}

.primary-card:hover,
.module-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent), white 55%);
}

.primary-card {
  min-height: 430px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #347197;
}

.primary-card .spark {
  font-size: 72px;
  line-height: 1;
}

.primary-card h1 {
  margin: 22px 0 0;
  font-size: 46px;
  letter-spacing: 0;
}

.side-stack {
  display: grid;
  gap: 22px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.module-card {
  min-height: 168px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #202020;
  background: rgba(255, 255, 255, 0.82);
}

.module-card .icon {
  color: #5b9de8;
  font-size: 38px;
}

.module-card strong {
  font-size: 24px;
}

.module-card.disabled {
  opacity: 0.5;
}

.home-shell {
  max-width: 620px;
  padding-bottom: var(--bottom-nav-space);
}

.memory-shell {
  max-width: 620px;
  overflow-x: clip;
}

.memory-shell,
.memory-shell * {
  min-width: 0;
}

.module-shell {
  max-width: 620px;
  padding-bottom: var(--bottom-nav-space);
}

.chat-shell {
  max-width: 620px;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}

.chat-shell .app-page {
  height: 100%;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.chat-shell .panel.main {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: rgba(255, 252, 252, 0.38);
}

.lair-hero {
  padding: 26px 8px 12px;
  color: var(--rose);
}

.lair-kicker {
  font-family: var(--ui-display);
  color: rgba(173, 98, 120, 0.24);
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.58em;
  text-align: center;
}

.anniversary-names {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 34px;
  color: var(--rose);
  font-family: Didot, "Bodoni 72", "Times New Roman", "Songti SC", serif;
  font-size: clamp(44px, 9vw, 72px);
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 500;
}

.anniversary-names b {
  color: rgba(173, 98, 120, 0.32);
  font-size: 0.56em;
  font-weight: 400;
}

.anniversary-script {
  display: block;
  width: min(76%, 390px);
  aspect-ratio: 488.6 / 229.91;
  flex: 0 1 390px;
  background: currentColor;
  -webkit-mask: url("./assets/sparkling-g-and-q.svg") center / contain no-repeat;
  mask: url("./assets/sparkling-g-and-q.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 20px rgba(255, 176, 204, 0.14));
}

.anniversary-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  color: rgba(173, 98, 120, 0.32);
}

.anniversary-meta > span {
  font-family: var(--ui-display);
  font-size: 13px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.anniversary-meta strong {
  display: grid;
  justify-items: center;
  color: var(--rose);
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-size: clamp(48px, 10vw, 82px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.8;
}

.anniversary-meta small {
  margin-top: 12px;
  color: rgba(173, 98, 120, 0.36);
  font-family: var(--ui-display);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.5em;
  text-transform: uppercase;
}

.home-card {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background: rgba(255, 252, 252, 0.72);
  box-shadow: 0 22px 60px rgba(138, 91, 103, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
}

.page-bottom-spacer {
  height: var(--bottom-nav-space);
}

.home-card header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-card header .home-icon {
  line-height: 1;
  margin-top: 1px;
}

.home-card header .memo-plus {
  align-self: start;
}

.home-card header strong {
  display: block;
  font-family: var(--ui-display);
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
}

.home-card header span,
.home-card small {
  display: block;
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.28);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.welcome-card {
  border-left: 0;
}

.welcome-card p {
  margin: 0;
  color: #696065;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.65;
  text-align: center;
}

.welcome-card footer {
  margin-top: 12px;
  color: rgba(63, 58, 61, 0.36);
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.08em;
  text-align: right;
}

.home-icon {
  color: var(--rose);
  font-size: 24px;
}

.memo-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.memo-line {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
}

.memo-line > button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(173, 98, 120, 0.24);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-weight: 400;
  padding: 0;
}

.memo-line > button.done {
  border-color: var(--rose);
  background: var(--rose);
}

.memo-line.event > button {
  width: 12px;
  height: 12px;
  margin: 6px auto 0;
  border: 0;
  background: var(--tag-color);
  color: transparent;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tag-color), transparent 86%);
  pointer-events: none;
}

.memo-line.done {
  opacity: 0.86;
}

.memo-line strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 400;
}

.memo-line small {
  display: block;
  margin-top: 4px;
  color: rgba(63, 58, 61, 0.36);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.home-today-empty {
  padding: 6px 2px 2px;
  color: rgba(63, 58, 61, 0.42);
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.6;
}

.memo-plus {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--rose);
  font-size: 28px;
  line-height: 1;
  padding: 0 2px;
}

.memo-editor form {
  position: relative;
  display: grid;
  gap: 14px;
}

.memo-editor {
  position: relative;
  z-index: 28;
  overflow: visible;
}

.memo-editor input,
.memo-editor textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.82);
  color: var(--ink);
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 24px rgba(138, 91, 103, 0.04);
}

.memo-picker {
  position: relative;
}

.memo-picker-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.82);
  color: var(--ink);
  padding: 13px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 24px rgba(138, 91, 103, 0.04);
}

.memo-picker-trigger strong {
  font-family: var(--ui-display);
  font-size: 14px;
  letter-spacing: 0.14em;
  font-weight: 400;
}

.memo-picker-trigger b {
  color: rgba(63, 58, 61, 0.32);
}

.memo-picker-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: rgba(255, 252, 252, 0.96);
  box-shadow: 0 20px 48px rgba(138, 91, 103, 0.14);
  backdrop-filter: blur(22px);
}

.memo-picker-panel button {
  border: 0;
  border-radius: 15px;
  background: rgba(248, 233, 238, 0.5);
  color: rgba(63, 58, 61, 0.64);
  padding: 11px 12px;
  font-family: var(--ui-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-align: left;
}

.memo-picker-panel button.active {
  background: var(--rose);
  color: white;
}

.memo-date-panel {
  left: auto;
  right: 0;
  width: min(calc(100vw - 56px), 430px);
  gap: 12px;
  padding: 16px;
  z-index: 35;
}

.memo-calendar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.memo-calendar-head strong {
  justify-self: center;
  font-family: var(--ui-display);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.memo-calendar-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(248, 233, 238, 0.62);
  color: var(--rose);
  padding: 0;
  font-size: 24px;
}

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

.memo-calendar-grid b {
  color: rgba(63, 58, 61, 0.28);
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
}

.memo-calendar-grid span,
.memo-calendar-grid button {
  display: grid;
  place-items: center;
  min-height: 38px;
}

.memo-calendar-grid button {
  border: 1px solid rgba(173, 98, 120, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: #5f565b;
  padding: 0;
  text-align: center;
}

.memo-calendar-grid button.today {
  border-color: rgba(173, 98, 120, 0.42);
  color: var(--rose);
}

.memo-calendar-grid button.active {
  border-color: var(--rose);
  background: var(--rose);
  color: white;
}

.memo-board {
  position: relative;
  z-index: 1;
}

.memo-section-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.memo-section-head .home-icon {
  line-height: 1;
  margin-top: 1px;
}

.memo-section-head div {
  min-width: 0;
}

.memo-section-head strong,
.memo-section-head small {
  display: block;
}

.memo-section-head strong {
  font-family: var(--ui-display);
  color: var(--ink);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.memo-section-head small {
  margin-top: 4px;
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.28);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.memo-section-head b {
  color: rgba(63, 58, 61, 0.28);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  margin-top: 0;
}

.memo-board.collapsed {
  padding-bottom: 20px;
}

.memo-editor {
  position: relative;
  z-index: 22;
}

.memo-editor:has(.memo-picker-panel) {
  z-index: 34;
}

.memo-editor textarea {
  min-height: 74px;
  resize: vertical;
}

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

.memo-controls label {
  display: grid;
  gap: 7px;
}

.memo-controls span {
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.32);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.memo-add {
  justify-self: center;
  min-width: 96px;
  padding: 9px 22px;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.memo-board {
  display: grid;
  gap: 16px;
}

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

.memo-task {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--tag-color), white 70%);
  border-radius: 22px;
  background: rgba(255, 253, 251, 0.72);
  box-shadow: 0 12px 30px rgba(138, 91, 103, 0.06);
}

.memo-task.done {
  opacity: 0.58;
}

.memo-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid color-mix(in srgb, var(--tag-color), white 35%);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-weight: 400;
}

.memo-task.done .memo-check {
  background: var(--tag-color);
  border-color: var(--tag-color);
}

.memo-task-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.memo-task-title strong {
  color: #5f565b;
  font-size: 17px;
  font-weight: 400;
}

.memo-task-title span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color), white 78%);
  color: var(--tag-color);
  padding: 4px 9px;
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.memo-task p {
  margin: 8px 0 0;
  color: rgba(63, 58, 61, 0.58);
  line-height: 1.55;
}

.memo-task small {
  margin-top: 8px;
  color: rgba(63, 58, 61, 0.34);
}

.memo-delete {
  border: 0;
  background: transparent;
  color: rgba(63, 58, 61, 0.28);
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.cycle-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  border-color: rgba(199, 95, 130, 0.18);
  background: linear-gradient(135deg, rgba(255, 252, 252, 0.86), rgba(250, 224, 233, 0.58));
}

.cycle-hero span,
.cycle-prediction header span {
  display: block;
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.32);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cycle-hero strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}

.cycle-hero small {
  display: block;
  margin-top: 8px;
  color: rgba(63, 58, 61, 0.48);
}

.cycle-hero b {
  font-family: var(--ui-display);
  color: var(--rose);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.cycle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 4px;
}

.cycle-action {
  min-height: 48px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.cycle-action.secondary {
  background: rgba(255, 252, 252, 0.82);
  color: var(--rose);
  border: 1px solid rgba(199, 95, 130, 0.2);
  box-shadow: 0 12px 26px rgba(138, 91, 103, 0.06);
}

.cycle-action:disabled {
  opacity: 0.42;
  pointer-events: none;
}

.cycle-prediction {
  display: grid;
  gap: 18px;
}

.cycle-wheel {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  justify-self: center;
  margin: 22px auto 2px;
}

.cycle-wheel svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cycle-wheel circle {
  fill: rgba(255, 255, 255, 0.56);
  stroke-width: 2.4;
}

.cycle-dot-period {
  stroke: rgba(173, 98, 160, 0.82);
  fill: rgba(221, 188, 216, 0.58);
}

.cycle-dot-today {
  stroke: rgba(173, 98, 160, 0.95);
  fill: rgba(199, 95, 130, 0.68);
  filter: drop-shadow(0 3px 7px rgba(173, 98, 120, 0.26));
}

.cycle-dot-ovulation {
  stroke: rgba(126, 106, 199, 0.78);
  fill: rgba(238, 233, 255, 0.88);
}

.cycle-dot-fertile {
  stroke: rgba(217, 133, 69, 0.62);
  fill: rgba(255, 244, 226, 0.82);
}

.cycle-dot-calm {
  stroke: rgba(154, 171, 112, 0.58);
}

.cycle-wheel-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -44%);
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: end;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  text-align: center;
}

.cycle-wheel-center strong {
  font-family: Georgia, "Times New Roman", serif;
  color: #4d474a;
  font-size: 78px;
  font-weight: 400;
  line-height: 0.86;
}

.cycle-wheel-center span {
  padding-bottom: 10px;
  color: rgba(63, 58, 61, 0.8);
  font-size: 20px;
}

.cycle-wheel-center b {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 72px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(173, 98, 160, 0.56);
  color: white;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.cycle-wheel-tag {
  position: absolute;
  display: grid;
  gap: 3px;
  color: rgba(154, 171, 112, 0.88);
  font-family: var(--ui-display);
  text-align: center;
  letter-spacing: 0.08em;
}

.cycle-wheel-tag strong {
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 250, 252, 0.92);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 400;
  box-shadow: 0 8px 18px rgba(138, 91, 103, 0.06);
}

.cycle-wheel-tag small {
  font-size: 10px;
  color: rgba(63, 58, 61, 0.28);
}

.cycle-wheel-tag.next {
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(173, 98, 160, 0.82);
}

.cycle-wheel-tag.ovulation {
  left: -22px;
  bottom: 68px;
}

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

.cycle-range {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 82px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.62);
}

.cycle-range > span,
.cycle-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--tag-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tag-color), transparent 86%);
}

.cycle-range strong {
  display: block;
  color: var(--ink);
  font-weight: 400;
}

.cycle-range small {
  display: block;
  margin-top: 4px;
  color: rgba(63, 58, 61, 0.44);
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cycle-record {
  grid-template-columns: 26px minmax(0, 1fr);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 15;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  width: min(620px, 100vw);
  height: calc(70px + env(safe-area-inset-bottom));
  min-height: 0;
  padding: 6px 18px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 252, 252, 0.76), rgba(255, 248, 250, 0.94));
  box-shadow: 0 -18px 50px rgba(138, 91, 103, 0.08);
  backdrop-filter: blur(24px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 0;
  grid-template-rows: 1fr;
  border: 0;
  background: transparent;
  color: rgba(63, 58, 61, 0.46);
  padding: 0;
}

.bottom-nav button:not(.chat-orb) {
  grid-template-rows: auto;
  padding-top: 24px;
}

.bottom-nav button:not(.chat-orb) span {
  display: none;
}

.bottom-nav span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 25px;
  line-height: 1;
}

.bottom-nav small {
  font-family: var(--ui-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottom-nav button.active {
  color: var(--rose-deep);
}

.bottom-nav .chat-orb {
  transform: translateY(-26px);
  color: white;
  gap: 0;
  grid-template-rows: 58px auto;
  padding-top: 0;
}

.bottom-nav .chat-orb span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--rose);
  color: white;
  font-size: 29px;
  box-shadow: 0 16px 30px rgba(173, 98, 120, 0.26);
}

.bottom-nav .chat-orb small {
  color: var(--rose-deep);
  font-size: 13px;
  transform: translateY(9px);
}

.simple-head {
  position: sticky;
  top: 18px;
  z-index: 60;
  min-height: 76px;
  display: grid;
  place-items: center;
  margin: -4px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 248, 250, 0.76);
  box-shadow: 0 16px 42px rgba(138, 91, 103, 0.08);
  backdrop-filter: blur(22px);
}

.simple-head h2 {
  margin: 0;
  font-family: var(--ui-display);
  color: var(--ink);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.more-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.more-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 252, 252, 0.72);
  padding: 22px 26px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 42px rgba(138, 91, 103, 0.07);
}

.more-card.setting-card {
  justify-content: flex-start;
}

.more-card > span {
  order: 2;
  font-size: 30px;
}

.more-card strong,
.more-card small {
  display: block;
}

.more-card strong {
  font-family: var(--ui-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.more-card small {
  margin-top: 12px;
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.26);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.more-card.disabled {
  opacity: 0.55;
}

.senses-card {
  display: grid;
  gap: 14px;
}

.senses-card-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.senses-card-head strong,
.senses-card-head span,
.senses-card-head small {
  display: block;
}

.senses-card-head strong {
  font-family: var(--ui-display);
  font-size: 24px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

.senses-card-head span,
.senses-card-head small {
  margin-top: 6px;
  font-family: var(--ui-display);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.senses-card-head small {
  margin-top: 0;
  text-align: right;
  max-width: 220px;
}

.senses-card-body {
  border-top: 1px solid rgba(173, 98, 120, 0.12);
  padding-top: 14px;
}

.senses-form {
  gap: 18px;
}

.senses-row {
  display: grid;
  gap: 16px;
  align-items: end;
}

.senses-row-top {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
}

.senses-row-location {
  grid-template-columns: minmax(140px, 1.1fr) minmax(110px, 0.7fr) minmax(190px, 1.4fr);
  margin-top: 2px;
}

.senses-row-location-bottom {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  margin-top: 2px;
}

.senses-row-weather-enable {
  grid-template-columns: minmax(150px, max-content);
  justify-content: start;
}

.senses-row-weather-options {
  grid-template-columns: auto minmax(120px, 180px);
  justify-content: start;
  align-items: end;
  margin-top: 2px;
}

.senses-row-weather-api {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  margin-top: 2px;
}

.senses-weather-result {
  margin-top: 18px;
}

.senses-row-notifications {
  grid-template-columns: minmax(180px, 0.8fr) auto;
  align-items: center;
  justify-content: start;
}

.senses-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 235, 246, 0.92);
}

.senses-form .senses-toggle {
  align-content: center;
  grid-template-columns: minmax(0, auto) auto;
  justify-content: start;
  align-items: center;
  column-gap: 10px;
}

.senses-form label span {
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(246, 190, 219, 0.68);
  text-transform: uppercase;
}

.senses-form input[type="text"],
.senses-form input[type="password"],
.senses-form input:not([type]) {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(246, 190, 219, 0.16);
  border-radius: 14px;
  background: rgba(18, 11, 17, 0.74);
  color: rgba(255, 245, 250, 0.96);
  padding: 10px 12px;
  font-family: var(--ui-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.senses-form input::placeholder {
  color: rgba(246, 190, 219, 0.36);
}

.senses-form input[type="checkbox"] {
  appearance: none;
  width: 36px;
  height: 20px;
  border: 1px solid rgba(246, 190, 219, 0.28);
  border-radius: 999px;
  background: rgba(18, 11, 17, 0.78);
  position: relative;
  justify-self: start;
}

.senses-form input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: rgba(246, 190, 219, 0.62);
  transition: transform 0.16s ease, background 0.16s ease;
}

.senses-form input[type="checkbox"]:checked {
  border-color: rgba(255, 79, 163, 0.56);
  background: rgba(255, 79, 163, 0.22);
}

.senses-form input[type="checkbox"]:checked::after {
  transform: translateX(16px);
  background: rgba(255, 242, 249, 0.96);
}

.senses-form .memo-controls.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.senses-form .senses-actions {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
}

.senses-form .send,
.senses-form .ghost,
.senses-form .actions .ghost:first-child {
  min-width: 0;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 13px;
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  box-shadow: none;
  white-space: nowrap;
}

.senses-form .senses-segment {
  min-height: 38px;
  justify-self: start;
}

.senses-form .senses-segment button {
  padding: 8px 12px;
}

.senses-status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid rgba(246, 190, 219, 0.2);
  border-radius: 999px;
  background: rgba(18, 11, 17, 0.58);
  color: rgba(246, 190, 219, 0.76);
  padding: 8px 14px;
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.senses-form .send {
  border: 1px solid rgba(255, 79, 163, 0.42);
  background: rgba(255, 79, 163, 0.24);
  color: rgba(255, 242, 249, 0.96);
}

.senses-form .ghost,
.senses-form .actions .ghost:first-child {
  border: 1px solid rgba(246, 190, 219, 0.24);
  background: rgba(18, 11, 17, 0.58);
  color: rgba(246, 190, 219, 0.72);
}

.memory-palace-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-room {
  min-height: 96px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon count";
  align-content: center;
  align-items: center;
  column-gap: 9px;
  row-gap: 2px;
  border: 1px solid color-mix(in srgb, var(--room-color), white 74%);
  border-radius: 20px;
  background: rgba(255, 252, 252, 0.68);
  color: var(--ink);
  padding: 12px 13px;
  text-align: left;
  box-shadow: 0 12px 26px rgba(138, 91, 103, 0.05);
}

.memory-room.active {
  background: color-mix(in srgb, var(--room-color), white 86%);
  border-color: color-mix(in srgb, var(--room-color), white 45%);
}

.memory-room span {
  grid-area: icon;
  display: grid;
  place-items: center;
  color: var(--room-color);
  font-size: 17px;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", var(--ui-display);
}

.memory-room strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--ui-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.memory-room small {
  grid-area: count;
  color: rgba(63, 58, 61, 0.36);
  font-family: var(--ui-display);
  font-size: 9px;
  letter-spacing: 0.1em;
  line-height: 1.45;
}

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

.memory-search-card input {
  width: 100%;
  border: 1px solid rgba(255, 214, 235, 0.18);
  border-radius: 18px;
  background: rgba(20, 12, 18, 0.72);
  color: rgba(255, 242, 249, 0.94);
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 214, 235, 0.08), 0 12px 26px rgba(10, 6, 10, 0.16);
}

.memory-search-card input::placeholder {
  color: rgba(255, 214, 235, 0.42);
}

.memory-search-card input:focus {
  border-color: rgba(255, 79, 163, 0.48);
  outline: none;
}

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

.memory-mode-toggle button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(63, 58, 61, 0.46);
  padding: 11px 12px;
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.memory-mode-toggle button.active {
  background: var(--rose);
  color: white;
  box-shadow: 0 12px 24px rgba(173, 98, 120, 0.18);
}

.memory-retag-button {
  width: auto;
  min-height: 46px;
  white-space: nowrap;
  border: 1px solid rgba(255, 79, 163, 0.28);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.18);
  color: rgba(255, 242, 249, 0.94);
  padding: 0 16px;
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.13em;
  box-shadow: 0 14px 28px rgba(10, 6, 10, 0.18);
}

.memory-retag-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.memory-retag-mode,
.memory-status-segment {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(18, 11, 17, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 235, 0.14);
}

.memory-retag-mode button,
.memory-status-segment button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 214, 235, 0.54);
  padding: 10px 12px;
  font-family: var(--ui-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.memory-retag-mode button.active,
.memory-status-segment button.active {
  background: rgba(255, 79, 163, 0.22);
  color: rgba(255, 242, 249, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.28), 0 10px 20px rgba(10, 6, 10, 0.18);
}

.memory-retag-button:disabled {
  opacity: 0.58;
}

.memory-retag-scope {
  margin-top: 10px;
  color: rgba(255, 214, 235, 0.68);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.memory-retag-progress {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: 16px;
  background: rgba(255, 79, 163, 0.075);
  padding: 10px 12px;
}

.memory-retag-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.memory-retag-progress strong,
.memory-retag-progress span {
  font-family: var(--ui-display);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-retag-progress strong {
  color: rgba(255, 242, 249, 0.94);
  font-size: 12px;
}

.memory-retag-progress span {
  color: rgba(255, 214, 235, 0.62);
  font-size: 10px;
  text-align: right;
}

.memory-retag-progress i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 214, 235, 0.12);
}

.memory-retag-progress b {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4fa3, #ffd6eb);
  transition: width 220ms ease;
}

.memory-retag-progress i.indeterminate b {
  width: 34% !important;
  animation: memoryProgressIndeterminate 1.15s ease-in-out infinite;
}

@keyframes memoryProgressIndeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.memory-room-summary-card {
  display: grid;
  gap: 10px;
  border-color: color-mix(in srgb, var(--room-color, var(--rose)), transparent 68%);
}

.memory-room-summary-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.memory-room-summary-card header span {
  color: rgba(255, 214, 235, 0.64);
}

.memory-room-summary-card p,
.memory-summary-text {
  margin: 0;
  color: rgba(247, 237, 243, 0.76);
  font-size: 13px;
  line-height: 1.75;
}

.memory-summary-pill,
.memory-summary-save {
  border: 1px solid rgba(255, 79, 163, 0.26);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.memory-summary-pill {
  min-height: 26px;
  padding: 0 10px;
  white-space: nowrap;
}

.memory-summary-stale {
  border: 1px solid rgba(255, 213, 119, 0.22);
  border-radius: 14px;
  background: rgba(255, 213, 119, 0.08);
  color: rgba(255, 230, 166, 0.9);
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.55;
}

.memory-summary-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.memory-summary-counts span {
  border: 1px solid rgba(255, 79, 163, 0.18);
  border-radius: 10px;
  background: rgba(255, 79, 163, 0.07);
  color: rgba(255, 214, 235, 0.62);
  padding: 7px 9px;
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.memory-summary-counts b {
  display: inline-block;
  margin-right: 6px;
  color: rgba(255, 242, 249, 0.94);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-summary-editor {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(255, 214, 235, 0.14);
  border-radius: 12px;
  background: rgba(18, 13, 19, 0.56);
  color: rgba(247, 237, 243, 0.88);
  padding: 10px 11px;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.memory-summary-editor:focus {
  border-color: rgba(255, 79, 163, 0.5);
  outline: none;
}

.memory-summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memory-summary-actions span {
  min-width: 0;
  color: rgba(255, 214, 235, 0.56);
  font-size: 11px;
}

.memory-summary-save {
  min-height: 28px;
  padding: 0 12px;
  white-space: nowrap;
}

.memory-lifecycle-card {
  display: grid;
  gap: 10px;
}

.memory-lifecycle-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.memory-lifecycle-card header > div:nth-child(2) {
  flex: 1 1 180px;
  min-width: 0;
}

.memory-lifecycle-card header .memory-summary-pill {
  flex: 0 0 auto;
}

.memory-lifecycle-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.memory-lifecycle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 214, 235, 0.62);
  font-size: 12px;
}

.memory-lifecycle-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.memory-lifecycle-row input {
  width: 64px;
  min-height: 30px;
  border: 1px solid rgba(255, 214, 235, 0.16);
  border-radius: 10px;
  background: rgba(18, 13, 19, 0.56);
  color: rgba(247, 237, 243, 0.9);
  padding: 0 8px;
}

.memory-lifecycle-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.memory-lifecycle-stats span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 79, 163, 0.18);
  border-radius: 10px;
  background: rgba(255, 79, 163, 0.07);
  color: rgba(255, 214, 235, 0.62);
  padding: 7px 4px;
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.memory-lifecycle-stats b {
  display: block;
  margin: 0 0 3px;
  color: rgba(255, 242, 249, 0.94);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.memory-lifecycle-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-lifecycle-coverage span {
  min-height: 24px;
  border: 1px solid rgba(255, 214, 235, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 237, 243, 0.72);
  padding: 4px 9px;
  font-size: 11px;
  line-height: 1.25;
}

.memory-lifecycle-list {
  display: grid;
  gap: 8px;
}

.memory-lifecycle-section {
  display: grid;
  gap: 8px;
}

.memory-lifecycle-section > strong {
  color: rgba(255, 214, 235, 0.7);
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.memory-lifecycle-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 214, 235, 0.13);
  border-radius: 14px;
  background: rgba(18, 13, 19, 0.42);
  padding: 10px 11px;
}

.memory-lifecycle-item strong,
.memory-lifecycle-item small,
.memory-lifecycle-item em {
  display: block;
}

.memory-lifecycle-item strong {
  color: rgba(255, 242, 249, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.memory-lifecycle-item small {
  margin-top: 3px;
  color: rgba(255, 214, 235, 0.48);
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-lifecycle-item p {
  margin-top: 7px;
  color: rgba(247, 237, 243, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.memory-lifecycle-item em {
  margin-top: 5px;
  color: rgba(255, 214, 235, 0.62);
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.memory-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 6px;
  min-width: 86px;
}

.memory-lifecycle-status-actions {
  min-width: 86px;
}

.memory-lifecycle-item button {
  min-height: 30px;
  border: 1px solid rgba(255, 79, 163, 0.26);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.12);
  color: rgba(255, 214, 235, 0.92);
  padding: 0 12px;
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.memory-lifecycle-actions button {
  min-height: 26px;
  padding: 0 9px;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.memory-aux-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 79, 163, 0.2);
  border-radius: 14px;
  color: rgba(255, 214, 235, 0.58);
  padding: 10px 12px;
  font-size: 12px;
}

.memory-list-card {
  display: grid;
  gap: 16px;
}

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

.memory-entry {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--room-color), white 72%);
  background: rgba(255, 253, 251, 0.68);
  cursor: pointer;
}

.memory-entry > span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 5px;
  background: var(--room-color);
  color: #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", var(--ui-display);
  font-size: 10px;
  line-height: 1;
}

.memory-entry strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

.memory-entry small {
  display: block;
  margin-top: 7px;
  color: rgba(63, 58, 61, 0.35);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-entry em {
  display: block;
  margin-top: 4px;
  color: rgba(63, 58, 61, 0.28);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.memory-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.memory-entry-actions button {
  border: 0;
  border-radius: 999px;
  background: rgba(248, 233, 238, 0.72);
  color: var(--rose);
  padding: 6px 10px;
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.memory-entry-actions button:first-child {
  background: color-mix(in srgb, var(--room-color), white 82%);
  color: var(--room-color);
}

.memory-detail-modal {
  max-width: 560px;
  max-height: min(820px, calc(100vh - 44px));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 16px;
  border-color: color-mix(in srgb, var(--room-color), white 64%);
}

.memory-detail-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.memory-detail-head > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--room-color);
  color: #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", var(--ui-display);
  font-size: 12px;
  line-height: 1;
}

.memory-detail-head h3 {
  margin: 0;
}

.memory-detail-head small,
.memory-detail-block > label,
.memory-detail-stats span {
  color: rgba(63, 58, 61, 0.36);
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.memory-detail-text {
  min-height: 138px;
  line-height: 1.7;
}

.memory-interpretation {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 12px 14px;
  line-height: 1.65;
}

.memory-detail-block {
  display: grid;
  gap: 10px;
}

.memory-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.memory-choice input,
.memory-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.memory-choice span,
.memory-stars span {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(63, 58, 61, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.78);
  padding: 0 13px;
  font-size: 13px;
}

.memory-choice input:checked + span,
.memory-stars input:checked + span {
  background: color-mix(in srgb, var(--room-color), white 82%);
  color: var(--room-color);
  border-color: color-mix(in srgb, var(--room-color), white 58%);
}

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

.memory-stars span {
  width: 36px;
  padding: 0;
  font-family: var(--ui-display);
  font-size: 12px;
}

.memory-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.memory-detail-fields input:disabled {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  color: rgba(63, 58, 61, 0.72);
  padding: 0 14px;
  font: inherit;
}

.memory-toggle-grid {
  display: grid;
  gap: 10px;
}

.memory-vector-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(63, 58, 61, 0.62);
  font-size: 14px;
}

.memory-vector-toggle input {
  accent-color: var(--room-color);
}

.memory-source-card {
  display: grid;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--room-color), white 72%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  padding: 13px 14px;
}

.memory-source-card strong {
  color: var(--room-color);
  font-family: var(--ui-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.memory-source-card span,
.memory-source-card small {
  color: rgba(63, 58, 61, 0.48);
  font-size: 13px;
  line-height: 1.45;
}

.memory-index-source-manager {
  gap: 8px;
}

.memory-index-source-note {
  color: rgba(63, 58, 61, 0.52);
  font-size: 12px;
  line-height: 1.5;
}

.memory-index-source-list {
  display: grid;
  gap: 6px;
}

.memory-index-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--room-color), white 76%);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  padding: 9px 9px 9px 12px;
}

.memory-index-source-row strong,
.memory-index-source-row small,
.memory-index-source-row em {
  display: block;
}

.memory-index-source-row strong {
  color: rgba(63, 58, 61, 0.82);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.memory-index-source-row small,
.memory-index-source-row em {
  color: rgba(63, 58, 61, 0.5);
  font-size: 11px;
  line-height: 1.35;
}

.memory-index-source-remove {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--room-color), white 60%);
  background: color-mix(in srgb, var(--room-color), white 88%);
  color: var(--room-color);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.memory-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.memory-detail-stats > div {
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
  padding: 7px 8px;
}

.memory-detail-stats strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
}

.memory-detail-actions {
  justify-content: center;
}

@media (max-width: 620px) {
  .memory-palace-hero {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .memory-room {
    min-height: 54px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "icon"
      "title";
    justify-items: center;
    align-content: center;
    row-gap: 4px;
    border-radius: 12px;
    padding: 7px 5px;
    text-align: center;
  }

  .memory-room span {
    font-size: 14px;
  }

  .memory-room strong {
    max-width: 100%;
    font-size: 10px;
    letter-spacing: 0.03em;
  }

  .memory-room small {
    display: none;
  }

  .memory-search-row {
    grid-template-columns: 1fr;
  }

  .memory-retag-button {
    justify-self: end;
    min-height: 38px;
    padding: 0 14px;
  }

  .memory-retag-control {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
  }

  .memory-retag-mode,
  .memory-status-segment {
    min-height: 38px;
  }

  .memory-retag-mode button,
  .memory-status-segment button {
    padding: 8px 10px;
  }

  .memory-room-summary-card header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .memory-summary-pill {
    min-height: 24px;
    padding: 0 9px;
    font-size: 10px;
  }

  .memory-lifecycle-stats {
    gap: 4px;
  }

  .memory-lifecycle-stats span {
    border-radius: 8px;
    padding: 6px 2px;
    font-size: 8px;
    letter-spacing: 0.02em;
  }

  .memory-lifecycle-stats b {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .memory-detail-modal {
    max-height: calc(100vh - 28px);
  }

  .memory-entry {
    grid-template-columns: 22px minmax(0, 1fr);
  }

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

  .memory-lifecycle-actions,
  .memory-lifecycle-status-actions,
  .memory-merge-actions,
  .memory-merge-actions--four,
  .memory-entry-actions {
    width: 100%;
    min-width: 0;
  }

  .memory-lifecycle-actions,
  .memory-merge-actions,
  .memory-merge-actions--four {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .memory-lifecycle-actions button,
  .memory-merge-actions .memory-summary-pill,
  .memory-merge-actions--four .memory-summary-pill {
    flex: 1 1 86px;
  }

  .memory-entry-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .memory-detail-fields {
    grid-template-columns: 1fr;
  }

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

.month-grid {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

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

.calendar-week {
  position: relative;
  grid-auto-rows: 118px;
}

.month-grid b,
.calendar-weekdays b {
  font-family: var(--ui-display);
  font-weight: 400;
  text-transform: uppercase;
  color: rgba(63, 58, 61, 0.34);
  font-size: 13px;
  text-align: center;
}

.month-day {
  position: relative;
  z-index: 1;
  grid-row: 1;
  display: grid;
  align-content: start;
  justify-items: stretch;
  min-height: 118px;
  border: 1px solid rgba(173, 98, 120, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  color: #5f565b;
  padding: 8px 5px 6px;
  overflow: hidden;
}

.month-day > span {
  justify-self: center;
  font-family: var(--ui-display);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.month-day:disabled {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.month-day.today {
  border-color: var(--rose);
  background: var(--rose);
  color: white;
  box-shadow: 0 10px 24px rgba(173, 98, 120, 0.2);
}

.month-day.selected {
  border-color: rgba(173, 98, 120, 0.46);
  background: rgba(255, 250, 252, 0.88);
  color: var(--rose-deep);
  box-shadow: 0 10px 20px rgba(138, 91, 103, 0.08);
}

.month-day.birthday {
  border-color: rgba(199, 95, 130, 0.42);
  background: linear-gradient(180deg, rgba(255, 247, 250, 0.92), rgba(248, 222, 231, 0.5));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 12px 26px rgba(173, 98, 120, 0.1);
}

.month-day.birthday > span {
  color: var(--rose-deep);
}

.birthday-mark {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.month-day.today.selected {
  background: var(--rose);
  color: white;
}

.month-day.today.birthday,
.month-day.today.selected.birthday {
  background: linear-gradient(180deg, var(--rose), #b8647e);
  color: white;
}

.month-day.today.birthday > span,
.month-day.today.selected.birthday > span,
.month-day.today.birthday .birthday-mark,
.month-day.today.selected.birthday .birthday-mark {
  color: white;
}

.month-day em {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  gap: 4px;
  font-style: normal;
  min-width: 0;
}

.month-day em i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.month-day em i.todo-dot {
  background: rgba(255, 170, 205, 0.78);
}

.month-day em i.event-dot {
  background: var(--tag-color, var(--rose));
}

.month-day em small {
  color: rgba(63, 58, 61, 0.55);
  font-size: 10px;
  line-height: 1;
  text-align: left;
}

.calendar-span-bar {
  position: relative;
  grid-row: 1;
  z-index: 6;
  align-self: start;
  min-width: 0;
  margin: 35px 2px 0;
  border-left: 3px solid var(--tag-color);
  border-radius: 6px;
  background: color-mix(in srgb, var(--tag-color), white 76%);
  color: rgba(63, 58, 61, 0.68);
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.calendar-span-bar.lane-1 {
  margin-top: 56px;
}

.calendar-span-bar.lane-2 {
  margin-top: 77px;
}

.calendar-span-bar.lane-3 {
  margin-top: 98px;
}

.calendar-month-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.calendar-month-actions button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(248, 233, 238, 0.62);
  color: var(--rose);
  font-size: 24px;
}

.calendar-editor,
.calendar-agenda {
  display: grid;
  gap: 16px;
}

.calendar-editor {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.calendar-agenda {
  position: relative;
  z-index: 1;
}

.calendar-form {
  display: grid;
  gap: 14px;
}

.calendar-form input,
.calendar-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.82);
  color: var(--ink);
  padding: 14px 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 24px rgba(138, 91, 103, 0.04);
}

.calendar-form textarea {
  min-height: 68px;
  resize: vertical;
}

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

.calendar-form-grid label {
  display: grid;
  gap: 7px;
}

.calendar-form-grid span {
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.32);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.calendar-switches {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 10px;
}

.calendar-switches > button {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.82);
  color: rgba(63, 58, 61, 0.58);
  font-family: var(--ui-display);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.calendar-switches > button.active {
  background: var(--rose);
  color: white;
}

.calendar-inline-picker {
  position: relative;
}

.calendar-inline-picker .memo-picker-panel,
.calendar-date-picker .memo-picker-panel {
  z-index: 120;
}

.calendar-date-panel {
  left: 0;
  right: auto;
  width: min(calc(100vw - 80px), 380px);
}

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

.calendar-agenda-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.66);
  border: 1px solid color-mix(in srgb, var(--tag-color), white 72%);
}

.calendar-agenda-item > span {
  justify-self: center;
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tag-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tag-color), transparent 86%);
}

.calendar-agenda-item strong {
  display: block;
  color: var(--ink);
  font-weight: 400;
}

.calendar-agenda-item small {
  display: block;
  margin-top: 4px;
  color: rgba(63, 58, 61, 0.36);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.calendar-agenda-item b {
  border-radius: 999px;
  background: rgba(248, 233, 238, 0.74);
  color: var(--rose);
  padding: 5px 9px;
  font-family: var(--ui-display);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.calendar-agenda-item > button:not(.memo-check) {
  border: 0;
  background: transparent;
  color: rgba(63, 58, 61, 0.28);
  font-size: 22px;
}

.calendar-event-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.calendar-event-actions button {
  min-width: 0;
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.88);
  padding: 6px 10px;
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.calendar-event-actions button[data-delete-calendar-event] {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.calendar-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-form-actions .memo-add {
  flex: 1;
}

.calendar-form-actions .ghost {
  width: auto;
  min-width: 112px;
  padding-inline: 18px;
}

.calendar-agenda-item.todo.done {
  opacity: 0.58;
}

.calendar-agenda-item.todo {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.calendar-agenda-item.todo .memo-check {
  justify-self: center;
}

.calendar-note {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: rgba(63, 58, 61, 0.42);
}

.app-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 20px;
  min-height: calc(100vh - 134px);
  padding-bottom: 24px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: rgba(255, 252, 252, 0.66);
  box-shadow: 0 18px 52px rgba(138, 91, 103, 0.08);
  backdrop-filter: blur(22px);
}

.sidebar {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100vh;
  z-index: 20;
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 79, 163, 0.18), transparent 14rem),
    linear-gradient(180deg, rgba(12, 10, 15, 0.98), rgba(24, 13, 21, 0.98));
  border-left: 1px solid rgba(255, 79, 163, 0.26);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  overflow-y: auto;
}

.chat-drawer .sidebar {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(6, 5, 8, 0.58);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.main {
  overflow: hidden;
}

.nav-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
}

.chat-head {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.chat-head > div {
  position: absolute;
  left: 72px;
  right: 72px;
  text-align: center;
}

.chat-head h2 {
  margin: 0;
  font-size: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(99, 181, 116, 0.12);
  background: #63b574;
}

.presence-dot.busy {
  background: #d95757;
  box-shadow: 0 0 0 4px rgba(217, 87, 87, 0.12);
}

.presence-dot.playing {
  background: #5b9de8;
  box-shadow: 0 0 0 4px rgba(91, 157, 232, 0.12);
}

.chat-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.chat-menu {
  position: absolute;
  display: grid;
  place-items: center;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  padding: 0;
}

.chat-back {
  position: absolute;
  display: grid;
  place-items: center;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
  padding: 0;
}

.messages {
  height: calc(100vh - 268px);
  min-height: 420px;
  overflow-y: auto;
  padding: 22px;
}

.chat-shell .messages {
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.load-older-messages {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 8px 14px;
  border: 1px solid rgba(173, 98, 120, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 250, 0.78);
  color: var(--rose);
  font-size: 13px;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(48, 42, 34, 0.06);
}

.load-older-messages:disabled {
  cursor: wait;
  opacity: 0.66;
}

.chat-bridge-panel {
  position: fixed;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  z-index: 219;
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100dvh - 124px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.chat-bridge-panel .bridge-card {
  border-radius: 18px;
  background: #111116;
  max-height: none;
}

.composer {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.composer textarea {
  min-height: 48px;
  height: auto;
  max-height: 132px;
  resize: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 252, 252, 0.86);
  line-height: 1.45;
}

.chat-plus {
  display: grid;
  place-items: center;
  width: 32px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--rose-deep);
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

.send {
  min-width: 88px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #c98296, var(--rose-deep));
  color: white;
  box-shadow: 0 12px 28px rgba(173, 98, 120, 0.22);
}

.icon-send {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: rgba(255, 252, 252, 0.86);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.paper-plane {
  width: 21px;
  height: 21px;
  display: block;
  overflow: visible;
}

.paper-plane path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-send.respond {
  border-color: transparent;
  background: linear-gradient(135deg, #c98296, var(--rose-deep));
  color: white;
}

.msg {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  align-items: flex-start;
}

.msg[data-select-row],
.bubble-line[data-select-bubble-row] {
  cursor: pointer;
}

.msg.selected .bubble,
.bubble-line.selected .bubble {
  outline: 2px solid var(--bubble-accent, var(--accent));
}

.msg.user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(680px, 78%);
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: rgba(255, 253, 251, 0.88);
  position: relative;
}

.moon-star-em {
  display: inline;
  color: var(--em-emphasis-color);
  -webkit-text-fill-color: currentColor;
  background: none;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 600;
  font-style: normal;
  padding: 0 3px;
  margin: 0 1px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-shadow:
    -1px -1px 0 var(--em-outline),
     1px -1px 0 var(--em-outline),
    -1px  1px 0 var(--em-outline),
     1px  1px 0 var(--em-outline),
    var(--em-emphasis-glow);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.msg:not(.user) .bubble {
  border: 1px solid color-mix(in srgb, var(--bubble-accent, var(--accent)) 42%, white);
  box-shadow: 0 12px 30px rgba(138, 91, 103, 0.08);
}

.msg.user .bubble {
  background: rgba(232, 203, 212, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: min(760px, 82%);
}

.bubble-row .bubble {
  max-width: 100%;
}

.bubble-stack {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.bubble-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bubble-line .bubble {
  flex: 0 1 auto;
}

.audio-chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
  font-family: var(--ui-display), "Avenir Next", Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.audio-chip.loading {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 54px;
  width: auto;
}

.typing-bubble span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  color: var(--muted);
  opacity: 0.35;
  animation: typingPulse 900ms ease-in-out infinite;
}

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

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

@keyframes typingPulse {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }

  40% {
    transform: translateY(-3px);
    opacity: 0.75;
  }
}

.edited {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.quote-block {
  margin-bottom: 8px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid rgba(255, 170, 205, 0.78);
  background: transparent;
  color: #ff4fa3;
  font-size: 13px;
  line-height: 1.65;
}

.quote-block span {
  color: rgba(255, 214, 235, 0.74);
}

.quote-block-note {
  display: inline-grid;
  gap: 2px;
  min-width: min(280px, 100%);
  border-left-color: rgba(255, 202, 128, 0.84);
  color: rgba(255, 214, 235, 0.9);
}

.quote-block-note span {
  color: #ffd5e7;
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.quote-block-note small {
  color: rgba(255, 214, 235, 0.58);
  font-size: 11px;
}

.quote-note-card {
  position: relative;
  max-width: min(560px, 100%);
  margin: 0 0 12px;
  border: 1px solid rgba(226, 191, 125, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 251, 232, 0.98), rgba(255, 232, 238, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  color: #3f2a32;
  padding: 28px 18px 16px;
  overflow: visible;
}

.quote-note-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 22px;
  transform: translateX(-50%);
  background: rgba(231, 197, 123, 0.54);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.quote-note-card header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.quote-note-card small,
.quote-note-card span {
  color: rgba(74, 45, 54, 0.78);
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.quote-note-card p {
  margin: 0;
  color: #3f2a32;
  font-family: var(--note-font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quote-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 8px;
}

.quote-preview-note {
  position: relative;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 44px 0 0;
  overflow: visible;
  box-shadow: none;
}

.quote-preview .quote-block {
  flex: 1;
  margin: 0;
}

.quote-preview button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.quote-preview-note > button {
  position: absolute;
  right: 0;
  top: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

.mention-menu {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
  box-shadow: 0 14px 34px rgba(48, 42, 34, 0.1);
}

.plus-menu {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 12px);
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, 0.94), transparent 118px),
    rgba(250, 247, 244, 0.82);
  box-shadow: 0 24px 64px rgba(138, 91, 103, 0.16);
  backdrop-filter: blur(24px);
}

.plus-menu button {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 251, 252, 0.64)),
    rgba(255, 255, 255, 0.72);
  padding: 16px 15px;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(138, 91, 103, 0.08);
  text-align: left;
}

.plus-menu button small {
  font-family: var(--ui-display);
  color: rgba(63, 58, 61, 0.46);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.plus-menu strong {
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-size: 24px;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0;
}

.plus-menu span {
  color: rgba(63, 58, 61, 0.45);
  font-size: 14px;
  font-weight: 600;
}

.mention-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px;
  text-align: left;
}

.mention-menu button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mention-menu span {
  display: grid;
  gap: 2px;
}

.mention-menu small {
  color: var(--muted);
  font-size: 12px;
}

.select-dot {
  align-self: center;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.selection-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(48, 42, 34, 0.08);
}

.msg.user .bubble {
  background: rgba(232, 203, 212, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
  border-color: #ebe6dd;
  color: #8c847a;
  background-color: #fff;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  background: white;
  background-size: cover;
  background-position: center;
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
}

.avatar.small {
  width: 42px;
  height: 42px;
  border-width: 2px;
}

.lover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.lover-select {
  position: relative;
}

.lover-current,
.lover-options button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
  color: var(--ink);
  text-align: left;
}

.lover-current {
  border-color: color-mix(in srgb, var(--accent), white 48%);
  background: linear-gradient(135deg, var(--accent-soft), #fff 72%);
  box-shadow: 0 12px 26px rgba(48, 42, 34, 0.08);
}

.lover-current span,
.lover-options span {
  display: grid;
  gap: 2px;
  flex: 1;
}

.lover-current small,
.lover-options small {
  color: var(--muted);
  font-size: 12px;
}

.lover-current b {
  color: var(--muted);
  font-size: 18px;
}

.lover-options {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(39, 32, 25, 0.14);
}

.lover-options button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.user-profile-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
  text-align: left;
}

.user-profile-card span {
  display: grid;
  gap: 2px;
}

.user-profile-card small {
  color: var(--muted);
  font-size: 12px;
}

.lover-current .avatar,
.lover-options .avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
}

.lover-btn {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 252, 252, 0.76);
  border-radius: 18px;
  padding: 10px 6px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--muted);
}

.lover-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.section-title {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
}

.mini-card {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 252, 252, 0.66);
  box-shadow: 0 14px 36px rgba(138, 91, 103, 0.06);
  font-size: 14px;
  line-height: 1.6;
}

.memory-vector-api-card {
  margin-top: 8px;
}

.memory-vector-palace-card {
  display: grid;
  gap: 10px;
}

.memory-vector-palace-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.memory-vector-palace-card header > div:nth-child(2) {
  flex: 1 1 180px;
  min-width: 0;
}

.memory-vector-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.memory-vector-status-line span {
  padding: 4px 8px;
  border: 1px solid rgba(255, 182, 205, 0.22);
  border-radius: 999px;
  background: rgba(37, 27, 35, 0.92);
  color: #ffd3e0;
  font-size: 11px;
  line-height: 1.2;
}

.memory-vector-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.memory-vector-monitor-card {
  padding: 12px;
  border: 1px solid rgba(255, 182, 205, 0.18);
  border-radius: 8px;
  background: rgba(34, 25, 32, 0.96);
  color: #ffe5ed;
}

.memory-vector-monitor-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memory-vector-monitor-card header span,
.memory-vector-monitor-card p {
  color: #f2b9ca;
  font-size: 11px;
}

.memory-vector-monitor-card p {
  margin: 8px 0 0;
}

.memory-merge-card {
  display: grid;
  gap: 10px;
}

.memory-merge-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.memory-merge-card header > div:nth-child(2) {
  flex: 1 1 180px;
  min-width: 0;
}

.memory-merge-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.74);
  font-size: 13px;
  line-height: 1.65;
}

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

.memory-merge-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 182, 205, 0.18);
  border-radius: 8px;
  background: rgba(37, 27, 35, 0.76);
}

.memory-merge-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memory-merge-item-head strong {
  color: rgba(255, 242, 249, 0.94);
  font-size: 13px;
}

.memory-merge-item-head span,
.memory-merge-item small,
.memory-merge-item em {
  color: rgba(255, 214, 235, 0.68);
  font-size: 11px;
  line-height: 1.45;
}

.memory-merge-item > p {
  color: rgba(255, 242, 249, 0.9);
  font-size: 13px;
}

.memory-merge-item--compact {
  padding: 10px;
}

.memory-merge-compact-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.memory-merge-compact-main > div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.memory-merge-compact-main p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: rgba(255, 242, 249, 0.88);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.memory-merge-inline-detail {
  margin-top: 6px;
}

.memory-merge-inline-detail summary {
  cursor: pointer;
  color: rgba(255, 214, 235, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.memory-merge-inline-detail em {
  display: block;
  margin-top: 6px;
  color: rgba(255, 226, 241, 0.76);
  font-size: 11px;
  font-style: normal;
  line-height: 1.55;
  white-space: pre-wrap;
}

.memory-merge-anchor-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.memory-merge-anchor-list span {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 214, 235, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.memory-merge-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-merge-badges span {
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(236, 65, 146, 0.34);
  border-radius: 999px;
  color: rgba(255, 214, 235, 0.76);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.memory-merge-head-pill {
  justify-self: end;
  min-height: 26px;
  padding: 4px 12px;
  border: 1px solid rgba(236, 65, 146, 0.42);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.memory-merge-head-pill:disabled {
  opacity: 0.45;
  cursor: wait;
}

.memory-merge-detail {
  display: grid;
  gap: 6px;
}

.memory-merge-detail summary {
  cursor: pointer;
  color: rgba(255, 214, 235, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.memory-merge-sources {
  display: grid;
  gap: 5px;
}

.memory-merge-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.memory-merge-source-row span {
  color: rgba(255, 214, 235, 0.76);
  font-size: 11px;
  line-height: 1.45;
}

.memory-merge-source-row button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 79, 163, 0.42);
  background: rgba(255, 79, 163, 0.12);
  color: rgba(255, 214, 235, 0.9);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.memory-merge-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.memory-merge-actions .memory-summary-pill {
  flex: 1 1 0;
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
}

.memory-merge-actions--four {
  gap: 6px;
}

.memory-merge-actions--four .memory-summary-pill {
  padding: 0 6px;
  font-size: 11px;
}

.memory-merge-revert-panel {
  border: 1px solid rgba(255, 182, 205, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.memory-merge-revert-panel summary {
  cursor: pointer;
  padding: 9px 10px;
  color: rgba(203, 151, 176, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.memory-merge-revert-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.memory-merge-archive-card {
  display: grid;
  gap: 10px;
}

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

.memory-merge-archive-toolbar input {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 182, 205, 0.22);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 242, 249, 0.92);
  font: inherit;
}

.memory-merge-archive-toolbar input::placeholder {
  color: rgba(255, 214, 235, 0.42);
}

.memory-merge-archive-page {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 214, 235, 0.72);
  font-size: 11px;
  white-space: nowrap;
}

.memory-merge-archive-list {
  padding: 0;
}

@media (max-width: 720px) {
  .memory-merge-archive-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .memory-merge-archive-page {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

.memory-merge-revert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px;
  border-radius: 8px;
  background: rgba(37, 27, 35, 0.72);
}

.memory-merge-revert-actions {
  display: grid;
  gap: 6px;
  min-width: 86px;
}

.memory-merge-revert-actions .memory-summary-pill {
  min-height: 28px;
  padding: 0 12px;
  font-size: 11px;
}

.memory-merge-established-detail {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 182, 205, 0.12);
  padding-top: 6px;
}

.memory-merge-established-detail summary {
  cursor: pointer;
  color: rgba(255, 214, 235, 0.78);
  font-size: 11px;
  font-weight: 700;
}

.memory-merge-established-body {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.memory-merge-established-body p {
  margin: 0;
  color: rgba(255, 214, 235, 0.72);
  font-size: 11px;
  line-height: 1.55;
}

.memory-merge-established-body p b {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 242, 249, 0.88);
}

.memory-merge-anchor-list {
  display: grid;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 214, 235, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.memory-merge-anchor-list b {
  color: rgba(255, 242, 249, 0.88);
}

.memory-merge-anchor-list span {
  display: block;
}

.memory-merge-revert-item strong {
  display: block;
  color: rgba(255, 242, 249, 0.9);
  font-size: 12px;
  line-height: 1.45;
}

.memory-merge-revert-item small,
.memory-merge-revert-item em {
  display: block;
  margin-top: 4px;
  color: rgba(255, 214, 235, 0.62);
  font-size: 11px;
  line-height: 1.4;
}

.memory-control {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  padding: 12px;
  background: rgba(255, 252, 252, 0.66);
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.memory-control input {
  width: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.form {
  padding: 28px 28px 96px;
  display: grid;
  gap: 18px;
}

.monitor-form,
.monitor-form > * {
  min-width: 0;
  max-width: 100%;
}

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

.field label {
  font-family: var(--ui-display);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.82);
  padding: 15px 18px;
  width: 100%;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 10px 24px rgba(138, 91, 103, 0.04);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(63, 58, 61, 0.28);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pretty-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ui-display);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.78);
  color: var(--ink);
  padding: 10px 14px;
  box-shadow: 0 10px 22px rgba(48, 42, 34, 0.06);
}

.pretty-select-trigger b {
  color: var(--muted);
}

.model-picker-panel {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  padding: 10px;
  background: rgba(255, 252, 252, 0.92);
  box-shadow: 0 18px 42px rgba(138, 91, 103, 0.08);
}

.model-option {
  font-family: var(--ui-display);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 252, 252, 0.88);
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}

.model-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

.diary-lover-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.76);
  padding: 10px;
  text-align: left;
}

.diary-lover-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.diary-lover-card span {
  display: grid;
  gap: 2px;
}

.diary-lover-card small {
  color: var(--muted);
  font-size: 12px;
}

.diary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.diary-view-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 79, 163, 0.2);
}

.diary-view-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255, 214, 235, 0.62);
  padding: 10px 14px;
}

.diary-view-tabs button.active {
  border-bottom-color: var(--rose);
  color: rgba(255, 242, 249, 0.96);
}

.diary-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.diary-date-field {
  position: relative;
  z-index: 20;
}

.diary-date-field:has(.memo-picker-panel) {
  z-index: 45;
}

.diary-date-panel {
  left: 0;
  right: auto;
}

.diary-date-panel-end {
  left: auto;
  right: 0;
}

.diary-date-clear {
  width: 100%;
  text-align: center !important;
}

.diary-date-picker .memo-picker-trigger,
.diary-date-picker .memo-picker-panel {
  border-color: rgba(255, 79, 163, 0.26);
  background: rgba(12, 12, 17, 0.97);
  color: rgba(255, 214, 235, 0.92);
}

.diary-date-picker .memo-calendar-head strong,
.diary-date-picker .memo-calendar-grid b {
  color: rgba(255, 214, 235, 0.62);
}

.diary-date-picker .memo-calendar-grid button {
  border-color: rgba(255, 79, 163, 0.2);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 214, 235, 0.88);
}

.diary-date-picker .memo-calendar-grid button.active {
  background: linear-gradient(135deg, #ff4fa3, #b62068);
  color: #fff;
}

.diary-card,
.diary-letter {
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 10px;
  background: rgba(17, 17, 22, 0.86);
  color: rgba(255, 242, 249, 0.94);
  text-align: left;
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.diary-card {
  min-height: 54px;
  display: flex;
  align-items: flex-end;
  font-size: 15px;
}

.diary-card span {
  color: rgba(255, 214, 235, 0.86);
}

.weekly-diary-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 10px;
  background: rgba(17, 17, 22, 0.84);
  color: rgba(255, 242, 249, 0.94);
  padding: 14px;
  text-align: left;
}

.weekly-diary-card span,
.weekly-diary-card small {
  color: rgba(255, 214, 235, 0.62);
}

.weekly-diary-card p {
  margin: 0;
  color: rgba(255, 214, 235, 0.78);
  line-height: 1.6;
}

.weekly-diary-status {
  display: grid;
  gap: 8px;
  border-left: 3px solid rgba(255, 79, 163, 0.7);
  background: rgba(255, 79, 163, 0.08);
  padding: 14px 16px;
}

.weekly-diary-status p {
  margin: 0;
  color: rgba(255, 214, 235, 0.76);
  line-height: 1.6;
}

.weekly-diary-status.working strong::after {
  content: "…";
  display: inline-block;
  width: 1.4em;
  overflow: hidden;
  vertical-align: bottom;
  animation: weekly-diary-dots 1.2s steps(4, end) infinite;
}

.weekly-diary-status.success {
  border-left-color: rgba(126, 221, 170, 0.82);
}

.weekly-diary-status.error {
  border-left-color: rgba(255, 126, 146, 0.85);
}

@keyframes weekly-diary-dots {
  from { width: 0; }
  to { width: 1.4em; }
}

.weekly-diary-detail-head {
  display: grid;
  gap: 7px;
  margin-bottom: 20px;
}

.weekly-diary-detail-head h3,
.weekly-diary-section h4 {
  margin: 0;
}

.weekly-diary-detail-head span,
.weekly-diary-detail-head small {
  color: rgba(255, 214, 235, 0.62);
}

.weekly-diary-summary {
  white-space: pre-wrap;
  line-height: 1.8;
  color: rgba(255, 242, 249, 0.9);
}

.weekly-diary-section {
  border-top: 1px solid rgba(255, 79, 163, 0.18);
  padding-top: 16px;
}

.weekly-diary-section p {
  margin: 8px 0 0;
  color: rgba(255, 214, 235, 0.78);
  line-height: 1.65;
}

.weekly-diary-detail-actions {
  margin-top: 20px;
}

.weekly-diary-preview-modal {
  width: min(1100px, calc(100vw - 28px));
  max-height: min(86vh, 880px);
  overflow-y: auto;
}

.weekly-diary-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.weekly-diary-preview-column {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(255, 79, 163, 0.2);
  background: rgba(255, 255, 255, 0.035);
  padding: 16px;
}

.weekly-diary-preview-column > span {
  color: rgba(255, 214, 235, 0.62);
  font-size: 12px;
}

.weekly-diary-preview-column > h4 {
  margin: 0;
}

.weekly-diary-preview-column > div {
  white-space: pre-wrap;
  color: rgba(255, 242, 249, 0.88);
  line-height: 1.7;
}

.weekly-diary-preview-actions {
  position: sticky;
  bottom: -20px;
  margin: 20px -20px -20px;
  padding: 14px 20px;
  background: rgba(12, 12, 17, 0.96);
}

.diary-letter header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.diary-letter header div {
  display: grid;
  gap: 3px;
}

.diary-letter header span {
  color: var(--muted);
  font-size: 13px;
}

.diary-content {
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 16px;
}

.diary-modal {
  max-height: min(78vh, 760px);
  overflow-y: auto;
}

.diary-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.diary-detail-head span {
  color: var(--muted);
  font-size: 14px;
}

.ghost,
.danger {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.78);
  padding: 11px 16px;
  color: #7c7076;
}

.actions .ghost:first-child,
[data-save-config],
[data-save-voice-config],
[data-generate-diary],
[data-generate-weekly-diary] {
  border-color: transparent;
  background: linear-gradient(135deg, #c98296, var(--rose-deep));
  color: white;
  box-shadow: 0 12px 28px rgba(173, 98, 120, 0.2);
}

button:disabled,
button[disabled] {
  cursor: default;
  opacity: 0.62;
}

.danger {
  color: #a13d45;
}

.config-list,
.log-list {
  display: grid;
  gap: 10px;
}

.bridge-card {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 20px;
  background: #111116;
  color: rgba(255, 242, 249, 0.92);
  padding: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.bridge-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bridge-card strong {
  color: rgba(255, 242, 249, 0.96);
}

.bridge-card-kicker {
  margin-top: -8px;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.bridge-card span,
.bridge-card small,
.bridge-card p {
  color: rgba(255, 214, 235, 0.72);
}

.bridge-card p {
  margin: 0;
  line-height: 1.7;
}

.page-loading {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 214, 235, 0.16);
  border-radius: 8px;
  color: rgba(255, 214, 235, 0.72);
  background: rgba(255, 214, 235, 0.08);
  font-size: 13px;
}

.cloud-status-grid {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.cloud-status-grid::-webkit-scrollbar {
  display: none;
}

.cloud-status-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: min(260px, 78vw);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 6px 9px;
  border-radius: 999px;
  color: rgba(255, 226, 238, 0.86);
  background: rgba(255, 214, 235, 0.08);
  font-size: 12px;
}

.cloud-status-grid b {
  flex: 0 0 auto;
  color: rgba(255, 214, 235, 0.58);
  font-size: 10px;
  font-weight: 600;
}

.cloud-local-backup {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 214, 235, 0.14);
}

.cloud-local-backup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cloud-local-backup-head strong {
  color: rgba(255, 226, 238, 0.92);
  font-size: 13px;
}

.cloud-local-backup-head span {
  color: rgba(255, 214, 235, 0.66);
  font-size: 12px;
}

.cloud-card {
  gap: 10px;
  overflow: hidden;
  padding: 15px;
}

.cloud-card .bridge-layers {
  gap: 6px;
}

.cloud-card .bridge-layers span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 8px;
}

.bridge-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bridge-layers span {
  border: 1px solid rgba(255, 182, 219, 0.28);
  border-radius: 999px;
  background: rgba(255, 182, 219, 0.1);
  padding: 7px 10px;
  font-size: 12px;
}

.bridge-context-preview {
  border: 1px solid rgba(255, 182, 219, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.bridge-context-preview summary {
  cursor: pointer;
  padding: 8px 10px;
  color: rgba(255, 226, 241, 0.84);
  font-size: 12px;
  font-weight: 400;
}

.bridge-context-preview small {
  display: block;
  padding: 0 10px 6px;
  color: rgba(255, 214, 235, 0.62);
  font-size: 11px;
}

.bridge-context-preview pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  padding: 10px;
  border-top: 1px solid rgba(255, 182, 219, 0.12);
  color: rgba(255, 236, 246, 0.86);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bridge-explain-list {
  display: grid;
  gap: 8px;
  max-height: min(42dvh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 10px 10px;
  scrollbar-width: thin;
}

.bridge-explain-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 182, 219, 0.1);
}

.bridge-explain-main {
  color: rgba(255, 236, 246, 0.9);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.bridge-explain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.bridge-explain-tags span {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  padding: 4px 7px;
  border: 1px solid rgba(255, 182, 219, 0.2);
  border-radius: 999px;
  background: rgba(255, 182, 219, 0.08);
  color: rgba(255, 214, 235, 0.72);
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.bridge-explain-row small {
  padding: 0;
  font-size: 11px;
}

.monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-plain {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
}

.monitor-filter {
  position: relative;
}

.filter-trigger {
  min-width: 132px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: rgba(255, 252, 252, 0.78);
  padding: 10px 12px;
  color: var(--ink);
}

.filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: rgba(255, 252, 252, 0.96);
  padding: 8px;
  box-shadow: 0 18px 42px rgba(48, 42, 34, 0.12);
}

.filter-menu button {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 252, 252, 0.86);
  padding: 9px 10px;
  text-align: left;
}

.filter-menu button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.config-item,
.log-item {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 252, 252, 0.76);
  box-shadow: 0 16px 40px rgba(138, 91, 103, 0.06);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.api-form .mini-card,
.api-form .config-item {
  border-color: rgba(255, 79, 163, 0.24);
  background: #111116;
  color: rgba(255, 214, 235, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.api-form .mini-card strong,
.api-form .config-item strong {
  color: rgba(255, 242, 249, 0.96);
}

.api-form .config-item.selected {
  border-color: rgba(255, 79, 163, 0.56);
  box-shadow: 0 0 0 1px rgba(255, 79, 163, 0.2), 0 18px 48px rgba(0, 0, 0, 0.34);
}

.api-form .config-select {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.api-form .config-select .subtle,
.api-form .config-item .subtle {
  color: rgba(255, 214, 235, 0.58);
}

.api-form .actions {
  gap: 6px;
  flex-wrap: wrap;
}

.api-form .actions .ghost,
.api-form .actions .danger {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.api-form .config-item .actions {
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.api-form .config-item .ghost,
.api-form .config-item .danger {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 13px;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.api-form .config-item .role-action {
  min-width: 0;
  white-space: nowrap;
}

.api-form .role-action.active {
  border-color: rgba(255, 79, 163, 0.72);
  background: linear-gradient(135deg, rgba(255, 79, 163, 0.34), rgba(182, 32, 104, 0.3));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 79, 163, 0.18), 0 10px 26px rgba(255, 79, 163, 0.16);
}

.log-item {
  border-color: rgba(255, 79, 163, 0.22);
  background: #111116;
  color: rgba(247, 237, 243, 0.9);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-item .subtle {
  color: rgba(255, 214, 235, 0.56);
}

.log-item strong {
  color: rgba(255, 242, 249, 0.95);
}

.log-item > div,
.log-item .subtle,
.log-item strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.monitor-filter .filter-trigger {
  border-color: rgba(255, 79, 163, 0.28);
  background: #111116;
  color: rgba(255, 242, 249, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.brand,
.field label,
.pretty-select-trigger,
.model-option,
.ghost,
.danger,
.send,
.config-item strong,
.log-item strong,
.mini-card strong,
.filter-trigger,
.filter-menu button,
.diary-lover-card strong,
.profile-form label,
.memory-control,
.actions button {
  font-weight: 400;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(31, 27, 24, 0.28);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(520px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 252, 252, 0.94);
  padding: 24px;
  box-shadow: 0 30px 80px rgba(138, 91, 103, 0.2);
}

.modal h3 {
  margin: 0 0 18px;
  line-height: 1.35;
}

.fiction-cover-error-backdrop {
  padding: 18px;
  background: rgba(5, 4, 8, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fiction-cover-error-modal {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(336px, calc(100vw - 36px));
  max-height: calc(100dvh - 48px);
  padding: 28px 24px 22px;
  overflow: auto;
  border: 1px solid #f6a6c2;
  border-radius: 18px;
  background: rgba(18, 14, 21, 0.96);
  color: rgba(247, 237, 243, 0.94);
  text-align: center;
  box-shadow: none;
}

.fiction-cover-error-kicker {
  color: rgba(255, 169, 203, 0.68);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.fiction-cover-error-icon {
  margin: 18px 0 12px;
  color: rgba(255, 169, 203, 0.88);
  font-size: 30px;
  font-variation-settings: "wght" 300;
}

.fiction-cover-error-modal h3 {
  max-width: 100%;
  margin: 0;
  color: rgba(255, 241, 247, 0.96);
  font-family: "Songti SC", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.fiction-cover-error-modal p {
  max-width: 268px;
  margin: 12px 0 20px;
  color: rgba(225, 200, 210, 0.72);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fiction-cover-error-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(225, 200, 210, 0.56);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.fiction-cover-error-close {
  min-height: 0;
  padding: 6px 16px;
  border: 0;
  background: transparent;
  color: rgba(255, 169, 203, 0.88);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.heart-modal {
  width: min(620px, 100%);
}

.heart-cards {
  display: grid;
  gap: 14px;
}

.heart-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.heart-main header,
.heart-small header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.heart-main header div {
  display: grid;
  gap: 2px;
}

.heart-main header span {
  color: var(--muted);
  font-size: 13px;
}

.heart-main p,
.heart-small p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.75;
}

.heart-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.heart-grid {
  display: grid;
  gap: 10px;
}

.heart-small {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.heart-small header {
  margin-bottom: 8px;
}

.heart-small p {
  color: #3d3934;
  font-size: 14px;
}

.modal .field {
  margin-top: 18px;
}

[data-edit-memo] {
  cursor: pointer;
}

.memo-edit-modal {
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
}

.memo-edit-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.memo-edit-datetime-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(112px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.memo-edit-datetime-row .field {
  margin-top: 12px;
}

.memo-edit-datetime-row input {
  padding: 10px 12px;
  border-radius: 12px;
}

.memo-edit-grid > div > label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--ui-display), "Avenir Next", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.memo-edit-actions {
  justify-content: center;
  margin-top: 22px;
}

.memo-edit-actions .send,
.memo-edit-actions .ghost {
  width: auto;
  min-width: 108px;
  padding-inline: 22px;
}

@media (max-width: 560px) {
  .memo-edit-grid {
    grid-template-columns: 1fr;
  }

  .memo-edit-datetime-row {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 8px;
  }

  .reminder-candidate {
    grid-template-columns: 1fr;
  }

  .reminder-candidate-actions {
    justify-content: flex-end;
  }

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

  .reminder-actions .send,
  .reminder-actions .ghost {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }
}

.edit-area {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.6;
}

.profile-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
}

.profile-preview.large .avatar {
  width: 148px;
  height: 148px;
  max-width: 148px;
  max-height: 148px;
  border-radius: 8px;
  font-size: 44px;
}

.context-menu {
  position: fixed;
  z-index: 40;
  min-width: 104px;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(39, 32, 25, 0.18);
  padding: 6px;
}

.context-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}

.context-menu button:hover {
  background: var(--accent-soft);
}

[data-message-menu] {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

.quote-selection-popover {
  position: fixed;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 82px;
  min-width: 82px;
  height: 36px;
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 11px;
  background: rgba(33, 31, 36, 0.98);
  color: rgba(255, 217, 228, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  padding: 0 10px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.quote-selection-popover .material-symbols-outlined {
  color: var(--stitch-primary, #ffb0cc);
  font-size: 16px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 20;
}

.quote-selection-popover:hover,
.quote-selection-popover:focus-visible {
  border-color: rgba(255, 176, 204, 0.4);
  background: rgba(255, 176, 204, 0.1);
  color: #fff;
  outline: none;
}

.quote-selection-popover:active {
  transform: scale(0.96);
}

.quote-selection-popover[hidden] {
  display: none;
}

.pre {
  white-space: pre-wrap;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

@media (max-width: 840px) {
  .shell {
    padding: 16px;
  }

  .home-grid,
  .app-page {
    grid-template-columns: 1fr;
  }

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

  .primary-card {
    min-height: 280px;
  }

  .messages {
    height: 58vh;
  }

  .lair-hero {
    padding-top: 26px;
  }

  .lair-kicker {
    font-size: 12px;
    letter-spacing: 0.48em;
  }

  .anniversary-names {
    margin-top: 34px;
    font-size: 48px;
  }

  .anniversary-meta strong {
    font-size: 58px;
  }

  .welcome-card p {
    font-size: 21px;
  }

  .more-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --bottom-nav-space: 94px;
  }

  .shell {
    padding: 14px 16px;
  }

  .home-shell,
  .module-shell {
    max-width: 100%;
    padding-bottom: var(--bottom-nav-space);
  }

  .lair-hero {
    padding: 30px 0 14px;
  }

  .lair-kicker {
    font-size: 11px;
    letter-spacing: 0.34em;
    text-align: left;
  }

  .anniversary-names {
    margin-top: 52px;
    font-size: 42px;
    line-height: 1;
  }

  .anniversary-meta {
    margin-top: 20px;
  }

  .anniversary-meta > span {
    font-size: 10px;
    letter-spacing: 0.24em;
  }

  .anniversary-meta strong {
    font-size: 44px;
  }

  .home-card {
    border-radius: 22px;
    padding: 16px;
  }

  .welcome-card p {
    font-size: 17px;
    line-height: 1.75;
  }

  .bottom-nav {
    width: 100vw;
    height: calc(64px + env(safe-area-inset-bottom));
    min-height: 0;
    padding: 4px 18px calc(5px + env(safe-area-inset-bottom));
  }

  .bottom-nav span {
    width: 34px;
    height: 34px;
    font-size: 25px;
  }

  .bottom-nav button:not(.chat-orb) {
    padding-top: 12px;
  }

  .bottom-nav small {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .bottom-nav .chat-orb {
    transform: translateY(-18px);
    grid-template-rows: 50px auto;
  }

  .bottom-nav .chat-orb span {
    width: 50px;
    height: 50px;
    font-size: 24px;
    box-shadow: 0 12px 24px rgba(173, 98, 120, 0.22);
  }

  .bottom-nav .chat-orb small {
    font-size: 10px;
    transform: translateY(5px);
  }

  .form {
    padding: 22px 22px 104px;
  }

  .api-form {
    gap: 14px;
  }

  .api-form .actions {
    gap: 6px;
  }

  .api-form .ghost,
  .api-form .danger,
  .api-form .pretty-select-trigger {
    min-height: 32px;
    border-radius: 12px;
    padding: 6px 9px;
    font-size: 11px;
    line-height: 1.15;
    letter-spacing: 0.04em;
  }

  .api-form [data-save-config],
  .api-form [data-save-voice-config],
  .api-form [data-test-config],
  .api-form [data-fetch-models] {
    box-shadow: 0 8px 18px rgba(173, 98, 120, 0.14);
  }

  .api-form .config-item .actions {
    gap: 5px;
    flex-wrap: wrap;
  }

  .api-form .config-item .ghost,
  .api-form .config-item .danger {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 9px;
    flex: 0 1 auto;
  }

  .api-form .config-item .role-action {
    flex: 1 1 calc(25% - 5px);
    text-align: center;
  }

  .api-form .config-item [data-delete-config] {
    flex: 0 1 auto;
  }

  .reminder-modal {
    width: min(100%, 430px);
    padding: 20px;
  }

  .reminder-actions {
    grid-template-columns: 1fr;
  }

  .snooze-options {
    grid-template-columns: 1fr;
  }

  .top-card,
  .panel {
    border-radius: 24px;
  }

  .more-card {
    min-height: 92px;
    padding: 16px 18px;
  }

  .more-card strong {
    font-size: 20px;
  }

  .senses-card-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .senses-card-head strong {
    font-size: 20px;
    letter-spacing: 0.16em;
  }

  .senses-card-head span,
  .senses-card-head small {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .senses-card-head small {
    text-align: left;
    max-width: none;
  }

  .senses-card {
    gap: 10px;
  }

  .senses-card-body {
    padding-top: 10px;
  }

  .senses-row,
  .senses-row-top,
  .senses-row-location,
  .senses-row-location-bottom,
  .senses-row-weather-enable,
  .senses-row-weather-options,
  .senses-row-weather-api,
  .senses-row-notifications {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .senses-form {
    gap: 18px;
  }

  .senses-row {
    gap: 14px;
  }

  .senses-row-notifications + .senses-actions {
    margin-top: 8px;
  }

  .senses-weather-result {
    margin-top: 20px;
  }

  .senses-form .senses-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .senses-form .send,
  .senses-form .ghost,
  .senses-form .actions .ghost:first-child,
  .senses-status-pill {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .senses-form input[type="text"],
  .senses-form input[type="password"],
  .senses-form input:not([type]) {
    min-height: 38px;
    font-size: 14px;
    padding: 8px 10px;
  }

  .senses-form .senses-segment {
    min-height: 34px;
  }

  .senses-form .senses-segment button {
    padding: 7px 10px;
    font-size: 10px;
  }

  .senses-form .memo-controls.two {
    grid-template-columns: 1fr;
  }

  .memo-controls {
    grid-template-columns: 1fr;
  }

  .memo-task {
    grid-template-columns: 32px minmax(0, 1fr) 24px;
  }

  .memo-date-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .calendar-form-grid,
  .calendar-switches {
    grid-template-columns: 1fr;
  }

  .calendar-preview {
    margin-left: -6px;
    margin-right: -6px;
    padding: 14px 10px 16px;
    border-radius: 22px;
  }

  .calendar-preview header {
    gap: 9px;
  }

  .calendar-preview header .home-icon {
    font-size: 18px;
    margin-top: 2px;
  }

  .calendar-preview header strong {
    font-size: 17px;
    letter-spacing: 0.2em;
  }

  .calendar-preview header span {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .calendar-month-actions {
    gap: 5px;
  }

  .calendar-month-actions button {
    width: 30px;
    height: 30px;
  }

  .month-grid.calendar-month {
    gap: 2px;
    margin-top: 16px;
  }

  .calendar-weekdays,
  .calendar-week {
    gap: 2px;
  }

  .calendar-week {
    grid-auto-rows: 76px;
  }

  .calendar-weekdays b {
    font-size: 10px;
    letter-spacing: 0.02em;
    color: rgba(63, 58, 61, 0.38);
  }

  .month-day {
    min-height: 76px;
    border-color: transparent;
    border-radius: 9px;
    background: transparent;
    padding: 4px 2px 3px;
  }

  .month-day > span {
    font-size: 13px;
    color: rgba(63, 58, 61, 0.82);
  }

  .month-day.today {
    border-color: rgba(173, 98, 120, 0.16);
    background: rgba(173, 98, 120, 0.12);
    color: var(--rose-deep);
    box-shadow: none;
  }

  .month-day.selected {
    border-color: rgba(173, 98, 120, 0.2);
    background: rgba(255, 255, 255, 0.54);
    box-shadow: none;
  }

  .month-day.birthday {
    border-color: rgba(199, 95, 130, 0.18);
    background: rgba(255, 247, 250, 0.56);
    box-shadow: none;
  }

  .month-day.today.birthday,
  .month-day.today.selected,
  .month-day.today.selected.birthday {
    background: rgba(173, 98, 120, 0.16);
    color: var(--rose-deep);
  }

  .month-day.today.birthday > span,
  .month-day.today.selected.birthday > span,
  .month-day.today.birthday .birthday-mark,
  .month-day.today.selected.birthday .birthday-mark {
    color: var(--rose-deep);
  }

  .birthday-mark {
    top: 4px;
    right: 2px;
    font-size: 10px;
  }

  .month-day em {
    left: 2px;
    right: 2px;
    bottom: 5px;
    gap: 3px;
  }

  .month-day em i {
    width: 4px;
    height: 4px;
  }

  .calendar-span-bar {
    margin: 25px 0 0;
    border-left-width: 2px;
    border-radius: 4px;
    padding: 2px 3px;
    font-size: 9px;
    line-height: 1.08;
    letter-spacing: 0;
    background: color-mix(in srgb, var(--tag-color), white 82%);
  }

  .calendar-span-bar.lane-1 {
    margin-top: 39px;
  }

  .calendar-span-bar.lane-2 {
    margin-top: 53px;
  }

  .calendar-span-bar.lane-3 {
    margin-top: 67px;
  }

  .cycle-wheel {
    width: min(100%, 312px);
    margin: 34px auto 20px;
  }

  .cycle-wheel-tag.ovulation {
    left: -18px;
    bottom: 42px;
  }

  .cycle-wheel-tag.next {
    top: -32px;
  }

  .chat-shell {
    padding: 0;
    max-width: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  .chat-shell .app-page,
  .chat-shell .panel.main {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .chat-shell .panel.main {
    background: rgba(255, 252, 252, 0.28);
  }

  .chat-shell .chat-head {
    height: calc(58px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: rgba(255, 248, 250, 0.72);
    backdrop-filter: blur(20px);
  }

  .chat-shell .messages {
    padding: 14px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .chat-search-panel {
    left: 8px;
    right: 8px;
    top: calc(60px + env(safe-area-inset-top));
  }

  .chat-shell .composer {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 248, 250, 0.82);
    backdrop-filter: blur(20px);
  }

  .chat-shell .composer textarea {
    min-height: 42px;
    height: auto;
    max-height: 116px;
  }
}

@media (max-width: 440px) {
  .chat-head > div:not(.chat-head-actions) {
    left: 54px;
    right: 100px;
  }

  .chat-head-actions {
    right: 8px;
  }

  .chat-head-actions .chat-menu,
  .chat-back {
    width: 38px;
    height: 38px;
  }

  .home-card header strong {
    font-size: 15px;
    letter-spacing: 0.16em;
  }

  .memo-text,
  .calendar-agenda-item strong,
  .memory-entry strong,
  .diary-letter {
    font-size: 14px;
  }

  .simple-head {
    min-height: 58px;
    top: 10px;
  }

  .simple-head h2 {
    font-size: 20px;
  }

  .chat-head h2 {
    font-size: 19px;
  }

  .chat-status {
    font-size: 11px;
  }
}

/* GPT Home black-pink apartment theme */
:root {
  --paper: #0b0b0f;
  --ink: #f7edf3;
  --muted: rgba(247, 237, 243, 0.48);
  --line: rgba(255, 79, 163, 0.24);
  --soft: rgba(255, 255, 255, 0.055);
  --rose: #ff4fa3;
  --rose-deep: #e84d8a;
  --accent: #ff4fa3;
  --accent-soft: rgba(255, 79, 163, 0.14);
  --user: rgba(255, 79, 163, 0.13);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 79, 163, 0.22), transparent 18rem),
    radial-gradient(circle at 88% 6%, rgba(232, 77, 138, 0.16), transparent 16rem),
    radial-gradient(circle at 52% 92%, rgba(255, 79, 163, 0.11), transparent 22rem),
    linear-gradient(180deg, #0b0b0f 0%, #111116 52%, #09090d 100%);
}

.home-card,
.panel,
.top-card,
.simple-head,
.month-card,
.cycle-current,
.cycle-forecast,
.cycle-info-card,
.memo-section,
.memory-palace-hero,
.memory-search-card,
.memory-list-card,
.more-card,
.setting-card,
.mini-card,
.modal,
.plus-menu {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(17, 17, 22, 0.72);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34), 0 0 38px rgba(255, 79, 163, 0.045);
  backdrop-filter: blur(24px);
}

.lair-hero {
  min-height: 240px;
  color: var(--rose);
}

.lair-kicker {
  color: rgba(247, 237, 243, 0.42);
}

.anniversary-names {
  justify-content: flex-start;
  margin-top: 34px;
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(48px, 9vw, 88px);
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(255, 79, 163, 0.26);
}

.anniversary-names b {
  display: inline;
}

.anniversary-names .anniversary-script {
  width: min(76%, 390px);
}

.home-tagline {
  margin-top: 20px;
  color: rgba(247, 237, 243, 0.44);
  font-size: 12px;
  letter-spacing: 0.26em;
}

.home-tagline.zh {
  color: rgba(247, 237, 243, 0.62);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  letter-spacing: 0.18em;
}

.home-quiet-line {
  margin: 18px 0 0;
  color: rgba(247, 237, 243, 0.34);
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
  text-align: center;
}

.anniversary-meta {
  margin-top: 18px;
}

.welcome-card {
  margin-top: 0;
}

.welcome-card p {
  color: rgba(247, 237, 243, 0.84);
}

.welcome-card footer {
  color: rgba(255, 79, 163, 0.72);
}

.memory-list-card header span {
  color: rgba(255, 214, 235, 0.68);
}

.memory-room {
  border-color: color-mix(in srgb, var(--room-color), black 28%);
  background: #171218;
}

.memory-room.active {
  border-color: color-mix(in srgb, var(--room-color), white 18%);
  background: color-mix(in srgb, var(--room-color), #171218 76%);
  box-shadow: 0 16px 42px color-mix(in srgb, var(--room-color), transparent 72%);
}

.memory-room span {
  color: color-mix(in srgb, var(--room-color), white 22%);
}

.memory-room strong,
.memory-room.active strong {
  color: rgba(255, 242, 249, 0.94);
}

.memory-room small,
.memory-room.active small {
  color: rgba(255, 214, 235, 0.72);
}

.memory-entry {
  background: rgba(255, 79, 163, 0.075);
  border-color: rgba(255, 79, 163, 0.22);
}

.memory-entry small {
  color: rgba(255, 214, 235, 0.62);
}

.memory-entry em {
  color: rgba(247, 237, 243, 0.46);
}

.memory-entry-actions button {
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.86);
  border: 1px solid rgba(255, 79, 163, 0.2);
}

.memory-entry-actions button:first-child {
  background: rgba(255, 79, 163, 0.16);
  color: rgba(255, 214, 235, 0.94);
}

.memory-detail-modal {
  background: rgba(12, 10, 15, 0.98);
  color: rgba(247, 237, 243, 0.9);
}

.memory-detail-head small,
.memory-detail-block > label,
.memory-detail-stats span {
  color: rgba(255, 214, 235, 0.66);
}

.memory-interpretation,
.memory-detail-fields input,
.memory-detail-fields input:disabled,
.memory-detail-text {
  border-color: rgba(255, 79, 163, 0.24);
  background: rgba(8, 8, 12, 0.58);
  color: rgba(247, 237, 243, 0.9);
}

.memory-interpretation::placeholder,
.memory-detail-fields input::placeholder {
  color: rgba(255, 214, 235, 0.36);
}

.memory-choice span,
.memory-stars span {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(255, 79, 163, 0.08);
  color: rgba(255, 214, 235, 0.74);
}

.memory-choice input:checked + span,
.memory-stars input:checked + span {
  border-color: rgba(255, 79, 163, 0.54);
  background: rgba(255, 79, 163, 0.2);
  color: rgba(247, 237, 243, 0.96);
}

.memory-vector-toggle {
  color: rgba(255, 214, 235, 0.72);
}

.memory-source-card,
.memory-detail-stats > div {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(255, 79, 163, 0.07);
}

.memory-source-card strong {
  color: rgba(255, 214, 235, 0.82);
}

.memory-source-card span,
.memory-source-card small {
  color: rgba(247, 237, 243, 0.62);
}

.memory-index-source-note {
  color: rgba(247, 237, 243, 0.52);
}

.memory-index-source-row {
  border-color: rgba(255, 79, 163, 0.2);
  background: rgba(255, 79, 163, 0.07);
}

.memory-index-source-row strong {
  color: rgba(247, 237, 243, 0.84);
}

.memory-index-source-row small,
.memory-index-source-row em {
  color: rgba(247, 237, 243, 0.52);
}

.memory-index-source-remove {
  border-color: rgba(255, 79, 163, 0.42);
  background: rgba(255, 79, 163, 0.12);
  color: rgba(255, 214, 235, 0.9);
}

.bottom-nav {
  background: rgba(10, 10, 14, 0.82);
  border-top-color: rgba(255, 79, 163, 0.18);
  box-shadow: 0 -20px 58px rgba(0, 0, 0, 0.28);
}

.bottom-nav button {
  color: rgba(247, 237, 243, 0.42);
}

.bottom-nav button.active,
.bottom-nav .chat-orb {
  color: var(--rose);
}

.bottom-nav .chat-orb span {
  background: linear-gradient(135deg, #ff4fa3, #b62068);
  box-shadow: 0 18px 42px rgba(255, 79, 163, 0.34);
}

.chat-shell {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 79, 163, 0.16), transparent 16rem),
    linear-gradient(180deg, rgba(11, 11, 15, 0.98), rgba(17, 17, 22, 0.98));
}

.chat-shell .panel.main,
.chat-shell .chat-head,
.chat-shell .composer {
  background: rgba(9, 9, 13, 0.82);
}

.chat-shell .panel.main {
  position: relative;
}

.chat-head {
  border-color: rgba(255, 79, 163, 0.2);
}

.composer {
  border-top-color: rgba(255, 79, 163, 0.18);
}

.reminder-candidates {
  display: grid;
  gap: 10px;
  padding: 10px 18px 0;
  background: rgba(9, 9, 13, 0.82);
}

.reminder-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 79, 163, 0.28);
  border-radius: 18px;
  background: rgba(255, 79, 163, 0.08);
}

.reminder-candidate div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reminder-candidate span,
.reminder-candidate small,
.reminder-modal > span,
.reminder-modal small {
  color: rgba(255, 214, 235, 0.5);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reminder-candidate strong {
  color: rgba(247, 237, 243, 0.92);
  font-size: 15px;
  font-weight: 400;
}

.reminder-candidate-actions {
  display: flex;
  gap: 8px;
}

.reminder-candidate-actions button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 79, 163, 0.18);
  color: rgba(255, 214, 235, 0.9);
  cursor: pointer;
}

.reminder-candidate-actions button:last-child {
  background: transparent;
  color: rgba(255, 214, 235, 0.52);
}

.reminder-modal {
  background: rgba(8, 8, 12, 0.96);
  border-color: rgba(255, 79, 163, 0.32);
  color: rgba(247, 237, 243, 0.92);
}

.reminder-modal h3 {
  margin: 12px 0 10px;
  font-weight: 400;
}

.reminder-modal p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.reminder-actions .send,
.reminder-actions .ghost {
  width: auto;
  min-width: 104px;
  padding-inline: 18px;
}

.reminder-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.reminder-inline-actions button,
.reminder-inline-status {
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 79, 163, 0.08);
  color: rgba(255, 214, 235, 0.78);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reminder-inline-actions button {
  cursor: pointer;
}

.reminder-inline-actions button:hover {
  background: rgba(255, 79, 163, 0.18);
}

.snooze-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 18px;
  background: rgba(255, 79, 163, 0.07);
}

.snooze-options button {
  border: 1px solid rgba(255, 214, 235, 0.16);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 237, 243, 0.86);
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.snooze-options button:hover {
  border-color: rgba(255, 79, 163, 0.52);
  background: rgba(255, 79, 163, 0.18);
}

.reminder-chat-backdrop {
  background: rgba(6, 4, 8, 0.54);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.reminder-chat-modal {
  width: min(390px, calc(100vw - 34px));
  border: 1px solid rgba(246, 166, 194, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 166, 194, 0.15), transparent 48%),
    linear-gradient(180deg, rgba(24, 19, 27, 0.98), rgba(12, 9, 15, 0.96));
  color: rgba(247, 237, 243, 0.92);
  padding: 24px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.reminder-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(246, 166, 194, 0.08);
}

.reminder-modal-kicker i {
  color: #ff9fc7;
  font-size: 17px;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 20;
}

.reminder-chat-modal h3 {
  margin: 18px 0 10px;
  color: #fbf4f8;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.reminder-chat-modal p {
  margin: 0 0 14px;
  color: rgba(247, 237, 243, 0.74);
  font-size: 15px;
  line-height: 1.76;
}

.reminder-chat-modal small {
  display: block;
  color: rgba(246, 166, 194, 0.58);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.reminder-chat-modal .reminder-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.reminder-chat-modal .reminder-actions .send,
.reminder-chat-modal .reminder-actions .ghost {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.07);
  color: rgba(247, 237, 243, 0.82);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.reminder-chat-modal .reminder-actions .send {
  border-color: rgba(255, 93, 169, 0.72);
  background: linear-gradient(135deg, #ff4fa3, #d9368c);
  color: #fff;
  box-shadow: 0 10px 32px rgba(255, 79, 163, 0.28);
}

.reminder-chat-modal .snooze-options {
  border-color: rgba(246, 166, 194, 0.16);
  border-radius: 20px;
  background: rgba(246, 166, 194, 0.06);
}

.reminder-chat-modal .snooze-options button {
  border-color: rgba(246, 166, 194, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 237, 243, 0.78);
  letter-spacing: 0.04em;
  text-transform: none;
}

.reminder-inline-actions button,
.reminder-inline-status {
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(246, 166, 194, 0.07);
  color: rgba(247, 237, 243, 0.72);
  letter-spacing: 0.04em;
  text-transform: none;
}

.reminder-inline-actions button:first-child {
  border-color: rgba(255, 93, 169, 0.45);
  color: #ffc0da;
}

body[data-app-theme="day"] .reminder-chat-backdrop {
  background: rgba(66, 39, 54, 0.2);
}

body[data-app-theme="day"] .reminder-chat-modal {
  border-color: rgba(214, 75, 139, 0.18);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 213, 232, 0.76), transparent 48%),
    linear-gradient(180deg, rgba(255, 252, 254, 0.98), rgba(255, 245, 250, 0.96));
  color: #382a32;
  box-shadow: 0 24px 78px rgba(159, 68, 111, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-app-theme="day"] .reminder-modal-kicker {
  border-color: rgba(214, 75, 139, 0.16);
  background: rgba(255, 229, 241, 0.86);
  color: rgba(148, 74, 108, 0.72);
}

body[data-app-theme="day"] .reminder-modal-kicker i {
  color: #d83b8b;
}

body[data-app-theme="day"] .reminder-chat-modal h3 {
  color: #2f2730;
}

body[data-app-theme="day"] .reminder-chat-modal p {
  color: rgba(59, 43, 52, 0.72);
}

body[data-app-theme="day"] .reminder-chat-modal small {
  color: rgba(148, 74, 108, 0.72);
}

body[data-app-theme="day"] .reminder-chat-modal .reminder-actions .ghost {
  border-color: rgba(214, 75, 139, 0.14);
  background: rgba(255, 232, 243, 0.66);
  color: rgba(76, 43, 58, 0.76);
}

body[data-app-theme="day"] .reminder-chat-modal .reminder-actions .send {
  border-color: rgba(216, 59, 139, 0.42);
  background: linear-gradient(135deg, #e74598, #cf2f83);
  color: #fff;
  box-shadow: 0 10px 30px rgba(216, 59, 139, 0.24);
}

body[data-app-theme="day"] .reminder-chat-modal .snooze-options {
  border-color: rgba(214, 75, 139, 0.12);
  background: rgba(255, 232, 243, 0.5);
}

body[data-app-theme="day"] .reminder-chat-modal .snooze-options button {
  border-color: rgba(214, 75, 139, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(76, 43, 58, 0.72);
}

body[data-app-theme="day"] .reminder-inline-actions button,
body[data-app-theme="day"] .reminder-inline-status {
  border-color: rgba(214, 75, 139, 0.16);
  background: rgba(255, 232, 243, 0.58);
  color: rgba(76, 43, 58, 0.72);
}

body[data-app-theme="day"] .reminder-inline-actions button:first-child {
  border-color: rgba(216, 59, 139, 0.32);
  color: #c72d7b;
}

.recurring-scope-modal {
  width: min(440px, 100%);
}

.recurring-scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.recurring-scope-options button {
  border: 1px solid rgba(255, 79, 163, 0.28);
  border-radius: 16px;
  padding: 13px 12px;
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.92);
  font-family: var(--ui-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.recurring-scope-options button:hover {
  border-color: rgba(255, 79, 163, 0.56);
  background: rgba(255, 79, 163, 0.2);
}

.recurring-scope-actions {
  justify-content: center;
  margin-top: 14px;
}

.composer textarea,
.field input,
.field textarea,
.field select {
  color: var(--ink);
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(255, 255, 255, 0.055);
}

.field select option {
  background: #111116;
  color: rgba(247, 237, 243, 0.92);
}

.composer textarea::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(247, 237, 243, 0.34);
}

.chat-plus,
.chat-back,
.chat-menu,
.icon-plain {
  color: var(--rose);
}

.pretty-select-trigger,
.model-picker-panel,
.model-option,
.monitor-filter .filter-menu,
.memo-picker-panel {
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(12, 12, 17, 0.96);
  color: rgba(247, 237, 243, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

.pretty-select-trigger b,
.memo-picker-trigger b {
  color: rgba(255, 214, 235, 0.44);
}

.model-option,
.monitor-filter .filter-menu button,
.memo-picker-panel button {
  border-color: rgba(255, 79, 163, 0.18);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 237, 243, 0.88);
}

.model-option:hover,
.monitor-filter .filter-menu button:hover,
.memo-picker-panel button:hover {
  border-color: rgba(255, 79, 163, 0.56);
  background: rgba(255, 79, 163, 0.16);
  color: #fff;
}

.memo-picker-panel button.active {
  background: linear-gradient(135deg, #ff4fa3, #b62068);
  color: #fff;
}

.icon-send.respond,
.send,
.actions .ghost:first-child,
[data-save-config],
[data-save-voice-config],
[data-generate-diary] {
  background: linear-gradient(135deg, #ff4fa3, #b62068);
  box-shadow: 0 16px 36px rgba(255, 79, 163, 0.22);
}

.msg:not(.user) .bubble,
.msg.user .bubble {
  color: rgba(247, 237, 243, 0.9);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 79, 163, 0.26);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.msg.user .bubble {
  background: rgba(255, 79, 163, 0.12);
}

.ai-msg {
  position: relative;
  display: grid;
  grid-template-columns: 3px 34px minmax(0, 1fr);
  align-items: flex-start;
  column-gap: 12px;
  width: 100%;
}

.ai-msg::before {
  content: "";
  width: 3px;
  min-height: 100%;
  border-radius: 999px;
  background: var(--bubble-accent, var(--rose));
  opacity: 0.78;
}

.ai-response-wrap {
  min-width: 0;
}

.ai-response {
  width: min(100%, 820px);
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ai-response-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  color: rgba(255, 214, 235, 0.72);
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ai-response-meta button {
  border: 0;
  background: transparent;
  color: rgba(255, 214, 235, 0.58);
  font: inherit;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.ai-response-body {
  color: rgba(247, 237, 243, 0.9);
  font-size: 15px;
  line-height: 1.82;
}

.ai-response-body p {
  margin: 0 0 14px;
}

.ai-response-body p:last-child {
  margin-bottom: 0;
}

.system-msg {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 6px 18px;
}

.system-msg > .select-dot {
  align-self: center;
  margin-right: 8px;
}

.system-message-card {
  width: min(520px, 92%);
  border: 1px solid rgba(255, 158, 196, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 158, 196, 0.13), transparent 34%),
    rgba(24, 18, 26, 0.72);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
  color: rgba(247, 237, 243, 0.84);
  text-align: left;
}

.system-message-card small {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 183, 208, 0.72);
  font: 800 10px/1.2 var(--mono);
  letter-spacing: 0.14em;
}

.system-message-card .ai-response-body,
.system-message-card div {
  color: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.system-message-card time {
  display: block;
  margin-top: 10px;
  color: rgba(255, 183, 208, 0.46);
  font: 700 10px/1.2 var(--mono);
  letter-spacing: 0.12em;
}

.piggy-system-msg .system-message-card {
  border-color: rgba(255, 198, 114, 0.26);
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 198, 114, 0.12), transparent 34%),
    rgba(24, 20, 18, 0.74);
}

.piggy-system-msg .system-message-card small,
.piggy-system-msg .system-message-card time {
  color: rgba(255, 215, 151, 0.68);
}

.piggy-system-msg {
  padding: 18px 18px;
}

.piggy-chat-card {
  width: min(360px, 92%);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: 20px;
  background: #111116;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.40);
  color: #f7edf3;
  padding: 20px;
  text-align: center;
}

.piggy-chat-card-income {
  border-color: #ff4fa3;
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.12), 0 12px 34px rgba(0, 0, 0, 0.30);
}

.piggy-chat-card-expense {
  border-color: rgba(247, 201, 121, 0.32);
  background: linear-gradient(180deg, #16131a 0%, #111116 100%);
  box-shadow: inset 0 0 28px rgba(247, 201, 121, 0.08), 0 12px 34px rgba(0, 0, 0, 0.32);
}

.piggy-chat-card-wish {
  width: min(100%, 340px);
  padding: 24px 20px 32px;
  border-radius: 24px;
  overflow: visible;
  border-color: transparent;
  background:
    radial-gradient(circle at 50% -14px, rgba(255, 79, 163, 0.18), transparent 38%),
    rgba(17, 17, 22, 0.72);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 30px 52px rgba(255, 79, 163, 0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.piggy-chat-card-wish::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 12%;
  right: 12%;
  bottom: -18px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 79, 163, 0.24), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.piggy-chat-card-wish.created::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 120px;
  height: 60px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 79, 163, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.piggy-chat-card-wish.fulfilled {
  border-color: transparent;
  background:
    radial-gradient(circle at top, rgba(247, 201, 121, 0.05) 0%, rgba(17, 17, 22, 0.72) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 30px 52px rgba(247, 201, 121, 0.12);
}

.piggy-chat-card-wish.fulfilled::after {
  background: radial-gradient(ellipse at center, rgba(247, 201, 121, 0.26), transparent 72%);
}

.piggy-chat-card-receipt {
  max-width: 320px;
  border-radius: 4px;
  border-color: rgba(255, 255, 255, 0.08);
  background: #1a171d;
  padding: 24px 18px 34px;
  text-align: left;
}

.piggy-chat-card-receipt::before,
.piggy-chat-card-receipt::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: radial-gradient(circle, #0c0a0f 2px, transparent 2.5px);
  background-size: 10px 10px;
}

.piggy-chat-card-receipt::before {
  top: -3px;
}

.piggy-chat-card-receipt::after {
  bottom: -3px;
}

.piggy-chat-card .piggy-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(247, 237, 243, 0.52);
  font: 800 10px/1.2 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.piggy-chat-card > strong {
  display: block;
  color: #ffb7d0;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.piggy-chat-card-expense > strong,
.piggy-chat-card-expense .amount {
  color: #f7c979;
}

.piggy-chat-card-wish > strong,
.piggy-chat-card-wish .amount {
  color: #ffb7d0;
}

.piggy-chat-card-wish > strong {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.18);
  color: #ff4fa3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.piggy-chat-card-wish.fulfilled > strong,
.piggy-chat-card-wish.fulfilled .amount {
  color: #f7c979;
}

.piggy-chat-card-wish.fulfilled > strong {
  background: rgba(247, 201, 121, 0.16);
}

.piggy-chat-card-receipt > strong {
  color: #f7edf3;
  font-family: "Songti SC", Georgia, serif;
  font-size: 16px;
  text-align: center;
}

.piggy-chat-card .amount {
  display: block;
  margin: 10px 0;
  color: #ff4fa3;
  font: 800 20px/1.15 var(--mono);
}

.piggy-chat-card .piggy-label {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 237, 243, 0.52);
  font-size: 11px;
}

.piggy-chat-card .piggy-content {
  margin: 10px 0 0;
  color: #f7edf3;
  font-size: 14px;
  line-height: 1.65;
}

.piggy-chat-card-wish .piggy-content {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.piggy-chat-card-wish .piggy-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.52);
  font-size: 11px;
  font-weight: 700;
}

.piggy-chat-card-wish .amount {
  margin: 0 0 18px;
  font-size: 13px;
}

.piggy-chat-card .piggy-content.reply {
  margin-top: 14px;
  font-family: "Songti SC", Georgia, serif;
  font-style: italic;
}

.piggy-chat-card .piggy-note {
  display: block;
  margin-top: 14px;
  padding: 12px 10px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.10);
  color: #ffb7d0;
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

.piggy-chat-card-wish .piggy-note {
  margin-top: 4px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 237, 243, 0.52);
  text-align: left;
}

.piggy-chat-card .piggy-wish-fulfillment-note {
  color: #f7c979;
}

.piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note {
  border-left: 2px solid #f7c979;
}

.piggy-chat-card-wish .piggy-content.reply {
  margin-top: 12px;
  color: rgba(247, 237, 243, 0.54);
  font-size: 12px;
}

.piggy-chat-card .piggy-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(247, 237, 243, 0.10);
}

.piggy-chat-card .piggy-footer {
  display: block;
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: right;
}

.piggy-chat-card time {
  display: block;
  margin: 0;
  color: rgba(247, 237, 243, 0.52);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
}

.piggy-chat-card-income .piggy-footer {
  color: #ff4fa3;
}

.piggy-chat-card-expense .piggy-footer {
  color: #f7c979;
}

.piggy-chat-card.piggy-chat-card-receipt > time {
  position: absolute;
  left: 18px;
  bottom: 12px;
  display: block;
  margin: 0;
  color: rgba(247, 237, 243, 0.34);
  font: 400 12px/1.35 var(--mono);
  letter-spacing: 0;
  text-align: left;
}

.piggy-chat-card i {
  display: block;
  margin: 16px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.10);
}

.piggy-chat-card .receipt-barcode {
  display: block;
  width: 100px;
  height: 30px;
  margin: 20px auto 0;
  background: repeating-linear-gradient(90deg, rgba(247, 237, 243, 0.52) 0px, rgba(247, 237, 243, 0.52) 1px, transparent 1px, transparent 3px);
  opacity: 0.4;
}

.ai-response-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 18px;
  margin-top: 10px;
}

.user-card-msg {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 3px;
  column-gap: 12px;
  justify-content: stretch;
  align-items: flex-start;
  width: 100%;
}

.user-card-msg::after {
  content: "";
  width: 3px;
  min-height: 100%;
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.72);
}

.user-response-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.user-response {
  width: min(100%, 760px);
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ai-msg > .select-dot,
.user-card-msg > .select-dot {
  position: absolute;
  top: 4px;
  z-index: 2;
}

.ai-msg > .select-dot {
  left: 16px;
}

.user-card-msg > .select-dot {
  right: 16px;
}

.heart-modal {
  width: min(560px, 100%);
  background: rgba(8, 8, 12, 0.96);
  border-color: rgba(255, 79, 163, 0.32);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 36px rgba(255, 79, 163, 0.12);
}

.heart-main {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.heart-main h4 {
  margin: 0 0 12px;
  color: rgba(255, 214, 235, 0.68);
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.heart-main p {
  color: rgba(255, 232, 244, 0.92);
  font-size: 15px;
  line-height: 1.82;
}

.context-menu {
  border: 1px solid rgba(255, 79, 163, 0.32);
  background: rgba(8, 8, 12, 0.96);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.48);
}

.context-menu button {
  color: rgba(255, 232, 244, 0.92);
}

.context-menu button:hover {
  background: rgba(255, 79, 163, 0.14);
  color: #fff;
}

.quote-selection-popover {
  border-color: rgba(255, 176, 204, 0.2);
  background: rgba(33, 31, 36, 0.98);
  color: rgba(255, 217, 228, 0.9);
}

.chat-head-actions {
  position: absolute;
  left: auto;
  right: 12px;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translateY(-50%);
  text-align: initial;
}

.chat-head > div:not(.chat-head-actions) {
  left: 72px;
  right: 116px;
}

.chat-head-actions .chat-menu {
  position: static;
  transform: none;
}

.chat-search-panel {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 78px;
  z-index: 180;
  border-bottom: 1px solid rgba(255, 79, 163, 0.18);
  border: 1px solid rgba(255, 79, 163, 0.34);
  border-radius: 18px;
  background: #0c0a0f;
  padding: 12px 14px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 214, 235, 0.04);
}

.chat-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-search-box input {
  min-height: 40px;
  border: 1px solid rgba(255, 79, 163, 0.42);
  border-radius: 14px;
  background: #151019;
  color: #fff3fa;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 235, 0.05);
}

.chat-search-box input::placeholder {
  color: rgba(255, 214, 235, 0.58);
}

.chat-search-box button,
.favorite-card > button {
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: 14px;
  background: #21101a;
  color: rgba(255, 214, 235, 0.82);
  padding: 0 12px;
}

.chat-search-results {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 10px;
  background: #0c0a0f;
}

.chat-search-results.empty {
  display: none;
}

.chat-search-results button {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 79, 163, 0.28);
  border-radius: 16px;
  background: #18111a;
  color: rgba(247, 237, 243, 0.88);
  min-height: 72px;
  padding: 12px 14px;
  text-align: left;
  overflow: hidden;
}

@media (max-width: 620px) {
  .chat-search-panel {
    left: 8px;
    right: 8px;
    top: calc(60px + env(safe-area-inset-top));
  }
}

.chat-search-results strong {
  color: rgba(255, 214, 235, 0.82);
  font-family: var(--ui-display);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chat-search-results span,
.chat-search-empty {
  color: rgba(247, 237, 243, 0.66);
  font-size: 13px;
  line-height: 1.55;
}

.chat-search-results button span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
  word-break: break-word;
}

.msg.search-hit .ai-response,
.msg.search-hit .user-response {
  border-color: rgba(255, 214, 235, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 79, 163, 0.24), 0 0 34px rgba(255, 79, 163, 0.18);
}

.favorites-list-card {
  display: grid;
  gap: 14px;
}

.proactive-toast {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 920;
  display: block;
  width: min(760px, calc(100% - 28px));
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #3e2932;
  pointer-events: auto;
}

.proactive-envelope {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 96px;
  border: 1px solid rgba(255, 202, 128, 0.66);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(255, 250, 224, 0.98), rgba(255, 220, 231, 0.96)),
    repeating-linear-gradient(90deg, rgba(130, 83, 98, 0.08) 0 1px, transparent 1px 28px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.38) inset;
  color: #4a2d36;
  padding: 18px 56px 18px 18px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.proactive-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, transparent 0 47%, rgba(255, 255, 255, 0.3) 48%, transparent 51%),
    linear-gradient(30deg, transparent 0 47%, rgba(196, 106, 137, 0.18) 48%, transparent 52%);
  pointer-events: none;
}

.proactive-envelope-mark {
  position: relative;
  display: block;
  width: 48px;
  height: 34px;
  border: 2px solid rgba(139, 64, 96, 0.42);
  border-radius: 6px;
  background: rgba(255, 252, 236, 0.42);
}

.proactive-envelope-mark::before,
.proactive-envelope-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, transparent 48%, rgba(139, 64, 96, 0.36) 49%, rgba(139, 64, 96, 0.36) 52%, transparent 53%),
    linear-gradient(35deg, transparent 48%, rgba(139, 64, 96, 0.28) 49%, rgba(139, 64, 96, 0.28) 52%, transparent 53%);
}

.proactive-envelope small,
.proactive-paper small,
.favorite-note-card small,
.favorite-note-modal-paper small {
  display: block;
  color: rgba(74, 45, 54, 0.78);
  font-family: var(--ui-display);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.proactive-envelope strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 7px;
  color: #4a2d36;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: 0;
}

.proactive-paper,
.favorite-note-modal-paper {
  position: relative;
  border: 1px solid rgba(226, 191, 125, 0.74);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 251, 232, 0.99), rgba(255, 231, 235, 0.97)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(115, 72, 88, 0.13) 36px 37px);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.32) inset;
  color: #3d2730;
  padding: 38px 24px 20px;
  overflow: visible;
}

.proactive-paper::before,
.favorite-note-modal-paper::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 92px;
  height: 25px;
  transform: translateX(-50%);
  background: rgba(231, 197, 123, 0.38);
  box-shadow: 0 2px 8px rgba(89, 52, 61, 0.12);
}

.proactive-paper header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.proactive-paper small,
.favorite-note-card small,
.favorite-note-modal-paper small,
.quote-note-card small,
.quote-note-card span {
  color: rgba(61, 39, 48, 0.82);
}

.proactive-paper header button {
  border: 0;
  background: transparent;
  color: rgba(85, 47, 62, 0.74);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.proactive-paper p,
.favorite-note-modal-paper p {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  color: #3f2a32;
  font-family: var(--note-font);
  font-size: clamp(18px, 2.1vw, 25px);
  font-weight: 400;
  line-height: 1.82;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.proactive-paper em,
.favorite-note-modal-paper em {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: rgba(74, 45, 54, 0.74);
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.proactive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.proactive-actions button,
.proactive-close {
  min-height: 32px;
  border: 1px solid rgba(255, 79, 163, 0.42);
  border-radius: 999px;
  background: rgba(255, 79, 163, 0.12);
  color: rgba(255, 214, 235, 0.9);
  padding: 0 12px;
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.proactive-paper .proactive-actions button,
.proactive-toast .proactive-close,
.favorite-tabs button {
  border-color: rgba(152, 51, 96, 0.34);
  background: rgba(124, 37, 79, 0.1);
  color: rgba(73, 32, 48, 0.92);
}

.proactive-actions button:disabled {
  opacity: 0.55;
}

.proactive-close {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 32px;
  padding: 0;
  z-index: 2;
  justify-self: end;
  background: rgba(124, 37, 79, 0.12);
}

.proactive-home-card {
  display: grid;
  gap: 12px;
}

.proactive-note-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.proactive-note-list .proactive-paper p {
  font-size: 18px;
}

.proactive-envelope-home {
  min-height: 88px;
  padding-right: 18px;
}

@media (max-width: 620px) {
  .proactive-toast {
    top: calc(8px + env(safe-area-inset-top));
    width: calc(100% - 20px);
  }

  .proactive-envelope {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 84px;
    padding: 14px 48px 14px 14px;
  }

  .proactive-envelope-mark {
    width: 40px;
    height: 29px;
  }

  .proactive-paper {
    padding: 20px 16px 16px;
  }

  .proactive-paper p,
  .favorite-note-modal-paper p {
    font-size: 18px;
    line-height: 1.75;
  }

  .proactive-actions button {
    flex: 1 1 calc(50% - 8px);
    padding: 0 8px;
  }
}

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

.favorite-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 79, 163, 0.2);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 214, 235, 0.045);
}

.favorite-tabs button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.favorite-tabs button.active {
  background: rgba(255, 79, 163, 0.28);
  color: #ffd6eb;
}

.favorite-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(255, 79, 163, 0.22);
  border-radius: 18px;
  background: rgba(255, 79, 163, 0.075);
  padding: 14px;
  cursor: pointer;
}

.favorite-card > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 79, 163, 0.14);
  color: rgba(255, 214, 235, 0.9);
}

.favorite-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.9);
  line-height: 1.7;
}

.favorite-card small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 214, 235, 0.56);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.favorite-note-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: start;
  gap: 22px 28px;
  padding: 24px 4px 6px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.07), transparent 22%),
    radial-gradient(circle at 70% 42%, rgba(255, 214, 235, 0.06), transparent 24%);
}

.favorite-note-card {
  --note-width: 190px;
  --note-min-height: 142px;
  --tape-left: 50%;
  --tape-color: rgba(159, 204, 138, 0.86);
  position: relative;
  flex: 0 1 var(--note-width);
  width: var(--note-width);
  min-height: var(--note-min-height);
  height: auto;
  align-self: start;
  border: 1px solid rgba(218, 188, 134, 0.54);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 252, 236, 0.98), rgba(255, 235, 239, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  color: #3f2a32;
  padding: 28px 15px 15px;
  cursor: pointer;
  transform: rotate(var(--note-tilt, -1deg));
}

.favorite-note-card:nth-child(3n + 1) {
  --note-tilt: -1.5deg;
}

.favorite-note-card:nth-child(3n + 2) {
  --note-tilt: 1.2deg;
  --note-width: 218px;
  --note-min-height: 132px;
  --tape-left: 39%;
  --tape-color: rgba(245, 223, 105, 0.86);
  background:
    linear-gradient(145deg, rgba(246, 252, 228, 0.98), rgba(255, 244, 226, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
}

.favorite-note-card:nth-child(3n) {
  --note-tilt: 0.8deg;
  --note-width: 182px;
  --note-min-height: 164px;
  --tape-left: 45%;
  --tape-color: rgba(229, 130, 151, 0.86);
  background:
    linear-gradient(145deg, rgba(238, 246, 255, 0.97), rgba(255, 238, 246, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
}

.favorite-note-card:nth-child(5n + 4) {
  --note-tilt: -0.6deg;
  --note-width: 236px;
  --note-min-height: 150px;
  --tape-left: 62%;
  --tape-color: rgba(126, 197, 229, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 244, 226, 0.98), rgba(255, 229, 216, 0.95)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
}

.favorite-note-card:nth-child(5n) {
  --note-tilt: 1.8deg;
  --note-width: 172px;
  --note-min-height: 178px;
  --tape-left: 54%;
  --tape-color: rgba(181, 140, 207, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 238, 244, 0.98), rgba(245, 240, 255, 0.95)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.1) 31px 32px);
}

.favorite-note-card::before {
  content: "";
  position: absolute;
  top: -12px;
  left: var(--tape-left);
  width: 48px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--tape-color);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.favorite-note-card:nth-child(3n + 2)::before {
  width: 64px;
}

.favorite-note-card:nth-child(3n)::before {
  width: 52px;
}

.favorite-note-card p {
  margin: 8px 0 0;
  color: #3f2a32;
  font-family: var(--note-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.66;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.favorite-note-card small {
  color: rgba(74, 45, 54, 0.82);
  font-size: 9px;
  letter-spacing: 0.14em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.favorite-note-delete {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(128, 67, 91, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(74, 45, 54, 0.74);
  font-size: 18px;
}

.favorite-modal > span {
  color: rgba(255, 214, 235, 0.58);
  font-family: var(--ui-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.favorite-modal {
  max-height: min(760px, calc(100dvh - 44px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.favorite-modal p {
  white-space: pre-wrap;
  color: rgba(247, 237, 243, 0.92);
  font-size: 16px;
  line-height: 1.9;
}

.favorite-modal small {
  color: rgba(255, 214, 235, 0.52);
}

.modal.favorite-note-modal,
.favorite-note-modal {
  width: min(580px, calc(100vw - 34px));
  max-height: min(760px, calc(100dvh - 44px));
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0;
  overflow: visible;
}

.modal.favorite-note-modal::before,
.modal.favorite-note-modal::after,
.favorite-note-modal::before,
.favorite-note-modal::after {
  display: none !important;
}

.favorite-note-modal-paper {
  width: 100%;
  min-height: 0;
  margin-top: 18px;
  padding: 50px 34px 32px;
  overflow: visible;
  max-width: 100%;
}

.favorite-note-modal-paper::before {
  top: -14px;
  width: 112px;
  height: 28px;
  border-radius: 0;
  background: rgba(231, 197, 123, 0.56);
}

.favorite-note-modal-paper p {
  color: #3f2a32;
  font-family: var(--note-font);
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 400;
  line-height: 1.78;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.favorite-note-modal-paper small {
  color: rgba(74, 45, 54, 0.82);
}

.favorite-note-modal-paper em {
  color: rgba(74, 45, 54, 0.7);
}

@media (max-width: 620px) {
  .favorite-tabs {
    width: 100%;
  }

  .favorite-tabs button {
    flex: 1 1 0;
  }

  .favorite-note-wall {
    gap: 16px 12px;
    padding-top: 20px;
  }

  .favorite-note-card {
    --note-width: calc(50% - 8px);
    flex-basis: var(--note-width);
    width: var(--note-width);
    min-height: 132px;
    padding: 26px 12px 13px;
  }

  .favorite-note-card:nth-child(3n + 2),
  .favorite-note-card:nth-child(3n),
  .favorite-note-card:nth-child(5n + 4),
  .favorite-note-card:nth-child(5n) {
    --note-width: calc(50% - 8px);
    min-height: var(--note-min-height);
  }

  .favorite-note-card p {
    font-size: 14px;
    line-height: 1.58;
  }

  .favorite-note-modal-paper {
    min-height: 0;
    padding: 46px 22px 26px;
  }

  .favorite-note-modal-paper p {
    font-size: 24px;
    line-height: 1.72;
  }
}

.avatar.emoji-avatar,
button.avatar.emoji-avatar {
  border: 0 !important;
  background-color: transparent !important;
  background-size: cover;
  background-position: center;
  box-shadow: none !important;
  color: #ffd6eb;
  font-size: 25px;
  line-height: 1;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
}

.avatar.emoji-avatar.small {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  font-size: 22px;
}

.avatar.emoji-avatar.large {
  flex-basis: 92px;
  width: 92px;
  height: 92px;
  font-size: 64px;
}

.user-avatar {
  color: #ffd6eb;
}

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

.profile-pair-row .user-profile-card {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(255, 79, 163, 0.08);
}

.chat-drawer .drawer-card {
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 79, 163, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 214, 235, 0.08), 0 18px 42px rgba(0, 0, 0, 0.18);
}

.chat-drawer .drawer-profile-card {
  padding: 12px;
}

.chat-drawer .section-title {
  color: rgba(255, 214, 235, 0.68);
  font-family: var(--ui-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
}

.chat-drawer .user-profile-card.icon-only {
  display: grid;
  place-items: center;
  min-height: 74px;
  border-radius: 16px;
  padding: 0;
  color: rgba(255, 214, 235, 0.95);
  font-size: 34px;
  line-height: 1;
}

.chat-drawer .user-profile-card.icon-only:hover {
  border-color: rgba(255, 79, 163, 0.52);
  background: rgba(255, 79, 163, 0.16);
}

.chat-drawer .memory-control {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.86);
}

.chat-drawer .memory-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 214, 235, 0.76);
}

.chat-drawer .memory-control input {
  width: 72px;
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(8, 8, 12, 0.72);
  color: rgba(247, 237, 243, 0.92);
}

.chat-drawer .memory-control .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-drawer .memory-control .ghost {
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(255, 79, 163, 0.1);
  color: rgba(255, 214, 235, 0.88);
  min-height: 40px;
  padding-inline: 10px;
}

.chat-drawer .memory-control .ghost:hover {
  background: rgba(255, 79, 163, 0.18);
}

.month-day,
.day-cell,
.calendar-editor,
.calendar-agenda,
.calendar-list-card,
.diary-letter,
.memory-room,
.memory-entry,
.memory-detail-card,
.memo-item,
.memo-editor,
.field input,
.field textarea,
.field select,
.custom-select-trigger,
.calendar-picker,
.select-menu,
.filter-menu,
.custom-select-menu {
  border-color: rgba(255, 79, 163, 0.2);
  background: rgba(255, 79, 163, 0.075);
}

.month-day {
  background: rgba(255, 79, 163, 0.065);
}

.month-day.selected,
.month-day.today {
  background: rgba(255, 79, 163, 0.45);
}

.chat-attachments,
.attachment-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 8px;
  margin-top: 10px;
}

.attachment-preview {
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: repeat(4, 74px);
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 79, 163, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-attachments figure,
.attachment-preview figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 79, 163, 0.2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.chat-attachments img,
.attachment-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.attachment-expired {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 10px;
  color: rgba(255, 214, 235, 0.58);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  text-align: center;
}

.chat-attachments figcaption {
  padding: 5px 7px;
  color: rgba(247, 237, 243, 0.46);
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attachment-preview button {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 11, 15, 0.72);
  color: #fff;
  padding: 0;
}

.plus-menu {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 79, 163, 0.16), transparent 120px),
    rgba(14, 14, 20, 0.92);
}

.plus-menu button {
  color: var(--ink);
  border-color: rgba(255, 79, 163, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.plus-menu button strong {
  color: #fff;
}

@media (max-width: 620px) {
  .lair-hero {
    min-height: 226px;
  }

  .chat-attachments {
    grid-template-columns: repeat(2, minmax(0, 130px));
  }

  .attachment-preview {
    grid-template-columns: repeat(4, 58px);
  }
}

/* GPT Home chat refinements */
.anniversary-names {
  gap: 10px;
}

.anniversary-names .mark,
.anniversary-names b {
  color: rgba(255, 214, 235, 0.74);
  font-size: 0.52em;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 79, 163, 0.2);
  transform: translateY(-0.08em);
}

.composer {
  grid-template-columns: 32px minmax(160px, 1fr) 48px;
  grid-template-rows: auto minmax(48px, auto);
  align-items: end;
}

.composer.dragging {
  outline: 1px dashed rgba(255, 79, 163, 0.58);
  outline-offset: -10px;
  background: rgba(255, 79, 163, 0.055);
}

.composer .chat-plus,
.composer textarea,
.composer .icon-send {
  grid-row: 2;
}

.composer textarea {
  width: 100%;
  min-width: 0;
  scrollbar-width: thin;
}

.attachment-preview {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 620px) {
  .composer {
    grid-template-columns: 30px minmax(0, 1fr) 46px;
  }

  .attachment-preview {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
  }
}

/* GPT Home dark menu readability guard */
.memo-editor input,
.memo-editor textarea,
.memo-editor .memo-picker-trigger,
.memo-editor .memo-picker-panel,
.memo-editor .memo-picker-panel button {
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(12, 12, 17, 0.97);
  color: rgba(255, 214, 235, 0.92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.memo-editor input::placeholder,
.memo-editor textarea::placeholder {
  color: rgba(255, 214, 235, 0.44);
}

.memo-editor .memo-controls span,
.memo-editor .memo-calendar-head strong,
.memo-editor .memo-calendar-grid b {
  color: rgba(255, 214, 235, 0.62);
}

.memo-editor .memo-calendar-grid button {
  border-color: rgba(255, 79, 163, 0.2);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 214, 235, 0.88);
}

.memo-editor .memo-calendar-grid button.today {
  border-color: rgba(255, 79, 163, 0.58);
  color: rgba(255, 214, 235, 0.96);
}

.memo-editor .memo-calendar-grid button.active {
  background: linear-gradient(135deg, #ff4fa3, #b62068);
  color: #fff;
}

.api-form .pretty-select-trigger,
.api-form .model-picker-panel,
.api-form .model-option,
.monitor-filter .filter-menu,
.monitor-filter .filter-menu button {
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(12, 12, 17, 0.97);
  color: rgba(247, 237, 243, 0.92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
}

.api-form .pretty-select-trigger b,
.monitor-filter .filter-trigger b {
  color: rgba(255, 214, 235, 0.46);
}

.api-form .model-option,
.monitor-filter .filter-menu button {
  background: rgba(255, 255, 255, 0.055);
}

.api-form .model-option:hover,
.monitor-filter .filter-menu button:hover {
  border-color: rgba(255, 79, 163, 0.56);
  background: rgba(255, 79, 163, 0.16);
  color: #fff;
}

.api-form .field select option,
.settings-page .field select option {
  background: #111116;
  color: rgba(247, 237, 243, 0.92);
}

.theme-page {
  display: grid;
  gap: 12px;
  width: min(100%, 700px);
  max-width: 700px;
  margin: 0 auto;
  padding: 4px 18px 18px;
  box-sizing: border-box;
}

.theme-page .section-head {
  min-height: auto;
  padding: 4px 0 6px;
  align-items: flex-start;
  gap: 6px;
}

.theme-page .section-head h2 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(19px, 4vw, 25px);
  line-height: 1.24;
  letter-spacing: 0;
}

.theme-page .section-title {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.theme-page .section-head > span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

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

.theme-option {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 79, 163, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  text-align: left;
}

.theme-option strong,
.theme-option small,
.theme-option p {
  display: block;
}

.theme-option strong {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.25;
}

.theme-option small {
  color: rgba(255, 214, 235, 0.62);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.theme-option p {
  margin: 8px 0 0;
  color: rgba(247, 237, 243, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.theme-option.active {
  border-color: rgba(255, 79, 163, 0.78);
  background: rgba(255, 79, 163, 0.14);
}

.theme-option.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.theme-preview-card {
  padding: 14px 16px;
  border: 1px solid rgba(255, 79, 163, 0.24);
  border-radius: 18px;
  background: rgba(4, 4, 8, 0.34);
}

.theme-preview-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
}

@media (max-width: 620px) {
  .theme-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 2px 12px 16px;
    gap: 10px;
  }

  .theme-page .section-head {
    padding: 2px 0 4px;
  }

  .theme-page .section-head h2 {
    font-size: 20px;
    line-height: 1.24;
  }

  .theme-page .section-head > span {
    position: static;
    align-self: flex-start;
  }

  .theme-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .theme-option {
    min-height: auto;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .theme-option strong {
    font-size: 15px;
  }

  .theme-preview-card {
    padding: 11px 12px;
    border-radius: 15px;
  }

  .theme-preview-card p {
    font-size: 13px;
    line-height: 1.68;
  }
}

/* Keep chat search and details controls anchored on the right. */
.chat-shell .chat-head .chat-head-actions {
  left: auto !important;
  right: 10px !important;
  width: max-content;
  justify-content: flex-end;
}

.chat-shell .chat-head .chat-head-actions .chat-menu {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
}

.chat-shell .chat-head > div:not(.chat-head-actions) {
  left: 50% !important;
  right: auto !important;
  width: max-content;
  max-width: calc(100% - 180px);
  transform: translateX(-50%);
  text-align: center;
}

/* Dark theme readability for card metadata, dates, and helper labels. */
.home-card header span,
.home-card small,
.memo-line small,
.memo-section-head small,
.memo-section-head b,
.memo-controls span,
.more-card small,
.setting-card small,
.calendar-preview header span,
.calendar-form-grid span,
.calendar-agenda-item small,
.calendar-note,
.month-grid b,
.calendar-weekdays b,
.month-day,
.month-day > span,
.month-day em small {
  color: rgba(255, 214, 235, 0.72) !important;
}

.month-day:disabled,
.month-day:disabled > span {
  color: rgba(255, 214, 235, 0.34) !important;
}

.month-day.today,
.month-day.selected,
.month-day.today.selected,
.month-day.today.birthday,
.month-day.today.selected.birthday {
  color: rgba(255, 242, 249, 0.94) !important;
}

.month-day.today > span,
.month-day.selected > span,
.month-day.today.selected > span,
.month-day.today.birthday > span,
.month-day.today.selected.birthday > span {
  color: rgba(255, 242, 249, 0.96) !important;
}

.calendar-switches > button {
  color: rgba(255, 214, 235, 0.76);
}

.calendar-switches > button.active {
  color: rgba(255, 242, 249, 0.96);
}

.cycle-wheel-center {
  color: rgba(255, 214, 235, 0.9);
}

.cycle-wheel-center strong,
.cycle-wheel-center span {
  color: rgba(255, 214, 235, 0.94);
}

.cycle-wheel-center b {
  background: rgba(255, 79, 163, 0.2);
  color: rgba(255, 242, 249, 0.96);
}

.cycle-wheel-tag strong {
  border-color: rgba(255, 214, 235, 0.42);
  background: rgba(17, 17, 22, 0.88);
  color: rgba(255, 242, 249, 0.9);
}

.cycle-wheel-tag small {
  color: rgba(255, 214, 235, 0.68);
}

.cycle-range {
  border: 1px solid rgba(255, 79, 163, 0.22);
  background: rgba(17, 17, 22, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.cycle-range strong {
  color: rgba(255, 242, 249, 0.94);
}

.cycle-range small {
  color: rgba(255, 214, 235, 0.7);
}

.cycle-history {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(17, 17, 22, 0.78);
}

.cycle-history .memo-section-head strong {
  color: rgba(255, 242, 249, 0.94);
}

.cycle-history .memo-section-head small,
.cycle-history .memo-section-head b {
  color: rgba(255, 214, 235, 0.72);
}

.cycle-history .memo-task {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(17, 17, 22, 0.9);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.cycle-history .memo-task-title strong {
  color: rgba(255, 242, 249, 0.94);
}

.cycle-history .memo-task-title span {
  background: rgba(255, 79, 163, 0.16);
  color: rgba(255, 214, 235, 0.9);
}

.cycle-history .memo-task small {
  color: rgba(255, 214, 235, 0.68);
}

.cycle-history .cycle-dot {
  background: rgba(255, 214, 235, 0.85);
  box-shadow: 0 0 0 6px rgba(255, 79, 163, 0.14);
}

.login-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 24px calc(62px + env(safe-area-inset-bottom));
  position: relative;
  background:
    linear-gradient(180deg, rgba(12, 10, 15, 0.96), rgba(22, 16, 24, 0.98)),
    #0c0a0f;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 214, 235, 0.16);
  border-radius: 8px;
  background: rgba(24, 19, 27, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.login-icon {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: rgba(255, 242, 249, 0.94);
}

.login-kicker {
  margin: 0 0 8px;
  color: rgba(255, 214, 235, 0.62);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 0;
  color: rgba(255, 242, 249, 0.96);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.login-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 214, 235, 0.74);
  font-size: 13px;
}

.login-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 214, 235, 0.18);
  border-radius: 8px;
  color: rgba(255, 242, 249, 0.96);
  background: rgba(12, 10, 15, 0.88);
  outline: none;
}

.login-form input:focus {
  border-color: rgba(255, 141, 194, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.12);
}

.login-error {
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 226, 238, 0.96);
  background: rgba(255, 79, 127, 0.18);
  font-size: 13px;
}

.login-site-notice {
  margin: 0;
  padding-top: 4px;
  color: rgba(255, 214, 235, 0.72);
  font-size: 12px;
  line-height: 1.75;
}

.login-beian {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 5;
  transform: translateX(-50%);
  color: rgba(255, 214, 235, 0.82);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.login-beian:hover,
.login-beian:focus-visible {
  color: rgba(255, 242, 249, 0.94);
  text-decoration: underline;
}

/* Keep Memo and Calendar lists as quiet rows inside their parent card, like Today's Todo. */
.memo-board:not(.cycle-history) .memo-task,
.calendar-agenda-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 214, 235, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.memo-board:not(.cycle-history) .memo-task:last-child,
.calendar-agenda-item:last-child {
  border-bottom: 0;
}

.memo-board:not(.cycle-history) .memo-task-title strong,
.calendar-agenda-item strong {
  color: rgba(255, 242, 249, 0.92);
  font-size: 16px;
}

.memo-board:not(.cycle-history) .memo-task-title span,
.calendar-agenda-item b {
  border: 1px solid rgba(255, 79, 163, 0.18);
  background: rgba(255, 79, 163, 0.11);
  color: rgba(255, 214, 235, 0.82);
}

.memo-board:not(.cycle-history) .memo-task p,
.memo-board:not(.cycle-history) .memo-task small,
.calendar-agenda-item small {
  color: rgba(255, 214, 235, 0.62) !important;
}

.calendar-agenda-item > span {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--tag-color), transparent 88%);
}

.calendar-agenda-item .calendar-event-actions {
  justify-self: end;
}

.calendar-agenda-item .calendar-event-actions button {
  color: rgba(255, 214, 235, 0.86);
}

.calendar-editor.memo-editor {
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(17, 17, 22, 0.78);
}

.log-item > div {
  font-size: 13px;
  line-height: 1.55;
}

/* Calendar stitch pass: align with More/Setting, keep bottom nav untouched. */
.calendar-control-shell.home-shell {
  --calendar-eraser: #f6a6c2;
  --calendar-eraser-bright: #ffb7d0;
  --calendar-line: rgba(246, 166, 194, 0.14);
  --calendar-card: rgba(17, 17, 22, 0.78);
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 42px 16px calc(var(--bottom-nav-space) + 30px);
  background:
    radial-gradient(circle at 68% 0%, rgba(246, 166, 194, 0.10), transparent 34%),
    radial-gradient(circle at 4% 88%, rgba(255, 177, 199, 0.05), transparent 32%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: #e7e0e8;
}

.calendar-control-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 34px;
}

.calendar-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 50%;
  background: rgba(17, 17, 22, 0.62);
  color: var(--calendar-eraser-bright);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.calendar-back .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.calendar-control-head h2 {
  margin: 0;
  color: #f2ecf2;
  font-family: "LiuYuHei70", Inter, "PingFang SC", sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
}

.calendar-control-shell .calendar-preview,
.calendar-control-shell .calendar-editor,
.calendar-control-shell .calendar-agenda {
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 28px;
  background: rgba(17, 17, 22, 0.74);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.20);
}

.calendar-control-shell .calendar-preview header strong,
.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .memo-section-head strong {
  color: rgba(255, 242, 249, 0.94);
  font-weight: 500;
}

.calendar-control-shell .home-icon.material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(246, 166, 194, 0.10);
  color: var(--calendar-eraser);
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.calendar-control-shell .calendar-month-actions button {
  border: 1px solid rgba(246, 166, 194, 0.14);
  background: rgba(246, 166, 194, 0.08);
  color: rgba(255, 214, 235, 0.84);
  font-size: 20px;
}

.calendar-control-shell .calendar-weekdays b,
.calendar-control-shell .month-day > span,
.calendar-control-shell .month-day:not(:disabled) {
  color: rgba(255, 214, 235, 0.78) !important;
}

.calendar-control-shell .month-day {
  border-color: rgba(246, 166, 194, 0.07);
  background: rgba(255, 255, 255, 0.018);
}

.calendar-control-shell .month-day > span {
  position: relative;
  z-index: 2;
  font-weight: 400;
}

.calendar-control-shell .month-day.today,
.calendar-control-shell .month-day.selected,
.calendar-control-shell .month-day.today.selected {
  border-color: rgba(246, 166, 194, 0.34);
  background: rgba(246, 166, 194, 0.10);
  box-shadow: none;
}

.calendar-control-shell .month-day.today > span,
.calendar-control-shell .month-day.selected > span,
.calendar-control-shell .month-day.today.selected > span {
  color: rgba(255, 242, 249, 0.96) !important;
}

.calendar-control-shell .calendar-span-bar {
  z-index: 4;
  margin-top: 46px;
  border-left-width: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color), #151218 78%);
  color: rgba(255, 242, 249, 0.76);
  padding: 3px 8px;
  box-shadow: none;
}

.calendar-control-shell .calendar-span-bar.lane-1 {
  margin-top: 67px;
}

.calendar-control-shell .calendar-span-bar.lane-2 {
  margin-top: 88px;
}

.calendar-control-shell .calendar-span-bar.lane-3 {
  margin-top: 109px;
}

.calendar-control-shell .calendar-form input,
.calendar-control-shell .calendar-form textarea,
.calendar-control-shell .memo-picker-trigger,
.calendar-control-shell .calendar-switches > button {
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 18px;
  background: rgba(10, 9, 13, 0.76);
  color: rgba(255, 242, 249, 0.92);
  box-shadow: none;
}

.calendar-control-shell .calendar-form input::placeholder,
.calendar-control-shell .calendar-form textarea::placeholder {
  color: rgba(255, 214, 235, 0.34);
}

.calendar-control-shell .calendar-form input:focus,
.calendar-control-shell .calendar-form textarea:focus {
  border-color: rgba(246, 166, 194, 0.48);
  outline: none;
  box-shadow: 0 0 0 3px rgba(246, 166, 194, 0.10);
}

.calendar-control-shell .calendar-form-grid span {
  color: rgba(246, 166, 194, 0.58) !important;
  font-weight: 400;
}

.calendar-control-shell .calendar-switches {
  align-items: start;
}

.calendar-control-shell .calendar-switches > button,
.calendar-control-shell .calendar-inline-picker .memo-picker-trigger {
  min-height: 48px;
  padding: 0 14px;
  color: rgba(255, 214, 235, 0.72);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.11em;
}

.calendar-control-shell .calendar-switches > button.active,
.calendar-control-shell .calendar-inline-picker .memo-picker-trigger strong {
  color: rgba(255, 242, 249, 0.95);
}

.calendar-control-shell .calendar-switches > button.active {
  border-color: rgba(246, 166, 194, 0.42);
  background: rgba(246, 166, 194, 0.15);
}

.calendar-control-shell .calendar-inline-picker .memo-picker-panel {
  display: grid;
  gap: 8px;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(246, 166, 194, 0.20);
  border-radius: 18px;
  background: rgba(17, 17, 22, 0.96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.36);
}

.calendar-control-shell .calendar-inline-picker .memo-picker-panel button {
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 214, 235, 0.76);
  padding: 9px 12px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.10em;
}

.calendar-control-shell .calendar-inline-picker .memo-picker-panel button.active {
  border-color: rgba(246, 166, 194, 0.42);
  background: rgba(246, 166, 194, 0.14);
  color: rgba(255, 242, 249, 0.96);
}

.calendar-control-shell .calendar-agenda-list {
  gap: 0;
}

.calendar-control-shell .calendar-agenda-item {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 74px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.11);
}

.calendar-control-shell .calendar-agenda-item > span {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tag-color), transparent 86%);
}

.calendar-control-shell .calendar-agenda-item strong {
  color: rgba(255, 242, 249, 0.92);
  font-size: 16px;
  font-weight: 400;
}

.calendar-control-shell .calendar-agenda-item small {
  color: rgba(255, 214, 235, 0.58) !important;
  font-size: 11px;
  font-weight: 400;
}

.calendar-control-shell .calendar-agenda-item b {
  border-color: rgba(246, 166, 194, 0.16);
  background: rgba(246, 166, 194, 0.10);
  color: rgba(246, 166, 194, 0.82);
}

.calendar-control-shell .calendar-edit-pill {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.08);
  color: rgba(246, 166, 194, 0.84);
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.calendar-control-shell .calendar-form-actions .danger {
  border-color: rgba(246, 166, 194, 0.22);
  color: rgba(246, 166, 194, 0.88);
}

@media (max-width: 560px) {
  .diary-filter {
    grid-template-columns: 1fr;
  }

  .diary-list {
    grid-template-columns: 1fr;
  }

  .weekly-diary-compare {
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 110px;
  }

  .weekly-diary-preview-modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    height: calc(100dvh - 18px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
  }

  .weekly-diary-preview-modal .weekly-diary-detail-head {
    flex: 0 0 auto;
  }

  .weekly-diary-preview-column {
    padding: 14px;
  }

  .weekly-diary-preview-actions {
    position: sticky;
    bottom: 0;
    flex: 0 0 auto;
    margin: 0 -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    background: rgba(12, 12, 17, 0.98);
  }

  .diary-date-panel,
  .diary-date-panel-end {
    left: 0;
    right: auto;
    width: min(calc(100vw - 44px), 430px);
  }

  .chat-bridge-panel {
    left: 50%;
    top: 88px;
    width: calc(100vw - 24px);
  }

  .monitor-form {
    padding: 16px 14px 88px;
    gap: 12px;
  }

  .monitor-form .bridge-card {
    padding: 13px;
  }

  .monitor-form .cloud-status-grid span {
    padding: 5px 8px;
    font-size: 11px;
  }

  .monitor-form .log-list {
    gap: 8px;
  }

  .monitor-form .log-item {
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 1.45;
  }

  .monitor-form .log-item strong {
    font-size: 11px;
  }

  .monitor-form .log-item .subtle,
  .monitor-form .log-item > div {
    font-size: 10px;
    line-height: 1.45;
  }
}

.fiction-shell {
  gap: 18px;
}

.fiction-hero-card {
  display: grid;
  gap: 10px;
}

.fiction-hero-card p,
.fiction-editor-card span,
.fiction-sidebar-head span,
.fiction-generate-card span,
.fiction-chapters-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.fiction-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.fiction-sidebar,
.fiction-editor-card,
.fiction-chapters-card {
  padding: 20px;
}

.fiction-sidebar-head,
.fiction-form-head,
.fiction-generate-card,
.fiction-chapter-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fiction-sidebar-head button,
.fiction-actions button,
.fiction-generate-card button,
.fiction-chapter-card button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid var(--pink-border);
  background: rgba(94, 25, 60, 0.42);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.fiction-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fiction-actions .ghost,
.fiction-chapter-card button {
  background: rgba(12, 10, 18, 0.58);
}

.fiction-world-list,
.fiction-chapter-list,
.fiction-form {
  display: grid;
  gap: 12px;
}

.fiction-world-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(231, 75, 151, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.fiction-world-card.active {
  border-color: rgba(244, 69, 155, 0.72);
  background: rgba(94, 25, 60, 0.34);
}

.fiction-world-card span,
.fiction-chapter-card small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fiction-form .field {
  display: grid;
  gap: 7px;
}

.fiction-form label,
.fiction-generate-card strong,
.fiction-chapter-card header span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fiction-form input,
.fiction-form select,
.fiction-form textarea,
.fiction-generate-card textarea {
  width: 100%;
  border: 1px solid rgba(255, 188, 219, 0.18);
  border-radius: 14px;
  background: rgba(8, 7, 12, 0.72);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  line-height: 1.5;
}

.fiction-form textarea,
.fiction-generate-card textarea {
  min-height: 92px;
  resize: vertical;
}

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

.fiction-generate-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 188, 219, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.fiction-generate-card textarea {
  min-height: 70px;
}

.fiction-chapter-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(231, 75, 151, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.fiction-chapter-card header strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.fiction-chapter-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

.fiction-chapter-card details {
  border-top: 1px solid rgba(255, 188, 219, 0.12);
  padding-top: 10px;
}

.fiction-chapter-card summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.fiction-chapter-card details div {
  margin-top: 10px;
  max-height: 460px;
  overflow: auto;
  color: var(--text);
  line-height: 1.85;
  white-space: normal;
}

.quote-fiction-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-left: 3px solid rgba(244, 69, 155, 0.72);
  border-radius: 14px;
  background: rgba(94, 25, 60, 0.18);
}

.quote-fiction-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-fiction-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.quote-fiction-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.chat-shell .fiction-share-card {
  display: block;
  width: min(100%, 520px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 187, 255, 0.18);
  border-left: 1px solid rgba(210, 187, 255, 0.18);
  border-radius: 14px;
  background: rgba(26, 22, 34, 0.92);
  box-shadow: none;
}

.chat-shell .fiction-share-cover {
  position: relative;
  height: 118px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 26%, rgba(210, 187, 255, 0.18), transparent 24%),
    radial-gradient(circle at 28% 68%, rgba(246, 166, 194, 0.18), transparent 30%),
    #111116;
}

.chat-shell .fiction-share-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.chat-shell .fiction-share-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 13, 0.08), rgba(26, 22, 34, 0.94));
}

.chat-shell .fiction-share-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(210, 187, 255, 0.22);
  border-radius: 5px;
  background: rgba(15, 13, 18, 0.72);
  color: rgba(231, 224, 232, 0.82);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.chat-shell .fiction-share-badge i {
  color: #d2bbff;
  font-size: 14px;
  font-style: normal;
}

.chat-shell .fiction-share-body {
  display: grid;
  gap: 10px;
  padding: 14px 16px 15px;
}

.chat-shell .fiction-share-body > small {
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-shell .fiction-share-body h4 {
  margin: 0;
  color: #d2bbff;
  font-family: "Syne", "Inter", "PingFang SC", sans-serif;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
}

.chat-shell .fiction-share-body h4 span {
  margin-left: 5px;
  color: rgba(210, 187, 255, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-shell .fiction-share-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(231, 224, 232, 0.82);
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.chat-shell .fiction-share-body button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  margin-top: 2px;
  border: 1px solid rgba(210, 187, 255, 0.28);
  border-radius: 8px;
  background: rgba(210, 187, 255, 0.07);
  color: rgba(210, 187, 255, 0.88);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chat-shell .fiction-share-body button i {
  font-size: 15px;
  font-style: normal;
}

.chat-shell .fiction-share-body > em {
  color: rgba(223, 190, 200, 0.32);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-align: center;
}

.chat-shell .quote-fiction-compact {
  gap: 5px;
  padding: 2px 28px 2px 12px;
  border: 0;
  border-left: 2px solid var(--stitch-primary);
  border-radius: 0;
  background: transparent;
}

.chat-shell .quote-fiction-compact header {
  display: grid;
  gap: 1px;
}

.chat-shell .quote-fiction-compact header small {
  color: var(--stitch-primary);
  font-size: 9px;
}

.chat-shell .quote-fiction-compact header span,
.chat-shell .quote-fiction-compact p {
  color: rgba(231, 224, 232, 0.58);
  font-size: 11px;
  line-height: 1.45;
  text-transform: none;
}

.chat-shell .quote-fiction-compact p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .fiction-layout,
  .fiction-two-col {
    grid-template-columns: 1fr;
  }

  .fiction-sidebar,
  .fiction-editor-card,
  .fiction-chapters-card {
    padding: 15px;
  }

  .fiction-form-head,
  .fiction-generate-card,
  .fiction-chapter-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .fiction-actions,
  .fiction-chapter-card button,
  .fiction-generate-card button {
    width: 100%;
  }
}

.fiction-shell {
  gap: 14px;
}

.fiction-hero-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.fiction-hero-card > div:first-child {
  display: grid;
  gap: 7px;
}

.fiction-hero-card span,
.fiction-section-head span,
.fiction-detail-hero span,
.fiction-reader-top,
.fiction-reading-page > span,
.fiction-generate-card span,
.fiction-boundary-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.fiction-hero-card strong {
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.02em;
}

.fiction-hero-card p,
.fiction-book-card p,
.fiction-detail-hero p,
.fiction-preset-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.fiction-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fiction-tabbar button,
.fiction-section-head button,
.fiction-actions button,
.fiction-back,
.fiction-preset-form button,
.fiction-empty button {
  min-height: 38px;
  border: 1px solid rgba(244, 69, 155, 0.42);
  border-radius: 999px;
  background: rgba(94, 25, 60, 0.34);
  color: var(--text);
  padding: 0 15px;
  font-size: 12px;
  font-weight: 700;
}

.fiction-tabbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 108px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.fiction-tabbar button strong {
  font-size: clamp(14px, 1.45vw, 16px);
  line-height: 1;
  letter-spacing: 0;
}

.fiction-tabbar button.active,
.fiction-section-head button,
.fiction-actions button:not(.ghost),
.fiction-empty button {
  background: rgba(244, 69, 155, 0.36);
  border-color: rgba(244, 69, 155, 0.76);
}

.fiction-section-card,
.fiction-reader-card {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.fiction-mode-create > .fiction-section-card,
.fiction-mode-settings > .fiction-section-card {
  padding: 0 22px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.fiction-section-head,
.fiction-reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fiction-section-head > header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fiction-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.fiction-book-card {
  text-align: left;
  display: grid;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.fiction-book-cover {
  aspect-ratio: 0.78;
  border: 1px solid rgba(255, 188, 219, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(244, 69, 155, 0.08)),
    rgba(8, 7, 12, 0.88);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.fiction-book-card:hover .fiction-book-cover {
  transform: translateY(-3px);
  border-color: rgba(244, 69, 155, 0.58);
}

.fiction-book-cover em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.fiction-book-cover.large {
  width: min(190px, 36vw);
  flex: 0 0 auto;
}

.fiction-book-card strong,
.fiction-mini-chapters strong {
  color: var(--text);
  line-height: 1.35;
}

.fiction-book-card small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fiction-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border: 1px dashed rgba(244, 69, 155, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.fiction-detail-hero {
  display: flex;
  gap: 22px;
  align-items: center;
}

.fiction-detail-hero h3,
.fiction-reading-page h3 {
  margin: 6px 0 10px;
  color: var(--text);
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.22;
}

.fiction-mini-chapters,
.fiction-preset-list {
  display: grid;
  gap: 10px;
}

.fiction-mini-chapters button,
.fiction-chapter-drawer button,
.fiction-preset-list article {
  text-align: left;
  border: 1px solid rgba(255, 188, 219, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 12px 14px;
}

.fiction-mini-chapters button {
  display: flex;
  gap: 12px;
  align-items: center;
}

.fiction-mini-chapters span,
.fiction-chapter-drawer span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.fiction-reader-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.fiction-chapter-drawer {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
}

.fiction-chapter-drawer strong {
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}

.fiction-chapter-drawer button.active {
  border-color: rgba(244, 69, 155, 0.68);
  background: rgba(94, 25, 60, 0.34);
}

.fiction-reading-page {
  min-height: 60vh;
  padding: min(6vw, 54px);
  border-radius: 18px;
  border: 1px solid rgba(255, 188, 219, 0.14);
  background: rgba(7, 6, 10, 0.5);
}

.fiction-reading-page div {
  color: rgba(255, 245, 250, 0.92);
  font-size: 18px;
  line-height: 2.05;
}

.fiction-summary-panel,
.fiction-generate-card,
.fiction-book-form,
.fiction-settings-grid {
  display: grid;
  gap: 14px;
}

.fiction-form-head,
.fiction-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.fiction-actions {
  justify-content: flex-start;
}

.fiction-actions .ghost,
.fiction-back {
  background: rgba(12, 10, 18, 0.48);
}

.fiction-form .field,
.fiction-summary-panel .field {
  display: grid;
  gap: 7px;
}

.fiction-form label,
.fiction-summary-panel label,
.fiction-preset-box h3 {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fiction-form input,
.fiction-form select,
.fiction-form textarea,
.fiction-summary-panel textarea,
.fiction-generate-card textarea,
.fiction-preset-form input,
.fiction-preset-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 188, 219, 0.18);
  border-radius: 14px;
  background: rgba(8, 7, 12, 0.72);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  line-height: 1.55;
}

.fiction-form select {
  min-height: 46px;
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 207, 226, 0.78) 50%) right 20px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 207, 226, 0.78) 50%, transparent 50%) right 15px center / 7px 7px no-repeat,
    rgba(8, 7, 12, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.fiction-form select:focus {
  outline: none;
  border-color: rgba(244, 69, 155, 0.68);
  box-shadow: 0 0 0 3px rgba(244, 69, 155, 0.14);
}

.fiction-form textarea,
.fiction-summary-panel textarea,
.fiction-generate-card textarea,
.fiction-preset-form textarea {
  min-height: 92px;
  resize: vertical;
}

.fiction-two-col,
.fiction-three-col,
.fiction-settings-grid {
  display: grid;
  gap: 12px;
}

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

.fiction-three-col,
.fiction-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.fiction-preset-preview {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 188, 219, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.fiction-preset-preview small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fiction-preset-preview strong {
  color: var(--text);
  font-size: 15px;
}

.fiction-preset-preview p {
  color: var(--muted);
  line-height: 1.6;
}

.fiction-preset-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 188, 219, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.fiction-preset-form {
  display: grid;
  gap: 9px;
}

.fiction-boundary-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(244, 69, 155, 0.22);
  background: rgba(94, 25, 60, 0.16);
}

@media (max-width: 860px) {
  .fiction-reader-layout,
  .fiction-two-col,
  .fiction-three-col,
  .fiction-preset-preview-grid,
  .fiction-settings-grid {
    grid-template-columns: 1fr;
  }

  .fiction-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .fiction-chapter-drawer {
    position: static;
    display: flex;
    overflow-x: auto;
    max-height: none;
    padding-bottom: 4px;
  }

  .fiction-chapter-drawer button {
    min-width: 170px;
  }
}

@media (max-width: 620px) {
  .fiction-section-card,
  .fiction-reader-card,
  .fiction-hero-card {
    padding: 15px;
  }

  .fiction-tabbar {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .fiction-tabbar button {
    min-height: 34px;
    min-width: 0;
    flex: 1 1 0;
    padding: 0 7px;
    border-radius: 999px;
  }

  .fiction-tabbar button strong {
    font-size: 11px;
  }

  .fiction-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .fiction-reading-page {
    padding: 22px 16px;
  }

  .fiction-reading-page div {
    font-size: 16px;
    line-height: 1.9;
  }
}

/* Parallel Fiction black-pink book room polish */
.fiction-shell {
  --fiction-bg: #0c0a0f;
  --fiction-card: rgba(18, 15, 22, 0.72);
  --fiction-ink: rgba(247, 237, 243, 0.94);
  --fiction-muted: rgba(223, 190, 200, 0.56);
  --fiction-dim: rgba(223, 190, 200, 0.36);
  --fiction-pink: #f6a6c2;
  --fiction-hot: #ff5aa6;
  --fiction-line: rgba(246, 166, 194, 0.16);
  --more-eraser-bright: #ffb7d0;
  position: relative;
  width: min(100%, 430px);
  max-width: 430px;
  gap: 12px;
  padding: 86px 16px calc(var(--bottom-nav-space) + 72px);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 176, 204, 0.09), transparent 22%),
    radial-gradient(circle at 18% 34%, rgba(255, 79, 163, 0.08), transparent 28%),
    linear-gradient(180deg, #0c0a0f, #110d15 52%, #0b090e);
}

.fiction-mode-shelf {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

.fiction-hero-card {
  padding: 20px 18px 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.fiction-hero-card > div:first-child {
  gap: 12px;
}

.fiction-hero-card small {
  display: block;
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.fiction-hero-card p {
  display: block;
  max-width: none;
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.fiction-section-card,
.fiction-reader-card {
  border: 1px solid var(--fiction-line);
  border-radius: 22px;
  background: var(--fiction-card);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
}

.fiction-control-head h2 {
  font-size: 24px;
}

.fiction-shelf-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 0 0;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.fiction-shelf-section .fiction-section-head {
  padding: 0 2px;
}

.fiction-section-head > header {
  gap: 0;
}

.fiction-section-head strong {
  color: var(--fiction-ink);
  font-family: "Syne", "Inter", sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.fiction-section-head span {
  color: var(--fiction-dim);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fiction-section-head small {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 7px;
  color: rgba(246, 166, 194, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fiction-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 172px;
  scrollbar-width: none;
}

.fiction-book-grid::-webkit-scrollbar {
  display: none;
}

.fiction-book-card {
  min-width: 0;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(246, 166, 194, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.fiction-empty-book {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.9;
}

.fiction-empty-book.muted {
  opacity: 0.58;
}

.fiction-empty-book strong {
  color: rgba(255, 183, 208, 0.78);
  font-size: 13px;
  line-height: 1.35;
}

.fiction-empty-book p {
  margin: 0;
  color: rgba(223, 190, 200, 0.54);
  font-size: 10.5px;
  line-height: 1.55;
}

.fiction-empty-book .fiction-book-cover {
  max-height: 228px;
}

.fiction-book-cover {
  position: relative;
  aspect-ratio: 0.78;
  overflow: hidden;
  border-radius: 7px 13px 13px 7px;
  border: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 176, 204, 0.22), transparent 22%),
    linear-gradient(135deg, rgba(31, 29, 38, 0.98), rgba(13, 10, 16, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.fiction-book-card:hover .fiction-book-cover {
  border-color: transparent;
}

.fiction-book-cover::before {
  content: none;
}

.fiction-book-cover i {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.12), transparent 18%);
  pointer-events: none;
}

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

.fiction-book-cover em {
  position: relative;
  z-index: 1;
  max-width: 86%;
  color: rgba(255, 205, 223, 0.96);
  font-family: "Songti SC", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fiction-book-card strong {
  color: rgba(255, 183, 208, 0.94);
  font-size: 14px;
}

.fiction-book-card small {
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.fiction-book-card p {
  color: rgba(223, 190, 200, 0.66);
  font-size: 11px;
  line-height: 1.55;
}

.fiction-shelf-dock {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 112px;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: min(398px, calc(100vw - 32px));
  margin: 0;
  padding: 11px 0 10px;
  border: 0;
  background: rgba(16, 14, 19, 0.88);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.fiction-shelf-dock button {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.74);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.fiction-shelf-dock button + button {
  border-left: 1px solid rgba(246, 166, 194, 0.10);
}

.fiction-detail-hero {
  align-items: center;
}

.fiction-book-cover.large {
  width: min(150px, 36vw);
}

.fiction-detail-hero h3,
.fiction-reading-page h3 {
  color: var(--fiction-ink);
  font-family: "Songti SC", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.fiction-actions button,
.fiction-back,
.fiction-preset-form button,
.fiction-empty button {
  min-height: 34px;
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 237, 243, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.fiction-book-form {
  gap: 22px;
  padding: 28px 18px 18px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(31, 28, 35, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018), 0 18px 46px rgba(0, 0, 0, 0.22);
}

.fiction-book-form .fiction-form-head {
  display: grid;
  gap: 16px;
}

.fiction-book-form .fiction-form-head strong {
  color: var(--fiction-pink);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.fiction-book-form .fiction-form-head span {
  color: rgba(223, 190, 200, 0.48);
  font-size: 11px;
  line-height: 1.65;
}

.fiction-book-form .fiction-actions {
  justify-content: flex-start;
  gap: 8px;
}

.fiction-book-form .fiction-actions button {
  min-height: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: rgba(255, 183, 208, 0.72);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.fiction-book-form .fiction-two-col,
.fiction-book-form .fiction-three-col {
  grid-template-columns: 1fr;
  gap: 16px;
}

.fiction-book-form .fiction-field-title {
  gap: 12px;
}

.fiction-book-form .fiction-field-title input {
  min-height: 44px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.28);
  border-radius: 0;
  background: rgba(8, 7, 12, 0.32);
  color: rgba(247, 237, 243, 0.94);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 650;
}

.fiction-book-form .fiction-field-description textarea {
  min-height: 108px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.13);
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.78);
  font-size: 16px;
}

.fiction-preset-picker-field {
  position: relative;
}

.fiction-preset-picker {
  position: relative;
}

.fiction-preset-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 207, 226, 0.62) 50%) right 18px center / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255, 207, 226, 0.62) 50%, transparent 50%) right 14px center / 6px 6px no-repeat,
    rgba(8, 7, 12, 0.42);
  color: rgba(247, 237, 243, 0.84);
  cursor: pointer;
  list-style: none;
}

.fiction-preset-picker summary::-webkit-details-marker {
  display: none;
}

.fiction-preset-picker summary span {
  overflow: hidden;
  color: rgba(247, 237, 243, 0.82);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiction-preset-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 12px;
  background: rgba(18, 15, 22, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.fiction-preset-menu button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 237, 243, 0.72);
  padding: 0 10px;
  text-align: left;
  font-size: 11.5px;
}

.fiction-preset-menu button.active,
.fiction-preset-menu button:hover {
  background: rgba(255, 123, 173, 0.14);
  color: rgba(255, 218, 232, 0.96);
}

.fiction-book-form .field:not(.fiction-field-title):not(.fiction-field-description) textarea {
  min-height: 128px;
  border: 0;
  border-radius: 14px;
  background: rgba(8, 7, 12, 0.60);
  color: rgba(247, 237, 243, 0.78);
  font-size: 14px;
}

.fiction-book-form .fiction-preset-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.fiction-book-form .fiction-preset-preview {
  min-height: 0;
  padding: 10px;
  border-color: rgba(246, 166, 194, 0.14);
  background: rgba(8, 7, 12, 0.38);
}

.fiction-book-form .fiction-preset-preview small {
  font-size: 9px;
}

.fiction-book-form .fiction-preset-preview strong {
  font-size: 13px;
}

.fiction-book-form .fiction-preset-preview p {
  display: none;
}

.fiction-actions button:not(.ghost),
.fiction-empty button {
  border-color: rgba(255, 123, 173, 0.46);
  background: rgba(255, 123, 173, 0.18);
  color: rgba(255, 220, 232, 0.96);
}

.fiction-form-head span {
  color: var(--fiction-muted);
  font-size: 11px;
}

.fiction-form label,
.fiction-summary-panel label,
.fiction-preset-box h3 {
  color: rgba(223, 190, 200, 0.52);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
}

.fiction-form input,
.fiction-form select,
.fiction-form textarea,
.fiction-summary-panel textarea,
.fiction-generate-card textarea,
.fiction-preset-form input,
.fiction-preset-form textarea {
  border-color: rgba(246, 166, 194, 0.14);
  border-radius: 12px;
  background: rgba(8, 7, 12, 0.62);
  color: rgba(247, 237, 243, 0.86);
  font-size: 12px;
}

.fiction-preset-preview,
.fiction-preset-box,
.fiction-mini-chapters button,
.fiction-chapter-drawer button,
.fiction-preset-list article {
  border-color: rgba(246, 166, 194, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.fiction-settings-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.fiction-preset-box {
  padding: 16px;
}

.fiction-preset-form button {
  justify-self: center;
  width: auto;
  min-height: 0;
  margin-top: 2px;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.72);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  box-shadow: none;
}

.fiction-existing-presets {
  margin-top: 8px;
  border-top: 1px solid rgba(246, 166, 194, 0.08);
  padding-top: 8px;
}

.fiction-existing-presets summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  color: rgba(255, 183, 208, 0.66);
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.fiction-existing-presets summary::-webkit-details-marker {
  display: none;
}

.fiction-existing-presets summary b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 999px;
  color: rgba(247, 237, 243, 0.52);
  font-size: 10px;
}

.fiction-existing-presets[open] summary {
  margin-bottom: 8px;
}

.fiction-preset-list {
  gap: 7px;
}

.fiction-preset-list article {
  padding: 10px 12px;
}

.fiction-preset-list article strong {
  color: rgba(247, 237, 243, 0.86);
  font-size: 12px;
}

.fiction-preset-list article p {
  margin-top: 4px;
  color: rgba(223, 190, 200, 0.56);
  font-size: 11px;
  line-height: 1.55;
}

.fiction-preset-empty {
  margin: 8px 0 0;
  color: rgba(247, 237, 243, 0.58);
  font-size: 12px;
}

.fiction-reader-layout {
  grid-template-columns: 1fr;
}

.fiction-reader-card {
  display: grid;
  gap: 26px;
  padding: 8px 18px 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fiction-reader-top {
  align-items: center;
}

.fiction-reader-link {
  min-height: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.fiction-chapter-drawer {
  position: static;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-height: none;
  overflow: hidden;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.08);
}

.fiction-chapter-drawer button {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  margin: 3px 4px;
  padding: 0 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.50);
  box-shadow: none;
  text-align: center;
}

.fiction-chapter-drawer button span {
  color: inherit;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.fiction-chapter-drawer button.active {
  border: 1px solid rgba(246, 166, 194, 0.20);
  background: rgba(246, 166, 194, 0.12);
  color: rgba(255, 183, 208, 0.92);
  box-shadow: 0 0 18px rgba(246, 166, 194, 0.10);
}

.fiction-chapter-drawer button.active::after {
  content: none;
}

.fiction-reading-page {
  min-height: 48vh;
  padding: 8px 2px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fiction-reading-page > span {
  color: rgba(223, 190, 200, 0.50);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.fiction-reading-page h3 {
  margin: 9px 0 18px;
  color: rgba(247, 237, 243, 0.96);
  font-family: "Syne", "Inter", "PingFang SC", sans-serif;
  font-size: clamp(21px, 5.8vw, 27px);
  font-weight: 680;
  line-height: 1.22;
  letter-spacing: 0;
}

.fiction-reading-page div {
  font-family: "Songti SC", Georgia, serif;
  font-size: 14.5px;
  line-height: 1.95;
}

.fiction-summary-panel,
.fiction-generate-card {
  display: grid;
  gap: 12px;
  margin: 0;
  width: 100%;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid rgba(246, 166, 194, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fiction-summary-panel .field {
  gap: 10px;
}

.fiction-summary-panel label,
.fiction-generate-card > div strong {
  color: rgba(246, 166, 194, 0.66);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.fiction-generate-card > div {
  display: grid;
  gap: 5px;
  width: 100%;
}

.fiction-generate-card > div span {
  color: rgba(223, 190, 200, 0.46);
  font-size: 11px;
}

.fiction-summary-panel textarea,
.fiction-generate-card textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 14px;
  background: rgba(8, 7, 12, 0.42);
  color: rgba(247, 237, 243, 0.84);
  font-family: "Songti SC", Georgia, serif;
  font-size: 14px;
  line-height: 1.75;
}

.fiction-generate-card textarea {
  max-width: none;
  min-height: 92px;
}

#fiction-guidance {
  width: 100%;
  max-width: none;
}

.fiction-text-actions {
  display: flex;
  justify-content: flex-start;
  gap: 28px;
  width: auto;
  flex-flow: row nowrap;
  align-items: center;
}

.fiction-text-actions button,
.fiction-text-actions button:not(.ghost) {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: none;
  white-space: nowrap;
}

.fiction-generate-card .fiction-text-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 28px;
  column-gap: 28px;
  width: auto;
}

.fiction-generate-card .fiction-text-actions button {
  width: auto !important;
}

.fiction-text-actions button:disabled {
  opacity: 0.38;
}

.fiction-generating-page {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  align-content: center;
  min-height: calc(100dvh - 190px);
  padding: 28px 20px 90px;
  text-align: center;
}

.fiction-turning-book {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 0.72;
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid rgba(246, 166, 194, 0.68);
  border-radius: 8px;
  background: rgba(27, 22, 30, 0.92);
  box-shadow: 0 0 34px rgba(246, 166, 194, 0.14);
}

.fiction-turning-book > span {
  color: rgba(246, 166, 194, 0.54);
  font-size: 42px;
  font-variation-settings: "wght" 260;
}

.fiction-turning-book i {
  position: absolute;
  inset: -2px -2px -2px 48%;
  border-left: 1px solid rgba(255, 213, 229, 0.72);
  background: linear-gradient(90deg, rgba(246, 166, 194, 0.04), rgba(246, 166, 194, 0.42));
  transform-origin: left center;
  animation: fiction-page-turn 1.55s ease-in-out infinite;
}

.fiction-generating-page > strong {
  color: rgba(247, 237, 243, 0.94);
  font-size: 17px;
  font-weight: 750;
}

.fiction-generating-page > small {
  margin-top: 10px;
  color: rgba(246, 166, 194, 0.58);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.fiction-generating-page > p {
  align-self: end;
  margin: 22vh 0 0;
  color: rgba(223, 190, 200, 0.32);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

@keyframes fiction-page-turn {
  0%,
  18% {
    transform: perspective(220px) rotateY(0deg);
    opacity: 0.8;
  }
  72%,
  100% {
    transform: perspective(220px) rotateY(-176deg);
    opacity: 0.12;
  }
}

.fiction-detail-card {
  gap: 26px;
  padding: 18px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.fiction-detail-card .fiction-back {
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.78);
  font-size: 12px;
  box-shadow: none;
}

.fiction-inline-back {
  justify-self: start;
  min-height: 0;
  padding: 0 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.76);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.fiction-detail-card .fiction-detail-hero {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.fiction-detail-card .fiction-book-cover.large {
  width: min(188px, 54vw);
  box-shadow: 0 0 34px rgba(255, 79, 163, 0.14), 0 22px 52px rgba(0, 0, 0, 0.38);
}

.fiction-detail-card .fiction-detail-hero h3 {
  max-width: 360px;
  margin: 4px 0 0;
  color: rgba(247, 237, 243, 0.96);
  font-family: "Syne", "Inter", sans-serif;
  font-size: clamp(24px, 6.6vw, 36px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0;
}

.fiction-detail-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.fiction-detail-meta span {
  padding: 5px 10px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 6px;
  color: rgba(223, 190, 200, 0.72);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
}

.fiction-detail-card blockquote {
  width: 100%;
  margin: 14px 0 8px;
  padding: 26px 22px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 18px;
  background: rgba(8, 7, 12, 0.36);
  color: rgba(247, 237, 243, 0.84);
  font-family: "GHomeNoteHand", "Songti SC", Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  text-align: left;
}

.fiction-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 6px;
  padding: 18px 0 0;
}

.fiction-detail-actions .fiction-read-now {
  grid-column: 1 / -1;
  min-height: 58px !important;
  border: 1px solid rgba(255, 156, 204, 0.72) !important;
  border-radius: 12px !important;
  background: #ff4aa0 !important;
  background-image: none !important;
  color: rgba(34, 10, 22, 0.96) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(112, 23, 62, 0.12) !important;
  filter: none !important;
}

.fiction-detail-actions .ghost {
  min-height: 48px;
  border: 1px solid rgba(246, 166, 194, 0.30);
  border-radius: 12px;
  background: rgba(12, 9, 15, 0.46);
  color: rgba(255, 214, 228, 0.82);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.fiction-chronicle-title {
  display: block;
  margin: 6px 0 4px;
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.fiction-detail-card .fiction-mini-chapters {
  gap: 0;
  width: 100%;
}

.fiction-detail-card .fiction-mini-chapters .mini-card {
  padding: 18px 20px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 16px;
  background: rgba(8, 7, 12, 0.28);
  color: rgba(247, 237, 243, 0.86);
  font-weight: 800;
}

.fiction-detail-card .fiction-chronicle-title {
  margin: 8px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  color: rgba(223, 190, 200, 0.54);
  font-size: 9px;
}

.fiction-detail-card .fiction-mini-chapters button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.fiction-detail-card .fiction-mini-chapters button span {
  color: rgba(246, 166, 194, 0.76);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.fiction-detail-card .fiction-mini-chapters button strong {
  color: rgba(247, 237, 243, 0.80);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.35;
}

.fiction-detail-card .fiction-mini-chapters button i {
  color: rgba(223, 190, 200, 0.42);
  font-size: 15px;
  font-style: normal;
}

.fiction-boundary-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  padding: 18px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 16px;
  background: rgba(8, 7, 12, 0.36);
}

.fiction-boundary-note .material-symbols-outlined {
  color: rgba(255, 183, 208, 0.78);
  font-size: 20px;
}

.fiction-boundary-note p {
  margin: 0;
  color: rgba(223, 190, 200, 0.66);
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
}

.fiction-boundary-note p strong {
  color: rgba(255, 205, 223, 0.84);
  font-weight: 800;
}

@media (max-width: 620px) {
  .fiction-section-head strong {
    font-size: 24px;
  }

  .fiction-shelf-dock {
    bottom: 108px;
  }
}

@media (max-width: 620px) {
  .fiction-mode-shelf .fiction-shelf-dock {
    bottom: 112px !important;
  }
}

/* Stitch Chat adapter — visual layer only; all behavior stays on the real Chat state/API. */
.chat-shell {
  --stitch-bg: #151218;
  --stitch-surface: #111116;
  --stitch-surface-soft: #1a171d;
  --stitch-surface-high: #231d25;
  --stitch-text: #e7e0e8;
  --stitch-muted: #dfbec8;
  --stitch-primary: #ffb0cc;
  --stitch-hot: #ff4fa3;
  --stitch-rose: #ffb1c7;
  max-width: 800px;
  color: var(--stitch-text);
  background:
    radial-gradient(circle at -8% -12%, rgba(255, 79, 163, 0.13), transparent 38%),
    radial-gradient(circle at 105% 108%, rgba(210, 187, 255, 0.08), transparent 34%),
    var(--stitch-bg);
}

.chat-shell .app-page,
.chat-shell .panel.main {
  background: transparent;
}

.chat-shell .panel.main {
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(215, 193, 207, 0.08);
  border-right: 1px solid rgba(215, 193, 207, 0.08);
}

.chat-shell .chat-head {
  position: relative;
  z-index: 50;
  flex: 0 0 64px;
  width: 100%;
  height: 64px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(215, 193, 207, 0.14);
  background: rgba(17, 17, 22, 0.72);
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-head .chat-identity,
.chat-head > div:not(.chat-head-actions) {
  position: absolute;
  left: 50%;
  right: auto;
  top: 7px;
  width: max-content;
  max-width: calc(100% - 260px);
  min-height: 48px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.chat-head .chat-identity h2 {
  display: block;
  margin: 0;
  color: var(--stitch-text);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 24px;
}

.chat-head .presence-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.62);
  animation: chatPresenceBreath 2.2s ease-in-out infinite;
}

.chat-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
  color: rgba(223, 190, 200, 0.72);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  line-height: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@keyframes chatPresenceBreath {
  0%, 100% {
    opacity: 0.58;
    transform: scale(0.88);
    box-shadow: 0 0 4px rgba(52, 211, 153, 0.42);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 11px rgba(52, 211, 153, 0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-head .presence-dot {
    animation: none;
  }
}

.chat-back,
.chat-head-actions .chat-menu {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--stitch-muted);
  font-size: 21px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chat-back .material-symbols-outlined,
.chat-head-actions .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 24;
}

.chat-back {
  left: 10px;
  font-size: 20px;
}

.chat-head-actions {
  right: 10px;
  gap: 0;
}

.chat-head-actions .chat-menu {
  font-family: Arial, sans-serif;
}

.chat-back:hover,
.chat-head-actions .chat-menu:hover {
  color: var(--stitch-hot);
  background: rgba(255, 255, 255, 0.05);
}

.chat-bag {
  position: relative !important;
  font-size: 20px !important;
}

.chat-bag i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stitch-hot);
  box-shadow: 0 0 5px rgba(255, 79, 163, 0.75);
}

.chat-shell .messages {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
  height: auto;
  min-height: 0;
  padding: 32px 16px;
  scroll-behavior: auto;
}

.chat-shell .msg {
  margin: 0;
  animation: none;
}

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

.chat-shell .ai-msg {
  grid-template-columns: 2px 20px minmax(0, 1fr);
  column-gap: 16px;
  width: fit-content;
  max-width: 85%;
  padding: 8px 0 8px 16px;
  background: linear-gradient(90deg, rgba(255, 176, 204, 0.05), transparent 78%);
}

.chat-shell .ai-msg::before {
  width: 2px;
  margin-left: -16px;
  background: var(--stitch-primary);
  box-shadow: inset 1px 0 4px rgba(255, 176, 204, 0.2);
}

.chat-shell .ai-msg > .avatar,
.chat-shell .user-card-msg > .avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  font-size: 19px;
}

.chat-shell .ai-response,
.chat-shell .user-response {
  width: auto;
  padding: 0;
}

.chat-shell .ai-response-meta {
  display: none;
}

.chat-shell .ai-response-body {
  color: var(--stitch-text);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.625;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-shell .ai-response-body *,
.chat-shell .user-response .ai-response-body *,
.chat-shell .bubble {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-shell .ai-response-body p {
  margin-bottom: 16px;
}

.chat-shell .user-card-msg {
  grid-template-columns: minmax(0, 1fr) 20px 2px;
  column-gap: 16px;
  width: fit-content;
  max-width: 85%;
  margin-left: auto;
  padding: 8px 16px 8px 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.05), transparent 78%);
}

.chat-shell .user-card-msg::after {
  width: 2px;
  margin-right: -16px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.chat-shell .user-card-msg .quote-block,
.chat-shell .ai-msg .quote-block {
  color: rgba(231, 224, 232, 0.68);
}

.chat-shell .user-card-msg .quote-block span,
.chat-shell .ai-msg .quote-block span {
  color: var(--stitch-primary);
}

.chat-shell .user-response-wrap {
  justify-content: flex-end;
}

.chat-shell .user-response {
  max-width: 100%;
}

.stitch-message-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 11px;
  opacity: 0;
  transition: opacity 170ms ease;
}

.ai-response:hover .stitch-message-actions,
.user-response:hover .stitch-message-actions,
.stitch-message-actions:focus-within {
  opacity: 1;
}

.stitch-user-actions {
  justify-content: flex-start;
}

.stitch-ai-actions {
  justify-content: flex-start;
}

.stitch-message-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: rgba(223, 190, 200, 0.72);
  padding: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.stitch-message-actions button:hover {
  color: var(--stitch-primary);
}

.stitch-message-actions button span {
  font-family: "Material Symbols Outlined";
  font-size: 14px;
  letter-spacing: 0;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 20;
}

.chat-shell .ai-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-start;
  align-items: center;
  min-height: 0;
  margin-top: 12px;
}

.voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 360px);
}

.voice-player-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--voice-accent, var(--stitch-rose)) !important;
  box-shadow: none;
  transition: color 160ms ease, transform 160ms ease;
}

.voice-player-button:hover {
  background: transparent;
  color: var(--stitch-primary) !important;
}

.voice-player-button:active {
  transform: scale(0.94);
}

.voice-player-button span {
  position: relative;
  display: block;
  width: 12px;
  height: 14px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.voice-player-button span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--voice-accent, var(--stitch-rose));
}

.voice-player.is-active .voice-player-button span {
  width: 11px;
  height: 13px;
}

.voice-player.is-active .voice-player-button span::before,
.voice-player.is-active .voice-player-button span::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 2px;
  height: 11px;
  border-radius: 1px;
  background: currentColor;
  color: var(--voice-accent, var(--stitch-rose));
}

.voice-player.is-active .voice-player-button span::before {
  left: 1px;
  border: 0;
}

.voice-player.is-active .voice-player-button span::after {
  right: 1px;
}

.voice-player-timeline {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.voice-player.is-active .voice-player-timeline {
  animation: stitchChatIn 180ms ease-out both;
}

.voice-player-timeline input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.voice-player-timeline input::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--stitch-primary) 0 var(--audio-progress, 0%),
    rgba(223, 190, 200, 0.18) var(--audio-progress, 0%) 100%
  );
}

.voice-player-timeline input::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--stitch-primary);
  box-shadow: 0 0 0 2px var(--stitch-bg);
}

.voice-player-timeline input::-moz-range-track {
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: rgba(223, 190, 200, 0.18);
}

.voice-player-timeline input::-moz-range-progress {
  height: 2px;
  border-radius: 999px;
  background: var(--stitch-primary);
}

.voice-player-timeline input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--stitch-primary);
}

.voice-player-timeline small {
  color: rgba(215, 193, 207, 0.62);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.writing-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border: 1px solid rgba(255, 176, 204, 0.16);
  border-radius: 999px;
  background: rgba(255, 176, 204, 0.07);
  color: rgba(247, 237, 243, 0.76);
  padding: 7px 12px 7px 14px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: inset 1px 0 8px rgba(255, 176, 204, 0.06);
}

.diary-draft-inline-status {
  flex: 1 1 220px;
  max-width: min(100%, 360px);
}

.diary-writing-status {
  width: 100%;
  margin: 0 0 12px;
  min-height: 48px;
  border-radius: 18px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 82% 50%, rgba(246, 166, 194, 0.12), transparent 34%),
    rgba(17, 15, 20, 0.74);
  color: rgba(247, 237, 243, 0.80);
}

.writing-status-pill.done {
  border-color: rgba(143, 226, 187, 0.24);
  background: rgba(143, 226, 187, 0.08);
  color: rgba(214, 248, 230, 0.86);
}

.writing-status-pill.failed {
  border-color: rgba(255, 176, 204, 0.24);
  background: rgba(255, 176, 204, 0.06);
  color: rgba(255, 202, 222, 0.78);
}

.writing-status-pill b {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 17px;
  font-variation-settings: "FILL" 0, "wght" 420, "GRAD" 0, "opsz" 20;
}

.writing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.writing-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f6a6c2;
  box-shadow: 0 0 7px rgba(246, 166, 194, 0.58);
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.writing-dots i:nth-child(2) { animation-delay: 0.16s; }
.writing-dots i:nth-child(3) { animation-delay: 0.32s; }

.stitch-typing {
  display: grid !important;
  grid-template-columns: 24px auto !important;
  width: fit-content !important;
  padding-left: 0 !important;
  border-left: 0 !important;
  background: transparent !important;
}

.stitch-typing::before {
  display: none;
}

.g-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 12px 14px;
  border: 1px solid rgba(255, 177, 197, 0.14);
  border-radius: 16px 16px 16px 4px;
  background: rgba(17, 17, 22, 0.72);
  box-shadow: inset 1px 0 7px rgba(255, 177, 197, 0.08);
  backdrop-filter: blur(16px);
}

.g-typing span,
.typing-bubble span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stitch-rose);
  box-shadow: 0 0 7px rgba(255, 177, 197, 0.42);
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.g-typing span:nth-child(2),
.typing-bubble span:nth-child(2) { animation-delay: 0.16s; }
.g-typing span:nth-child(3),
.typing-bubble span:nth-child(3) { animation-delay: 0.32s; }

@keyframes stitchTypingBreath {
  0%, 70%, 100% { opacity: 0.28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

.chat-shell .composer {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  grid-template-columns: 48px minmax(0, 1fr) 68px;
  grid-template-rows: auto minmax(48px, auto) 48px;
  gap: 8px 10px;
  margin: 10px 16px calc(14px + env(safe-area-inset-bottom));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 120%, rgba(255, 79, 163, 0.10), transparent 42%),
    rgba(17, 17, 22, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  isolation: isolate;
  contain: paint;
}

.chat-shell .composer textarea {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 48px;
  max-height: 128px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--stitch-text);
  padding: 6px 8px;
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 24px;
}

.chat-shell .composer textarea:focus {
  outline: none;
  border-color: transparent;
}

.chat-shell .chat-plus,
.chat-shell .icon-send {
  grid-row: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.chat-shell .chat-plus {
  grid-column: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(35, 29, 37, 0.45);
  color: var(--stitch-primary);
}

.chat-shell .icon-send.respond {
  grid-column: 3;
  justify-self: end;
  width: 68px;
  border-radius: 999px;
  border: 0;
  background: var(--stitch-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 176, 204, 0.2);
}

.chat-shell .icon-send.respond.is-stopping {
  background: var(--stitch-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 176, 204, 0.2);
}

.chat-stop-square {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: currentColor;
}

.chat-shell .quote-preview {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(29, 27, 32, 0.5);
  padding: 8px 12px;
}

.chat-shell .quote-block {
  margin: 0;
  padding: 1px 0 1px 12px;
  border-left: 2px solid var(--stitch-primary);
  background: transparent;
  color: rgba(231, 224, 232, 0.68);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 12px;
  line-height: 18px;
}

.chat-shell .quote-block span {
  color: var(--stitch-primary);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.chat-shell .quote-preview > button {
  color: rgba(223, 190, 200, 0.5);
  font-size: 18px;
}

.chat-shell .moon-star-em {
  color: var(--stitch-primary);
  -webkit-text-fill-color: currentColor;
  font-family: inherit;
  font-weight: 600;
  padding: 0;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 176, 204, 0.44);
}

.chat-shell .plus-menu {
  left: 14px;
  right: 14px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 79, 163, 0.14);
  border-radius: 20px;
  background: rgba(35, 29, 37, 0.9);
  backdrop-filter: blur(24px);
}

.chat-search-panel {
  top: 72px;
  left: 16px;
  right: 16px;
  border-color: rgba(255, 79, 163, 0.22);
  background: rgba(11, 11, 15, 0.96);
  backdrop-filter: blur(20px);
}

.chat-bridge-panel {
  top: 76px;
  width: min(400px, calc(100vw - 30px));
}

.chat-bridge-panel .bridge-card {
  border: 1px solid rgba(215, 193, 207, 0.14);
  border-radius: 18px;
  background: rgba(35, 29, 37, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.chat-drawer {
  z-index: 210;
  width: min(320px, 88vw);
  background: rgba(33, 31, 36, 0.98);
  border-left-color: rgba(88, 64, 72, 0.5);
  backdrop-filter: blur(24px);
}

.drawer-backdrop {
  z-index: 209;
}

.chat-drawer .sidebar {
  gap: 0;
  padding: 0 0 calc(22px + env(safe-area-inset-bottom));
  color: var(--stitch-text);
}

.stitch-drawer-profile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px 22px;
  border-bottom: 1px solid rgba(88, 64, 72, 0.38);
  background: linear-gradient(180deg, rgba(255, 176, 204, 0.09), transparent);
}

.stitch-drawer-close {
  position: absolute;
  left: 14px;
  top: calc(14px + env(safe-area-inset-top));
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--stitch-muted);
  font-size: 25px;
}

.stitch-drawer-kicker {
  align-self: flex-end;
  color: var(--stitch-hot);
  font-family: var(--ui-display);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.stitch-drawer-avatar {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-top: 14px;
  border: 2px solid rgba(255, 176, 204, 0.28);
  border-radius: 50%;
  background: var(--stitch-surface-high);
  box-shadow: 0 0 20px rgba(255, 176, 204, 0.16);
  font-size: 38px;
}

.stitch-drawer-profile h2 {
  margin: 10px 0 3px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 21px;
}

.stitch-drawer-profile small {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--stitch-muted);
  font-family: var(--ui-display);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.stitch-drawer-section,
.stitch-drawer-nav {
  padding: 16px;
  border-bottom: 1px solid rgba(88, 64, 72, 0.28);
}

.stitch-drawer-section .section-title {
  margin: 0 0 10px 4px;
  color: rgba(215, 193, 207, 0.46);
  font-family: var(--ui-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stitch-summary-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 13px;
  background: rgba(15, 13, 18, 0.72);
}

.stitch-summary-icon {
  color: var(--stitch-primary);
  font-size: 22px;
}

.stitch-summary-row strong,
.stitch-summary-row small {
  display: block;
}

.stitch-summary-row strong {
  font-size: 13px;
  font-weight: 500;
}

.stitch-summary-row small {
  margin-top: 3px;
  color: var(--stitch-muted);
  font-size: 10px;
}

.stitch-summary-row b {
  color: var(--stitch-hot);
  font-family: var(--ui-display);
  font-size: 10px;
}

.chat-drawer .memory-control {
  margin: 9px 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.chat-drawer .memory-control label {
  color: var(--stitch-muted);
  font-size: 11px;
}

.chat-drawer .memory-control input {
  color: var(--stitch-text);
  background: var(--stitch-surface);
}

.stitch-drawer-link,
.stitch-drawer-nav button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--stitch-muted);
  padding: 0 10px;
  text-align: left;
}

.stitch-drawer-link:hover,
.stitch-drawer-nav button:hover {
  color: var(--stitch-primary);
  background: rgba(255, 255, 255, 0.04);
}

.stitch-drawer-link strong,
.stitch-drawer-nav strong {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
}

.stitch-drawer-link > .material-symbols-outlined,
.stitch-drawer-nav button > .material-symbols-outlined {
  color: var(--stitch-muted);
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 22;
}

.stitch-drawer-link i,
.stitch-drawer-nav small {
  color: rgba(215, 193, 207, 0.4);
  font-size: 10px;
  font-style: normal;
}

.stitch-drawer-nav {
  display: grid;
  gap: 2px;
}

.stitch-drawer-nav button.disabled {
  cursor: default;
  opacity: 0.6;
}

.context-menu {
  width: 136px;
  padding: 4px 0;
  border-color: rgba(255, 176, 204, 0.2);
  border-radius: 12px;
  background: rgba(33, 31, 36, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.context-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--stitch-text);
  padding: 7px 12px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 14px;
  text-align: left;
}

.context-menu button .material-symbols-outlined {
  flex: 0 0 18px;
  color: rgba(255, 176, 204, 0.82);
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 20;
}

.context-menu button:hover {
  background: rgba(255, 176, 204, 0.1);
  color: var(--stitch-primary);
}

.context-menu button[data-menu-action="favorite"] {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(223, 190, 200, 0.1);
  color: var(--stitch-primary);
}

.context-menu button[data-menu-action="favorite"] .material-symbols-outlined {
  color: var(--stitch-primary);
}

.proactive-toast {
  top: calc(80px + env(safe-area-inset-top));
  width: max-content;
  max-width: calc(100% - 30px);
  z-index: 920;
}

.proactive-envelope.proactive-envelope-toast {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
  width: auto;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.36);
  color: rgba(247, 237, 243, 0.86);
  padding: 9px 14px;
  backdrop-filter: blur(24px);
}

.proactive-envelope.proactive-envelope-toast::before {
  display: none;
}

.proactive-envelope-icon {
  color: var(--stitch-hot);
  font-size: 17px;
}

.proactive-envelope.proactive-envelope-toast strong {
  margin: 0;
  color: rgba(247, 237, 243, 0.82);
  font-family: var(--ui-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.proactive-envelope.proactive-envelope-toast i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stitch-hot);
  animation: stitchTypingBreath 1.3s ease-in-out infinite;
}

.proactive-toast:not(.is-open) .proactive-close {
  display: none;
}

.proactive-toast.is-open {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  padding: 20px;
  transform: none;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.proactive-toast.is-open .proactive-paper {
  position: relative;
  width: min(384px, 100%);
  border: 0;
  border-radius: 2px 2px 20px 2px;
  background: #fdfaf7;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1), 0 24px 80px rgba(0, 0, 0, 0.46);
  padding: 32px;
}

.proactive-toast.is-open .proactive-paper::before {
  display: none;
}

.proactive-toast.is-open .proactive-paper p {
  color: #2a2a2c;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  margin: 0 0 28px;
}

.proactive-toast.is-open .proactive-paper em,
.proactive-toast.is-open .proactive-paper small {
  color: rgba(42, 42, 44, 0.62);
}

.proactive-toast.is-open .proactive-paper header,
.proactive-toast.is-open .proactive-paper em {
  display: none;
}

.proactive-paper-icon {
  display: block;
  margin: 0 auto 16px;
  color: var(--stitch-hot);
  font-size: 28px;
  text-align: center;
}

.proactive-toast.is-open .proactive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
}

.proactive-toast.is-open .proactive-actions button {
  min-height: 38px;
  border-color: rgba(42, 42, 44, 0.18);
  background: transparent;
  color: #3a3a3c;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.proactive-toast.is-open .proactive-actions button:last-child {
  background: #242428;
  color: white;
}

.proactive-paper-close {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(58, 58, 60, 0.68);
  box-shadow: none;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.proactive-paper-close:hover {
  background: rgba(42, 42, 44, 0.06);
  color: #2a2a2c;
}

@media (max-width: 620px) {
  .chat-head .chat-identity,
  .chat-head > div:not(.chat-head-actions) {
    max-width: calc(100% - 230px);
  }

  .chat-head-actions {
    right: 5px;
  }

  .chat-back {
    left: 5px;
  }

  .chat-head-actions .chat-menu {
    width: 34px;
  }

  .chat-shell .messages {
    padding: 32px 16px;
  }

  .chat-shell .ai-msg,
  .chat-shell .user-card-msg {
    max-width: 85%;
  }

  .chat-shell .composer {
    grid-template-columns: 44px minmax(0, 1fr) 62px;
    gap: 9px;
    padding: 12px;
  }

  .chat-shell .chat-plus,
  .chat-shell .icon-send {
    width: 44px;
    height: 44px;
  }

  .chat-shell .icon-send.respond {
    width: 62px;
  }

  .stitch-message-actions {
    gap: 13px;
  }
}

/* Exact Stitch overlay/layout corrections after live visual comparison. */
.chat-shell .chat-head {
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(21, 18, 24, 0.97);
}

.chat-shell .messages {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
}

.chat-shell .ai-msg {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 22px;
  border-left: 2px solid var(--stitch-primary);
  padding: 8px 0 8px 16px;
}

.chat-shell .ai-msg::before {
  display: none;
}

.chat-shell .user-card-msg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px 8px 0;
}

.chat-shell .user-card-msg::after {
  display: none;
}

.chat-shell .user-response-wrap {
  width: auto;
}

.plus-menu-backdrop {
  --stitch-primary: #ffb0cc;
  --stitch-text: #e7e0e8;
  --stitch-muted: #dfbec8;
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px calc(112px + env(safe-area-inset-bottom));
  background: rgba(21, 18, 24, 0.62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.plus-menu-backdrop .plus-menu {
  position: static;
  width: min(340px, 100%);
  display: block;
  padding: 24px;
  border: 1px solid rgba(255, 176, 204, 0.1);
  border-radius: 16px;
  background: rgba(44, 41, 47, 0.96);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(24px);
}

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

.plus-menu-backdrop .plus-menu-grid button {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: var(--stitch-primary);
}

.plus-menu-backdrop .plus-menu-grid button > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 176, 204, 0.1);
  border-radius: 16px;
  background: rgba(255, 176, 204, 0.05);
  font-size: 25px;
  font-weight: 300;
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" -25,
    "opsz" 24;
  color: var(--stitch-primary) !important;
  opacity: 1 !important;
  transition: 160ms ease;
}

.plus-menu-backdrop .plus-menu-grid button:hover > .material-symbols-outlined {
  background: var(--stitch-primary);
  color: #640038;
  transform: scale(1.05);
}

.plus-menu-backdrop .plus-menu-grid button small {
  color: rgba(223, 190, 200, 0.88) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 1 !important;
}

.plus-menu-close {
  width: 100%;
  min-height: 0 !important;
  margin-top: 24px;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(223, 190, 200, 0.5) !important;
  padding: 16px 0 0 !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.chat-search-panel {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: rgba(21, 18, 24, 0.98);
  padding: 0;
  box-shadow: none;
  backdrop-filter: blur(24px);
}

.chat-search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  border-bottom: 1px solid rgba(88, 64, 72, 0.2);
  background: rgba(21, 18, 24, 0.72);
}

.chat-search-head > button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--stitch-text);
}

.chat-search-panel .chat-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(88, 64, 72, 0.48);
  border-radius: 999px;
  background: rgba(55, 52, 57, 0.4);
  padding: 0 14px;
}

.chat-search-panel .chat-search-box > .material-symbols-outlined {
  color: rgba(223, 190, 200, 0.72);
  font-size: 20px;
}

.chat-search-panel .chat-search-box input {
  min-height: 0;
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: var(--stitch-text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
}

.chat-search-panel .chat-search-box button {
  border: 0;
  background: transparent;
  color: rgba(223, 190, 200, 0.58);
}

.chat-search-results {
  flex: 1;
  max-height: none;
  overflow-y: auto;
  padding: 20px 16px;
  background: transparent;
  align-content: start;
}

.chat-search-panel .chat-search-results button {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 16px;
}

.chat-search-panel .chat-search-results button span {
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

.chat-bridge-panel {
  position: fixed;
  inset: 0;
  z-index: 320;
  width: auto;
  max-height: none;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(21, 18, 24, 0.86);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-bag-sheet {
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  max-height: min(707px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid rgba(88, 64, 72, 0.42);
  border-radius: 12px;
  background: #2c292f;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

.chat-bag-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(88, 64, 72, 0.28);
}

.chat-bag-sheet > header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-bag-sheet > header .material-symbols-outlined {
  color: var(--stitch-primary);
}

.chat-bag-sheet h2 {
  margin: 0;
  color: var(--stitch-text);
  font-family: "Syne", sans-serif;
  font-size: 20px;
}

.chat-bag-sheet h2 small {
  margin-left: 8px;
  color: rgba(223, 190, 200, 0.65);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 400;
}

.chat-bag-sheet > header > button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(55, 52, 57, 0.5);
  color: var(--stitch-muted);
}

.stitch-drawer-custom-icon {
  display: block;
  width: 16px;
  height: 16px;
  justify-self: center;
  color: var(--stitch-muted);
  fill: currentColor;
  transition: color 160ms ease, filter 160ms ease;
}

.stitch-drawer-link:hover > .stitch-drawer-custom-icon,
.stitch-drawer-nav button:hover > .stitch-drawer-custom-icon {
  color: var(--stitch-primary);
  filter: drop-shadow(0 0 5px rgba(255, 176, 204, 0.16));
}

.chat-bag-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-bag-content .bridge-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.chat-bag-content .bridge-card-head {
  display: none;
}

.chat-bag-content .bridge-card-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--stitch-primary);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.chat-bag-content .bridge-card > p {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(88, 64, 72, 0.28);
  border-radius: 8px;
  background: #151218;
  color: var(--stitch-text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.chat-bag-content .bridge-layers {
  gap: 8px;
  margin: 0 0 12px;
}

.chat-bag-content .bridge-layers span {
  border-color: rgba(255, 176, 204, 0.18);
  background: rgba(255, 176, 204, 0.07);
  color: rgba(255, 217, 228, 0.84);
}

.proactive-ledger {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(255, 176, 204, 0.18);
  background: rgba(25, 20, 27, 0.78);
}

.proactive-ledger-head,
.proactive-ledger-stats,
.proactive-ledger-list article > div {
  display: flex;
  align-items: center;
}

.proactive-ledger-head {
  justify-content: space-between;
  gap: 12px;
}

.proactive-ledger-head > div {
  display: grid;
  gap: 3px;
}

.proactive-ledger-head small,
.proactive-ledger-head strong {
  letter-spacing: 0.08em;
}

.proactive-ledger-head small {
  color: rgba(255, 176, 204, 0.68);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
}

.proactive-ledger-head strong {
  color: var(--stitch-text);
  font-size: 14px;
  font-weight: 600;
}

.proactive-ledger-head > span {
  color: var(--stitch-primary);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
}

.proactive-ledger-stats {
  gap: 14px;
  margin: 12px 0;
  color: rgba(218, 194, 203, 0.66);
  font-size: 11px;
}

.proactive-ledger-stats b {
  color: rgba(255, 217, 228, 0.9);
  font-weight: 500;
}

.proactive-ledger details,
.proactive-ledger summary {
  color: rgba(255, 217, 228, 0.82);
}

.proactive-ledger summary {
  padding: 9px 0;
  border-top: 1px solid rgba(255, 176, 204, 0.1);
  cursor: pointer;
  font-size: 12px;
}

.proactive-ledger-list {
  display: grid;
  gap: 8px;
}

.proactive-ledger-list article {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 176, 204, 0.08);
}

.proactive-ledger-list article > div {
  flex-wrap: wrap;
  gap: 7px;
}

.proactive-ledger-list article > div span {
  color: rgba(255, 176, 204, 0.74);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.proactive-ledger-list article p {
  margin: 7px 0 4px;
  color: rgba(245, 232, 237, 0.82);
  font-size: 12px;
  line-height: 1.55;
}

.proactive-ledger-list article small,
.proactive-ledger-older,
.proactive-ledger-principle {
  color: rgba(190, 166, 176, 0.56);
  font-size: 10px;
  line-height: 1.5;
}

.proactive-ledger-older {
  margin: 3px 0 0;
}

.proactive-ledger-principle {
  display: block;
  margin-top: 10px;
}

.chat-bag-content .bridge-context-preview {
  margin-top: 12px;
  border-color: rgba(88, 64, 72, 0.38);
  background: #151218;
}

@media (max-width: 620px) {
  .chat-bridge-panel {
    align-items: stretch;
    padding: max(8px, env(safe-area-inset-top)) 0 0;
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
  }

  .chat-bag-sheet {
    width: 100%;
    height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    max-height: none;
    min-height: 0;
    border-radius: 18px 18px 0 0;
  }

  .chat-bag-content {
    min-height: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .chat-search-panel {
    width: 100vw;
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
  }

  .chat-search-panel .chat-search-box input {
    /* iOS zooms focused form controls whose text is smaller than 16px. */
    font-size: 16px;
  }

  .chat-search-results {
    min-height: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* Stitch drawer tools */
.chat-drawer .memory-control .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.chat-drawer .memory-control .ghost {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  background: rgba(15, 13, 18, 0.82);
  color: var(--stitch-text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.chat-drawer .memory-control .ghost .material-symbols-outlined {
  flex: 0 0 auto;
  color: var(--stitch-primary);
  font-size: 21px;
  font-weight: 400;
}

.chat-drawer .memory-control .ghost:hover,
.chat-drawer .memory-control .ghost:focus-visible {
  border-color: rgba(255, 176, 204, 0.18);
  background: rgba(255, 176, 204, 0.08);
}

.chat-drawer .memory-control .ghost:disabled {
  opacity: 0.55;
}

/* Quiet message receipts and timestamps */
.message-receipt {
  color: rgba(223, 190, 200, 0.42);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1;
}

.user-message-receipt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 17px;
}

.user-message-receipt > span {
  flex: 1;
  min-width: 42px;
  height: 1px;
  background: rgba(223, 190, 200, 0.1);
}

.user-message-receipt time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ai-message-receipt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 15px;
  color: rgba(223, 190, 200, 0.38);
}

.ai-message-receipt time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ai-message-receipt > span {
  flex: 1;
  min-width: 42px;
  height: 1px;
  background: rgba(223, 190, 200, 0.1);
}

/* Keep the selection quote control solid above selected text. */
.quote-selection-popover {
  z-index: 400;
  background: #211f24;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.quote-selection-popover:hover,
.quote-selection-popover:focus-visible {
  background: #352a32;
  border-color: rgba(255, 176, 204, 0.42);
  color: #fff;
  opacity: 1;
}

/* Message columns keep a stable width so receipts do not shrink with short text. */
.chat-shell .ai-msg,
.chat-shell .user-card-msg {
  width: 85%;
}

.chat-shell .ai-response-wrap,
.chat-shell .user-response-wrap,
.chat-shell .ai-response,
.chat-shell .user-response {
  width: 100%;
}

/* Refined formal Chat typography */
.chat-shell .ai-response-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Heart modal aligned with the current Stitch Chat language. */
.heart-modal {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 176, 204, 0.12), transparent 42%),
    #211a21;
  padding: 56px 38px 46px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.heart-modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 217, 228, 0.78);
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.heart-modal-close:hover {
  background: transparent;
  color: var(--stitch-primary, #ffb0cc);
}

.heart-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
}

.heart-main-icon {
  margin-bottom: 22px;
  color: var(--stitch-primary, #ffb0cc);
  font-size: 52px;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" -25, "opsz" 48;
}

.heart-main h4 {
  margin: 0 0 22px;
  color: var(--stitch-text, #e7e0e8);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.heart-main p {
  width: 100%;
  margin: 0;
  border-left: 0;
  color: rgba(231, 224, 232, 0.86);
  font-family: "Literata", "Songti SC", "Noto Serif SC", serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.85;
  text-align: left;
  white-space: pre-wrap;
}

@media (max-width: 620px) {
  .heart-modal {
    padding: 52px 28px 40px;
  }
}

/* Chat message editor aligned with the current Stitch visual language. */
.chat-edit-backdrop {
  z-index: 520;
  padding: 20px;
  background: rgba(8, 7, 11, 0.76);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-edit-modal {
  width: min(560px, 100%);
  border: 1px solid rgba(255, 176, 204, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 176, 204, 0.09), transparent 38%),
    #17141a;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.chat-edit-head {
  margin-bottom: 20px;
}

.chat-edit-head > span {
  display: block;
  margin-bottom: 8px;
  color: rgba(223, 190, 200, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.chat-edit-modal .chat-edit-head h3 {
  margin: 0;
  color: var(--stitch-text, #e7e0e8);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chat-edit-modal .edit-area {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: min(48dvh, 420px);
  border: 1px solid rgba(255, 176, 204, 0.18);
  border-radius: 12px;
  outline: 0;
  resize: vertical;
  background: #100e13;
  padding: 18px;
  color: var(--stitch-text, #e7e0e8);
  caret-color: var(--stitch-primary, #ffb0cc);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.72;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
  -webkit-font-smoothing: antialiased;
}

.chat-edit-modal .edit-area:focus {
  border-color: rgba(255, 176, 204, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 176, 204, 0.07);
}

.chat-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.chat-edit-actions .send,
.chat-edit-actions .ghost {
  min-width: 0;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  box-shadow: none;
}

.chat-edit-actions .send {
  border: 1px solid var(--stitch-primary, #ffb0cc);
  background: var(--stitch-primary, #ffb0cc);
  color: #25131c;
}

.chat-edit-actions .ghost {
  border: 1px solid rgba(255, 176, 204, 0.22);
  background: transparent;
  color: rgba(231, 224, 232, 0.7);
}

.chat-edit-actions .send:hover,
.chat-edit-actions .send:focus-visible {
  background: #ffc0d6;
  border-color: #ffc0d6;
}

.chat-edit-actions .ghost:hover,
.chat-edit-actions .ghost:focus-visible {
  border-color: rgba(255, 176, 204, 0.5);
  background: rgba(255, 176, 204, 0.07);
  color: var(--stitch-text, #e7e0e8);
}

@media (max-width: 620px) {
  .chat-edit-backdrop {
    align-items: end;
    padding: 0;
  }

  .chat-edit-modal {
    width: 100%;
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  }

  .chat-edit-modal .edit-area {
    min-height: 150px;
    max-height: 40dvh;
    resize: none;
    font-size: 16px;
  }
}

/* Chat multi-select controls: floating above the composer, outside message flow. */
.chat-shell .composer.selection-mode {
  overflow: visible;
  contain: none;
}

.chat-shell .selection-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 8px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: auto;
  min-height: 52px;
  margin: 0;
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 14px;
  background: #1a171d;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.48);
}

.chat-shell .selection-bar > span {
  min-width: 0;
  color: rgba(223, 190, 200, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chat-shell .selection-bar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-shell .selection-bar button {
  min-width: 0;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  box-shadow: none;
}

.chat-shell .selection-delete {
  border: 1px solid rgba(255, 176, 204, 0.34);
  background: rgba(255, 176, 204, 0.12);
  color: var(--stitch-primary, #ffb0cc);
}

.chat-shell .selection-cancel {
  border: 1px solid rgba(223, 190, 200, 0.14);
  background: transparent;
  color: rgba(231, 224, 232, 0.62);
}

.chat-shell .selection-delete:hover,
.chat-shell .selection-delete:focus-visible {
  border-color: var(--stitch-primary, #ffb0cc);
  background: var(--stitch-primary, #ffb0cc);
  color: #25131c;
}

.chat-shell .selection-cancel:hover,
.chat-shell .selection-cancel:focus-visible {
  border-color: rgba(255, 176, 204, 0.4);
  background: rgba(255, 176, 204, 0.06);
  color: var(--stitch-text, #e7e0e8);
}

.chat-shell .select-dot {
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.chat-shell .select-dot input {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 176, 204, 0.45);
  border-radius: 6px;
  outline: 0;
  background: #1a171d;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.chat-shell .select-dot input::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 1.5px solid #25131c;
  border-bottom: 1.5px solid #25131c;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.chat-shell .select-dot input:checked {
  border-color: var(--stitch-primary, #ffb0cc);
  background: var(--stitch-primary, #ffb0cc);
  box-shadow: 0 0 0 3px rgba(255, 176, 204, 0.1);
}

.chat-shell .select-dot input:checked::after {
  opacity: 1;
}

.chat-shell .select-dot input:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 176, 204, 0.16);
}

.chat-shell .ai-msg.selected,
.chat-shell .user-card-msg.selected,
.chat-shell .bubble-line.selected {
  background: rgba(255, 176, 204, 0.025);
}

@media (max-width: 620px) {
  .chat-shell .selection-bar {
    left: 11px;
    right: 11px;
    bottom: calc(100% + 6px);
    min-height: 48px;
    padding-left: 13px;
  }

  .chat-shell .selection-bar button {
    min-height: 32px;
    padding-inline: 11px;
  }
}

.chat-shell[data-theme="day"],
[data-chat-theme="day"] .chat-shell {
  --stitch-bg: #fbf6f4;
  --stitch-surface: #fffdfb;
  --stitch-surface-soft: #f4edef;
  --stitch-surface-high: #ece2e6;
  --stitch-text: #302a2e;
  --stitch-muted: #8d7a82;
  --stitch-primary: #d986a3;
  --stitch-hot: #e65d9c;
  --stitch-rose: #d986a3;
  color: var(--stitch-text);
  background:
    radial-gradient(circle at -10% -12%, rgba(230, 93, 156, 0.10), transparent 36%),
    radial-gradient(circle at 108% 108%, rgba(170, 135, 210, 0.09), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%);
}

.chat-shell[data-theme="day"] .panel.main,
[data-chat-theme="day"] .chat-shell .panel.main {
  border-left-color: rgba(96, 72, 82, 0.10);
  border-right-color: rgba(96, 72, 82, 0.10);
}

.chat-shell[data-theme="day"] .chat-head,
[data-chat-theme="day"] .chat-shell .chat-head {
  border-bottom-color: rgba(96, 72, 82, 0.13);
  background: rgba(251, 246, 244, 0.96);
  box-shadow: 0 10px 32px rgba(112, 74, 88, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-shell[data-theme="day"] .chat-head .chat-identity h2,
[data-chat-theme="day"] .chat-shell .chat-head .chat-identity h2 {
  color: #493741;
}

.chat-shell[data-theme="day"] .chat-status,
[data-chat-theme="day"] .chat-shell .chat-status {
  color: rgba(94, 73, 81, 0.72);
}

.chat-shell[data-theme="day"] .chat-back,
.chat-shell[data-theme="day"] .chat-head-actions .chat-menu,
[data-chat-theme="day"] .chat-shell .chat-back,
[data-chat-theme="day"] .chat-shell .chat-head-actions .chat-menu {
  color: rgba(94, 73, 81, 0.66);
}

.chat-shell[data-theme="day"] .chat-back:hover,
.chat-shell[data-theme="day"] .chat-head-actions .chat-menu:hover,
[data-chat-theme="day"] .chat-shell .chat-back:hover,
[data-chat-theme="day"] .chat-shell .chat-head-actions .chat-menu:hover {
  background: rgba(217, 134, 163, 0.10);
  color: var(--stitch-hot);
}

.chat-shell[data-theme="day"] .chat-bag i,
[data-chat-theme="day"] .chat-shell .chat-bag i {
  background: var(--stitch-hot);
  box-shadow: 0 0 7px rgba(230, 93, 156, 0.55);
}

.chat-shell[data-theme="day"] .ai-msg,
[data-chat-theme="day"] .chat-shell .ai-msg {
  background: linear-gradient(90deg, rgba(217, 134, 163, 0.11), transparent 78%);
}

.chat-shell[data-theme="day"] .ai-msg::before,
[data-chat-theme="day"] .chat-shell .ai-msg::before {
  background: var(--stitch-primary);
  box-shadow: inset 1px 0 4px rgba(217, 134, 163, 0.20);
}

[data-chat-theme="day"] .chat-shell .system-message-card,
body[data-app-theme="day"] .chat-shell .system-message-card {
  border-color: rgba(217, 142, 170, 0.24);
  background:
    radial-gradient(circle at 14% 0%, rgba(232, 145, 177, 0.14), transparent 34%),
    rgba(255, 250, 252, 0.88);
  box-shadow: 0 18px 42px rgba(176, 112, 139, 0.12);
  color: rgba(73, 60, 68, 0.76);
}

[data-chat-theme="day"] .chat-shell .system-message-card small,
[data-chat-theme="day"] .chat-shell .system-message-card time,
body[data-app-theme="day"] .chat-shell .system-message-card small,
body[data-app-theme="day"] .chat-shell .system-message-card time {
  color: rgba(190, 92, 128, 0.62);
}

[data-chat-theme="day"] .chat-shell .piggy-system-msg .system-message-card,
body[data-app-theme="day"] .chat-shell .piggy-system-msg .system-message-card {
  border-color: rgba(214, 165, 72, 0.26);
  background:
    radial-gradient(circle at 14% 0%, rgba(230, 187, 91, 0.14), transparent 34%),
    rgba(255, 252, 244, 0.9);
}

[data-chat-theme="day"] .chat-shell .piggy-system-msg .system-message-card small,
[data-chat-theme="day"] .chat-shell .piggy-system-msg .system-message-card time,
body[data-app-theme="day"] .chat-shell .piggy-system-msg .system-message-card small,
body[data-app-theme="day"] .chat-shell .piggy-system-msg .system-message-card time {
  color: rgba(165, 123, 45, 0.7);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card,
body[data-app-theme="day"] .chat-shell .piggy-chat-card {
  border-color: rgba(255, 79, 163, 0.14);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(138, 91, 103, 0.08);
  color: #3f2a32;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-income,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-income {
  border-color: rgba(255, 79, 163, 0.30);
  background: linear-gradient(180deg, #fffafc 0%, #ffffff 100%);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-expense,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-expense {
  border-color: rgba(212, 160, 23, 0.26);
  background: linear-gradient(180deg, #fffcf5 0%, #ffffff 100%);
  box-shadow: 0 12px 34px rgba(138, 91, 103, 0.08);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish {
  border-color: transparent;
  background:
    radial-gradient(circle at 50% -14px, rgba(255, 79, 163, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(138, 91, 103, 0.08), 0 28px 48px rgba(255, 79, 163, 0.10);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled {
  border-color: transparent;
  background:
    radial-gradient(circle at top, rgba(212, 160, 23, 0.08) 0%, rgba(255, 255, 255, 0.82) 100%);
  box-shadow: 0 18px 44px rgba(138, 91, 103, 0.08), 0 28px 48px rgba(212, 160, 23, 0.12);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-receipt,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-receipt {
  border-color: rgba(0, 0, 0, 0.04);
  background: #fdfafb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-receipt::before,
[data-chat-theme="day"] .chat-shell .piggy-chat-card-receipt::after,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-receipt::before,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-receipt::after {
  background-image: radial-gradient(circle, #eee 2px, transparent 2.5px);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-kicker,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-kicker {
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card > strong {
  color: #ff4fa3;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-expense > strong,
[data-chat-theme="day"] .chat-shell .piggy-chat-card-expense .amount,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-expense > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-expense .amount {
  color: #d4a017;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish > strong,
[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish .amount,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish .amount {
  color: #ff4fa3;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish > strong {
  border: 0;
  background: rgba(255, 79, 163, 0.10);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled > strong,
[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled .amount,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled .amount,
[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-wish-fulfillment-note,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-wish-fulfillment-note {
  color: #d4a017;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled > strong {
  border: 0;
  background: rgba(212, 160, 23, 0.12);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-receipt > strong,
[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-content,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-receipt > strong,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-content {
  color: #3f2a32;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-label,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-label,
[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-content.reply,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-content.reply {
  background: transparent;
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .amount,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .amount {
  color: #ff4fa3;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-label,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-label {
  background: rgba(255, 79, 163, 0.08);
  color: #ff4fa3;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-expense .piggy-label,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-expense .piggy-label {
  background: rgba(212, 160, 23, 0.08);
  color: #d4a017;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-label,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-label {
  background: transparent;
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-note,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-note {
  border-top-color: rgba(0, 0, 0, 0.06);
  color: #554148;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-note,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish .piggy-note {
  border-top: 0;
  background: rgba(0, 0, 0, 0.035);
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note {
  border-left-color: #d4a017;
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-footer,
[data-chat-theme="day"] .chat-shell .piggy-chat-card time,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-footer,
body[data-app-theme="day"] .chat-shell .piggy-chat-card time {
  color: #8c7d84;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .piggy-card-meta,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .piggy-card-meta {
  border-top-color: rgba(63, 42, 50, 0.08);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-income .piggy-footer,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-income .piggy-footer {
  color: #ff4fa3;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card-expense .piggy-footer,
body[data-app-theme="day"] .chat-shell .piggy-chat-card-expense .piggy-footer {
  color: #d4a017;
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card.piggy-chat-card-receipt > time,
body[data-app-theme="day"] .chat-shell .piggy-chat-card.piggy-chat-card-receipt > time {
  position: absolute;
  left: 18px;
  bottom: 12px;
  display: block;
  margin: 0;
  font: 400 12px/1.35 var(--mono);
  letter-spacing: 0;
  text-align: left;
  color: rgba(140, 125, 132, 0.42);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card i,
body[data-app-theme="day"] .chat-shell .piggy-chat-card i {
  border-top-color: rgba(0, 0, 0, 0.06);
}

[data-chat-theme="day"] .chat-shell .piggy-chat-card .receipt-barcode,
body[data-app-theme="day"] .chat-shell .piggy-chat-card .receipt-barcode {
  background: repeating-linear-gradient(90deg, #ccc 0px, #ccc 1px, transparent 1px, transparent 4px);
  opacity: 0.6;
}

.chat-shell[data-theme="night"] .piggy-chat-card,
[data-chat-theme="night"] .chat-shell .piggy-chat-card {
  border-color: rgba(255, 79, 163, 0.22);
  background: #111116;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.40);
  color: #f7edf3;
}

.chat-shell[data-theme="night"] .piggy-chat-card-income,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-income {
  border-color: #ff4fa3;
  background: #111116;
  box-shadow: 0 0 20px rgba(255, 79, 163, 0.12), 0 12px 34px rgba(0, 0, 0, 0.30);
}

.chat-shell[data-theme="night"] .piggy-chat-card-expense,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-expense {
  border-color: rgba(247, 201, 121, 0.32);
  background: linear-gradient(180deg, #16131a 0%, #111116 100%);
  box-shadow: inset 0 0 28px rgba(247, 201, 121, 0.08), 0 12px 34px rgba(0, 0, 0, 0.32);
}

.chat-shell[data-theme="night"] .piggy-chat-card-receipt,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-receipt {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1a171d;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.40);
}

.chat-shell[data-theme="night"] .piggy-chat-card-receipt::before,
.chat-shell[data-theme="night"] .piggy-chat-card-receipt::after,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-receipt::before,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-receipt::after {
  background-image: radial-gradient(circle, #0c0a0f 2px, transparent 2.5px);
}

.chat-shell[data-theme="night"] .piggy-chat-card .piggy-kicker,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-kicker,
.chat-shell[data-theme="night"] .piggy-chat-card .piggy-label,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-label,
.chat-shell[data-theme="night"] .piggy-chat-card .piggy-footer,
.chat-shell[data-theme="night"] .piggy-chat-card time,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-footer,
[data-chat-theme="night"] .chat-shell .piggy-chat-card time {
  color: rgba(247, 237, 243, 0.52);
}

.chat-shell[data-theme="night"] .piggy-chat-card .piggy-card-meta,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-card-meta {
  border-top-color: rgba(247, 237, 243, 0.10);
}

.chat-shell[data-theme="night"] .piggy-chat-card-income .piggy-footer,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-income .piggy-footer {
  color: #ff4fa3;
}

.chat-shell[data-theme="night"] .piggy-chat-card-expense .piggy-footer,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-expense .piggy-footer {
  color: #f7c979;
}

.chat-shell[data-theme="night"] .piggy-chat-card.piggy-chat-card-receipt > time,
[data-chat-theme="night"] .chat-shell .piggy-chat-card.piggy-chat-card-receipt > time {
  position: absolute;
  left: 18px;
  bottom: 12px;
  display: block;
  margin: 0;
  font: 400 12px/1.35 var(--mono);
  letter-spacing: 0;
  text-align: left;
  color: rgba(247, 237, 243, 0.34);
}

.chat-shell[data-theme="night"] .piggy-chat-card .piggy-label,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-label {
  background: rgba(255, 255, 255, 0.05);
}

.chat-shell[data-theme="night"] .piggy-chat-card > strong,
[data-chat-theme="night"] .chat-shell .piggy-chat-card > strong,
.chat-shell[data-theme="night"] .piggy-chat-card .amount,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .amount {
  color: #ff4fa3;
}

.chat-shell[data-theme="night"] .piggy-chat-card-expense > strong,
.chat-shell[data-theme="night"] .piggy-chat-card-expense .amount,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-expense > strong,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-expense .amount {
  color: #f7c979;
}

.chat-shell[data-theme="night"] .piggy-chat-card-receipt > strong,
.chat-shell[data-theme="night"] .piggy-chat-card .piggy-content,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-receipt > strong,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-content {
  color: #f7edf3;
}

.chat-shell[data-theme="night"] .piggy-chat-card .piggy-note,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .piggy-note {
  border-top-color: rgba(255, 255, 255, 0.10);
  color: #ffb7d0;
}

.chat-shell[data-theme="night"] .piggy-chat-card i,
[data-chat-theme="night"] .chat-shell .piggy-chat-card i {
  border-top-color: rgba(255, 255, 255, 0.10);
}

.chat-shell[data-theme="night"] .piggy-chat-card .receipt-barcode,
[data-chat-theme="night"] .chat-shell .piggy-chat-card .receipt-barcode {
  background: repeating-linear-gradient(90deg, rgba(247, 237, 243, 0.52) 0px, rgba(247, 237, 243, 0.52) 1px, transparent 1px, transparent 3px);
  opacity: 0.4;
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish {
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle at 50% -10px, rgba(255, 79, 163, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(24, 20, 28, 0.88), rgba(14, 13, 18, 0.94));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 28px 54px rgba(255, 79, 163, 0.13);
  color: #f7edf3;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish::after,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish::after,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish::after {
  left: 10%;
  right: 10%;
  bottom: -22px;
  height: 42px;
  background: radial-gradient(ellipse at center, rgba(255, 79, 163, 0.34), transparent 70%);
  filter: blur(20px);
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish.fulfilled,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled {
  border: 0;
  background:
    radial-gradient(circle at 50% -10px, rgba(247, 201, 121, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(25, 22, 25, 0.90), rgba(15, 14, 18, 0.95));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.50),
    0 28px 54px rgba(247, 201, 121, 0.14);
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish.fulfilled::after,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled::after,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled::after {
  background: radial-gradient(ellipse at center, rgba(247, 201, 121, 0.34), transparent 70%);
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish > strong,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish > strong,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish > strong {
  border: 0;
  background: rgba(255, 79, 163, 0.18);
  color: #ff4fa3;
  box-shadow: none;
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish.fulfilled > strong,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled > strong,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled > strong {
  border: 0;
  background: rgba(247, 201, 121, 0.16);
  color: #f7c979;
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish .piggy-label,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-label,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.58);
  box-shadow: none;
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish .piggy-content,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-content,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-content {
  color: #f7edf3;
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish .piggy-note,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-note,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish .piggy-note {
  border: 0;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.58);
}

.chat-shell[data-theme="night"] .piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note,
[data-chat-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note,
body[data-app-theme="night"] .chat-shell .piggy-chat-card-wish.fulfilled .piggy-wish-fulfillment-note {
  border-left: 2px solid rgba(247, 201, 121, 0.72);
  color: #f7c979;
}

.chat-shell[data-theme="day"] .user-card-msg,
[data-chat-theme="day"] .chat-shell .user-card-msg {
  background: linear-gradient(270deg, rgba(96, 72, 82, 0.045), transparent 78%);
}

.chat-shell[data-theme="day"] .user-card-msg::after,
[data-chat-theme="day"] .chat-shell .user-card-msg::after {
  background: rgba(96, 72, 82, 0.18);
}

.chat-shell[data-theme="day"] .ai-response-body,
.chat-shell[data-theme="day"] .user-response-body,
[data-chat-theme="day"] .chat-shell .ai-response-body,
[data-chat-theme="day"] .chat-shell .user-response-body {
  color: var(--stitch-text);
  text-shadow: none;
}

.chat-shell[data-theme="day"] .quote-block,
[data-chat-theme="day"] .chat-shell .quote-block {
  border-left-color: var(--stitch-primary);
  color: rgba(48, 42, 46, 0.58);
}

.chat-shell[data-theme="day"] .quote-block span,
.chat-shell[data-theme="day"] .moon-star-em,
[data-chat-theme="day"] .chat-shell .quote-block span,
[data-chat-theme="day"] .chat-shell .moon-star-em {
  color: var(--stitch-primary);
  text-shadow: 0 0 8px rgba(217, 134, 163, 0.18);
}

.chat-shell[data-theme="day"] .message-receipt,
.chat-shell[data-theme="day"] .stitch-message-actions,
.chat-shell[data-theme="day"] .stitch-message-actions button,
[data-chat-theme="day"] .chat-shell .message-receipt,
[data-chat-theme="day"] .chat-shell .stitch-message-actions,
[data-chat-theme="day"] .chat-shell .stitch-message-actions button {
  color: rgba(104, 82, 91, 0.54);
}

.chat-shell[data-theme="day"] .user-message-receipt::before,
.chat-shell[data-theme="day"] .ai-message-receipt::after,
[data-chat-theme="day"] .chat-shell .user-message-receipt::before,
[data-chat-theme="day"] .chat-shell .ai-message-receipt::after {
  background: rgba(104, 82, 91, 0.14);
}

.chat-shell[data-theme="day"] .composer,
[data-chat-theme="day"] .chat-shell .composer {
  border-color: rgba(96, 72, 82, 0.10);
  background:
    radial-gradient(circle at 18% 120%, rgba(217, 134, 163, 0.14), transparent 42%),
    rgba(255, 253, 251, 0.92);
  box-shadow: 0 18px 44px rgba(112, 74, 88, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.chat-shell[data-theme="day"] .composer textarea,
[data-chat-theme="day"] .chat-shell .composer textarea {
  border-color: transparent;
  background: transparent;
  color: var(--stitch-text);
}

.chat-shell[data-theme="day"] .composer textarea::placeholder,
[data-chat-theme="day"] .chat-shell .composer textarea::placeholder {
  color: rgba(104, 82, 91, 0.42);
}

.chat-shell[data-theme="day"] .composer textarea:focus,
[data-chat-theme="day"] .chat-shell .composer textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.chat-shell[data-theme="day"] .chat-plus,
[data-chat-theme="day"] .chat-shell .chat-plus {
  border-color: rgba(96, 72, 82, 0.12);
  background: rgba(255, 253, 251, 0.76);
  color: var(--stitch-primary);
}

.chat-shell[data-theme="day"] .icon-send.respond,
[data-chat-theme="day"] .chat-shell .icon-send.respond {
  background: #f0a8bf;
  color: #fff;
  box-shadow: 0 10px 28px rgba(217, 134, 163, 0.28);
}

.chat-shell[data-theme="day"] .icon-send.respond.is-stopping,
[data-chat-theme="day"] .chat-shell .icon-send.respond.is-stopping {
  background: #f0a8bf;
  color: #fff;
  box-shadow: 0 10px 28px rgba(217, 134, 163, 0.28);
}

.chat-shell[data-theme="day"] .plus-menu,
.chat-shell[data-theme="day"] .context-menu,
.chat-shell[data-theme="day"] .chat-search-panel,
.chat-shell[data-theme="day"] .chat-bag-sheet,
.chat-shell[data-theme="day"] .selection-bar,
[data-chat-theme="day"] .chat-shell .plus-menu,
[data-chat-theme="day"] .chat-shell .context-menu,
[data-chat-theme="day"] .chat-shell .chat-search-panel,
[data-chat-theme="day"] .chat-shell .chat-bag-sheet,
[data-chat-theme="day"] .chat-shell .selection-bar {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.98);
  color: var(--stitch-text);
  box-shadow: 0 18px 54px rgba(112, 74, 88, 0.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-shell[data-theme="day"] .context-menu button,
[data-chat-theme="day"] .chat-shell .context-menu button {
  color: rgba(48, 42, 46, 0.86);
}

.chat-shell[data-theme="day"] .context-menu button .material-symbols-outlined,
[data-chat-theme="day"] .chat-shell .context-menu button .material-symbols-outlined {
  color: rgba(217, 134, 163, 0.9);
}

.chat-shell[data-theme="day"] .context-menu button:hover,
[data-chat-theme="day"] .chat-shell .context-menu button:hover {
  background: rgba(217, 134, 163, 0.09);
  color: var(--stitch-hot);
}

.chat-shell[data-theme="day"] .context-menu button[data-menu-action="favorite"],
[data-chat-theme="day"] .chat-shell .context-menu button[data-menu-action="favorite"] {
  border-top-color: rgba(96, 72, 82, 0.12);
  color: var(--stitch-primary);
}

.chat-shell[data-theme="day"] .quote-selection-popover,
[data-chat-theme="day"] .chat-shell .quote-selection-popover {
  border-color: rgba(217, 134, 163, 0.36);
  background: #fffdfb;
  color: #3a3035;
  box-shadow: 0 12px 26px rgba(112, 74, 88, 0.16);
}

.chat-shell[data-theme="day"] .quote-selection-popover:hover,
.chat-shell[data-theme="day"] .quote-selection-popover:focus-visible,
[data-chat-theme="day"] .chat-shell .quote-selection-popover:hover,
[data-chat-theme="day"] .chat-shell .quote-selection-popover:focus-visible {
  background: #f9edf1;
  color: #3a3035;
}

.chat-shell[data-theme="day"] .chat-bag-content .bridge-card > p,
.chat-shell[data-theme="day"] .chat-bag-content .bridge-context-preview,
[data-chat-theme="day"] .chat-shell .chat-bag-content .bridge-card > p,
[data-chat-theme="day"] .chat-shell .chat-bag-content .bridge-context-preview {
  border-color: rgba(96, 72, 82, 0.12);
  background: #fbf6f4;
  color: var(--stitch-text);
}

.chat-shell[data-theme="day"] .drawer-backdrop,
[data-chat-theme="day"] .chat-shell .drawer-backdrop {
  background: rgba(44, 36, 42, 0.28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-shell[data-theme="day"] .chat-drawer,
[data-chat-theme="day"] .chat-shell .chat-drawer {
  border-left-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.98);
  color: var(--stitch-text);
  box-shadow: -18px 0 48px rgba(112, 74, 88, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-shell[data-theme="day"] .stitch-drawer-profile,
[data-chat-theme="day"] .chat-shell .stitch-drawer-profile {
  border-bottom-color: rgba(96, 72, 82, 0.10);
  background: linear-gradient(180deg, rgba(217, 134, 163, 0.12), transparent);
}

.chat-shell[data-theme="day"] .stitch-summary-row,
.chat-shell[data-theme="day"] .chat-drawer .memory-control input,
.chat-shell[data-theme="day"] .chat-drawer .memory-control .ghost,
[data-chat-theme="day"] .chat-shell .stitch-summary-row,
[data-chat-theme="day"] .chat-shell .chat-drawer .memory-control input,
[data-chat-theme="day"] .chat-shell .chat-drawer .memory-control .ghost {
  border-color: rgba(96, 72, 82, 0.12);
  background: #fbf6f4;
  color: var(--stitch-text);
}

.chat-shell[data-theme="day"] .chat-edit-backdrop,
[data-chat-theme="day"] .chat-shell .chat-edit-backdrop {
  background: rgba(44, 36, 42, 0.32);
}

.chat-shell[data-theme="day"] .chat-edit-modal,
[data-chat-theme="day"] .chat-shell .chat-edit-modal {
  border-color: rgba(217, 134, 163, 0.34);
  background:
    radial-gradient(circle at 90% 0%, rgba(217, 134, 163, 0.12), transparent 38%),
    #fffdfb;
  box-shadow: 0 24px 70px rgba(112, 74, 88, 0.18);
}

.chat-shell[data-theme="day"] .chat-edit-modal .chat-edit-head h3,
.chat-shell[data-theme="day"] .chat-edit-modal .edit-area,
[data-chat-theme="day"] .chat-shell .chat-edit-modal .chat-edit-head h3,
[data-chat-theme="day"] .chat-shell .chat-edit-modal .edit-area {
  color: var(--stitch-text);
}

.chat-shell[data-theme="day"] .chat-edit-modal .edit-area,
[data-chat-theme="day"] .chat-shell .chat-edit-modal .edit-area {
  border-color: rgba(217, 134, 163, 0.24);
  background: #fbf6f4;
}

.chat-shell[data-theme="day"] .selection-delete,
[data-chat-theme="day"] .chat-shell .selection-delete {
  border-color: rgba(217, 134, 163, 0.36);
  background: rgba(217, 134, 163, 0.12);
  color: var(--stitch-primary);
}

.chat-shell[data-theme="day"] .selection-cancel,
[data-chat-theme="day"] .chat-shell .selection-cancel {
  border-color: rgba(96, 72, 82, 0.14);
  color: rgba(72, 55, 63, 0.62);
}

.chat-shell[data-theme="day"] .voice-player-timeline input::-webkit-slider-runnable-track,
[data-chat-theme="day"] .chat-shell .voice-player-timeline input::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--stitch-primary) 0 var(--audio-progress, 0%), rgba(104, 82, 91, 0.16) var(--audio-progress, 0%) 100%);
}

.chat-shell[data-theme="day"] .voice-player-timeline input::-webkit-slider-thumb,
[data-chat-theme="day"] .chat-shell .voice-player-timeline input::-webkit-slider-thumb {
  background: var(--stitch-primary);
  box-shadow: 0 0 0 2px #fbf6f4;
}

.chat-shell[data-theme="day"] .writing-status-pill,
[data-chat-theme="day"] .chat-shell .writing-status-pill,
body[data-app-theme="day"] .diary-writing-status {
  border-color: rgba(217, 134, 163, 0.20);
  background: rgba(255, 253, 251, 0.86);
  color: rgba(72, 55, 63, 0.76);
  box-shadow: inset 1px 0 7px rgba(217, 134, 163, 0.08);
}

.chat-shell[data-theme="day"] .writing-dots i,
[data-chat-theme="day"] .chat-shell .writing-dots i,
body[data-app-theme="day"] .diary-writing-status .writing-dots i {
  background: #d986a3;
  box-shadow: 0 0 7px rgba(217, 134, 163, 0.34);
}

.chat-shell[data-theme="day"] .writing-status-pill.done,
[data-chat-theme="day"] .chat-shell .writing-status-pill.done,
body[data-app-theme="day"] .diary-writing-status.done {
  border-color: rgba(67, 171, 119, 0.22);
  background: rgba(235, 250, 242, 0.86);
  color: rgba(34, 112, 75, 0.82);
}

.chat-shell[data-theme="day"] .writing-status-pill.failed,
[data-chat-theme="day"] .chat-shell .writing-status-pill.failed,
body[data-app-theme="day"] .diary-writing-status.failed {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 246, 250, 0.9);
  color: rgba(128, 71, 98, 0.78);
}

/* Chat profile editor — bring the old generic modal into the new Chat language. */
.profile-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid rgba(255, 176, 204, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 176, 204, 0.09), transparent 38%),
    #17141a;
  padding: 28px;
  color: var(--stitch-text, #e7e0e8);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.profile-modal h3 {
  margin: 0 0 22px;
  color: var(--stitch-text, #e7e0e8);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 20px;
  font-weight: 500;
}

.profile-modal .profile-preview.large {
  margin: 0 0 28px;
}

.profile-modal .profile-preview.large .avatar {
  width: 118px;
  height: 118px;
  max-width: 118px;
  max-height: 118px;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 204, 0.24);
  background-color: #211a21;
  box-shadow: 0 0 30px rgba(255, 176, 204, 0.08);
  font-size: 54px;
}

.profile-modal .field {
  margin-top: 18px;
}

.profile-modal .field label {
  display: block;
  margin-bottom: 8px;
  color: rgba(223, 190, 200, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-modal .field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 176, 204, 0.22);
  border-radius: 14px;
  outline: 0;
  background: #100e13;
  color: var(--stitch-text, #e7e0e8);
  padding: 0 18px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.profile-modal .field input::placeholder {
  color: rgba(223, 190, 200, 0.38);
}

.profile-modal .field input:focus {
  border-color: rgba(255, 176, 204, 0.52);
  box-shadow: 0 0 0 3px rgba(255, 176, 204, 0.07);
}

.profile-modal .actions {
  display: flex;
  gap: 12px;
  margin-top: 24px !important;
}

.profile-modal .actions .send,
.profile-modal .actions .ghost {
  min-width: 0;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 26px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.profile-modal .actions .send {
  border: 1px solid var(--stitch-primary, #ffb0cc);
  background: var(--stitch-primary, #ffb0cc);
  color: #25131c;
}

.profile-modal .actions .ghost {
  border: 1px solid rgba(255, 176, 204, 0.22);
  background: transparent;
  color: rgba(231, 224, 232, 0.7);
}

/* Day theme fixes for overlays that live outside .chat-shell. */
[data-chat-theme="day"] .modal-backdrop {
  background: rgba(44, 36, 42, 0.30);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-chat-theme="day"] .chat-edit-modal,
[data-chat-theme="day"] .profile-modal,
[data-chat-theme="day"] .heart-modal {
  border-color: rgba(217, 134, 163, 0.34);
  background:
    radial-gradient(circle at 88% 0%, rgba(217, 134, 163, 0.12), transparent 40%),
    #fffdfb;
  color: #302a2e;
  box-shadow: 0 24px 70px rgba(112, 74, 88, 0.18);
}

[data-chat-theme="day"] .chat-edit-head > span,
[data-chat-theme="day"] .profile-modal .field label {
  color: rgba(104, 82, 91, 0.58);
}

[data-chat-theme="day"] .chat-edit-modal .chat-edit-head h3,
[data-chat-theme="day"] .profile-modal h3,
[data-chat-theme="day"] .heart-main h4 {
  color: #302a2e;
}

[data-chat-theme="day"] .chat-edit-modal .edit-area,
[data-chat-theme="day"] .profile-modal .field input {
  border-color: rgba(217, 134, 163, 0.24);
  background: #fbf6f4;
  color: #302a2e;
}

[data-chat-theme="day"] .chat-edit-modal .edit-area::placeholder,
[data-chat-theme="day"] .profile-modal .field input::placeholder {
  color: rgba(104, 82, 91, 0.40);
}

[data-chat-theme="day"] .chat-edit-modal .edit-area:focus,
[data-chat-theme="day"] .profile-modal .field input:focus {
  border-color: rgba(217, 134, 163, 0.54);
  box-shadow: 0 0 0 3px rgba(217, 134, 163, 0.08);
}

[data-chat-theme="day"] .chat-edit-actions .send,
[data-chat-theme="day"] .profile-modal .actions .send {
  border-color: #f0a8bf;
  background: #f0a8bf;
  color: #fff;
}

[data-chat-theme="day"] .chat-edit-actions .ghost,
[data-chat-theme="day"] .profile-modal .actions .ghost {
  border-color: rgba(217, 134, 163, 0.28);
  color: rgba(72, 55, 63, 0.66);
}

[data-chat-theme="day"] .heart-modal-close {
  color: rgba(104, 82, 91, 0.70);
}

[data-chat-theme="day"] .heart-modal-close:hover {
  color: #d986a3;
}

[data-chat-theme="day"] .heart-main-icon {
  color: #d986a3;
}

[data-chat-theme="day"] .heart-main p {
  color: rgba(48, 42, 46, 0.76);
}

[data-chat-theme="day"] .profile-modal .profile-preview.large .avatar {
  border-color: rgba(217, 134, 163, 0.26);
  background-color: #fbf6f4;
}

/* Heart voice heartbeat icon. */
.heart-main .heart-rate-icon {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 0 22px;
  color: #f0a8bf;
  filter: drop-shadow(0 0 12px rgba(240, 168, 191, 0.24));
}

.heart-main .heart-rate-icon path {
  fill: currentColor;
}

[data-chat-theme="day"] .heart-main .heart-rate-icon {
  color: #d986a3;
  filter: drop-shadow(0 0 10px rgba(217, 134, 163, 0.16));
}

/* Day theme: body-level plus menu, search, and bag internals. */
[data-chat-theme="day"] .plus-menu-backdrop {
  --stitch-primary: #d986a3;
  --stitch-text: #302a2e;
  --stitch-muted: #8d7a82;
  background: rgba(44, 36, 42, 0.28);
}

[data-chat-theme="day"] .plus-menu-backdrop .plus-menu {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 18px 54px rgba(112, 74, 88, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-chat-theme="day"] .plus-menu-backdrop .plus-menu-grid button {
  color: #d986a3;
}

[data-chat-theme="day"] .plus-menu-backdrop .plus-menu-grid button > .material-symbols-outlined {
  border-color: rgba(217, 134, 163, 0.26);
  background: rgba(217, 134, 163, 0.08);
  color: #d986a3 !important;
}

[data-chat-theme="day"] .plus-menu-backdrop .plus-menu-grid button:hover > .material-symbols-outlined {
  background: #d986a3;
  color: #fff !important;
}

[data-chat-theme="day"] .plus-menu-backdrop .plus-menu-grid button small {
  color: rgba(72, 55, 63, 0.78) !important;
}

[data-chat-theme="day"] .plus-menu-close {
  border-top-color: rgba(96, 72, 82, 0.12) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

[data-chat-theme="day"] .chat-search-panel {
  background: #fbf6f4;
  color: #302a2e;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-chat-theme="day"] .chat-search-head {
  border-bottom-color: rgba(96, 72, 82, 0.12);
  background: #fbf6f4;
}

[data-chat-theme="day"] .chat-search-head > button {
  color: rgba(72, 55, 63, 0.72);
}

[data-chat-theme="day"] .chat-search-panel .chat-search-box {
  border-color: rgba(217, 134, 163, 0.30);
  background: #fffdfb;
}

[data-chat-theme="day"] .chat-search-panel .chat-search-box > .material-symbols-outlined {
  color: rgba(104, 82, 91, 0.64);
}

[data-chat-theme="day"] .chat-search-panel .chat-search-box input {
  color: #302a2e;
}

[data-chat-theme="day"] .chat-search-panel .chat-search-box input::placeholder {
  color: rgba(104, 82, 91, 0.48);
}

[data-chat-theme="day"] .chat-search-panel .chat-search-box button {
  color: rgba(104, 82, 91, 0.58);
}

[data-chat-theme="day"] .chat-search-results {
  background: transparent;
}

[data-chat-theme="day"] .chat-search-results button {
  border-color: rgba(217, 134, 163, 0.20);
  background: #fffdfb;
  color: rgba(48, 42, 46, 0.86);
}

[data-chat-theme="day"] .chat-search-results strong {
  color: rgba(72, 55, 63, 0.74);
}

[data-chat-theme="day"] .chat-search-results span,
[data-chat-theme="day"] .chat-search-empty {
  color: rgba(72, 55, 63, 0.66);
}

[data-chat-theme="day"] .chat-bag-sheet > header > button {
  border-radius: 0;
  background: transparent;
  color: rgba(104, 82, 91, 0.70);
}

[data-chat-theme="day"] .chat-bag-sheet > header > button:hover {
  background: transparent;
  color: #d986a3;
}

[data-chat-theme="day"] .chat-bag-content .bridge-card-kicker,
[data-chat-theme="day"] .chat-bag-sheet > header .material-symbols-outlined {
  color: #d986a3;
}

[data-chat-theme="day"] .chat-bag-content .bridge-layers span {
  border-color: rgba(217, 134, 163, 0.26);
  background: rgba(217, 134, 163, 0.08);
  color: rgba(72, 55, 63, 0.76);
}

[data-chat-theme="day"] .proactive-ledger {
  border-color: rgba(217, 134, 163, 0.2);
  background: rgba(251, 246, 244, 0.88);
}

[data-chat-theme="day"] .proactive-ledger-head strong,
[data-chat-theme="day"] .proactive-ledger details,
[data-chat-theme="day"] .proactive-ledger summary,
[data-chat-theme="day"] .proactive-ledger-list article p {
  color: rgba(48, 42, 46, 0.82);
}

[data-chat-theme="day"] .proactive-ledger-stats,
[data-chat-theme="day"] .proactive-ledger-list article small,
[data-chat-theme="day"] .proactive-ledger-older,
[data-chat-theme="day"] .proactive-ledger-principle {
  color: rgba(72, 55, 63, 0.58);
}

[data-chat-theme="day"] .proactive-ledger-stats b {
  color: rgba(48, 42, 46, 0.8);
}

[data-chat-theme="day"] .chat-bag-content details,
[data-chat-theme="day"] .chat-bag-content summary,
[data-chat-theme="day"] .chat-bag-content .bridge-card,
[data-chat-theme="day"] .chat-bag-content .bridge-context-preview,
[data-chat-theme="day"] .chat-bag-content .bridge-context-preview * {
  color: rgba(48, 42, 46, 0.76);
}

[data-chat-theme="day"] .chat-bag-content summary {
  border-color: rgba(96, 72, 82, 0.12);
  background: #fbf6f4;
}

[data-chat-theme="day"] .bridge-context-preview pre {
  border-top-color: rgba(96, 72, 82, 0.12);
  color: rgba(48, 42, 46, 0.74);
}

[data-chat-theme="day"] .bridge-context-preview small,
[data-chat-theme="day"] .bridge-explain-row small {
  color: rgba(72, 55, 63, 0.58);
}

[data-chat-theme="day"] .bridge-explain-row {
  border-top-color: rgba(96, 72, 82, 0.10);
}

[data-chat-theme="day"] .bridge-explain-main {
  color: rgba(48, 42, 46, 0.82);
}

[data-chat-theme="day"] .bridge-explain-tags span {
  border-color: rgba(217, 134, 163, 0.22);
  background: rgba(217, 134, 163, 0.08);
  color: rgba(72, 55, 63, 0.68);
}

/* Theme polish: bag meta text, typing states, and cleared-image placeholders. */
.chat-shell .attachment-expired {
  border: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 176, 204, 0.08), transparent 48%),
    rgba(16, 14, 19, 0.86);
  color: rgba(255, 217, 228, 0.72);
}

.chat-shell .chat-attachments figure,
.chat-shell .attachment-preview figure {
  border-color: rgba(255, 176, 204, 0.22);
  background: rgba(16, 14, 19, 0.74);
}

.chat-shell .chat-attachments figcaption {
  background: rgba(16, 14, 19, 0.45);
  color: rgba(231, 224, 232, 0.62);
}

.chat-shell[data-theme="day"] .chat-bag-sheet h2 small,
[data-chat-theme="day"] .chat-shell .chat-bag-sheet h2 small,
[data-chat-theme="day"] .chat-bag-content .bridge-card > small,
[data-chat-theme="day"] .chat-bag-content .bridge-card small:not(.bridge-card-kicker),
[data-chat-theme="day"] .chat-bag-content .bridge-card span:not(.material-symbols-outlined) {
  color: rgba(72, 55, 63, 0.68);
}

[data-chat-theme="day"] .chat-bag-sheet h2 small {
  color: rgba(72, 55, 63, 0.56) !important;
}

[data-chat-theme="day"] .chat-bag-content .bridge-card-kicker {
  color: #cf7698 !important;
}

[data-chat-theme="day"] .chat-bag-content .bridge-card > small {
  display: block;
  margin-top: 10px;
  color: rgba(72, 55, 63, 0.68) !important;
}

[data-chat-theme="day"] .chat-bag-content .bridge-card > p {
  color: rgba(48, 42, 46, 0.86) !important;
}

.chat-shell[data-theme="day"] .stitch-typing,
[data-chat-theme="day"] .chat-shell .stitch-typing {
  background: transparent !important;
}

.chat-shell[data-theme="day"] .g-typing,
[data-chat-theme="day"] .chat-shell .g-typing,
.chat-shell[data-theme="day"] .typing-bubble,
[data-chat-theme="day"] .chat-shell .typing-bubble {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.90);
  box-shadow: inset 1px 0 7px rgba(217, 134, 163, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chat-shell[data-theme="day"] .g-typing span,
.chat-shell[data-theme="day"] .typing-bubble span,
[data-chat-theme="day"] .chat-shell .g-typing span,
[data-chat-theme="day"] .chat-shell .typing-bubble span {
  background: #d986a3;
  color: #d986a3;
  box-shadow: 0 0 7px rgba(217, 134, 163, 0.34);
}

.chat-shell[data-theme="day"] .chat-attachments figure,
.chat-shell[data-theme="day"] .attachment-preview figure,
[data-chat-theme="day"] .chat-shell .chat-attachments figure,
[data-chat-theme="day"] .chat-shell .attachment-preview figure {
  border-color: rgba(217, 134, 163, 0.26);
  background: #fffdfb;
}

.chat-shell[data-theme="day"] .attachment-expired,
[data-chat-theme="day"] .chat-shell .attachment-expired {
  background:
    radial-gradient(circle at 50% 25%, rgba(217, 134, 163, 0.10), transparent 48%),
    #f1ebeb;
  color: rgba(72, 55, 63, 0.60);
}

.chat-shell[data-theme="day"] .chat-attachments figcaption,
[data-chat-theme="day"] .chat-shell .chat-attachments figcaption {
  background: rgba(255, 253, 251, 0.54);
  color: rgba(72, 55, 63, 0.54);
}

/* Day theme: body-level quote popover and message context menu. */
[data-chat-theme="day"] .context-menu {
  border-color: rgba(217, 134, 163, 0.28);
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 18px 44px rgba(112, 74, 88, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-chat-theme="day"] .context-menu button {
  color: rgba(48, 42, 46, 0.86);
}

[data-chat-theme="day"] .context-menu button .material-symbols-outlined {
  color: rgba(217, 134, 163, 0.92);
}

[data-chat-theme="day"] .context-menu button:hover,
[data-chat-theme="day"] .context-menu button:focus-visible {
  background: rgba(217, 134, 163, 0.09);
  color: #c86f91;
}

[data-chat-theme="day"] .context-menu button[data-menu-action="favorite"] {
  border-top-color: rgba(96, 72, 82, 0.12);
  color: #c86f91;
}

[data-chat-theme="day"] .context-menu button[data-menu-action="favorite"] .material-symbols-outlined {
  color: #c86f91;
}

[data-chat-theme="day"] #quote-selection-popover,
[data-chat-theme="day"] .quote-selection-popover {
  border-color: rgba(217, 134, 163, 0.30);
  background: rgba(255, 253, 251, 0.98);
  color: rgba(72, 55, 63, 0.78);
  box-shadow: 0 12px 26px rgba(112, 74, 88, 0.16);
}

[data-chat-theme="day"] #quote-selection-popover .material-symbols-outlined,
[data-chat-theme="day"] .quote-selection-popover .material-symbols-outlined {
  color: #d986a3;
}

[data-chat-theme="day"] #quote-selection-popover:hover,
[data-chat-theme="day"] #quote-selection-popover:focus-visible,
[data-chat-theme="day"] .quote-selection-popover:hover,
[data-chat-theme="day"] .quote-selection-popover:focus-visible {
  border-color: rgba(217, 134, 163, 0.46);
  background: #f9edf1;
  color: #3a3035;
}

/* Day theme: composer quote previews, note quotes, and fiction co-reading quote cards. */
.chat-shell[data-theme="day"] .quote-preview,
[data-chat-theme="day"] .chat-shell .quote-preview {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.96);
  box-shadow: 0 10px 26px rgba(112, 74, 88, 0.08);
}

.chat-shell[data-theme="day"] .quote-preview .quote-block,
[data-chat-theme="day"] .chat-shell .quote-preview .quote-block {
  border-left-color: #d986a3;
  color: rgba(48, 42, 46, 0.72);
}

.chat-shell[data-theme="day"] .quote-preview .quote-block span,
[data-chat-theme="day"] .chat-shell .quote-preview .quote-block span {
  color: #c86f91;
  text-shadow: none;
}

.chat-shell[data-theme="day"] .quote-preview button,
[data-chat-theme="day"] .chat-shell .quote-preview button {
  color: rgba(104, 82, 91, 0.58);
}

.chat-shell[data-theme="day"] .quote-preview button:hover,
[data-chat-theme="day"] .chat-shell .quote-preview button:hover {
  color: #c86f91;
}

.chat-shell[data-theme="day"] .quote-preview-note,
[data-chat-theme="day"] .chat-shell .quote-preview-note {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.chat-shell[data-theme="day"] .quote-note-card,
[data-chat-theme="day"] .chat-shell .quote-note-card {
  border-color: rgba(217, 172, 115, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 251, 239, 0.99), rgba(255, 240, 244, 0.98)),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(115, 72, 88, 0.08) 31px 32px);
  box-shadow: 0 12px 28px rgba(112, 74, 88, 0.10);
  color: #3f2a32;
}

.chat-shell[data-theme="day"] .quote-note-card small,
.chat-shell[data-theme="day"] .quote-note-card span,
[data-chat-theme="day"] .chat-shell .quote-note-card small,
[data-chat-theme="day"] .chat-shell .quote-note-card span {
  color: rgba(61, 39, 48, 0.76);
}

.chat-shell[data-theme="day"] .quote-note-card p,
[data-chat-theme="day"] .chat-shell .quote-note-card p {
  color: #3f2a32;
}

.chat-shell[data-theme="day"] .quote-preview-fiction,
[data-chat-theme="day"] .chat-shell .quote-preview-fiction {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.96);
}

.chat-shell[data-theme="day"] .quote-fiction-card,
[data-chat-theme="day"] .chat-shell .quote-fiction-card {
  border-left-color: #d986a3;
  background: rgba(217, 134, 163, 0.08);
  color: #302a2e;
}

.chat-shell[data-theme="day"] .quote-fiction-card header,
[data-chat-theme="day"] .chat-shell .quote-fiction-card header {
  color: rgba(72, 55, 63, 0.64);
}

.chat-shell[data-theme="day"] .quote-fiction-card p,
[data-chat-theme="day"] .chat-shell .quote-fiction-card p {
  color: rgba(48, 42, 46, 0.86);
}

.chat-shell[data-theme="day"] .quote-fiction-card em,
[data-chat-theme="day"] .chat-shell .quote-fiction-card em {
  color: rgba(72, 55, 63, 0.58);
}

[data-chat-theme="day"] .proactive-envelope,
[data-chat-theme="day"] .proactive-paper,
[data-chat-theme="day"] .favorite-note-card,
[data-chat-theme="day"] .favorite-note-modal-paper {
  color: #3f2a32;
}

[data-chat-theme="day"] .proactive-envelope small,
[data-chat-theme="day"] .proactive-paper small,
[data-chat-theme="day"] .favorite-note-card small,
[data-chat-theme="day"] .favorite-note-modal-paper small {
  color: rgba(61, 39, 48, 0.74);
}

[data-chat-theme="day"] .proactive-paper p,
[data-chat-theme="day"] .favorite-note-card p,
[data-chat-theme="day"] .favorite-note-modal-paper p {
  color: #3f2a32;
}

/* Day theme: proactive note toast/paper must stay legible and keep the close button inside the card. */
[data-chat-theme="day"] .proactive-toast:not(.is-open) .proactive-envelope.proactive-envelope-toast {
  border-color: rgba(196, 117, 145, 0.28);
  background: rgba(255, 250, 248, 0.92);
  box-shadow: 0 16px 42px rgba(87, 65, 72, 0.16);
  color: #3f2a32;
  backdrop-filter: none;
}

[data-chat-theme="day"] .proactive-toast:not(.is-open) .proactive-envelope-icon {
  color: #8b5267;
}

[data-chat-theme="day"] .proactive-envelope.proactive-envelope-toast strong {
  color: rgba(63, 42, 50, 0.88);
}

[data-chat-theme="day"] .proactive-envelope.proactive-envelope-toast i {
  background: #dd78a0;
  box-shadow: 0 0 10px rgba(221, 120, 160, 0.38);
}

[data-chat-theme="day"] .proactive-toast.is-open {
  background: rgba(45, 38, 42, 0.46);
  backdrop-filter: blur(6px);
}

[data-chat-theme="day"] .proactive-toast.is-open .proactive-paper {
  border: 1px solid rgba(196, 117, 145, 0.2);
  background: #fffaf8;
  box-shadow: 4px 4px 0 rgba(94, 74, 82, 0.12), 0 24px 80px rgba(63, 48, 55, 0.28);
}

[data-chat-theme="day"] .proactive-toast.is-open .proactive-paper p {
  color: #282329;
}

[data-chat-theme="day"] .proactive-toast.is-open .proactive-paper em,
[data-chat-theme="day"] .proactive-toast.is-open .proactive-paper small {
  color: rgba(68, 48, 56, 0.74);
}

[data-chat-theme="day"] .proactive-toast.is-open .proactive-actions button {
  border-color: rgba(68, 48, 56, 0.18);
  background: rgba(255, 250, 248, 0.72);
  color: rgba(40, 35, 41, 0.88);
}

[data-chat-theme="day"] .proactive-toast.is-open .proactive-actions button:last-child {
  background: #242226;
  color: #fff8fb;
}

[data-chat-theme="day"] .proactive-paper-close {
  color: rgba(68, 48, 56, 0.66);
}

[data-chat-theme="day"] .proactive-paper-close:hover {
  background: rgba(196, 117, 145, 0.1);
  color: #3f2a32;
}

/* Stitch Home handoff integration — scoped to the real Home page only. */
.stitch-home.home-shell {
  --home-night-text: #eee7ef;
  --home-night-muted: rgba(223, 190, 200, 0.72);
  --home-night-pink: #ffb0cc;
  position: relative;
  z-index: 0;
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 22px) calc(112px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 79, 163, 0.1), transparent 30%),
    radial-gradient(circle at 0 72%, rgba(210, 187, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: var(--home-night-text);
  overflow: visible;
  isolation: isolate;
}

.stitch-home.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 79, 163, 0.1), transparent 30%),
    radial-gradient(circle at 0 72%, rgba(210, 187, 255, 0.07), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
}

.stitch-home .lair-hero {
  min-height: 0;
  margin-bottom: 38px;
  padding: 0;
  color: var(--home-night-pink);
}

.stitch-home .lair-kicker {
  margin: 4px 0 20px;
  color: var(--home-night-pink);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
}

.stitch-home .gq-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(174px, 46vw, 214px);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  isolation: isolate;
}

.stitch-home .gq-stage::before {
  content: none;
}

.stitch-home .gq-stage::after {
  content: none;
}

.stitch-home .anniversary-script {
  position: relative;
  z-index: 1;
  display: block;
  width: min(82%, 345px);
  aspect-ratio: 488.6 / 229.91;
  flex: none;
  background: linear-gradient(90deg, #ff9ec5, #ff4fa3 58%, #ffb0cc);
  -webkit-mask: url("./assets/sparkling-g-and-q.svg") center / contain no-repeat;
  mask: url("./assets/sparkling-g-and-q.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 24px rgba(255, 79, 163, 0.24));
}

.stitch-home .gq-symbol {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--home-night-pink);
  font-size: clamp(18px, 4.8vw, 24px);
  filter: drop-shadow(0 0 10px rgba(21, 18, 24, 0.78)) drop-shadow(0 0 14px rgba(255, 176, 204, 0.22));
  pointer-events: none;
  user-select: none;
}

.stitch-home .gq-symbol.sparkle {
  left: 24%;
  top: 38%;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.stitch-home .gq-symbol.moon {
  right: 23.5%;
  top: 35.8%;
  transform: translate(50%, -50%) rotate(-12deg);
  font-size: clamp(21px, 5.4vw, 27px);
}

.stitch-home .home-tagline.zh {
  margin: 22px 0 12px;
  color: rgba(238, 231, 239, 0.92);
  font-family: Literata, "Songti SC", "STSong", serif;
  font-size: clamp(20px, 5vw, 23px);
  font-style: italic;
  line-height: 1.5;
  letter-spacing: 0;
}

.stitch-home .anniversary-meta {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 0;
  border-top: 1px solid rgba(255, 176, 204, 0.08);
  padding-top: 14px;
  color: var(--home-night-muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stitch-home .anniversary-meta strong {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-left: auto;
  color: var(--home-night-pink);
  font-family: "SparklingDigits", Inter, "PingFang SC", sans-serif;
  font-size: clamp(38px, 10vw, 48px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.8;
}

.stitch-home .anniversary-meta small {
  margin: 0 0 2px;
  color: var(--home-night-muted);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.stitch-home .home-card {
  border: 1px solid rgba(255, 176, 204, 0.11);
  background: rgba(24, 23, 28, 0.72);
  box-shadow: 0 0 0 5px rgba(255, 79, 163, 0.025), 0 20px 56px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.stitch-home .welcome-card {
  width: min(94%, 382px);
  margin: 0 auto 38px;
  padding: 17px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 176, 204, 0.035), transparent 42%), rgba(28, 27, 32, 0.9);
}

.stitch-home .welcome-card p {
  margin: 0;
  color: rgba(238, 231, 239, 0.9);
  font-family: Literata, "Songti SC", "STSong", serif;
  font-size: clamp(14px, 3.8vw, 15.5px);
  font-style: normal;
  line-height: 1.72;
  letter-spacing: 0.02em;
  text-align: left;
}

.stitch-home .welcome-card footer {
  margin-top: 14px;
  color: var(--home-night-pink);
  font-family: Literata, "Songti SC", "STSong", serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: right;
}

.stitch-home .proactive-home-card {
  display: block;
  margin: 0 0 30px;
}

.stitch-home .proactive-note-list {
  display: block;
}

.stitch-home .proactive-envelope-home {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 176, 204, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 176, 204, 0.045), transparent 62%), rgba(17, 15, 20, 0.78);
  box-shadow: 0 24px 60px rgba(255, 79, 163, 0.08), 0 22px 54px rgba(0, 0, 0, 0.32);
  color: inherit;
  text-align: left;
  padding: 22px 18px 20px;
  overflow: hidden;
}

.stitch-home .proactive-envelope-home::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 176, 204, 0.45), rgba(255, 79, 163, 0.18));
}

.stitch-home .proactive-home-top,
.stitch-home .proactive-home-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(223, 190, 200, 0.76);
  font-family: "Avenir Next", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stitch-home .proactive-home-top small,
.stitch-home .proactive-home-foot small {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  opacity: 0.96;
  white-space: nowrap;
  color: inherit;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.stitch-home .proactive-home-top i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 176, 204, 0.09);
  color: var(--home-night-pink);
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-style: normal;
}

.stitch-home .proactive-home-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 22px 0;
  color: rgba(238, 231, 239, 0.9);
  font-family: Literata, "Songti SC", "STSong", serif;
  font-size: clamp(17px, 4.8vw, 19px);
  font-style: italic;
  line-height: 1.75;
}

.stitch-home .proactive-home-foot small:first-child::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(255, 176, 204, 0.42);
  vertical-align: 1px;
}

.stitch-home .proactive-paper-home {
  position: relative;
  border: 1px solid rgba(255, 176, 204, 0.25);
  border-radius: 13px;
  background: radial-gradient(circle at 86% 24%, rgba(255, 176, 204, 0.26), transparent 34%), linear-gradient(135deg, #fffdf1 0%, #ffe9ef 100%);
  box-shadow: 0 18px 48px rgba(63, 42, 50, 0.16), 0 6px 16px rgba(0, 0, 0, 0.08);
  color: #3f2a32;
  padding: 28px 22px 24px;
}

.stitch-home .proactive-paper-home header small {
  color: rgba(63, 42, 50, 0.55);
}

.stitch-home .proactive-paper-home p {
  margin: 28px 0 26px;
  color: #4a343d;
  font-family: Literata, "Songti SC", "STSong", serif;
  font-size: clamp(17px, 4.8vw, 21px);
  font-style: italic;
  line-height: 1.9;
}

.stitch-home .proactive-paper-home .proactive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 9px;
  width: min(100%, 360px);
  margin: 0 auto 20px;
}

.stitch-home .proactive-paper-home .proactive-actions button {
  min-height: 34px;
  border: 1px solid rgba(183, 4, 108, 0.72);
  border-radius: 999px;
  background: transparent;
  color: rgba(74, 52, 61, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.stitch-home .today-schedule-card {
  margin-top: 0;
  border-radius: 16px;
  background: rgba(18, 17, 21, 0.72);
  padding: 24px 22px 22px;
  box-shadow: none;
}

.stitch-home .today-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.stitch-home .today-card-head .calendar-mark {
  color: var(--home-night-pink);
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.stitch-home .today-card-head strong {
  color: rgba(255, 248, 252, 0.94);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.stitch-home .today-card-head span:last-child {
  margin-left: auto;
  color: rgba(223, 190, 200, 0.48);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.stitch-home .today-group {
  margin-bottom: 22px;
}

.stitch-home .today-group-label {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 176, 204, 0.55);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stitch-home .event-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  gap: 12px;
  border: 1px solid rgba(255, 176, 204, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px 13px;
  margin-bottom: 8px;
}

.stitch-home .event-row:last-child {
  margin-bottom: 0;
}

.stitch-home .event-tag-dot {
  justify-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tag-color);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.035);
}

.stitch-home .event-row strong,
.stitch-home .memo-row strong {
  color: rgba(255, 248, 252, 0.92);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.stitch-home .event-row .pill {
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 176, 204, 0.15);
  color: var(--home-night-pink);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.stitch-home .memo-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 0;
}

.stitch-home .memo-row.done {
  opacity: 0.55;
}

.stitch-home .memo-check {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(223, 190, 200, 0.55);
  border-radius: 50%;
  background: transparent;
  padding: 0;
}

.stitch-home .memo-row.done .memo-check {
  border-color: var(--home-night-pink);
  background: var(--home-night-pink);
}

.stitch-home .memo-time,
.stitch-home .today-empty-row {
  color: rgba(223, 190, 200, 0.58);
  font-size: 13px;
}

.stitch-home .today-add {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 248, 252, 0.72);
  border-radius: 9px;
  background: transparent;
  color: rgba(223, 190, 200, 0.62);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.stitch-home .bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  width: min(346px, calc(100% - 48px));
  height: 68px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 999px;
  background: rgba(16, 14, 19, 0.94);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42), inset 0 0 18px rgba(255, 176, 204, 0.02);
  padding: 0;
  backdrop-filter: none;
}

.stitch-home .bottom-nav button {
  display: grid;
  place-items: center;
  height: 100%;
  border: 0;
  background: transparent;
  color: rgba(223, 190, 200, 0.8);
  padding: 0;
}

.stitch-home .bottom-nav small {
  display: none;
}

.stitch-home .bottom-nav span.material-symbols-outlined {
  display: block;
  width: auto;
  height: auto;
  font-size: 24px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.stitch-home .bottom-nav button.active {
  color: var(--home-night-pink);
}

.stitch-home .bottom-nav .chat-orb {
  width: 54px;
  height: 54px;
  justify-self: center;
  transform: none;
  border-radius: 50%;
  background: #d93b87;
  color: #fff8fb;
  box-shadow: 0 0 24px rgba(255, 79, 163, 0.42);
}

.stitch-home .bottom-nav .chat-orb span.material-symbols-outlined {
  font-size: 25px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

body .bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  width: min(346px, calc(100% - 48px));
  height: 68px;
  min-height: 0;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 999px;
  background: rgba(16, 14, 19, 0.94);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.42), inset 0 0 18px rgba(255, 176, 204, 0.02);
  padding: 0;
  backdrop-filter: none;
  overflow: hidden;
}

body .bottom-nav button,
body .bottom-nav button:not(.chat-orb) {
  display: grid;
  place-items: center;
  height: 100%;
  grid-template-rows: auto;
  border: 0;
  background: transparent;
  color: rgba(223, 190, 200, 0.8);
  padding: 0;
  transform: none;
}

body .bottom-nav small,
body .bottom-nav .chat-orb small {
  display: none;
}

body .bottom-nav span.material-symbols-outlined,
body .bottom-nav button:not(.chat-orb) span.material-symbols-outlined {
  display: block;
  width: auto;
  height: auto;
  font-size: 24px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

body .bottom-nav button.active {
  color: var(--home-night-pink, #ffb0cc);
}

body .bottom-nav .chat-orb {
  display: grid !important;
  place-items: center !important;
  width: 54px;
  height: 54px;
  justify-self: center;
  align-self: center;
  transform: none !important;
  border-radius: 50%;
  background: #d93b87;
  color: #fff8fb;
  box-shadow: 0 0 18px rgba(255, 79, 163, 0.34);
  overflow: hidden;
}

body .bottom-nav .chat-orb span.material-symbols-outlined {
  display: block !important;
  font-size: 25px;
  color: currentColor;
  background: transparent;
  box-shadow: none;
  transform: none !important;
  line-height: 1 !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

@media (max-width: 640px) {
  body .bottom-nav .chat-orb span.material-symbols-outlined {
    transform: translateY(2px) !important;
  }
}

body .bottom-nav .chat-orb.active {
  background: #e24392;
  color: #fff;
}

.setting-control-shell.home-shell {
  --setting-eraser: #f6a6c2;
  --setting-eraser-bright: #ffb7d0;
  --setting-line: rgba(246, 166, 194, 0.13);
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 86px 16px calc(var(--bottom-nav-space) + 30px);
  background:
    radial-gradient(circle at 74% 0%, rgba(246, 166, 194, 0.10), transparent 34%),
    radial-gradient(circle at 8% 96%, rgba(255, 177, 199, 0.045), transparent 32%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: #e7e0e8;
}

.setting-control-head {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 86px;
  width: min(430px, 100%);
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(17, 14, 20, 0.80);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.setting-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 50%;
  background: rgba(17, 17, 22, 0.62);
  color: var(--setting-eraser-bright);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.setting-back .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.setting-control-head h2 {
  justify-self: center;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.setting-note {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 28px 0 30px;
  text-align: center;
}

.setting-note small {
  display: block;
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.setting-note p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.setting-control-section {
  display: grid;
  gap: 18px;
  margin: 0 0 34px;
}

.setting-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setting-section-title strong {
  color: rgba(246, 166, 194, 0.74);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.setting-section-title i {
  height: 1px;
  flex: 1;
  background: rgba(246, 166, 194, 0.10);
}

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

.setting-live-card {
  display: grid;
  gap: 28px;
  min-height: 188px;
  border: 1px solid var(--setting-line);
  border-radius: 18px;
  background: rgba(17, 17, 22, 0.70);
  color: #e7e0e8;
  padding: 24px;
  text-align: left;
  box-shadow: 0 0 20px rgba(246, 166, 194, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.setting-live-card:hover {
  border-color: rgba(246, 166, 194, 0.30);
}

.setting-live-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 40px;
}

.setting-live-icon {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.13);
  color: var(--setting-eraser);
  font-size: 22px !important;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" 0, "opsz" 24;
}

.setting-live-top small {
  color: rgba(223, 190, 200, 0.42);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.setting-pulse-dots {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.setting-pulse-dots b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--setting-eraser);
  box-shadow: 0 0 10px rgba(246, 166, 194, 0.56);
}

.setting-pulse-dots b + b {
  opacity: 0.32;
}

.setting-live-copy strong {
  display: block;
  color: rgba(247, 237, 243, 0.94);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
}

.setting-live-copy small {
  display: block;
  margin-top: 10px;
  color: rgba(223, 190, 200, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.setting-live-action {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--setting-eraser-bright);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.setting-live-action b {
  font-weight: 700;
}

.setting-live-action .material-symbols-outlined {
  font-size: 15px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 16;
}

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

.setting-room-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  border: 1px solid rgba(246, 166, 194, 0.09);
  border-radius: 18px;
  background: rgba(17, 17, 22, 0.54);
  padding: 16px 18px;
  opacity: 0.48;
  filter: saturate(0.65);
}

button.setting-room-card.setting-theme-entry {
  width: 100%;
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.setting-room-card.setting-theme-entry.active {
  border-color: rgba(246, 166, 194, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    rgba(17, 17, 22, 0.72);
  opacity: 1;
  filter: none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.012);
}

button.setting-room-card.setting-theme-entry.active:hover {
  border-color: rgba(246, 166, 194, 0.32);
}

.setting-room-icon {
  display: grid !important;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(223, 190, 200, 0.12);
  border-radius: 50%;
  color: rgba(223, 190, 200, 0.62);
  font-size: 22px !important;
  font-variation-settings: "FILL" 0, "wght" 260, "GRAD" 0, "opsz" 24;
}

.setting-theme-entry .setting-room-copy {
  justify-self: stretch;
  text-align: left;
}

button.setting-room-card.setting-theme-entry.active .setting-room-icon {
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(246, 166, 194, 0.08);
  color: #f6a6c2;
}

button.setting-room-card.setting-theme-entry.active .setting-room-copy strong {
  color: rgba(247, 237, 243, 0.92);
}

button.setting-room-card.setting-theme-entry.active .setting-room-copy small {
  color: rgba(223, 190, 200, 0.66);
}

button.setting-room-card.setting-theme-entry.active .setting-room-copy em,
button.setting-room-card.setting-theme-entry.active .setting-room-end {
  color: #ffb7d0;
}

.setting-theme-svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke-width: 1.35;
}

.setting-room-copy strong,
.setting-room-copy small,
.setting-room-copy em {
  display: block;
}

.setting-room-copy strong {
  color: rgba(231, 224, 232, 0.82);
  font-size: 16px;
  font-weight: 600;
}

.setting-room-copy small {
  margin-top: 3px;
  color: rgba(223, 190, 200, 0.42);
  font-size: 12px;
}

.setting-room-copy em {
  margin-top: 5px;
  color: rgba(223, 190, 200, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.setting-room-end {
  color: rgba(223, 190, 200, 0.36);
  font-size: 20px !important;
  font-variation-settings: "FILL" 0, "wght" 260, "GRAD" 0, "opsz" 20;
}

.setting-meta {
  margin: auto 0 0;
  padding: 18px 0 6px;
  color: rgba(223, 190, 200, 0.30);
  text-align: center;
  user-select: none;
}

.setting-meta p {
  margin: 0 0 10px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.setting-meta span {
  font-family: "GHomeNoteHand", Georgia, "Songti SC", serif;
  font-size: 14px;
  font-style: normal;
}

@media (min-width: 760px) {
  .setting-control-shell.home-shell {
    width: min(430px, calc(100% - 40px));
  }
}

@media (max-width: 360px) {
  .setting-live-grid {
    grid-template-columns: 1fr;
  }
}

.more-control-shell.home-shell {
  --more-eraser: #f6a6c2;
  --more-eraser-bright: #ffb7d0;
  --more-eraser-soft: rgba(246, 166, 194, 0.13);
  --more-eraser-line: rgba(246, 166, 194, 0.18);
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 86px 16px calc(var(--bottom-nav-space) + 30px);
  background:
    radial-gradient(circle at 60% 6%, rgba(246, 166, 194, 0.10), transparent 32%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: #e7e0e8;
}

.more-control-head {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 86px;
  width: min(430px, 100%);
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(17, 14, 20, 0.80);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.more-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 50%;
  background: rgba(17, 17, 22, 0.62);
  color: var(--more-eraser-bright);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.more-back .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.more-control-head h2 {
  justify-self: center;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.more-poem {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 28px 0 30px;
  text-align: center;
}

.more-poem small {
  display: block;
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.more-poem p {
  display: block;
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.more-control-section {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
}

.more-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

.more-section-title strong {
  color: rgba(246, 166, 194, 0.74);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.more-section-title i {
  height: 1px;
  flex: 1;
  background: rgba(246, 166, 194, 0.12);
}

.more-section-title.muted strong {
  color: rgba(223, 190, 200, 0.36);
}

.more-section-title.muted i {
  background: rgba(223, 190, 200, 0.06);
}

.more-routine-list,
.more-reserved-list {
  display: grid;
  gap: 16px;
}

.more-line-card,
.more-senses-card,
.more-square-card,
.more-reserved-card {
  position: relative;
  border: 1px solid rgba(246, 166, 194, 0.13);
  background: rgba(17, 17, 22, 0.70);
  color: #e7e0e8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(16px);
}

.more-line-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
}

.more-line-card:hover,
.more-square-card:hover,
.more-senses-card:hover {
  border-color: rgba(246, 166, 194, 0.30);
}

.more-card-icon {
  display: grid !important;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--more-eraser-soft);
  color: var(--more-eraser);
  font-size: 23px !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.more-line-card.accent-lavender .more-card-icon {
  background: rgba(210, 187, 255, 0.16);
  color: #d2bbff;
}

.more-line-card.accent-rose .more-card-icon {
  background: rgba(246, 166, 194, 0.18);
  color: #ffb7d0;
}

.more-line-card.accent-gold .more-card-icon {
  background: rgba(245, 194, 102, 0.18);
  color: #f7c979;
}

.more-line-card.accent-blue .more-card-icon {
  background: rgba(125, 183, 255, 0.18);
  color: #9dccff;
}

.more-card-icon.svg-icon {
  font-size: 0 !important;
}

.more-card-icon.svg-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.more-card-copy strong,
.more-square-card strong,
.more-senses-card strong,
.more-reserved-card strong {
  display: block;
  color: rgba(247, 237, 243, 0.94);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}

.more-card-copy small,
.more-square-card small,
.more-senses-card small,
.more-reserved-card small {
  display: block;
  margin-top: 4px;
  color: rgba(223, 190, 200, 0.54);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.more-card-badge,
.more-reserved-card b {
  justify-self: end;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.13);
  color: var(--more-eraser-bright);
  padding: 4px 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.more-card-chevron {
  color: rgba(223, 190, 200, 0.38);
  font-size: 20px !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.more-square-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.more-square-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 10px;
  padding: 28px 22px 22px;
  text-align: left;
}

.more-square-icon {
  color: var(--more-eraser);
  font-size: 30px !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 32;
}

.more-square-icon.filled {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 32;
}

.more-senses-card {
  display: grid;
  gap: 8px;
  min-height: 158px;
  overflow: hidden;
  border-radius: 12px;
  padding: 28px 24px 22px;
  text-align: left;
}

.more-senses-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -46px auto;
  width: 190px;
  height: 120px;
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.055);
  filter: blur(34px);
  pointer-events: none;
}

.more-senses-light {
  position: absolute;
  top: 26px;
  right: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--more-eraser-bright);
  box-shadow: 0 0 14px rgba(246, 166, 194, 0.58);
}

.more-senses-card strong {
  font-size: 19px;
}

.more-senses-row {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}

.more-senses-row i {
  display: grid;
  gap: 5px;
  justify-items: center;
  color: rgba(246, 166, 194, 0.82);
  font-style: normal;
}

.more-senses-row i.muted {
  color: rgba(223, 190, 200, 0.34);
}

.more-senses-row .material-symbols-outlined {
  font-size: 19px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.more-senses-row b {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.more-coming-section {
  margin-top: 6px;
}

.more-reserved-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  border-radius: 10px;
  padding: 16px 18px;
  opacity: 0.62;
}

.more-reserved-card > .material-symbols-outlined {
  color: rgba(223, 190, 200, 0.55);
  font-size: 21px;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" 0, "opsz" 22;
}

.more-reserved-card strong {
  color: rgba(231, 224, 232, 0.62);
}

.more-reserved-card small {
  color: rgba(223, 190, 200, 0.28);
}

.more-reserved-card b {
  background: rgba(255, 255, 255, 0.025);
  color: rgba(223, 190, 200, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 204, 0.08);
}

@media (min-width: 760px) {
  .more-control-shell.home-shell {
    width: min(430px, calc(100% - 40px));
  }
}

@media (max-width: 420px) {
  .more-control-shell.home-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .more-line-card {
    grid-template-columns: 48px minmax(0, 1fr) auto 16px;
    gap: 12px;
    padding: 15px;
  }

  .more-card-badge {
    font-size: 8px;
    padding: 4px 7px;
  }
}

.stitch-home .home-quiet-line {
  margin-top: 18px;
  color: rgba(247, 237, 243, 0.28);
}

@media (min-width: 760px) {
  .stitch-home.home-shell {
    width: min(430px, calc(100% - 40px));
    padding-top: 28px;
  }
}

/* Chat bag mobile compact lock: keep it as a little bag, not a full-screen drawer. */
@media (max-width: 620px) {
  .chat-bridge-panel {
    align-items: center !important;
    justify-content: center !important;
    min-height: 100svh !important;
    height: 100dvh !important;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
  }

  .chat-bag-sheet {
    width: min(360px, calc(100vw - 32px)) !important;
    height: auto !important;
    max-height: min(620px, calc(100dvh - 72px)) !important;
    min-height: 0 !important;
    border-radius: 22px !important;
  }

  .chat-bag-sheet > header {
    padding: 16px 18px !important;
  }

  .chat-bag-sheet h2 {
    font-size: 18px !important;
  }

  .chat-bag-sheet h2 small {
    font-size: 12px !important;
    margin-left: 6px !important;
  }

  .chat-bag-sheet > header > button {
    width: 32px !important;
    height: 32px !important;
  }

  .chat-bag-content {
    flex: 0 1 auto !important;
    max-height: calc(100dvh - 176px) !important;
    padding: 14px !important;
    padding-bottom: 16px !important;
  }

  .chat-bag-content .bridge-card-kicker {
    margin-bottom: 8px !important;
    font-size: 9px !important;
  }

  .chat-bag-content .bridge-card > p {
    margin-bottom: 12px !important;
    padding: 14px !important;
    font-size: 13px !important;
    line-height: 1.58 !important;
  }

  .chat-bag-content .bridge-layers {
    gap: 7px !important;
  }

  .chat-bag-content .bridge-layers span {
    padding: 8px 11px !important;
    font-size: 12px !important;
  }
}

/* Calendar final lock: placed last so legacy/mobile calendar rules cannot drift. */
@media (min-width: 760px) {
  .calendar-control-shell.home-shell {
    width: min(430px, calc(100% - 40px));
  }
}

@media (max-width: 560px) {
  .calendar-control-shell.home-shell {
    padding: 42px 16px calc(var(--bottom-nav-space) + 30px);
  }

  .calendar-control-shell .calendar-control-head {
    margin-bottom: 30px;
  }

  .calendar-control-shell .calendar-control-head h2 {
    font-size: 32px;
  }

  .calendar-control-shell .calendar-preview {
    margin-left: 0;
    margin-right: 0;
    padding: 16px 12px 18px;
  }

  .calendar-control-shell .month-grid.calendar-month {
    gap: 4px;
  }

  .calendar-control-shell .calendar-weekdays,
  .calendar-control-shell .calendar-week {
    gap: 4px;
  }

  .calendar-control-shell .calendar-week {
    grid-auto-rows: 84px;
  }

  .calendar-control-shell .month-day {
    min-height: 84px;
    border-color: rgba(246, 166, 194, 0.07);
    background: rgba(255, 255, 255, 0.018);
  }

  .calendar-control-shell .month-day > span {
    color: rgba(255, 214, 235, 0.78) !important;
  }

  .calendar-control-shell .calendar-span-bar {
    margin-top: 31px;
    padding: 2px 4px;
    font-size: 9px;
  }

  .calendar-control-shell .calendar-span-bar.lane-1 {
    margin-top: 45px;
  }

  .calendar-control-shell .calendar-span-bar.lane-2 {
    margin-top: 59px;
  }

  .calendar-control-shell .calendar-span-bar.lane-3 {
    margin-top: 73px;
  }

  .calendar-control-shell .calendar-switches {
    grid-template-columns: 1fr;
  }
}

/* Calendar stitch visual lock: use the provided stitched calendar language. */
.calendar-control-shell.home-shell {
  --calendar-bg: #0f0d12;
  --calendar-card: #121015;
  --calendar-card-soft: rgba(31, 24, 31, 0.78);
  --calendar-line: rgba(246, 166, 194, 0.18);
  --calendar-line-hot: rgba(246, 166, 194, 0.34);
  --calendar-text: rgba(247, 237, 243, 0.94);
  --calendar-muted: rgba(223, 190, 200, 0.66);
  --calendar-dim: rgba(223, 190, 200, 0.42);
  --calendar-pink: #f6a6c2;
  --calendar-hot: #ef3f97;
  background:
    radial-gradient(circle at 72% -4%, rgba(246, 166, 194, 0.12), transparent 32%),
    radial-gradient(circle at 6% 58%, rgba(148, 93, 169, 0.08), transparent 34%),
    linear-gradient(180deg, #151116 0%, #0f0d12 100%);
}

.calendar-control-head {
  margin-bottom: 10px;
}

.calendar-control-head h2 {
  font-size: 31px;
  letter-spacing: -0.045em;
}

.calendar-note-pill {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  max-width: min(320px, calc(100% - 64px));
  min-height: 44px;
  margin: -10px auto -8px;
  padding: 0 22px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(58, 49, 57, 0.78);
  color: rgba(247, 237, 243, 0.82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  font-size: 13px;
}

.calendar-note-pill .material-symbols-outlined {
  color: var(--calendar-pink);
  font-size: 17px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.calendar-note-pill strong {
  color: rgba(255, 242, 249, 0.9);
  font-weight: 700;
}

.calendar-note-pill span:last-child {
  color: rgba(223, 190, 200, 0.76);
}

.calendar-control-shell .calendar-preview,
.calendar-control-shell .calendar-editor,
.calendar-control-shell .calendar-agenda {
  border: 1px solid var(--calendar-line);
  border-radius: 28px;
  background: rgba(18, 16, 21, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    0 22px 60px rgba(0, 0, 0, 0.24);
}

.calendar-control-shell .calendar-preview {
  padding: 24px 20px 26px;
}

.calendar-control-shell .calendar-preview header,
.calendar-control-shell .calendar-agenda header,
.calendar-control-shell .memo-section-head {
  gap: 16px;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) strong,
.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .memo-section-head strong {
  color: var(--calendar-text);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) span,
.calendar-control-shell .calendar-agenda header span,
.calendar-control-shell .memo-section-head small {
  color: var(--calendar-muted) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.calendar-control-shell .home-icon.material-symbols-outlined {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(246, 166, 194, 0.10);
  color: var(--calendar-pink);
  font-size: 26px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 28;
}

.calendar-control-shell .calendar-month-actions {
  gap: 10px;
}

.calendar-control-shell .calendar-month-actions button {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(246, 166, 194, 0.17);
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.07);
  color: rgba(246, 166, 194, 0.86);
  font-size: 25px;
}

.calendar-control-shell .month-grid.calendar-month {
  gap: 10px;
  margin-top: 28px;
}

.calendar-control-shell .calendar-weekdays,
.calendar-control-shell .calendar-week {
  gap: 10px;
}

.calendar-control-shell .calendar-week {
  grid-auto-rows: 166px;
}

.calendar-control-shell .calendar-weekdays b {
  color: rgba(246, 207, 225, 0.82) !important;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.calendar-control-shell .month-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 166px;
  padding: 16px 8px 12px;
  border: 1px solid rgba(246, 166, 194, 0.11);
  border-radius: 18px;
  background: rgba(17, 15, 20, 0.76);
  overflow: hidden;
}

.calendar-control-shell .month-day > span:first-child {
  display: block;
  margin: 0 auto 10px;
  color: rgba(246, 207, 225, 0.82) !important;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.calendar-control-shell .month-day.selected {
  border-color: rgba(246, 166, 194, 0.44);
  background: rgba(42, 27, 38, 0.78);
}

.calendar-control-shell .month-day.today {
  border-color: rgba(246, 166, 194, 0.30);
  background: rgba(246, 166, 194, 0.08);
}

.calendar-control-shell .calendar-day-chips {
  display: grid;
  gap: 5px;
  margin: 16px 0 8px;
  min-height: 0;
}

.calendar-control-shell .calendar-day-chip {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px 5px;
  border-left: 2px solid var(--tag-color, var(--calendar-pink));
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color, var(--calendar-pink)), #17131b 68%);
  color: rgba(247, 237, 243, 0.88);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-control-shell .calendar-span-bar {
  display: block;
  z-index: 3;
  align-self: start;
  height: 5px;
  min-height: 0;
  margin: 42px 8px 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color, var(--calendar-pink)), transparent 24%);
  padding: 0;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--tag-color, var(--calendar-pink)), transparent 72%);
}

.calendar-control-shell .calendar-span-bar.lane-1 {
  margin-top: 52px;
}

.calendar-control-shell .calendar-span-bar.lane-2 {
  margin-top: 62px;
}

.calendar-control-shell .calendar-span-bar.lane-3 {
  margin-top: 72px;
}

.calendar-control-shell .month-day em {
  position: static;
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
  min-height: 8px;
}

.calendar-control-shell .month-day em i {
  width: 7px;
  height: 7px;
  opacity: 0.92;
}

.calendar-control-shell .calendar-editor {
  padding: 26px 28px 28px;
}

.calendar-control-shell .calendar-editor .memo-section-head {
  padding: 0;
}

.calendar-control-shell .calendar-editor .memo-section-head > b {
  margin-left: auto;
  color: var(--calendar-muted);
  font-size: 28px;
  font-weight: 400;
}

.calendar-control-shell .calendar-form {
  gap: 18px;
  margin-top: 26px;
}

.calendar-control-shell .calendar-form input,
.calendar-control-shell .calendar-form textarea {
  min-height: 84px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 28px;
  background: rgba(7, 7, 12, 0.70);
  color: var(--calendar-text);
  padding: 20px 24px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 400;
}

.calendar-control-shell .calendar-form textarea {
  min-height: 116px;
}

.calendar-control-shell .calendar-form-grid {
  gap: 16px;
}

.calendar-control-shell .calendar-form-grid span {
  color: rgba(246, 166, 194, 0.62) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.calendar-control-shell .calendar-form-grid input,
.calendar-control-shell .calendar-form-grid .memo-picker-trigger {
  min-height: 90px;
  border-radius: 26px;
}

.calendar-control-shell .calendar-form-grid input[type="text"] {
  color: rgba(223, 190, 200, 0.58);
  font-size: 22px;
}

.calendar-control-shell .calendar-form-grid .memo-picker-trigger strong {
  color: var(--calendar-text);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: capitalize;
}

.calendar-control-shell .calendar-switches {
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 16px;
}

.calendar-control-shell .calendar-switches > button,
.calendar-control-shell .calendar-inline-picker .memo-picker-trigger {
  min-height: 66px;
  border-radius: 24px;
  border-color: rgba(246, 166, 194, 0.18);
  background: rgba(7, 7, 12, 0.72);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.calendar-control-shell .calendar-switches > button.active {
  border-color: rgba(246, 166, 194, 0.46);
  background: rgba(246, 166, 194, 0.16);
}

.calendar-control-shell .calendar-form-actions {
  margin-top: 8px;
}

.calendar-control-shell .calendar-form-actions .memo-add {
  min-height: 74px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f34aa2, #c51f72);
  color: #fff8fb;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 18px;
  letter-spacing: 0.22em;
  box-shadow: 0 18px 40px rgba(239, 63, 151, 0.28);
}

.calendar-control-shell .calendar-agenda {
  padding: 26px 28px 28px;
}

.calendar-control-shell .calendar-agenda-list {
  margin-top: 24px;
}

.calendar-control-shell .calendar-agenda-empty {
  padding: 8px 0 8px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.58);
  font-size: 15px;
  line-height: 1.7;
}

.calendar-control-shell .calendar-agenda-item {
  min-height: 96px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 20px 0;
}

.calendar-control-shell .calendar-agenda-item strong {
  font-size: 22px;
  font-weight: 600;
}

.calendar-control-shell .calendar-agenda-item small {
  margin-top: 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.20em;
}

.calendar-control-shell .calendar-agenda-item b {
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--calendar-pink);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.calendar-control-shell .calendar-edit-pill {
  width: 46px;
  height: 46px;
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(246, 166, 194, 0.08);
  color: var(--calendar-pink);
}

.memo-edit-modal {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid rgba(239, 63, 151, 0.42);
  border-radius: 30px;
  background:
    radial-gradient(circle at 45% 8%, rgba(246, 166, 194, 0.10), transparent 32%),
    rgba(15, 13, 18, 0.96);
  color: var(--calendar-text, rgba(247, 237, 243, 0.94));
  padding: 34px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.memo-edit-modal h3 {
  margin: 0 0 28px;
  color: rgba(247, 237, 243, 0.96);
  font-size: 30px;
  font-weight: 800;
}

.memo-edit-modal .field span,
.memo-edit-grid > div > strong,
.memo-edit-datetime-row .field span {
  color: rgba(223, 190, 200, 0.64);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.memo-edit-modal input,
.memo-edit-modal textarea {
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 24px;
  background: rgba(42, 18, 33, 0.62);
  color: rgba(247, 237, 243, 0.94);
  font-size: 20px;
}

.memo-edit-grid > div > label {
  border-color: rgba(246, 166, 194, 0.28);
  background: rgba(246, 166, 194, 0.08);
  color: rgba(223, 190, 200, 0.82);
}

.memo-edit-grid > div > label:has(input:checked) {
  border-color: rgba(239, 63, 151, 0.72);
  background: rgba(239, 63, 151, 0.16);
  color: rgba(247, 237, 243, 0.96);
}

@media (max-width: 620px) {
  .calendar-control-shell .calendar-preview,
  .calendar-control-shell .calendar-editor,
  .calendar-control-shell .calendar-agenda {
    border-radius: 26px;
  }

  .calendar-control-shell .calendar-preview {
    padding: 22px 16px 24px;
  }

  .calendar-control-shell .calendar-preview header {
    grid-template-columns: auto 1fr;
    display: grid;
  }

  .calendar-control-shell .calendar-month-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 10px;
  }

  .calendar-control-shell .calendar-week {
    grid-auto-rows: 126px;
  }

  .calendar-control-shell .month-day {
    min-height: 126px;
    padding: 12px 5px 9px;
    border-radius: 16px;
  }

  .calendar-control-shell .calendar-day-chip {
    padding: 4px 6px;
    font-size: 10px;
  }

  .calendar-control-shell .calendar-day-chips {
    margin-top: 14px;
  }

  .calendar-control-shell .calendar-form-grid,
  .calendar-control-shell .calendar-switches {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-control-shell .calendar-switches > button {
    grid-column: span 2;
  }

  .calendar-control-shell .calendar-form input,
  .calendar-control-shell .calendar-form textarea {
    font-size: 16px;
  }

  .calendar-control-shell .calendar-agenda-item strong {
    font-size: 19px;
  }
}

/* Calendar compact correction: square month, quiet dots, Today-sized text. */
.calendar-control-shell .calendar-preview {
  padding: 18px 16px 20px;
}

.calendar-control-shell .calendar-preview header,
.calendar-control-shell .calendar-agenda header,
.calendar-control-shell .memo-section-head {
  gap: 12px;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) strong,
.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .memo-section-head strong {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.22em;
  line-height: 1.35;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) span,
.calendar-control-shell .calendar-agenda header span,
.calendar-control-shell .memo-section-head small {
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.45;
}

.calendar-control-shell .home-icon.material-symbols-outlined {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 21px;
}

.calendar-control-shell .calendar-month-actions {
  gap: 8px;
}

.calendar-control-shell .calendar-month-actions button {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.calendar-control-shell .month-grid.calendar-month {
  gap: 7px;
  margin-top: 20px;
}

.calendar-control-shell .calendar-weekdays,
.calendar-control-shell .calendar-week {
  gap: 7px;
}

.calendar-control-shell .calendar-week {
  grid-auto-rows: auto;
  align-items: stretch;
}

.calendar-control-shell .month-day {
  min-height: 0;
  aspect-ratio: 1 / 1;
  z-index: 4;
  padding: 9px 5px 7px;
  border-radius: 14px;
}

.calendar-control-shell .month-day > span:first-child {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 700;
}

.calendar-control-shell .calendar-day-chips,
.calendar-control-shell .calendar-day-chip {
  display: none !important;
}

.calendar-control-shell .calendar-span-bar {
  height: 4px;
  z-index: 2;
  margin: 30px 6px 0;
  opacity: 0.95;
}

.calendar-control-shell .calendar-span-bar.lane-1 {
  margin-top: 37px;
}

.calendar-control-shell .calendar-span-bar.lane-2 {
  margin-top: 44px;
}

.calendar-control-shell .calendar-span-bar.lane-3 {
  margin-top: 51px;
}

.calendar-control-shell .month-day em {
  gap: 4px;
  min-height: 6px;
}

.calendar-control-shell .month-day em i {
  width: 5px;
  height: 5px;
}

.calendar-control-shell .month-day em small {
  display: none;
}

.calendar-control-shell .birthday-mark {
  top: auto;
  right: auto;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 13px;
}

.calendar-control-shell .calendar-editor,
.calendar-control-shell .calendar-agenda {
  padding: 18px 16px 20px;
  border-radius: 24px;
}

.calendar-control-shell .calendar-editor .memo-section-head > b {
  font-size: 22px;
}

.calendar-control-shell .calendar-form {
  gap: 12px;
  margin-top: 16px;
}

.calendar-control-shell .calendar-form input,
.calendar-control-shell .calendar-form textarea {
  min-height: 54px;
  border-radius: 18px;
  padding: 13px 16px;
  font-size: 14px;
}

.calendar-control-shell .calendar-form textarea {
  min-height: 80px;
}

.calendar-control-shell .calendar-form-grid {
  gap: 10px;
}

.calendar-control-shell .calendar-form-grid span {
  font-size: 10px;
  letter-spacing: 0.22em;
}

.calendar-control-shell .calendar-form-grid input,
.calendar-control-shell .calendar-form-grid .memo-picker-trigger {
  min-height: 54px;
  border-radius: 17px;
}

.calendar-control-shell .calendar-form-grid input[type="text"] {
  font-size: 15px;
}

.calendar-control-shell .calendar-form-grid .memo-picker-trigger strong {
  font-size: 12px;
}

.calendar-control-shell .calendar-switches {
  gap: 10px;
}

.calendar-control-shell .calendar-switches > button,
.calendar-control-shell .calendar-inline-picker .memo-picker-trigger {
  min-height: 46px;
  border-radius: 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.calendar-control-shell .calendar-inline-picker .memo-picker-panel {
  min-width: 150px;
  padding: 8px;
  border-radius: 16px;
}

.calendar-control-shell .calendar-inline-picker .memo-picker-panel button {
  padding: 7px 10px;
  font-size: 11px;
}

.calendar-control-shell .calendar-form-actions {
  margin-top: 2px;
}

.calendar-control-shell .calendar-form-actions .memo-add {
  min-height: 52px;
  border-radius: 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  box-shadow: 0 12px 28px rgba(239, 63, 151, 0.22);
}

.calendar-control-shell .calendar-form-actions .ghost {
  min-height: 52px;
  border-radius: 18px;
  font-size: 12px;
}

.calendar-control-shell .calendar-line-fields {
  display: grid;
  gap: 0;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
}

.calendar-control-shell .calendar-line-fields input,
.calendar-control-shell .calendar-line-fields textarea {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  color: rgba(247, 237, 243, 0.88);
  box-shadow: none;
}

.calendar-control-shell .calendar-line-fields input {
  font-size: 18px;
  font-weight: 400;
}

.calendar-control-shell .calendar-line-fields textarea {
  min-height: 56px;
  border-top: 1px solid rgba(246, 166, 194, 0.08);
  font-size: 14px;
}

.calendar-control-shell .calendar-all-day-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 0;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: transparent;
  color: rgba(247, 237, 243, 0.86);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.calendar-control-shell .calendar-all-day-toggle i {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.14);
}

.calendar-control-shell .calendar-all-day-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(223, 190, 200, 0.62);
  transition: transform 0.18s ease, background 0.18s ease;
}

.calendar-control-shell .calendar-all-day-toggle.active i {
  background: rgba(239, 63, 151, 0.92);
}

.calendar-control-shell .calendar-all-day-toggle.active i::after {
  transform: translateX(16px);
  background: rgba(63, 18, 46, 0.9);
}

.calendar-control-shell .calendar-chip-section {
  display: grid;
  gap: 12px;
}

.calendar-control-shell .calendar-chip-section > span {
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
}

.calendar-control-shell .calendar-chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.calendar-control-shell .calendar-chip-picker button {
  min-height: 34px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.62);
  padding: 0 16px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.calendar-control-shell .calendar-chip-picker button.active {
  border-color: rgba(246, 166, 194, 0.62);
  background: rgba(246, 166, 194, 0.10);
  color: rgba(247, 237, 243, 0.88);
}

.calendar-control-shell .calendar-agenda-list {
  margin-top: 12px;
}

.calendar-control-shell .calendar-agenda-item {
  min-height: 58px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 0;
}

.calendar-control-shell .calendar-agenda-item > span {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--tag-color), transparent 88%);
}

.calendar-control-shell .calendar-agenda-item strong {
  font-size: 15px;
  font-weight: 400;
}

.calendar-control-shell .calendar-agenda-item small {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.calendar-control-shell .calendar-agenda-item b {
  padding: 6px 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.calendar-control-shell .calendar-edit-pill {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.memo-edit-modal {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: 24px;
  padding: 22px;
}

.memo-edit-modal h3 {
  margin-bottom: 18px;
  font-size: 22px;
}

.memo-edit-modal .field span,
.memo-edit-modal .field label,
.memo-edit-grid > div > strong,
.memo-edit-grid > div > label,
.memo-edit-datetime-row .field span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.memo-edit-modal input,
.memo-edit-modal textarea {
  min-height: 50px;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 15px;
}

.memo-edit-modal textarea {
  min-height: 78px;
}

.memo-edit-grid {
  gap: 14px;
}

.memo-edit-grid > div > label {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.memo-edit-datetime-row {
  gap: 12px;
}

.memo-edit-actions {
  margin-top: 14px;
  gap: 10px;
}

.memo-edit-actions .send,
.memo-edit-actions .ghost {
  min-height: 46px;
  border-radius: 16px;
  font-size: 13px;
}

@media (max-width: 620px) {
  .memo-edit-modal {
    width: min(390px, calc(100vw - 28px));
    max-height: calc(100dvh - 36px);
    padding: 18px;
    border-radius: 22px;
  }

  .memo-edit-modal h3 {
    font-size: 19px;
    margin-bottom: 14px;
  }

  .memo-edit-grid,
  .memo-edit-datetime-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .memo-edit-grid > div > label {
    margin-bottom: 8px;
  }

  .memo-edit-grid > div > label.memory-choice {
    margin-bottom: 0;
  }
}

/* Calendar form precision pass: match Stitch's thin-line event editor. */
.calendar-control-shell .calendar-editor .home-icon.material-symbols-outlined {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--calendar-pink);
  font-size: 25px;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) strong,
.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .memo-section-head strong {
  color: rgba(247, 237, 243, 0.88);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: none;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) span,
.calendar-control-shell .calendar-agenda header span,
.calendar-control-shell .memo-section-head small,
.calendar-control-shell .calendar-form-grid span,
.calendar-control-shell .calendar-chip-section > span {
  color: rgba(223, 190, 200, 0.58) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.calendar-control-shell .calendar-form-grid {
  gap: 18px 34px;
}

.calendar-control-shell .calendar-form-grid label {
  gap: 8px;
}

.calendar-control-shell .calendar-form-grid input,
.calendar-control-shell .calendar-form-grid .memo-picker-trigger {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 0;
  background: transparent;
  padding: 0 0 8px;
  color: rgba(247, 237, 243, 0.86);
  box-shadow: none;
}

.calendar-control-shell .calendar-form-grid input:focus,
.calendar-control-shell .calendar-form-grid .memo-picker-trigger:focus-visible {
  border-bottom-color: rgba(246, 166, 194, 0.46);
  box-shadow: none;
  outline: none;
}

.calendar-control-shell .calendar-form-grid input[type="text"],
.calendar-control-shell .calendar-form-grid .memo-picker-trigger strong {
  color: rgba(247, 237, 243, 0.82);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.calendar-control-shell .calendar-form-grid .memo-picker-trigger b {
  color: rgba(223, 190, 200, 0.42);
}

.calendar-control-shell .calendar-chip-picker {
  gap: 12px 22px;
}

.calendar-control-shell .calendar-chip-picker button {
  min-height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(223, 190, 200, 0.44);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 400;
}

.calendar-control-shell .calendar-chip-picker button.active {
  border-color: rgba(246, 166, 194, 0.55);
  background: rgba(246, 166, 194, 0.08);
  color: rgba(247, 237, 243, 0.80);
}

.calendar-control-shell .calendar-all-day-toggle {
  min-height: 42px;
  color: rgba(247, 237, 243, 0.78);
  font-weight: 400;
}

.calendar-control-shell .calendar-agenda-item strong {
  font-size: 14px;
  font-weight: 400;
}

.memo-edit-modal {
  width: min(520px, calc(100vw - 28px));
  border-color: rgba(246, 166, 194, 0.24);
  background:
    radial-gradient(circle at 46% 4%, rgba(246, 166, 194, 0.06), transparent 30%),
    rgba(15, 13, 18, 0.97);
}

.memo-edit-modal h3 {
  color: rgba(247, 237, 243, 0.88);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memo-edit-modal .field label,
.memo-edit-grid > div > label,
.memo-edit-datetime-row .field label {
  color: rgba(223, 190, 200, 0.58);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.memo-edit-modal input,
.memo-edit-modal textarea {
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.86);
  padding: 8px 0 10px;
  box-shadow: none;
}

.memo-edit-modal textarea {
  min-height: 70px;
  resize: vertical;
}

.memo-edit-grid {
  gap: 20px 34px;
}

.memo-edit-grid .memory-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.memo-edit-grid .memory-choice {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.44);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 400;
}

.memo-edit-grid .memory-choice:has(input:checked) {
  border-color: rgba(246, 166, 194, 0.55);
  background: rgba(246, 166, 194, 0.08);
  color: rgba(247, 237, 243, 0.80);
}

.memo-edit-datetime-row input {
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 0;
  background: transparent;
}

/* Memo edit chip fix: remove the accidental double-pill inheritance. */
.memo-edit-modal h3 {
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.memo-edit-grid .memory-choice,
.memo-edit-grid .memory-choice:has(input:checked) {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.memo-edit-grid .memory-choice span {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.46);
  padding: 0 16px;
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.memo-edit-grid .memory-choice input:checked + span {
  border-color: rgba(246, 166, 194, 0.58);
  background: rgba(246, 166, 194, 0.09);
  color: rgba(247, 237, 243, 0.84);
}

/* Calendar/detail final alignment polish. */
.calendar-control-head {
  position: relative;
  justify-content: flex-start;
}

.calendar-control-head h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 112px);
  text-align: center;
}

.calendar-back,
.setting-back,
.more-back {
  position: relative;
  z-index: 2;
}

.calendar-control-shell .calendar-editor .home-icon.material-symbols-outlined,
.calendar-control-shell .calendar-agenda .home-icon.material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--calendar-pink);
  font-size: 24px;
}

.calendar-control-shell .calendar-agenda header > div:nth-child(2) {
  display: grid;
  gap: 6px;
}

.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .memo-section-head strong {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.20em;
}

.calendar-control-shell .calendar-agenda header span,
.calendar-control-shell .memo-section-head small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.memo-edit-grid > div > label:not(.memory-choice) {
  display: grid;
  place-items: center;
  min-height: 42px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.055);
  color: rgba(223, 190, 200, 0.56);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1;
  text-align: center;
}

.memo-edit-grid .memory-chip-grid {
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
}

.memo-edit-grid .memory-choice span {
  min-height: 30px;
  padding: 0 15px;
  font-size: 12px;
  line-height: 1;
}

.memo-edit-actions {
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.memo-edit-actions .send,
.memo-edit-actions .ghost {
  width: auto;
  min-width: 104px;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
}

.memo-edit-actions .send {
  background: linear-gradient(135deg, #f4a1bd, #d16b96);
  color: #fff8fb;
}

.memo-edit-actions .ghost {
  border: 1px solid rgba(246, 166, 194, 0.26);
  background: rgba(246, 166, 194, 0.06);
  color: rgba(223, 190, 200, 0.72);
}

/* Calendar span-track correction: taller cells give cross-day bars their own lane. */
.calendar-control-shell .month-day {
  aspect-ratio: 1 / 1.5;
  z-index: 3;
  overflow: hidden;
}

.calendar-control-shell .calendar-span-bar {
  z-index: 9;
  height: 4px;
  margin: 40px 8px 0;
  opacity: 0.9;
  pointer-events: none;
}

.calendar-control-shell .calendar-span-bar.lane-1 {
  margin-top: 48px;
}

.calendar-control-shell .calendar-span-bar.lane-2 {
  margin-top: 56px;
}

.calendar-control-shell .calendar-span-bar.lane-3 {
  margin-top: 64px;
}

.calendar-control-shell .month-day em {
  position: relative;
  z-index: 10;
  margin-top: auto;
}

@media (max-width: 620px) {
  .calendar-control-shell .month-day {
    aspect-ratio: 1 / 1.5;
  }

  .calendar-control-shell .calendar-span-bar {
    margin-top: 34px;
    margin-inline: 5px;
  }

  .calendar-control-shell .calendar-span-bar.lane-1 {
    margin-top: 41px;
  }

  .calendar-control-shell .calendar-span-bar.lane-2 {
    margin-top: 48px;
  }

  .calendar-control-shell .calendar-span-bar.lane-3 {
    margin-top: 55px;
  }
}

@media (max-width: 620px) {
  .calendar-control-shell .month-grid.calendar-month,
  .calendar-control-shell .calendar-weekdays,
  .calendar-control-shell .calendar-week {
    gap: 6px;
  }

  .calendar-control-shell .calendar-week {
    grid-auto-rows: auto;
  }

  .calendar-control-shell .month-day {
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 7px 4px 6px;
    border-radius: 13px;
  }

  .calendar-control-shell .month-day > span:first-child {
    font-size: 12px;
  }

  .calendar-control-shell .calendar-span-bar {
    margin-top: 24px;
    margin-inline: 4px;
  }

  .calendar-control-shell .calendar-span-bar.lane-1 {
    margin-top: 31px;
  }

  .calendar-control-shell .calendar-span-bar.lane-2 {
    margin-top: 38px;
  }

  .calendar-control-shell .calendar-span-bar.lane-3 {
    margin-top: 45px;
  }

  .calendar-control-shell .calendar-form-grid,
  .calendar-control-shell .calendar-switches {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-control-shell .calendar-switches > button {
    grid-column: auto;
  }
}

/* Calendar absolute final lock: overrides older mobile rules above. */
.calendar-control-shell .calendar-chip-section {
  display: grid;
  place-items: center;
  gap: 12px;
}

.calendar-control-shell .calendar-chip-section > span {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.055);
  text-align: center;
}

.calendar-control-shell .calendar-chip-picker {
  justify-content: center;
  align-items: center;
}

.calendar-control-shell .calendar-chip-picker button {
  min-height: 30px;
  padding: 0 15px;
  font-size: 12px;
  line-height: 1;
}

.calendar-control-shell .calendar-form-actions {
  justify-content: center;
  gap: 12px;
}

.calendar-control-shell .calendar-form-actions .memo-add,
.calendar-control-shell .calendar-form-actions .ghost {
  flex: 0 0 auto;
  min-width: 104px;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  box-shadow: none;
}

.calendar-control-shell .calendar-form-actions .memo-add {
  background: linear-gradient(135deg, #f4a1bd, #d16b96);
}

.calendar-control-shell .calendar-form-actions .ghost {
  border: 1px solid rgba(246, 166, 194, 0.26);
  background: rgba(246, 166, 194, 0.06);
  color: rgba(223, 190, 200, 0.72);
}

.calendar-control-shell .month-day {
  aspect-ratio: 1 / 1.5 !important;
}

.calendar-control-shell .calendar-span-bar {
  margin-top: 38px !important;
}

.calendar-control-shell .calendar-span-bar.lane-1 {
  margin-top: 46px !important;
}

.calendar-control-shell .calendar-span-bar.lane-2 {
  margin-top: 54px !important;
}

.calendar-control-shell .calendar-span-bar.lane-3 {
  margin-top: 62px !important;
}

@media (max-width: 620px) {
  .calendar-control-shell .month-day {
    aspect-ratio: 1 / 1.5 !important;
  }

  .calendar-control-shell .calendar-span-bar {
    margin-top: 34px !important;
    margin-inline: 5px !important;
  }

  .calendar-control-shell .calendar-span-bar.lane-1 {
    margin-top: 42px !important;
  }

  .calendar-control-shell .calendar-span-bar.lane-2 {
    margin-top: 50px !important;
  }

  .calendar-control-shell .calendar-span-bar.lane-3 {
    margin-top: 58px !important;
  }
}

/* Calendar agenda memo polish: match Home Today check circles and keep edit visible. */
.calendar-control-shell .calendar-agenda-item.todo {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

.calendar-control-shell .calendar-agenda-item.todo .memo-check {
  justify-self: center;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(223, 190, 200, 0.55);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  padding: 0;
}

.calendar-control-shell .calendar-agenda-item.todo.done .memo-check {
  border-color: var(--calendar-pink);
  background: var(--calendar-pink);
}

.calendar-control-shell .calendar-edit-pill {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #f6a6c2;
  font-size: 18px;
  opacity: 1;
}

.calendar-control-shell .calendar-edit-pill:hover,
.calendar-control-shell .calendar-edit-pill:focus-visible {
  color: #ffd6eb;
  background: rgba(246, 166, 194, 0.08);
  outline: none;
}

.calendar-control-shell .calendar-agenda-item small {
  color: rgba(223, 190, 200, 0.56) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.11em;
  line-height: 1.45;
}

/* Calendar typography trial: reuse weekday face for calendar labels. */
.calendar-control-shell .calendar-preview header > div:nth-child(2) strong,
.calendar-control-shell .calendar-preview header > div:nth-child(2) span,
.calendar-control-shell .calendar-agenda header strong,
.calendar-control-shell .calendar-agenda header span,
.calendar-control-shell .memo-section-head strong,
.calendar-control-shell .memo-section-head small {
  font-family: "Inter", "PingFang SC", sans-serif;
  font-weight: 560;
  text-transform: uppercase;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2),
.calendar-control-shell .calendar-agenda header > div:nth-child(2),
.calendar-control-shell .memo-section-head > div {
  display: grid;
  gap: 5px;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) strong {
  color: rgba(247, 237, 243, 0.90);
  font-size: 15.5px;
  letter-spacing: 0.16em;
  line-height: 1.05;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) span {
  color: rgba(223, 190, 200, 0.62) !important;
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.05;
}

.calendar-control-shell .memo-section-head strong {
  color: rgba(247, 237, 243, 0.88);
  font-size: 14.5px;
  letter-spacing: 0.15em;
  line-height: 1.05;
}

.calendar-control-shell .memo-section-head small {
  color: rgba(223, 190, 200, 0.62) !important;
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.05;
}

.calendar-control-shell .calendar-agenda header strong {
  color: rgba(247, 237, 243, 0.88);
  font-size: 14.5px;
  letter-spacing: 0.15em;
  line-height: 1.05;
}

.calendar-control-shell .calendar-agenda header span {
  color: rgba(223, 190, 200, 0.62) !important;
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.05;
}

/* Calendar agenda edit icon hard lock: keep memo/event pencils visible without hover. */
.calendar-control-shell .calendar-agenda-item .calendar-edit-pill,
.calendar-control-shell .calendar-agenda-item button.calendar-edit-pill.material-symbols-outlined {
  color: #f6a6c2 !important;
  -webkit-text-fill-color: #f6a6c2 !important;
  opacity: 1 !important;
  background: rgba(246, 166, 194, 0.075) !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24 !important;
}

.calendar-control-shell .calendar-agenda-item .calendar-edit-pill:hover,
.calendar-control-shell .calendar-agenda-item .calendar-edit-pill:focus-visible {
  color: #ffd6eb !important;
  -webkit-text-fill-color: #ffd6eb !important;
  background: rgba(246, 166, 194, 0.14) !important;
}

/* Calendar month header: align title block bottom with the left icon. */
.calendar-control-shell .calendar-preview header {
  align-items: flex-end !important;
}

.calendar-control-shell .calendar-preview header > div:nth-child(2) {
  align-self: flex-end !important;
  padding-bottom: 1px !important;
}

.calendar-control-shell .calendar-preview header .home-icon.material-symbols-outlined {
  align-self: flex-end !important;
}

/* Unify desktop/home favorite note expansion with the global notification paper. */
.stitch-home .proactive-paper-home,
.favorite-note-modal-paper {
  position: relative !important;
  width: min(384px, 100%) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 2px 2px 20px 2px !important;
  background: #fdfaf7 !important;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.10), 0 24px 80px rgba(0, 0, 0, 0.46) !important;
  color: #2a2a2c !important;
  padding: 32px !important;
  overflow: visible !important;
}

.stitch-home .proactive-paper-home::before,
.favorite-note-modal-paper::before {
  content: "edit_note" !important;
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto 16px !important;
  transform: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #242428 !important;
  font-family: "Material Symbols Outlined" !important;
  font-feature-settings: "liga" !important;
  font-size: 28px !important;
  line-height: 1 !important;
  text-align: center !important;
}

.stitch-home .proactive-paper-home header,
.stitch-home .proactive-paper-home em,
.favorite-note-modal-paper small,
.favorite-note-modal-paper em {
  display: none !important;
}

.stitch-home .proactive-paper-home .proactive-paper-close,
.favorite-note-modal-paper .favorite-note-paper-close {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: rgba(58, 58, 60, 0.68) !important;
  box-shadow: none !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

.stitch-home .proactive-paper-home p,
.favorite-note-modal-paper p {
  margin: 0 0 28px !important;
  color: #2a2a2c !important;
  font-family: var(--note-font) !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 28px !important;
  text-align: center !important;
}

.proactive-toast.is-open .proactive-paper .proactive-paper-icon {
  display: block !important;
  margin: 0 auto 16px !important;
  color: #242428 !important;
  font-size: 28px !important;
  line-height: 1 !important;
  text-align: center !important;
}

.stitch-home .proactive-paper-home .proactive-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  width: 100% !important;
  margin: 0 !important;
}

.stitch-home .proactive-paper-home .proactive-actions button {
  min-height: 38px !important;
  border-color: rgba(42, 42, 44, 0.18) !important;
  background: transparent !important;
  color: #3a3a3c !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

.stitch-home .proactive-paper-home .proactive-actions button:last-child {
  background: #242428 !important;
  color: #fff !important;
}

/* Home day theme: follow Chat's cream-pink daylight without touching the G & Q script. */
body[data-app-theme="day"] .stitch-home.home-shell {
  --home-day-bg: #fbf6f4;
  --home-day-surface: #fffdfb;
  --home-day-surface-soft: #f4edef;
  --home-day-text: #302a2e;
  --home-day-muted: rgba(104, 82, 91, 0.58);
  --home-day-line: rgba(96, 72, 82, 0.12);
  --home-day-primary: #d986a3;
  --home-day-hot: #e65d9c;
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%);
  color: var(--home-day-text);
}

body[data-app-theme="day"] .stitch-home.home-shell::before {
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%);
}

body[data-app-theme="day"] .stitch-home .lair-hero {
  color: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .lair-kicker {
  color: rgba(217, 134, 163, 0.86);
}

body[data-app-theme="day"] .stitch-home .gq-symbol {
  color: var(--home-day-primary);
  filter: drop-shadow(0 0 8px rgba(255, 253, 251, 0.94)) drop-shadow(0 0 10px rgba(217, 134, 163, 0.18));
}

body[data-app-theme="day"] .stitch-home .home-tagline.zh {
  color: rgba(48, 42, 46, 0.86);
}

body[data-app-theme="day"] .stitch-home .anniversary-meta {
  border-top-color: rgba(96, 72, 82, 0.10);
  color: var(--home-day-muted);
}

body[data-app-theme="day"] .stitch-home .anniversary-meta strong {
  color: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .anniversary-meta small {
  color: var(--home-day-muted);
}

body[data-app-theme="day"] .stitch-home .home-card {
  border-color: var(--home-day-line);
  background: rgba(255, 253, 251, 0.78);
  box-shadow: 0 18px 48px rgba(112, 74, 88, 0.10), 0 0 0 5px rgba(217, 134, 163, 0.025);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-app-theme="day"] .stitch-home .welcome-card {
  background:
    linear-gradient(180deg, rgba(217, 134, 163, 0.08), transparent 44%),
    rgba(255, 253, 251, 0.92);
}

body[data-app-theme="day"] .stitch-home .welcome-card p {
  color: rgba(48, 42, 46, 0.86);
}

body[data-app-theme="day"] .stitch-home .welcome-card footer {
  color: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .proactive-envelope-home {
  border-color: rgba(217, 134, 163, 0.18);
  background:
    linear-gradient(180deg, rgba(217, 134, 163, 0.09), transparent 62%),
    rgba(255, 253, 251, 0.88);
  box-shadow: 0 18px 48px rgba(112, 74, 88, 0.12);
  color: var(--home-day-text);
}

body[data-app-theme="day"] .stitch-home .proactive-envelope-home::before {
  background: linear-gradient(90deg, rgba(217, 134, 163, 0.52), rgba(230, 93, 156, 0.18));
}

body[data-app-theme="day"] .stitch-home .proactive-home-top,
body[data-app-theme="day"] .stitch-home .proactive-home-foot {
  color: rgba(104, 82, 91, 0.82);
}

body[data-app-theme="day"] .stitch-home .proactive-home-top i {
  background: rgba(217, 134, 163, 0.12);
  color: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .proactive-home-content {
  color: rgba(48, 42, 46, 0.86);
}

body[data-app-theme="day"] .stitch-home .proactive-home-foot small:first-child::before {
  background: rgba(217, 134, 163, 0.48);
}

body[data-app-theme="day"] .stitch-home .today-schedule-card {
  background: rgba(255, 253, 251, 0.82);
}

body[data-app-theme="day"] .stitch-home .today-card-head .calendar-mark,
body[data-app-theme="day"] .stitch-home .event-row .pill {
  color: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .today-card-head strong,
body[data-app-theme="day"] .stitch-home .event-row strong,
body[data-app-theme="day"] .stitch-home .memo-row strong {
  color: rgba(48, 42, 46, 0.88);
}

body[data-app-theme="day"] .stitch-home .today-card-head span:last-child,
body[data-app-theme="day"] .stitch-home .memo-time,
body[data-app-theme="day"] .stitch-home .today-empty-row {
  color: rgba(104, 82, 91, 0.56);
}

body[data-app-theme="day"] .stitch-home .today-group-label {
  color: rgba(217, 134, 163, 0.70);
}

body[data-app-theme="day"] .stitch-home .event-row {
  border-color: rgba(96, 72, 82, 0.10);
  background: rgba(255, 255, 255, 0.46);
}

body[data-app-theme="day"] .stitch-home .event-tag-dot {
  box-shadow: 0 0 0 5px rgba(217, 134, 163, 0.08);
}

body[data-app-theme="day"] .stitch-home .event-row .pill {
  background: rgba(217, 134, 163, 0.12);
}

body[data-app-theme="day"] .stitch-home .memo-check {
  border-color: rgba(104, 82, 91, 0.36);
}

body[data-app-theme="day"] .stitch-home .memo-row.done .memo-check {
  border-color: var(--home-day-primary);
  background: var(--home-day-primary);
}

body[data-app-theme="day"] .stitch-home .today-add {
  border-color: rgba(96, 72, 82, 0.13);
  background: rgba(255, 253, 251, 0.62);
  color: rgba(104, 82, 91, 0.62);
}

body[data-app-theme="day"] .stitch-home .home-quiet-line {
  color: rgba(104, 82, 91, 0.40);
}

body[data-app-theme="day"] .stitch-home .bottom-nav,
body[data-app-theme="day"] .bottom-nav {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 18px 54px rgba(112, 74, 88, 0.14), inset 0 0 18px rgba(217, 134, 163, 0.035);
}

body[data-app-theme="day"] .stitch-home .bottom-nav button,
body[data-app-theme="day"] .bottom-nav button,
body[data-app-theme="day"] .bottom-nav button:not(.chat-orb) {
  color: rgba(104, 82, 91, 0.66);
}

body[data-app-theme="day"] .stitch-home .bottom-nav button.active,
body[data-app-theme="day"] .bottom-nav button.active {
  color: var(--home-day-primary, #d986a3);
}

body[data-app-theme="day"] .stitch-home .bottom-nav .chat-orb,
body[data-app-theme="day"] .bottom-nav .chat-orb,
body[data-app-theme="day"] .bottom-nav .chat-orb.active {
  background: #e65d9c;
  color: #fff;
  box-shadow: 0 0 18px rgba(230, 93, 156, 0.26), 0 10px 28px rgba(217, 134, 163, 0.28);
}

/* Shared fixed title bar: Calendar follows Monitor/API/More/Setting. */
.calendar-control-shell.home-shell {
  padding-top: 86px;
}

.calendar-control-head {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  width: min(430px, 100%);
  min-height: 86px;
  margin: 0;
  padding: 0 16px;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(17, 14, 20, 0.80);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.calendar-control-head h2 {
  position: static;
  justify-self: center;
  width: max-content;
  max-width: calc(100% - 112px);
  margin: 0;
  transform: none;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: none;
}

/* API Config Stitch integration */
.module-shell:has(.api-config-page) {
  width: min(430px, 100%);
  max-width: 430px;
  padding: 0;
  background:
    radial-gradient(circle at 52% 0%, rgba(90, 34, 62, 0.22), transparent 34%),
    linear-gradient(180deg, #100b12 0%, #0d0910 100%);
}

.module-shell:has(.api-config-page) .top-card {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 86px;
  width: min(430px, 100%);
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  background: rgba(16, 11, 18, 0.78);
  box-shadow: none;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.module-shell:has(.api-config-page) .top-card .nav-btn {
  color: #f6a6c2;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 34px;
}

.module-shell:has(.api-config-page) .top-card .brand {
  position: static;
  justify-self: center;
  transform: none;
  width: max-content;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: none;
}

.module-shell:has(.api-config-page) .top-card .subtle {
  display: none;
}

.module-shell:has(.api-config-page) .app-page {
  display: block;
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  padding: 86px 16px 118px;
}

.module-shell:has(.api-config-page) .panel.main {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.api-config-page {
  --api-pink: #f6a6c2;
  --api-soft: rgba(246, 166, 194, 0.22);
  --api-line: rgba(246, 166, 194, 0.18);
  --api-card: rgba(18, 13, 20, 0.76);
  display: grid;
  gap: 18px;
  color: rgba(247, 237, 243, 0.92);
}

.api-config-intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 0 30px;
  text-align: center;
}

.api-config-intro small {
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.api-config-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.api-config-section {
  overflow: hidden;
  border: 1px solid var(--api-line);
  border-radius: 20px;
  background: rgba(17, 12, 19, 0.72);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.20), 0 0 0 1px rgba(255, 255, 255, 0.015) inset;
}

.api-config-section.open {
  border-color: rgba(246, 166, 194, 0.24);
  background: rgba(20, 15, 22, 0.82);
}

.api-config-head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 16px 20px;
  text-align: left;
}

.api-config-section.open .api-config-head {
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(246, 166, 194, 0.08);
}

.api-config-icon {
  color: var(--api-pink);
  font-size: 23px;
  font-variation-settings: "FILL" 0, "wght" 280, "GRAD" 0, "opsz" 28;
}

.api-config-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.api-config-title strong {
  overflow: hidden;
  color: rgba(247, 237, 243, 0.94);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-config-title small {
  color: rgba(223, 190, 200, 0.42);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 10px;
  line-height: 1.25;
}

.api-config-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.api-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.api-status-ready {
  border: 1px solid rgba(246, 166, 194, 0.28);
  background: rgba(246, 166, 194, 0.11);
  color: #f8bfd4;
}

.api-status-optional,
.api-status-soon {
  border: 1px solid rgba(223, 190, 200, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(223, 190, 200, 0.62);
}

.api-status-missing {
  border: 1px solid rgba(255, 112, 136, 0.42);
  background: rgba(170, 0, 18, 0.72);
  color: #ffd7df;
}

.api-config-chevron {
  color: #f0c6d5;
  font-size: 24px;
  transition: transform 0.22s ease;
}

.api-config-section.open .api-config-chevron {
  transform: rotate(180deg);
}

.api-config-body {
  display: none;
  padding: 22px 24px 26px;
}

.api-config-section.open .api-config-body {
  display: block;
}

.api-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.api-form-grid.disabled {
  opacity: 0.46;
  pointer-events: none;
}

.api-form-grid .api-wide {
  grid-column: 1 / -1;
}

.api-config-page .field {
  display: grid;
  gap: 10px;
  margin: 0;
}

.api-config-page .field label {
  color: rgba(223, 190, 200, 0.62);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.api-config-page input,
.api-config-page textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(223, 190, 200, 0.13);
  border-radius: 10px;
  background: rgba(7, 6, 10, 0.72);
  color: rgba(247, 237, 243, 0.90);
  padding: 0 12px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
  outline: none;
  box-shadow: none;
}

.api-config-page textarea {
  min-height: 86px;
  padding-top: 14px;
  resize: vertical;
}

.api-config-page input:focus,
.api-config-page textarea:focus {
  border-color: rgba(246, 166, 194, 0.45);
  box-shadow: 0 0 18px rgba(246, 166, 194, 0.08);
}

.api-config-page input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #f6a6c2;
}

.api-config-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 132px));
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.api-config-actions .send,
.api-config-actions .ghost,
.api-config-actions .pretty-select-trigger {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.api-config-actions .send {
  border: 1px solid rgba(246, 166, 194, 0.42);
  background: #ee98b7;
  color: #2a101c;
  box-shadow: 0 14px 34px rgba(246, 166, 194, 0.16);
}

.api-config-actions .ghost,
.api-config-actions .pretty-select-trigger {
  border: 1px solid rgba(246, 166, 194, 0.36);
  background: transparent;
  color: #f4a9c4;
  box-shadow: none;
}

.api-config-actions .ghost:first-child,
.api-config-actions button[data-fetch-models],
.api-config-actions button[data-fetch-image-models] {
  border: 1px solid rgba(246, 166, 194, 0.36);
  background: transparent;
  color: #f4a9c4;
  box-shadow: none;
}

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

.api-route-chip,
.api-mini-note,
.api-empty-card {
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.api-route-chip {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.api-route-chip small {
  color: #f4a9c4;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.api-route-chip strong {
  overflow: hidden;
  color: rgba(247, 237, 243, 0.88);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-route-chip span {
  overflow: hidden;
  color: rgba(223, 190, 200, 0.45);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-config-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.api-config-item {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px;
}

.api-config-item.selected {
  border-color: rgba(246, 166, 194, 0.38);
  background: rgba(246, 166, 194, 0.065);
}

.api-config-select {
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.api-config-select strong {
  color: rgba(247, 237, 243, 0.92);
  font-size: 13px;
}

.api-config-select span,
.api-config-item > small {
  overflow: hidden;
  color: rgba(223, 190, 200, 0.50);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.api-role-actions button {
  min-height: 26px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.65);
  padding: 0 9px;
  font-size: 10px;
}

.api-role-actions button.active {
  border-color: rgba(246, 166, 194, 0.52);
  background: rgba(246, 166, 194, 0.12);
  color: #ffd6e5;
}

.api-role-actions .danger {
  border-color: rgba(255, 112, 136, 0.22);
  color: rgba(255, 177, 199, 0.70);
}

.api-model-picker {
  margin-top: 16px;
}

.api-mini-note {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  color: rgba(223, 190, 200, 0.66);
}

.api-mini-note strong {
  color: rgba(247, 237, 243, 0.88);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
}

.api-mini-note span,
.api-mini-note em {
  color: rgba(223, 190, 200, 0.50);
  font-size: 11px;
  font-style: normal;
  line-height: 1.5;
}

.api-vector-status {
  margin: 0 0 18px;
}

.api-vector-toggle {
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 10px;
  margin: 0 0 18px;
  color: rgba(223, 190, 200, 0.68);
  font-size: 13px;
  line-height: 1.4;
}

.api-vector-toggle input {
  flex: 0 0 auto;
}

.api-vector-toggle span {
  writing-mode: horizontal-tb;
  white-space: normal;
}

.api-config-footer {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 54px 0 72px;
  color: rgba(246, 166, 194, 0.18);
}

.api-config-footer .material-symbols-outlined {
  font-size: 42px;
  font-variation-settings: "FILL" 0, "wght" 220, "GRAD" 0, "opsz" 40;
}

.api-config-footer small {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 12px;
  letter-spacing: 0.36em;
}

@media (max-width: 720px) {
  .module-shell:has(.api-config-page) .app-page {
    padding-inline: 10px;
  }

  .api-config-page {
    gap: 18px;
  }

  .api-config-head {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 76px;
    padding: 16px 18px;
  }

  .api-config-title strong {
    font-size: 18px;
  }

  .api-config-title small {
    font-size: 10px;
  }

  .api-config-body {
    padding: 22px 20px 24px;
  }

  .api-config-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 132px));
    justify-content: center;
  }

  .api-config-actions .send,
  .api-config-actions .ghost,
  .api-config-actions .pretty-select-trigger {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .api-config-head {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding: 15px 16px;
  }

  .api-config-head-meta {
    gap: 6px;
  }

  .api-status {
    min-width: 52px;
    font-size: 9px;
  }

  .api-config-body {
    padding: 20px 16px 24px;
  }

  .api-config-actions {
    grid-template-columns: 1fr;
  }
}

/* Monitor observation room Stitch integration */
body[data-view="monitor"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 24, 55, 0.42), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(72, 24, 48, 0.34), transparent 22rem),
    linear-gradient(180deg, #100b12 0%, #0b0b11 58%, #07080d 100%);
}

.module-shell:has(.monitor-observation-room) {
  width: min(430px, 100%);
  max-width: 430px;
  padding: 0;
  background:
    radial-gradient(circle at 70% 0%, rgba(246, 166, 194, 0.08), transparent 40%),
    linear-gradient(180deg, #0c0a0f, #110e16);
}

.module-shell:has(.monitor-observation-room) .top-card {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 86px;
  width: min(430px, 100%);
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  background: rgba(12, 10, 15, 0.80);
  box-shadow: none;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.module-shell:has(.monitor-observation-room) .top-card .nav-btn {
  color: #f6a6c2;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 34px;
}

.module-shell:has(.monitor-observation-room) .top-card .brand {
  position: static;
  justify-self: center;
  transform: none;
  width: max-content;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.module-shell:has(.monitor-observation-room) .app-page {
  display: block;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 86px 16px 128px;
}

.module-shell:has(.monitor-observation-room) .panel.main {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.monitor-observation-room {
  display: grid;
  gap: 16px;
  padding: 30px 0 104px;
  color: #f7edf3;
}

.monitor-intro {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  padding: 28px 0 30px;
  text-align: center;
}

.monitor-intro span {
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.monitor-card-label {
  color: rgba(247, 237, 243, 0.42);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.monitor-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.monitor-card {
  overflow: hidden;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(21, 18, 24, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.monitor-health-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.monitor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monitor-health-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.56);
  font-size: 12px;
  line-height: 1.65;
}

.monitor-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 237, 243, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.monitor-status-pill.ok {
  color: #9ce6c8;
  background: rgba(156, 230, 200, 0.10);
}

.monitor-status-pill.warn {
  color: #ffd18a;
  background: rgba(255, 209, 138, 0.10);
}

.monitor-status-pill.bad {
  color: #ff8aa0;
  background: rgba(255, 138, 160, 0.10);
}

.monitor-breathing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9ce6c8;
  box-shadow: 0 0 10px rgba(156, 230, 200, 0.90);
  animation: monitor-breathe-ok 1.8s ease-in-out infinite;
}

.monitor-breathing-dot.ok,
.monitor-status-pill.ok .monitor-breathing-dot {
  background: #9ce6c8;
  box-shadow: 0 0 10px rgba(156, 230, 200, 0.90);
  animation-name: monitor-breathe-ok;
}

.monitor-breathing-dot.warn,
.monitor-status-pill.warn .monitor-breathing-dot {
  background: #ffd18a;
  box-shadow: 0 0 10px rgba(255, 209, 138, 0.90);
  animation-name: monitor-breathe-warn;
}

.monitor-breathing-dot.bad,
.monitor-status-pill.bad .monitor-breathing-dot {
  background: #ff8aa0;
  box-shadow: 0 0 10px rgba(255, 138, 160, 0.90);
  animation-name: monitor-breathe-bad;
}

@keyframes monitor-breathe-ok {
  0%, 100% { box-shadow: 0 0 6px rgba(156, 230, 200, 0.42), 0 0 0 0 rgba(156, 230, 200, 0.28); opacity: 0.72; }
  50% { box-shadow: 0 0 14px rgba(156, 230, 200, 0.95), 0 0 0 7px rgba(156, 230, 200, 0); opacity: 1; }
}

@keyframes monitor-breathe-warn {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 209, 138, 0.42), 0 0 0 0 rgba(255, 209, 138, 0.28); opacity: 0.72; }
  50% { box-shadow: 0 0 14px rgba(255, 209, 138, 0.95), 0 0 0 7px rgba(255, 209, 138, 0); opacity: 1; }
}

@keyframes monitor-breathe-bad {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 138, 160, 0.42), 0 0 0 0 rgba(255, 138, 160, 0.30); opacity: 0.72; }
  50% { box-shadow: 0 0 14px rgba(255, 138, 160, 0.98), 0 0 0 7px rgba(255, 138, 160, 0); opacity: 1; }
}

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

.monitor-metric {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px;
}

.monitor-metric small {
  display: block;
  margin-bottom: 4px;
  color: rgba(247, 237, 243, 0.42);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
}

.monitor-metric strong {
  display: block;
  color: #f7edf3;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.monitor-backup-grid {
  display: grid;
  gap: 12px;
}

.monitor-backup-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

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

.monitor-backup-title strong {
  min-width: 0;
  color: #f7edf3;
  font-size: 14px;
}

.monitor-backup-title span {
  color: rgba(247, 237, 243, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  white-space: nowrap;
}

.monitor-backup-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  color: rgba(247, 237, 243, 0.56);
  font-size: 12px;
}

.monitor-backup-line b {
  color: rgba(247, 237, 243, 0.38);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.monitor-backup-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.monitor-backup-card small {
  color: rgba(247, 237, 243, 0.38);
  font-size: 10px;
  font-style: italic;
}

.monitor-log-section {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.monitor-log-section .monitor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px auto;
  align-items: center;
  gap: 10px;
}

.monitor-log-section .monitor-toolbar strong {
  display: block;
  margin-top: 2px;
  color: #f7edf3;
  font-size: 20px;
}

.monitor-refresh {
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #f6a6c2;
  font-size: 20px;
}

.monitor-observation-room .filter-trigger {
  min-width: 98px;
  min-height: 38px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(17, 15, 20, 0.88);
  color: rgba(247, 237, 243, 0.62);
  box-shadow: none;
  padding: 0 12px;
  font-size: 12px;
}

.monitor-observation-room .filter-menu {
  border-color: rgba(246, 166, 194, 0.18);
  background: rgba(21, 18, 24, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.monitor-observation-room .filter-menu button {
  border-color: rgba(246, 166, 194, 0.10);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.68);
}

.monitor-observation-room .filter-menu button:hover {
  border-color: rgba(246, 166, 194, 0.32);
  background: rgba(246, 166, 194, 0.10);
}

.monitor-observation-room .log-list {
  display: grid;
  gap: 10px;
}

.monitor-observation-room .log-item {
  border: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 18px;
  background: rgba(17, 15, 20, 0.88);
  padding: 15px;
  box-shadow: none;
}

.monitor-observation-room .log-item.error {
  border-left: 3px solid #ff8aa0;
}

.monitor-observation-room .log-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.monitor-observation-room .log-item strong {
  display: inline-flex;
  width: auto;
  border-radius: 5px;
  background: rgba(255, 79, 163, 0.08);
  color: #ffb7d0;
  padding: 2px 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.monitor-observation-room .log-item .subtle {
  color: rgba(247, 237, 243, 0.42);
  font-size: 11px;
  white-space: nowrap;
}

.monitor-observation-room .log-item > div {
  color: rgba(247, 237, 243, 0.62);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.monitor-load-more {
  justify-self: center;
  min-height: 42px;
  min-width: min(260px, 100%);
  border: 1px solid rgba(246, 166, 194, 0.28);
  border-radius: 999px;
  background: rgba(17, 15, 20, 0.78);
  color: #ffb7d0;
  padding: 0 18px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.monitor-load-more:hover {
  border-color: rgba(246, 166, 194, 0.44);
  background: rgba(246, 166, 194, 0.08);
}

/* Monitor day theme */
body[data-app-theme="day"][data-view="monitor"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(244, 193, 211, 0.48), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(218, 146, 176, 0.26), transparent 22rem),
    linear-gradient(180deg, #fff8fb 0%, #fff3f7 48%, #fbf5f7 100%);
}

body[data-app-theme="day"] .module-shell:has(.monitor-observation-room) {
  background:
    radial-gradient(circle at 70% 0%, rgba(232, 139, 172, 0.16), transparent 40%),
    linear-gradient(180deg, #fff8fb, #fff3f7 52%, #fbf5f7);
}

body[data-app-theme="day"] .module-shell:has(.monitor-observation-room) .top-card {
  border-bottom-color: rgba(210, 116, 151, 0.14);
  background: rgba(255, 248, 251, 0.84);
  box-shadow: 0 16px 42px rgba(190, 105, 135, 0.08);
}

body[data-app-theme="day"] .module-shell:has(.monitor-observation-room) .top-card .nav-btn {
  color: #d978a0;
}

body[data-app-theme="day"] .module-shell:has(.monitor-observation-room) .top-card .brand {
  color: #3f343a;
}

body[data-app-theme="day"] .monitor-observation-room {
  color: #3f343a;
}

body[data-app-theme="day"] .monitor-intro span,
body[data-app-theme="day"] .monitor-card-label,
body[data-app-theme="day"] .monitor-metric small,
body[data-app-theme="day"] .monitor-backup-line b {
  color: rgba(174, 99, 128, 0.58);
}

body[data-app-theme="day"] .monitor-intro p {
  color: rgba(82, 63, 72, 0.62);
}

body[data-app-theme="day"] .monitor-card {
  border-color: rgba(214, 127, 160, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 252, 0.70)),
    rgba(255, 253, 251, 0.82);
  box-shadow: 0 18px 44px rgba(185, 100, 130, 0.12);
}

body[data-app-theme="day"] .monitor-health-card p,
body[data-app-theme="day"] .monitor-backup-line,
body[data-app-theme="day"] .monitor-backup-title span,
body[data-app-theme="day"] .monitor-backup-card small {
  color: rgba(84, 65, 74, 0.64);
}

body[data-app-theme="day"] .monitor-metric {
  border-color: rgba(214, 127, 160, 0.13);
  background: rgba(255, 255, 255, 0.54);
}

body[data-app-theme="day"] .monitor-metric strong,
body[data-app-theme="day"] .monitor-backup-title strong,
body[data-app-theme="day"] .monitor-log-section .monitor-toolbar strong {
  color: #473a41;
}

body[data-app-theme="day"] .monitor-status-pill {
  background: rgba(94, 74, 84, 0.06);
  color: rgba(84, 65, 74, 0.66);
}

body[data-app-theme="day"] .monitor-status-pill.ok {
  background: rgba(85, 166, 129, 0.13);
  color: #3f9c73;
}

body[data-app-theme="day"] .monitor-status-pill.warn {
  background: rgba(210, 148, 54, 0.14);
  color: #a86f22;
}

body[data-app-theme="day"] .monitor-status-pill.bad {
  background: rgba(220, 92, 116, 0.13);
  color: #c44f6a;
}

body[data-app-theme="day"] .monitor-refresh,
body[data-app-theme="day"] .monitor-load-more,
body[data-app-theme="day"] .monitor-observation-room .filter-trigger {
  border-color: rgba(214, 127, 160, 0.24);
  background: rgba(255, 253, 251, 0.72);
  color: #c4668b;
}

body[data-app-theme="day"] .monitor-observation-room .filter-menu {
  border-color: rgba(214, 127, 160, 0.20);
  background: #fffafd;
  box-shadow: 0 18px 38px rgba(185, 100, 130, 0.12);
}

body[data-app-theme="day"] .monitor-observation-room .filter-menu button {
  border-color: rgba(214, 127, 160, 0.12);
  background: #fffdfb;
  color: rgba(78, 60, 69, 0.72);
}

body[data-app-theme="day"] .monitor-observation-room .filter-menu button:hover {
  border-color: rgba(214, 127, 160, 0.30);
  background: rgba(244, 193, 211, 0.28);
}

body[data-app-theme="day"] .monitor-filter .filter-menu {
  border-color: rgba(214, 127, 160, 0.20) !important;
  background: #fffafd !important;
  color: rgba(78, 60, 69, 0.78) !important;
  box-shadow: 0 18px 38px rgba(185, 100, 130, 0.12) !important;
  scrollbar-color: rgba(214, 127, 160, 0.34) rgba(255, 250, 252, 0.76);
}

body[data-app-theme="day"] .monitor-filter .filter-menu button {
  border-color: rgba(214, 127, 160, 0.13) !important;
  background: #fffdfb !important;
  color: rgba(78, 60, 69, 0.74) !important;
  box-shadow: 0 8px 18px rgba(185, 100, 130, 0.06) !important;
}

body[data-app-theme="day"] .monitor-filter .filter-menu button:hover {
  border-color: rgba(214, 127, 160, 0.32) !important;
  background: #fff3f8 !important;
  color: #8f4568 !important;
}

body[data-app-theme="day"] .monitor-filter .filter-menu::-webkit-scrollbar-thumb {
  background: rgba(214, 127, 160, 0.34);
}

body[data-app-theme="day"] .monitor-observation-room .log-item {
  border-color: rgba(214, 127, 160, 0.14);
  background: rgba(255, 253, 251, 0.78);
}

body[data-app-theme="day"] .monitor-observation-room .log-item strong {
  background: rgba(219, 126, 159, 0.12);
  color: #b85b7f;
}

body[data-app-theme="day"] .monitor-observation-room .log-item .subtle {
  color: rgba(104, 82, 91, 0.52);
}

body[data-app-theme="day"] .monitor-observation-room .log-item > div {
  color: rgba(58, 48, 54, 0.72);
}

body[data-app-theme="day"] .monitor-load-more:hover {
  border-color: rgba(214, 127, 160, 0.38);
  background: rgba(244, 193, 211, 0.24);
}

body[data-view="theme"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 24, 55, 0.42), transparent 24rem),
    radial-gradient(circle at 82% 8%, rgba(72, 24, 48, 0.34), transparent 22rem),
    linear-gradient(180deg, #100b12 0%, #0b0b11 58%, #07080d 100%);
}

.theme-room {
  gap: 16px;
}

.theme-room .theme-note {
  padding: 18px 0 22px;
}

.theme-room .setting-control-section {
  gap: 14px;
  margin: 0;
}

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

.theme-preset-card {
  width: 100%;
  appearance: none;
  display: grid;
  gap: 16px;
  border-color: rgba(246, 166, 194, 0.12);
  color: #f7edf3;
  padding: 18px;
  text-align: left;
}

button.theme-preset-card {
  cursor: pointer;
}

button.theme-preset-card:hover {
  border-color: rgba(246, 166, 194, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(21, 18, 24, 0.84);
}

.theme-preset-card.active {
  border-color: rgba(246, 166, 194, 0.34);
  background:
    linear-gradient(180deg, rgba(246, 166, 194, 0.10), rgba(255, 255, 255, 0.014)),
    rgba(21, 18, 24, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(246, 166, 194, 0.04);
}

.theme-preset-future {
  opacity: 0.58;
}

.theme-preset-body {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.theme-preset-icon {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.13);
  color: #f6a6c2;
  font-size: 22px !important;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 250, "GRAD" 0, "opsz" 24;
}

.theme-preset-svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke-width: 1.35;
}

.theme-preset-copy strong {
  display: block;
  color: rgba(247, 237, 243, 0.94);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
}

.theme-preset-copy small {
  display: block;
  margin-top: 7px;
  color: rgba(223, 190, 200, 0.68);
  font-size: 12px;
  line-height: 1.5;
}

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

.theme-swatches i {
  display: block;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--theme-swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Shared back control: use the Monitor chevron everywhere. */
.calendar-back,
.setting-back,
.more-back,
.chat-head .chat-back,
.top-card .nav-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f6a6c2;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.calendar-back:hover,
.setting-back:hover,
.more-back:hover,
.chat-head .chat-back:hover,
.top-card .nav-btn:hover {
  background: transparent;
  color: #ffb7d0;
}

.chat-shell[data-theme="day"] .chat-head .chat-back,
[data-chat-theme="day"] .chat-shell .chat-head .chat-back {
  color: #d986a3;
}

.chat-shell[data-theme="day"] .chat-head .chat-back:hover,
[data-chat-theme="day"] .chat-shell .chat-head .chat-back:hover {
  background: transparent;
  color: #c96f91;
}

@media (max-width: 430px) {
  .monitor-observation-room {
    padding-top: 24px;
  }

  .monitor-log-section .monitor-toolbar {
    grid-template-columns: minmax(0, 1fr) 36px auto;
  }

  .monitor-observation-room .filter-trigger {
    min-width: 86px;
  }
}

/* Memo Stitch integration: keep the shared header, bottom nav, and real pickers. */
body[data-view="memo"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(88, 24, 55, 0.38), transparent 24rem),
    radial-gradient(circle at 84% 4%, rgba(72, 24, 48, 0.28), transparent 22rem),
    linear-gradient(180deg, #100b12 0%, #0b0b11 64%, #08090e 100%);
}

.memo-control-shell.home-shell {
  width: min(430px, 100%) !important;
  max-width: 430px !important;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 106px 16px calc(var(--bottom-nav-space) + 36px);
  background:
    radial-gradient(circle at 72% 0%, rgba(246, 166, 194, 0.08), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: #f7edf3;
}

.memo-control-shell .simple-head {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  width: min(430px, 100%);
  min-height: 86px;
  margin: 0;
  padding: 0 16px;
  transform: translateX(-50%);
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  background: rgba(17, 14, 20, 0.82);
  box-shadow: none;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.memo-control-shell .simple-head .chat-back {
  position: static;
  transform: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f6a6c2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.memo-control-shell .simple-head h2 {
  justify-self: center;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memo-control-shell .memo-editor {
  z-index: 22;
  margin: 0 0 34px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 8px;
  background: rgba(17, 15, 20, 0.74);
  box-shadow: none;
  padding: 14px 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.memo-control-shell .memo-editor:has(.memo-picker-panel) {
  z-index: 70;
}

.memo-control-shell .memo-editor form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
}

.memo-control-shell .memo-editor input,
.memo-control-shell .memo-editor textarea {
  grid-column: 1 / -1;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #f7edf3;
  padding: 4px 10px 12px;
}

.memo-control-shell .memo-editor input {
  min-height: 38px;
  font-size: 16px;
  font-weight: 650;
}

.memo-control-shell .memo-editor textarea {
  min-height: 34px;
  height: 34px;
  resize: vertical;
  color: rgba(247, 237, 243, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.memo-control-shell .memo-editor input::placeholder,
.memo-control-shell .memo-editor textarea::placeholder {
  color: rgba(223, 190, 200, 0.34);
}

.memo-control-shell .memo-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
}

.memo-control-shell .memo-controls > label {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
}

.memo-control-shell .memo-controls > label > span {
  display: none;
}

.memo-control-shell .memo-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: rgba(247, 237, 243, 0.68);
  padding: 0 5px;
}

.memo-control-shell .memo-picker-trigger:hover,
.memo-control-shell .memo-picker-trigger:focus-visible {
  background: rgba(246, 166, 194, 0.07);
  color: #ffb7d0;
}

.memo-control-shell .memo-picker-trigger .material-symbols-outlined {
  flex: none;
  color: #e6bdcc;
  font-size: 20px;
  font-family: "Material Symbols Outlined" !important;
  font-feature-settings: "liga" !important;
  letter-spacing: 0 !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.memo-control-shell .memo-picker-trigger strong {
  color: inherit;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.memo-control-shell .memo-picker-trigger small {
  display: none;
}

.memo-control-shell .memo-add {
  align-self: center;
  justify-self: end;
  min-width: 104px;
  min-height: 38px;
  border: 1px solid #f6a6c2;
  border-radius: 999px;
  background: #f6a6c2;
  color: #25131c;
  box-shadow: 0 8px 24px rgba(246, 166, 194, 0.16);
  padding: 0 18px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
}

.memo-control-shell .memo-picker-panel {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  z-index: 90;
  min-width: 150px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 8px;
  background: rgba(21, 18, 24, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  padding: 8px;
}

.memo-control-shell .memo-picker-panel button {
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(247, 237, 243, 0.68);
  padding: 10px 11px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.memo-control-shell .memo-picker-panel button:hover {
  background: rgba(246, 166, 194, 0.08);
}

.memo-control-shell .memo-picker-panel button.active {
  background: rgba(246, 166, 194, 0.14);
  color: #ffb7d0;
}

.memo-control-shell .memo-date-panel {
  left: auto;
  right: 0;
  width: min(354px, calc(100vw - 32px));
  padding: 14px;
}

.memo-control-shell .memo-calendar-head strong {
  color: #f7edf3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
}

.memo-control-shell .memo-calendar-head button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f6a6c2;
}

.memo-control-shell .memo-calendar-grid {
  gap: 5px;
}

.memo-control-shell .memo-calendar-grid b {
  color: rgba(247, 237, 243, 0.34);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
}

.memo-control-shell .memo-calendar-grid span,
.memo-control-shell .memo-calendar-grid button {
  min-height: 34px;
}

.memo-control-shell .memo-calendar-grid button {
  border: 1px solid rgba(246, 166, 194, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(247, 237, 243, 0.66);
}

.memo-control-shell .memo-calendar-grid button.today {
  border-color: rgba(246, 166, 194, 0.36);
  color: #ffb7d0;
}

.memo-control-shell .memo-calendar-grid button.active {
  border-color: #f6a6c2;
  background: #f6a6c2;
  color: #25131c;
}

.memo-control-shell .memo-board {
  display: grid;
  gap: 12px;
  margin: 0 0 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.memo-control-shell .memo-board.collapsed {
  padding: 0;
}

.memo-control-shell .memo-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
}

.memo-control-shell .memo-section-head .home-icon {
  display: none;
}

.memo-control-shell .memo-section-head div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.memo-control-shell .memo-section-head strong {
  color: rgba(247, 237, 243, 0.48);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
}

.memo-control-shell .memo-board-today .memo-section-head strong {
  color: #ffb7d0;
}

.memo-control-shell .memo-section-head small {
  margin: 0;
  color: rgba(247, 237, 243, 0.38);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.memo-control-shell .memo-section-head b {
  color: rgba(247, 237, 243, 0.36);
  font-size: 18px;
}

.memo-control-shell .memo-task-list {
  display: grid;
  gap: 10px;
}

.memo-control-shell .memo-board:not(.cycle-history) .memo-task {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 12px;
  min-height: 84px;
  border: 1px solid rgba(246, 166, 194, 0.11);
  border-radius: 8px;
  background: rgba(17, 15, 20, 0.74);
  box-shadow: none;
  padding: 15px 14px;
}

.memo-control-shell .memo-check {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 2px solid rgba(223, 190, 200, 0.55);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  padding: 0;
  font-size: 0;
  line-height: 1;
}

.memo-control-shell .memo-task.done .memo-check {
  border-color: #f6a6c2;
  background: #f6a6c2;
}

.memo-control-shell .memo-task.done {
  opacity: 0.52;
}

.memo-control-shell .memo-task-body {
  min-width: 0;
}

.memo-control-shell .memo-task-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.memo-control-shell .memo-task-title strong {
  min-width: 0;
  color: rgba(247, 237, 243, 0.92);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.memo-control-shell .memo-task-title span {
  flex: none;
  border: 0;
  border-radius: 5px;
  background: color-mix(in srgb, var(--tag-color), transparent 82%);
  color: color-mix(in srgb, var(--tag-color), white 34%);
  padding: 3px 7px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
}

.memo-control-shell .memo-task p {
  margin: 6px 0 0;
  color: rgba(247, 237, 243, 0.56);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.memo-control-shell .memo-task small {
  display: block;
  margin-top: 7px;
  color: rgba(247, 237, 243, 0.40) !important;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.memo-control-shell .memo-delete {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: rgba(223, 190, 200, 0.38);
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.memo-control-shell .memo-delete:hover {
  color: #ff8aa0;
}

.memo-control-shell .mini-card {
  border: 1px solid rgba(246, 166, 194, 0.08);
  border-radius: 8px;
  background: rgba(17, 15, 20, 0.54);
  color: rgba(247, 237, 243, 0.42);
  box-shadow: none;
  padding: 16px;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 380px) {
  .memo-control-shell .memo-editor {
    padding: 15px 12px;
  }

  .memo-control-shell .memo-editor form {
    grid-template-columns: 1fr;
  }

  .memo-control-shell .memo-controls {
    justify-content: space-between;
  }

  .memo-control-shell .memo-add {
    justify-self: stretch;
  }

  .memo-control-shell .memo-picker-trigger {
    padding: 0 6px;
  }
}

/* Shared date popover: Memo and Calendar use the same complete, unclipped calendar. */
.memo-control-shell .memo-date-panel,
.calendar-control-shell .calendar-date-panel {
  position: fixed;
  left: 50%;
  right: auto;
  top: clamp(150px, 24vh, 220px);
  z-index: 150;
  display: grid;
  width: min(354px, calc(100vw - 32px));
  max-height: calc(100dvh - 190px);
  transform: translateX(-50%);
  overflow-y: auto;
  gap: 12px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 8px;
  background: rgba(15, 13, 18, 0.985);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  padding: 14px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.calendar-control-shell .calendar-editor,
.calendar-control-shell .calendar-form,
.calendar-control-shell .calendar-form-grid,
.calendar-control-shell .calendar-form-grid label,
.calendar-control-shell .calendar-date-picker {
  overflow: visible;
}

.calendar-control-shell .calendar-editor:has(.calendar-date-panel) {
  z-index: 90;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-head,
.memo-control-shell .memo-date-panel .memo-calendar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-head strong,
.memo-control-shell .memo-date-panel .memo-calendar-head strong {
  justify-self: center;
  color: #f7edf3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-head button,
.memo-control-shell .memo-date-panel .memo-calendar-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f6a6c2;
  padding: 0;
  font-size: 24px;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid,
.memo-control-shell .memo-date-panel .memo-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid b,
.memo-control-shell .memo-date-panel .memo-calendar-grid b {
  color: rgba(247, 237, 243, 0.38);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid > span,
.calendar-control-shell .calendar-date-panel .memo-calendar-grid > button,
.memo-control-shell .memo-date-panel .memo-calendar-grid > span,
.memo-control-shell .memo-date-panel .memo-calendar-grid > button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid > button,
.memo-control-shell .memo-date-panel .memo-calendar-grid > button {
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(247, 237, 243, 0.70);
  padding: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid > button.today,
.memo-control-shell .memo-date-panel .memo-calendar-grid > button.today {
  border-color: rgba(246, 166, 194, 0.42);
  color: #ffb7d0;
}

.calendar-control-shell .calendar-date-panel .memo-calendar-grid > button.active,
.memo-control-shell .memo-date-panel .memo-calendar-grid > button.active {
  border-color: #f6a6c2;
  background: #f6a6c2;
  color: #25131c;
}

@media (max-height: 640px) {
  .memo-control-shell .memo-date-panel,
  .calendar-control-shell .calendar-date-panel {
    top: 96px;
    max-height: calc(100dvh - 116px);
  }
}

/* Cycle visual integration. */
.cycle-control-shell.home-shell {
  --more-eraser: #f6a6c2;
  --more-eraser-bright: #ffb7d0;
  --cycle-rubber: #ff4fa3;
  --cycle-rubber-soft: #f6a6c2;
  --cycle-ink: #f7edf3;
  --cycle-muted: rgba(223, 190, 200, 0.58);
  --cycle-dim: rgba(223, 190, 200, 0.36);
  --cycle-line: rgba(246, 166, 194, 0.16);
  width: min(430px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 86px 16px calc(var(--bottom-nav-space) + 30px);
  background:
    radial-gradient(circle at 60% 6%, rgba(246, 166, 194, 0.10), transparent 32%),
    linear-gradient(180deg, #151218 0%, #0c0a0f 100%);
  color: #e7e0e8;
}

.cycle-control-shell .cycle-control-head h2 {
  text-transform: uppercase;
}

.cycle-control-shell .cycle-intro {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
}

.cycle-control-shell .cycle-intro small {
  color: rgba(246, 166, 194, 0.58);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cycle-control-shell .cycle-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.96);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0;
}

.cycle-control-shell .cycle-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  min-height: 118px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 16%, rgba(246, 166, 194, 0.09), transparent 30%),
    rgba(29, 27, 32, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  padding: 24px 28px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cycle-control-shell .cycle-hero-copy {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.cycle-control-shell .cycle-hero span {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(247, 237, 243, 0.92);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.cycle-control-shell .cycle-hero span i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cycle-rubber);
  box-shadow: 0 0 18px rgba(255, 79, 163, 0.62);
}

.cycle-control-shell .cycle-hero small {
  display: block;
  margin: 0;
  color: rgba(223, 190, 200, 0.56);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.cycle-control-shell .cycle-hero b {
  color: var(--cycle-rubber);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 79, 163, 0.18);
}

.cycle-control-shell .cycle-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.cycle-control-shell .cycle-action {
  min-width: 0;
  min-height: 56px;
  border-radius: 999px;
  padding: 0 16px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.cycle-control-shell .cycle-action.is-active {
  border: 1px solid rgba(255, 79, 163, 0.88);
  background: var(--cycle-rubber);
  color: #2b1020;
  box-shadow: 0 0 34px rgba(255, 79, 163, 0.32);
}

.cycle-control-shell .cycle-action.is-dark {
  border: 1px solid rgba(246, 166, 194, 0.08);
  background: rgba(17, 15, 20, 0.72);
  color: rgba(223, 190, 200, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012);
}

.cycle-control-shell .cycle-action:disabled {
  opacity: 1;
  pointer-events: none;
}

.cycle-control-shell .cycle-prediction {
  display: grid;
  gap: 18px;
  margin: 0 0 22px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 14px;
  background: rgba(21, 18, 24, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012);
  padding: 20px 22px 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cycle-control-shell .cycle-prediction header {
  display: block;
}

.cycle-control-shell .cycle-prediction header strong {
  display: block;
  color: rgba(247, 237, 243, 0.90);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cycle-control-shell .cycle-prediction header span {
  display: block;
  margin-top: 8px;
  color: rgba(223, 190, 200, 0.48);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.cycle-control-shell .cycle-wheel {
  position: relative;
  justify-self: center;
  width: min(100%, 318px);
  aspect-ratio: 1;
  margin: 6px auto 10px;
}

.cycle-control-shell .cycle-wheel svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cycle-control-shell .cycle-wheel circle {
  fill: rgba(223, 190, 200, 0.18);
  stroke: transparent;
  stroke-width: 0;
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-period {
  --cycle-today-color: #ff4fa3;
  fill: rgba(255, 79, 163, 0.92);
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-pms {
  --cycle-today-color: #f08366;
  fill: rgba(240, 131, 102, 0.82);
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-ovulation {
  --cycle-today-color: #d2bbff;
  fill: rgba(210, 187, 255, 0.82);
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-fertile {
  --cycle-today-color: #7f739d;
  fill: rgba(127, 115, 157, 0.82);
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-calm {
  --cycle-today-color: #b498c5;
  fill: rgba(180, 152, 197, 0.46);
}

.cycle-control-shell .cycle-wheel circle.cycle-dot-today {
  fill: var(--cycle-today-color);
  stroke: var(--cycle-today-color);
  stroke-width: 8px;
  stroke-opacity: 0.28;
  filter: drop-shadow(0 0 8px var(--cycle-today-color)) drop-shadow(0 0 18px var(--cycle-today-color)) drop-shadow(0 0 28px var(--cycle-today-color));
  transform-box: fill-box;
  transform-origin: center;
  animation: cycle-dot-breathe 1.8s ease-in-out infinite;
}

@keyframes cycle-dot-breathe {
  0%, 100% {
    opacity: 0.72;
    stroke-opacity: 0.18;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    stroke-opacity: 0.42;
    transform: scale(1.22);
  }
}

.cycle-control-shell .cycle-wheel-center {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -43%);
  color: rgba(247, 237, 243, 0.92);
  text-align: center;
}

.cycle-control-shell .cycle-wheel-center strong {
  color: rgba(247, 237, 243, 0.96);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.cycle-control-shell .cycle-wheel-center span {
  padding-bottom: 0;
  color: rgba(247, 237, 243, 0.90);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cycle-control-shell .cycle-wheel-center b {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cycle-rubber);
  padding: 0;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.cycle-control-shell .cycle-wheel-tag {
  position: absolute;
  display: block;
  min-width: 0;
  color: rgba(246, 166, 194, 0.36);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  letter-spacing: 0;
}

.cycle-control-shell .cycle-wheel-tag small {
  color: inherit;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
}

.cycle-control-shell .cycle-wheel-tag.next {
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
}

.cycle-control-shell .cycle-wheel-tag.ovulation {
  left: 50%;
  bottom: 66px;
  transform: translateX(-50%);
  color: rgba(210, 187, 255, 0.36);
}

.cycle-control-shell .cycle-ranges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  margin-top: 0;
}

.cycle-control-shell .cycle-range {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.cycle-control-shell .cycle-range > span,
.cycle-control-shell .cycle-range .cycle-dot {
  width: 7px;
  height: 7px;
  margin: 0;
  border-radius: 50%;
  background: var(--tag-color);
  box-shadow: none;
}

.cycle-control-shell .cycle-range div {
  display: contents;
}

.cycle-control-shell .cycle-range strong {
  min-width: 0;
  color: rgba(247, 237, 243, 0.72);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.cycle-control-shell .cycle-range small {
  justify-self: end;
  margin: 0;
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cycle-control-shell .cycle-history {
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cycle-control-shell .cycle-history .memo-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  border: 0;
  background: transparent;
  padding: 0;
}

.cycle-control-shell .cycle-history .memo-section-head div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cycle-control-shell .cycle-history .memo-section-head strong {
  color: rgba(247, 237, 243, 0.86);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cycle-control-shell .cycle-history .memo-section-head small {
  border-radius: 999px;
  background: rgba(223, 190, 200, 0.16);
  color: rgba(223, 190, 200, 0.76);
  padding: 5px 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.cycle-control-shell .cycle-history .memo-section-head b {
  color: var(--cycle-rubber-soft);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.cycle-control-shell .cycle-history .memo-task-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.cycle-control-shell .cycle-history .cycle-history-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 12px;
  background: rgba(17, 15, 20, 0.60);
  box-shadow: none;
  padding: 14px;
}

.cycle-control-shell .cycle-history .cycle-history-row i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.13);
}

.cycle-control-shell .cycle-history .cycle-history-row i::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.82);
}

.cycle-control-shell .cycle-history .cycle-history-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cycle-control-shell .cycle-history .cycle-history-row strong {
  color: rgba(247, 237, 243, 0.76);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}

.cycle-control-shell .cycle-history .cycle-history-row small {
  color: rgba(223, 190, 200, 0.48);
  font-size: 13px;
  line-height: 1.3;
}

.cycle-control-shell .cycle-history .cycle-history-row > span {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.12);
  color: rgba(246, 166, 194, 0.78);
  padding: 5px 10px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (max-width: 380px) {
  .cycle-control-shell.home-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cycle-control-shell .cycle-intro p {
    font-size: 25px;
  }

  .cycle-control-shell .cycle-hero,
  .cycle-control-shell .cycle-prediction {
    padding-left: 22px;
    padding-right: 22px;
  }

  .cycle-control-shell .cycle-range {
    gap: 12px;
  }

  .cycle-control-shell .cycle-range strong {
    font-size: 14px;
  }

  .cycle-control-shell .cycle-range small {
    font-size: 12px;
  }
}

/* Diary visual integration. */
.diary-control-shell.home-shell {
  width: min(430px, 100%) !important;
  max-width: 430px !important;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  padding: 106px 16px calc(var(--bottom-nav-space) + 36px);
  background:
    radial-gradient(circle at 74% 0%, rgba(246, 166, 194, 0.08), transparent 34%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: #f7edf3;
}

.diary-control-shell .simple-head {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  width: min(430px, 100%);
  min-height: 86px;
  margin: 0;
  padding: 0 16px;
  transform: translateX(-50%);
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  background: rgba(17, 14, 20, 0.82);
  box-shadow: none;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.diary-control-shell .simple-head .chat-back {
  position: static;
  transform: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f6a6c2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.diary-control-shell .simple-head h2 {
  justify-self: center;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.diary-control-shell .diary-intro {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 28px 0 30px;
  text-align: center;
}

.diary-control-shell .diary-intro small,
.diary-control-shell .diary-view-tabs button span,
.diary-control-shell .diary-date-field > span,
.diary-card span,
.diary-card small,
.weekly-diary-card span,
.weekly-diary-card small,
.diary-monthly-placeholder span,
.weekly-diary-detail-head span,
.weekly-diary-detail-head small {
  font-family: "Space Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diary-control-shell .diary-intro small {
  color: rgba(223, 190, 200, 0.40);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.diary-control-shell .diary-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.diary-control-shell .diary-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 16px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 999px;
  background: rgba(17, 15, 20, 0.74);
  padding: 5px;
}

.diary-control-shell .diary-view-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(247, 237, 243, 0.54);
  padding: 0 8px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.diary-control-shell .diary-view-tabs button span {
  display: none;
}

.diary-control-shell .diary-view-tabs button.active {
  background: #f3a0c2;
  color: #171017;
}

.diary-control-shell .diary-actions,
.diary-control-shell .diary-weekly-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}

.diary-control-shell .diary-weekly-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diary-control-shell .diary-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diary-control-shell .diary-actions .send,
.diary-control-shell .diary-actions .ghost,
.weekly-diary-detail-actions .ghost {
  width: 100%;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.diary-control-shell .diary-actions .send {
  border: 1px solid #f6a6c2;
  background: #f6a6c2;
  color: #25131c;
  box-shadow: 0 8px 24px rgba(246, 166, 194, 0.14);
}

.diary-control-shell .diary-actions .ghost,
.weekly-diary-detail-actions .ghost {
  border: 1px solid rgba(246, 166, 194, 0.18);
  background: rgba(246, 166, 194, 0.06);
  color: #ffb7d0;
}

.diary-draft-backdrop {
  left: 50%;
  right: auto;
  width: min(430px, 100vw);
  padding: 16px;
  transform: translateX(-50%);
}

.diary-draft-modal {
  width: min(398px, 100%);
  max-height: min(76vh, 680px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(14, 11, 17, 0.92);
  padding: 20px;
  box-shadow: 0 24px 80px rgba(246, 166, 194, 0.12);
}

.diary-draft-head {
  display: grid;
  gap: 6px;
  padding-right: 34px;
  text-align: left;
}

.diary-draft-head span {
  color: rgba(246, 166, 194, 0.68);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.diary-draft-head h3 {
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
}

.diary-draft-head small {
  color: rgba(247, 237, 243, 0.52);
  font-size: 12px;
  line-height: 1.65;
}

.diary-draft-list {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: min(52vh, 480px);
  overflow: auto;
  padding-right: 3px;
}

.diary-draft-group {
  display: grid;
  gap: 12px;
}

.diary-draft-group h4 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 0 2px;
  background: rgba(14, 11, 17, 0.92);
  color: rgba(246, 166, 194, 0.66);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.diary-draft-card {
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(246, 166, 194, 0.07), rgba(12, 10, 15, 0.78));
  padding: 14px;
}

.diary-draft-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.diary-draft-card header span {
  color: rgba(246, 166, 194, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.diary-draft-card header button {
  border: 0;
  background: transparent;
  color: #ffb7d0;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 0;
}

.diary-draft-card strong {
  display: block;
  margin-bottom: 8px;
  color: #f8eff4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.diary-draft-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.72);
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-line;
}

.diary-draft-quotes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.diary-draft-quotes span {
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(246, 166, 194, 0.06);
  color: rgba(246, 166, 194, 0.78);
  font-size: 11px;
}

.diary-draft-empty {
  border: 1px dashed rgba(246, 166, 194, 0.22);
  border-radius: 16px;
  padding: 20px;
  color: rgba(247, 237, 243, 0.54);
  font-size: 13px;
  text-align: center;
}

.diary-draft-error {
  margin: 0;
  color: #ffb7d0;
  font-size: 12px;
  line-height: 1.6;
}

.diary-draft-generate-row {
  display: grid;
}

.diary-draft-generate-row .ghost {
  min-height: 40px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.08);
  color: #ffb7d0;
  font-size: 13px;
  font-weight: 600;
}

.diary-control-shell .diary-filter,
.diary-control-shell .diary-filter *,
.diary-control-shell .diary-date-picker {
  overflow: visible;
}

.diary-control-shell .diary-filter {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 38px;
  align-items: end;
  gap: 7px;
  margin: 0 0 18px;
}

.diary-control-shell .diary-filter > i {
  align-self: center;
  color: rgba(247, 237, 243, 0.25);
  font-style: normal;
  text-align: center;
}

.diary-control-shell .diary-date-field {
  position: static;
  z-index: auto;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.diary-control-shell .diary-date-field > span {
  color: rgba(247, 237, 243, 0.36);
  font-size: 9px;
  font-weight: 700;
}

.diary-control-shell .diary-date-field:has(.diary-date-panel),
.diary-control-shell .diary-filter:has(.diary-date-panel) {
  z-index: 90;
}

.diary-control-shell .diary-date-picker {
  position: static;
}

.diary-control-shell .diary-date-picker .memo-picker-trigger {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 6px;
  background: rgba(17, 15, 20, 0.72);
  box-shadow: none;
  color: rgba(247, 237, 243, 0.72);
  padding: 0 8px;
}

.diary-control-shell .diary-date-picker .memo-picker-trigger strong {
  min-width: 0;
  color: inherit;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diary-control-shell .diary-filter-clear {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 6px;
  background: rgba(17, 15, 20, 0.72);
  color: rgba(255, 183, 208, 0.74);
  padding: 0;
}

.diary-control-shell .diary-filter-clear .material-symbols-outlined {
  font-size: 20px;
  font-family: "Material Symbols Outlined" !important;
  font-feature-settings: "liga" !important;
  letter-spacing: 0 !important;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.diary-control-shell .diary-date-panel,
.diary-control-shell .diary-date-panel-end {
  position: fixed;
  left: 50%;
  right: auto;
  top: clamp(150px, 24vh, 220px);
  z-index: 150;
  display: grid;
  width: min(354px, calc(100vw - 32px));
  max-height: calc(100dvh - 190px);
  transform: translateX(-50%);
  overflow-y: auto;
  gap: 12px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 8px;
  background: rgba(15, 13, 18, 0.985);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  padding: 14px;
  color: #f7edf3;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.diary-control-shell .diary-date-panel .memo-calendar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.diary-control-shell .diary-date-panel .memo-calendar-head strong {
  justify-self: center;
  color: #f7edf3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diary-control-shell .diary-date-panel .memo-calendar-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f6a6c2;
  padding: 0;
  font-size: 24px;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid b {
  color: rgba(247, 237, 243, 0.38);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid > span,
.diary-control-shell .diary-date-panel .memo-calendar-grid > button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 36px;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid > button {
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(247, 237, 243, 0.70);
  padding: 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid > button.today {
  border-color: rgba(246, 166, 194, 0.42);
  color: #ffb7d0;
}

.diary-control-shell .diary-date-panel .memo-calendar-grid > button.active {
  border-color: #f6a6c2;
  background: #f6a6c2;
  color: #25131c;
}

.diary-control-shell .diary-date-clear {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 6px;
  background: rgba(246, 166, 194, 0.06);
  color: rgba(255, 183, 208, 0.78);
  padding: 0 10px;
  font-size: 12px;
}

.diary-control-shell .diary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.diary-card,
.weekly-diary-card {
  display: grid;
  align-items: start;
  gap: 10px;
  width: 100%;
  min-height: 150px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 24%, rgba(246, 166, 194, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 46%),
    rgba(17, 15, 20, 0.80);
  box-shadow: none;
  color: rgba(247, 237, 243, 0.92);
  padding: 22px 26px;
  text-align: left;
}

.diary-card {
  min-height: 132px;
  align-items: start;
  font-size: 15px;
}

.diary-card span,
.weekly-diary-card span {
  color: rgba(255, 183, 208, 0.74);
  font-size: 11px;
  font-weight: 400;
}

.diary-card strong,
.weekly-diary-card strong {
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
}

.diary-card p,
.weekly-diary-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(247, 237, 243, 0.58);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.weekly-diary-card p::before {
  content: none;
}

.diary-card small,
.weekly-diary-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(247, 237, 243, 0.34);
  font-size: 11px;
  font-weight: 450;
}

.weekly-diary-card small b,
.weekly-diary-card small i {
  font: inherit;
  color: inherit;
}

.weekly-diary-card small i {
  color: rgba(255, 138, 160, 0.78);
}

.weekly-diary-status {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-left: 0;
  border-radius: 8px;
  background: rgba(17, 15, 20, 0.68);
  padding: 14px;
}

.weekly-diary-status > i {
  display: block;
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: rgba(247, 237, 243, 0.28);
  box-shadow: 0 0 0 5px rgba(247, 237, 243, 0.03);
  animation: diary-status-breathe 2.2s ease-in-out infinite;
}

.weekly-diary-status.success > i {
  background: #8ee0b0;
  box-shadow: 0 0 0 5px rgba(142, 224, 176, 0.08), 0 0 18px rgba(142, 224, 176, 0.42);
}

.weekly-diary-status.empty > i,
.weekly-diary-status.working > i {
  background: #f6a6c2;
  box-shadow: 0 0 0 5px rgba(246, 166, 194, 0.08), 0 0 18px rgba(246, 166, 194, 0.34);
}

.weekly-diary-status.error > i {
  background: #ff8aa0;
  box-shadow: 0 0 0 5px rgba(255, 138, 160, 0.08), 0 0 18px rgba(255, 138, 160, 0.38);
}

.weekly-diary-status strong {
  display: block;
  color: #f7edf3;
  font-size: 15px;
  line-height: 1.4;
}

.weekly-diary-status p {
  margin: 4px 0 0;
  color: rgba(247, 237, 243, 0.52);
  font-size: 12px;
  line-height: 1.55;
}

.weekly-diary-status .ghost {
  margin-top: 10px;
  min-height: 32px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.06);
  color: #ffb7d0;
  padding: 0 14px;
}

@keyframes diary-status-breathe {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.diary-monthly-placeholder {
  display: grid;
  gap: 10px;
  min-height: 190px;
  border: 1px dashed rgba(246, 166, 194, 0.20);
  border-radius: 8px;
  background: rgba(17, 15, 20, 0.56);
  padding: 20px;
}

.diary-monthly-placeholder span {
  color: rgba(255, 183, 208, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.diary-monthly-placeholder strong {
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}

.diary-monthly-placeholder p {
  margin: 0;
  color: rgba(247, 237, 243, 0.56);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
}

.weekly-diary-modal {
  width: min(372px, calc(100vw - 52px));
  max-height: min(74dvh, 680px);
  overflow-y: auto;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 14%, rgba(246, 166, 194, 0.06), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 180px),
    #141017;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color: #f7edf3;
  padding: 30px 28px 0;
}

.diary-letter-modal {
  width: min(372px, calc(100vw - 52px));
  max-height: min(74dvh, 680px);
  overflow-y: auto;
  border: 1px solid rgba(243, 232, 222, 0.92);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(225, 210, 200, 0.20) 0,
      rgba(225, 210, 200, 0.20) 1px,
      transparent 1px,
      transparent 60px
    ),
    #f8f3ed;
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.62);
  color: #273142;
  padding: 42px 30px 0;
}

.diary-detail-head,
.weekly-diary-detail-head {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.12);
}

.diary-letter-modal .diary-detail-head {
  gap: 20px;
  margin: 0 0 24px;
  border-bottom: 0;
  padding-bottom: 0;
}

.diary-detail-head span,
.weekly-diary-detail-head span,
.weekly-diary-detail-head small {
  color: rgba(255, 183, 208, 0.58);
  font-size: 10px;
  font-weight: 700;
}

.diary-letter-modal .diary-detail-head span {
  color: #aeb5c4;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weekly-diary-detail-head span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.weekly-diary-detail-head span b {
  color: rgba(247, 237, 243, 0.46);
  font: inherit;
}

.diary-detail-head strong,
.weekly-diary-detail-head h3 {
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  line-height: 1.25;
}

.weekly-diary-modal .weekly-diary-detail-head {
  gap: 18px;
  margin: 0 0 22px;
  border-bottom: 0;
  padding-bottom: 0;
}

.weekly-diary-modal .weekly-diary-detail-head span {
  color: rgba(255, 183, 208, 0.76);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: 0;
  text-transform: none;
}

.weekly-diary-modal .weekly-diary-detail-head span::first-letter {
  text-transform: uppercase;
}

.weekly-diary-modal .weekly-diary-detail-head span > :first-child,
.weekly-diary-modal .weekly-diary-detail-head span {
  text-transform: uppercase;
}

.weekly-diary-modal .weekly-diary-detail-head span b {
  color: rgba(247, 237, 243, 0.36);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 520;
  letter-spacing: 0.04em;
}

.weekly-diary-modal .weekly-diary-detail-head h3 {
  color: rgba(247, 237, 243, 0.92);
  font-size: 25px;
  font-weight: 430;
  line-height: 1.35;
}

.weekly-diary-modal .weekly-diary-detail-head small {
  color: rgba(247, 237, 243, 0.32);
  font-size: 11px;
  font-weight: 430;
  letter-spacing: 0.04em;
}

.diary-letter-modal .diary-detail-head strong {
  color: #253047;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
}

.diary-content,
.weekly-diary-summary {
  white-space: pre-wrap;
  color: rgba(247, 237, 243, 0.82);
  font-size: 15px;
  line-height: 1.9;
}

.weekly-diary-modal .weekly-diary-summary {
  border-top: 1px solid rgba(246, 166, 194, 0.09);
  border-bottom: 1px solid rgba(246, 166, 194, 0.09);
  color: rgba(247, 237, 243, 0.66);
  padding: 18px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.78;
}

.diary-letter-modal .diary-content {
  color: #2b2e37;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 18px;
  line-height: 2.05;
}

.diary-letter-modal .diary-content::after {
  content: "— 老G";
  display: block;
  margin: 34px 14px 12px 0;
  color: #2b2e37;
  font-style: italic;
  text-align: right;
}

.weekly-diary-section {
  margin-top: 24px;
  border-top: 0;
  padding-top: 0;
}

.weekly-diary-section h4 {
  margin: 0;
  color: rgba(255, 183, 208, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 520;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.weekly-diary-section p {
  margin: 11px 0 0;
  color: rgba(247, 237, 243, 0.58);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.72;
}

.weekly-diary-section:nth-of-type(3) p {
  border: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
  color: rgba(247, 237, 243, 0.72);
  padding: 15px 17px;
}

.diary-letter-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  margin: 30px -30px 0;
  border-top: 1px solid rgba(38, 31, 45, 0.08);
  background: rgba(12, 10, 15, 0.96);
  padding: 16px 30px 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.diary-letter-actions .danger {
  justify-self: center;
  min-width: 160px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffacd0;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 800;
}

.weekly-diary-detail-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  margin: 30px -28px 0;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(20, 16, 23, 0.94);
  padding: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.weekly-diary-modal .actions.weekly-diary-detail-actions .ghost,
.weekly-diary-modal .actions.weekly-diary-detail-actions .ghost:first-child {
  width: 100%;
  min-height: 72px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.92);
  box-shadow: none;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
  padding: 0 24px;
}

.weekly-diary-preview-modal {
  width: min(392px, calc(100vw - 36px));
  height: auto;
  max-height: min(82dvh, 740px);
  display: block;
  overflow-y: auto;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 10%, rgba(246, 166, 194, 0.06), transparent 24%),
    #141017;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color: #f7edf3;
  padding: 30px 24px 0;
}

.weekly-diary-preview-modal .weekly-diary-detail-head {
  gap: 12px;
  margin: 0 0 20px;
  border-bottom: 0;
  padding: 0;
}

.weekly-diary-preview-modal .weekly-diary-detail-head span {
  color: rgba(255, 183, 208, 0.58);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 520;
  letter-spacing: 0.08em;
}

.weekly-diary-preview-modal .weekly-diary-detail-head h3 {
  color: rgba(247, 237, 243, 0.92);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 430;
  line-height: 1.32;
}

.weekly-diary-preview-modal .weekly-diary-detail-head small {
  color: rgba(247, 237, 243, 0.34);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.weekly-diary-preview-modal .weekly-diary-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 0;
  overflow: visible;
  padding-bottom: 0;
}

.weekly-diary-preview-modal .weekly-diary-preview-column {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 18px;
  background: rgba(8, 7, 11, 0.20);
  padding: 18px;
}

.weekly-diary-preview-modal .weekly-diary-preview-column > span {
  justify-self: start;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.10);
  color: rgba(255, 183, 208, 0.72);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 520;
  letter-spacing: 0;
}

.weekly-diary-preview-modal .weekly-diary-preview-column > h4,
.weekly-diary-preview-modal .weekly-diary-preview-column > strong {
  margin: 0;
  color: rgba(247, 237, 243, 0.88);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 20px;
  font-weight: 430;
  line-height: 1.36;
}

.weekly-diary-preview-modal .weekly-diary-preview-column > div,
.weekly-diary-preview-modal .weekly-diary-preview-column > p {
  white-space: pre-wrap;
  color: rgba(247, 237, 243, 0.56);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.72;
}

.weekly-diary-preview-modal .weekly-diary-section {
  margin-top: 10px;
}

.weekly-diary-preview-modal .weekly-diary-section h4 {
  color: rgba(255, 183, 208, 0.42);
  font-size: 9px;
  font-weight: 520;
}

.weekly-diary-preview-modal .weekly-diary-section p,
.weekly-diary-preview-modal .weekly-diary-section:nth-of-type(3) p {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.52);
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.68;
}

.weekly-diary-preview-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px -24px 0;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(20, 16, 23, 0.95);
  padding: 14px 24px 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.weekly-diary-preview-modal .weekly-diary-preview-actions .send,
.weekly-diary-preview-modal .weekly-diary-preview-actions .ghost,
.weekly-diary-preview-modal .weekly-diary-preview-actions .send:first-child,
.weekly-diary-preview-modal .weekly-diary-preview-actions .ghost:first-child {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  box-shadow: none;
  padding: 0 12px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0;
}

.weekly-diary-preview-modal .weekly-diary-preview-actions .send,
.weekly-diary-preview-modal .weekly-diary-preview-actions .send:first-child {
  border: 1px solid rgba(246, 166, 194, 0.70);
  background: #f3a0c2;
  color: #171017;
}

.weekly-diary-preview-modal .weekly-diary-preview-actions .ghost,
.weekly-diary-preview-modal .weekly-diary-preview-actions .ghost:first-child {
  border: 1px solid rgba(246, 166, 194, 0.18);
  background: rgba(246, 166, 194, 0.05);
  color: rgba(247, 237, 243, 0.72);
}

@media (max-width: 380px) {
  .diary-control-shell.home-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .diary-control-shell .diary-filter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    gap: 7px;
  }

  .diary-control-shell .diary-filter > i {
    display: none;
  }

}

@media (max-height: 640px) {
  .diary-control-shell .diary-date-panel,
  .diary-control-shell .diary-date-panel-end {
    top: 96px;
    max-height: calc(100dvh - 116px);
  }
}

/* Senses / MCP visual integration. */
.senses-control-shell.home-shell {
  width: min(100%, 430px);
  max-width: 430px;
  margin: 0 auto;
  padding: 104px 16px 132px;
  background:
    radial-gradient(circle at 74% 0%, rgba(246, 166, 194, 0.10), transparent 36%),
    linear-gradient(180deg, rgba(21, 18, 24, 0.96), rgba(12, 10, 15, 0.98) 58%, #0c0a0f);
}

.senses-control-shell .simple-head {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 110;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  width: min(430px, 100vw);
  height: 86px;
  transform: translateX(-50%);
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 0;
  background: rgba(12, 10, 15, 0.90);
  box-shadow: none;
  padding: 0 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.senses-control-shell .simple-head .chat-back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #f6a6c2;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.senses-control-shell .simple-head h2 {
  justify-self: center;
  grid-column: 2;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(246, 166, 194, 0.28);
  transform: none;
  translate: none;
}

.senses-control-shell .senses-intro {
  display: grid;
  gap: 12px;
  padding: 28px 0 30px;
  text-align: center;
}

.senses-control-shell .senses-intro small {
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.senses-control-shell .senses-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.senses-control-shell .senses-section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 14px;
  color: rgba(223, 190, 200, 0.38);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.senses-control-shell .senses-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(246, 166, 194, 0.11);
}

.senses-control-shell .senses-card {
  display: block;
  overflow: visible;
  margin: 0 0 12px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 12px;
  background: rgba(17, 15, 20, 0.72);
  box-shadow: none;
  padding: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.senses-control-shell .senses-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 0;
  background: transparent;
  color: #f7edf3;
  padding: 16px;
  text-align: left;
}

.senses-control-shell .sense-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.08);
  color: #f6a6c2;
  font-size: 19px;
  line-height: 1;
}

.senses-control-shell .sense-icon .material-symbols-outlined {
  font-size: 20px;
}

.senses-control-shell .sense-info {
  min-width: 0;
}

.senses-control-shell .sense-info strong {
  display: block;
  overflow: hidden;
  color: rgba(247, 237, 243, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.senses-control-shell .sense-info span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: rgba(223, 190, 200, 0.48);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.senses-control-shell .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 25px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(223, 190, 200, 0.62);
  padding: 4px 10px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.senses-control-shell .status-badge.connected {
  border-color: rgba(156, 230, 200, 0.34);
  background: rgba(156, 230, 200, 0.08);
  color: #9ce6c8;
}

.senses-control-shell .status-badge.ready {
  border-color: rgba(255, 209, 138, 0.28);
  background: rgba(255, 209, 138, 0.07);
  color: #ffd18a;
}

.senses-control-shell .status-badge.planned {
  border-color: rgba(246, 166, 194, 0.14);
  color: rgba(246, 166, 194, 0.68);
  opacity: 0.74;
}

.senses-control-shell .sense-status-light {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: end;
  color: #ffd18a;
  background: #ffd18a;
  box-shadow: 0 0 9px rgba(255, 209, 138, 0.72), 0 0 1px rgba(255, 209, 138, 0.86);
}

.senses-control-shell .sense-status-light::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.18;
  filter: blur(4px);
  animation: senseLightBreath 1.8s ease-in-out infinite;
}

.senses-control-shell .sense-status-light.connected {
  color: #9ce6c8;
  background: #9ce6c8;
  box-shadow: 0 0 10px rgba(156, 230, 200, 0.76), 0 0 2px rgba(156, 230, 200, 0.9);
}

.senses-control-shell .sense-status-light.ready {
  color: #ffd18a;
  background: #ffd18a;
}

.senses-control-shell .sense-status-light.error {
  color: #ff6f8f;
  background: #ff6f8f;
  box-shadow: 0 0 11px rgba(255, 111, 143, 0.82), 0 0 2px rgba(255, 111, 143, 0.95);
}

@keyframes senseLightBreath {
  0%,
  100% {
    transform: scale(0.78);
    opacity: 0.16;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.36;
  }
}

.senses-control-shell .senses-card-body {
  display: grid;
  gap: 16px;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  padding: 16px;
}

.senses-control-shell .senses-form {
  display: grid;
  gap: 14px;
}

.senses-control-shell .senses-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.senses-control-shell .senses-row-top,
.senses-control-shell .senses-row-notifications {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.senses-control-shell .senses-row-weather-options {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
}

.senses-control-shell .senses-row-location,
.senses-control-shell .senses-row-location-bottom,
.senses-control-shell .senses-row-weather-api {
  grid-template-columns: 1fr;
}

.senses-control-shell .senses-row-weather-enable {
  grid-template-columns: 1fr;
}

.senses-control-shell .senses-form label {
  display: grid;
  gap: 6px;
  color: #f7edf3;
}

.senses-control-shell .senses-form .senses-toggle {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.senses-control-shell .senses-form label span {
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.senses-control-shell .senses-static-field {
  display: grid;
  gap: 6px;
}

.senses-control-shell .senses-static-field > span {
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.senses-control-shell .senses-form input[type="text"],
.senses-control-shell .senses-form input[type="password"],
.senses-control-shell .senses-form input:not([type]) {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(247, 237, 243, 0.94);
  padding: 9px 11px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.senses-control-shell .senses-form input::placeholder {
  color: rgba(223, 190, 200, 0.30);
}

.senses-control-shell .senses-form input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 34px;
  height: 20px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.senses-control-shell .senses-form input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(223, 190, 200, 0.58);
  transition: transform 0.16s ease, background 0.16s ease;
}

.senses-control-shell .senses-form input[type="checkbox"]:checked {
  border-color: rgba(156, 230, 200, 0.45);
  background: rgba(156, 230, 200, 0.11);
}

.senses-control-shell .senses-form input[type="checkbox"]:checked::after {
  transform: translateX(14px);
  background: #9ce6c8;
}

.senses-control-shell .senses-picker {
  position: relative;
  min-width: 132px;
}

.senses-control-shell .senses-picker-trigger {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  border-color: rgba(246, 166, 194, 0.14);
  background: rgba(255, 255, 255, 0.035);
  padding: 0 10px;
}

.senses-control-shell .senses-picker-panel {
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: 148px;
  z-index: 160;
}

.senses-control-shell .senses-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid rgba(246, 166, 194, 0.10);
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: transparent;
  color: rgba(247, 237, 243, 0.76);
  padding: 0;
  text-align: left;
}

.senses-control-shell .senses-switch-row strong {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.senses-control-shell .senses-switch-label {
  color: rgba(223, 190, 200, 0.48);
  font-size: 12px;
  font-weight: 700;
}

.senses-control-shell .senses-switch-row i {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.18);
  box-shadow: inset 0 0 0 1px rgba(246, 166, 194, 0.14);
}

.senses-control-shell .senses-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(223, 190, 200, 0.70);
  transition: transform 0.16s ease, background 0.16s ease;
}

.senses-control-shell .senses-switch-row[aria-pressed="true"] i {
  background: #d8348b;
  box-shadow: 0 0 18px rgba(216, 52, 139, 0.22);
}

.senses-control-shell .senses-switch-row[aria-pressed="true"] i::after {
  transform: translateX(20px);
  background: #422033;
}

.senses-control-shell .senses-static-pill {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 132px;
  min-height: 40px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.82);
  padding: 0 10px;
}

.senses-control-shell .senses-static-pill .material-symbols-outlined {
  font-size: 18px;
}

.senses-control-shell .senses-static-pill strong {
  font-size: 13px;
  font-weight: 700;
}

.senses-control-shell .senses-static-pill small {
  color: rgba(223, 190, 200, 0.68);
  font-size: 11px;
  font-weight: 700;
}

.senses-control-shell .senses-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.senses-control-shell .senses-form .send,
.senses-control-shell .senses-form .ghost,
.senses-control-shell .senses-form .actions .ghost:first-child {
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: none;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.senses-control-shell .senses-form .send {
  border: 1px solid rgba(246, 166, 194, 0.42);
  background: #f6a6c2;
  color: #211018;
}

.senses-control-shell .senses-form .ghost,
.senses-control-shell .senses-form .actions .ghost:first-child,
.senses-control-shell .senses-status-pill {
  border: 1px solid rgba(246, 166, 194, 0.18);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(246, 166, 194, 0.74);
}

.senses-control-shell .senses-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
}

.senses-control-shell .senses-weather-result {
  margin: 2px 0 0;
  padding: 12px;
  text-align: left;
}

.senses-control-shell .senses-planned-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.senses-control-shell .senses-planned-card {
  display: grid;
  gap: 11px;
  min-height: 170px;
  border: 1px solid rgba(246, 166, 194, 0.11);
  border-radius: 12px;
  background: rgba(17, 15, 20, 0.58);
  padding: 16px;
  color: inherit;
  font: inherit;
  text-align: left;
}

.senses-control-shell button.senses-planned-card {
  appearance: none;
  cursor: pointer;
}

.senses-control-shell .senses-planned-card.is-interactive {
  box-shadow: 0 14px 34px rgba(255, 45, 85, 0.08);
}

.senses-control-shell .senses-planned-card.is-live {
  border-color: rgba(255, 45, 85, 0.22);
  background:
    radial-gradient(circle at 84% 6%, rgba(255, 45, 85, 0.10), transparent 38%),
    rgba(17, 15, 20, 0.66);
}

.senses-control-shell .senses-planned-card .sense-icon {
  margin-bottom: 2px;
}

.senses-control-shell .senses-planned-card strong {
  color: rgba(247, 237, 243, 0.64);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.35;
}

.senses-control-shell .senses-planned-card.is-live strong {
  color: rgba(247, 237, 243, 0.94);
}

.senses-control-shell .senses-planned-card p {
  margin: 0;
  color: rgba(223, 190, 200, 0.42);
  font-size: 12px;
  line-height: 1.55;
}

.senses-control-shell .senses-planned-card.is-live p {
  color: rgba(223, 190, 200, 0.58);
}

.senses-control-shell .xhs-sense-panel {
  margin-top: 14px;
}

.senses-control-shell .xhs-sense-panel-head {
  pointer-events: none;
}

@media (max-width: 380px) {
  .senses-control-shell.home-shell {
    padding-inline: 12px;
  }

  .senses-control-shell .senses-card-head {
    grid-template-columns: 38px minmax(0, 1fr) 22px;
  }

  .senses-control-shell .senses-card-head .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .senses-control-shell .senses-row-top,
  .senses-control-shell .senses-row-weather-options,
  .senses-control-shell .senses-row-notifications,
  .senses-control-shell .senses-planned-grid {
    grid-template-columns: 1fr;
  }

  .senses-control-shell .senses-picker {
    width: 100%;
  }

  .senses-control-shell .senses-picker-panel {
    right: auto;
    left: 0;
  }
}

/* Calendar top bar polish: match More scale and center title to the full shell. */
.calendar-control-shell .calendar-control-head {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.calendar-control-shell .calendar-control-head h2 {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  max-width: calc(100% - 116px);
  transform: translate(-50%, -50%);
  justify-self: auto;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

/* Favorites visual integration. */
@font-face {
  font-family: "FavoriteNoteHand";
  src: url("https://cissiexu0214-fontdatabase.static.hf.space/a1.woff2") format("woff2");
  font-display: swap;
}

.favorites-control-shell.home-shell {
  --fav-bg: #0c0a0f;
  --fav-surface: #151218;
  --fav-card: rgba(21, 18, 24, 0.82);
  --fav-ink: #f7edf3;
  --fav-muted: rgba(247, 237, 243, 0.58);
  --fav-dim: rgba(223, 190, 200, 0.38);
  --fav-pink: #f6a6c2;
  --fav-hot: #ff4fa3;
  --fav-line: rgba(246, 166, 194, 0.18);
  width: min(430px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 106px 16px calc(var(--bottom-nav-space) + 34px);
  background:
    radial-gradient(circle at 70% 0%, rgba(246, 166, 194, 0.08), transparent 35%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: var(--fav-ink);
}

.favorites-control-shell .favorites-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 24px;
  text-align: center;
}

.favorites-control-shell .favorites-summary > span {
  color: rgba(246, 166, 194, 0.52);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.favorites-control-shell .favorites-summary strong {
  color: rgba(247, 237, 243, 0.92);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: 0;
}

.favorites-control-shell .favorites-summary small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 1px solid rgba(223, 190, 200, 0.14);
  border-radius: 999px;
  background: rgba(223, 190, 200, 0.15);
  color: rgba(223, 190, 200, 0.78);
  padding: 0 14px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.favorites-control-shell .favorites-summary small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fav-pink);
  box-shadow: 0 0 10px rgba(246, 166, 194, 0.56);
  animation: favorite-saved-pulse 1.9s ease-in-out infinite;
}

@keyframes favorite-saved-pulse {
  0%, 100% {
    opacity: 0.58;
    transform: scale(0.92);
    box-shadow: 0 0 6px rgba(246, 166, 194, 0.30);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
    box-shadow: 0 0 10px rgba(246, 166, 194, 0.70), 0 0 20px rgba(246, 166, 194, 0.34);
  }
}

.favorites-control-shell .favorites-list-card {
  display: grid;
  gap: 24px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.favorites-control-shell .favorite-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: min(280px, 100%);
  max-width: 100%;
  margin: 0 auto 12px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 999px;
  background: rgba(29, 27, 32, 0.66);
  padding: 4px;
}

.favorites-control-shell .favorite-tabs button {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(223, 190, 200, 0.54);
  padding: 0 10px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0;
  box-shadow: none;
}

.favorites-control-shell .favorite-tabs button.active {
  background: var(--fav-hot);
  color: #fff7fb;
  box-shadow: 0 0 22px rgba(255, 79, 163, 0.36);
}

.favorites-control-shell .favorite-card-list {
  display: grid;
  gap: 12px;
}

.favorites-control-shell .favorite-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: start;
  min-height: 92px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(246, 166, 194, 0.06), transparent 28%),
    rgba(21, 18, 24, 0.72);
  padding: 15px;
  box-shadow: none;
  cursor: pointer;
}

.favorites-control-shell .favorite-card > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.08);
  color: var(--fav-pink);
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

.favorites-control-shell .favorite-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  color: rgba(247, 237, 243, 0.86);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.68;
}

.favorites-control-shell .favorite-card small {
  display: block;
  margin-top: 8px;
  color: rgba(223, 190, 200, 0.44);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

.favorites-control-shell .favorite-card > button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(223, 190, 200, 0.38);
  padding: 0;
  font-size: 18px;
}

.favorites-control-shell .favorite-note-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 34px 12px;
  padding: 20px 2px 96px;
  background: transparent;
}

.favorites-control-shell .favorite-note-card {
  --note-tilt: -0.8deg;
  --pin-color: #ff5b67;
  position: relative;
  display: block;
  width: 100%;
  min-height: 150px;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: #fff3f8;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  color: #4c3540;
  padding: 34px 14px 16px;
  transform: translateY(var(--note-lift, 0)) rotate(var(--note-tilt));
  cursor: pointer;
}

.favorites-control-shell .favorite-note-card:nth-child(4n + 1) {
  --note-tilt: -1.2deg;
  --note-lift: 0;
  --pin-color: #ff5b67;
  background: #fff2f8;
}

.favorites-control-shell .favorite-note-card:nth-child(4n + 2) {
  --note-tilt: 1.1deg;
  --note-lift: 18px;
  --pin-color: #26b7df;
  min-height: 136px;
  background: #fffde9;
  color: #51492c;
}

.favorites-control-shell .favorite-note-card:nth-child(4n + 3) {
  --note-tilt: -0.3deg;
  --note-lift: 6px;
  --pin-color: #b163d7;
  min-height: 162px;
  background: #eef8ff;
  color: #315273;
}

.favorites-control-shell .favorite-note-card:nth-child(4n) {
  --note-tilt: 1deg;
  --note-lift: 26px;
  --pin-color: #7ac060;
  min-height: 150px;
  background: #f0fff5;
  color: #315e45;
}

.favorites-control-shell .favorite-note-card::before {
  display: none;
}

.favorites-control-shell .favorite-note-card::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 50%;
  background: var(--pin-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(255, 255, 255, 0.36);
}

.favorites-control-shell .favorite-note-card small {
  display: block;
  color: currentColor;
  opacity: 0.52;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.favorites-control-shell .favorite-note-card strong {
  display: block;
  margin-top: 13px;
  color: currentColor;
  opacity: 0.58;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.42;
}

.favorites-control-shell .favorite-note-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  margin: 8px 0 0;
  color: currentColor;
  font-family: "FavoriteNoteHand", "GHomeNoteHand", "LXGW WenKai", "Kaiti SC", serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: 0;
}

.favorites-control-shell .favorite-note-delete {
  position: absolute;
  top: 13px;
  right: 14px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  opacity: 0.32;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.favorite-letter-modal {
  width: min(370px, calc(100vw - 42px));
  max-height: min(78dvh, 650px);
  overflow-y: auto;
  align-self: center;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
}

.favorite-letter-paper {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(239, 228, 218, 0.92);
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 43px, rgba(60, 49, 40, 0.055) 44px 45px),
    linear-gradient(180deg, #fdfaf5, #f7efe8);
  color: #2c292f;
  padding: 58px 28px 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.58);
}

.favorite-letter-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(44, 41, 47, 0.74);
  padding: 0;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.favorite-letter-paper::after {
  content: "SAVED";
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1.5px solid rgba(58, 45, 54, 0.10);
  border-radius: 50%;
  color: rgba(58, 45, 54, 0.32);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  transform: rotate(-15deg);
}

.favorite-letter-paper header {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  border-bottom: 1px solid rgba(58, 45, 54, 0.08);
  padding-bottom: 22px;
}

.favorite-letter-paper header small {
  color: rgba(58, 45, 54, 0.48);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.favorite-letter-paper h3 {
  margin: 0;
  color: #2c292f;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.3;
}

.favorite-letter-body {
  color: #2c292f;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.95;
  white-space: pre-wrap;
}

.favorite-letter-paper em {
  display: block;
  margin-top: 20px;
  color: rgba(58, 45, 54, 0.52);
  font-size: 13px;
  font-style: normal;
  line-height: 1.7;
}

.favorite-letter-foot {
  display: grid;
  justify-items: end;
  gap: 8px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px dotted rgba(58, 45, 54, 0.13);
  color: rgba(58, 45, 54, 0.78);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 16px;
}

.favorite-letter-foot small {
  color: rgba(58, 45, 54, 0.34);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.favorite-letter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 28px -28px 0;
  border-top: 1px solid rgba(58, 45, 54, 0.08);
  background: rgba(13, 10, 15, 0.96);
}

.favorite-letter-actions button {
  min-height: 58px;
  border: 0;
  background: transparent;
  color: rgba(255, 172, 208, 0.92);
  font-size: 14px;
  font-weight: 650;
}

.favorite-letter-actions button:first-child {
  color: rgba(255, 172, 208, 0.58);
}

.modal.favorite-note-modal,
.favorite-note-modal {
  width: min(360px, calc(100vw - 42px));
  max-height: min(82dvh, 720px);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  overflow: visible;
}

.favorite-note-modal-paper {
  position: relative;
  width: 100%;
  max-height: min(82dvh, 720px);
  overflow-y: auto;
  border: 0;
  border-radius: 4px;
  background: #fdfaf5;
  color: #3a2d36;
  padding: 48px 24px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.60);
}

.favorite-note-modal-paper::before {
  display: none;
}

.favorite-note-modal-paper::after {
  display: none;
}

.favorite-note-modal-paper small {
  display: block;
  color: rgba(58, 45, 54, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.favorite-note-modal-paper p {
  margin: 18px 0 0;
  color: #3a2d36;
  font-family: "FavoriteNoteHand", "GHomeNoteHand", "LXGW WenKai", "Kaiti SC", serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.48;
  white-space: pre-wrap;
}

.favorite-note-modal-paper em {
  display: block;
  margin-top: 22px;
  color: rgba(58, 45, 54, 0.50);
  font-size: 12px;
  font-style: normal;
  line-height: 1.7;
}

.favorite-note-modal .favorite-note-paper-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(58, 45, 54, 0.46);
  font-size: 26px;
}

@media (max-width: 380px) {
  .favorites-control-shell.home-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .favorites-control-shell .favorite-note-wall {
    column-gap: 10px;
  }

  .favorites-control-shell .favorite-note-card {
    min-height: 132px;
    padding: 29px 12px 14px;
  }

  .favorites-control-shell .favorite-note-card p {
    font-size: 16px;
  }
}

/* Chat note context cards: unify proactive-note quotes with the paper-note detail style. */
.chat-shell .quote-preview-note,
[data-chat-theme] .chat-shell .quote-preview-note {
  position: relative;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: 14px;
  padding: 0 38px 2px 0;
  overflow: visible;
}

.chat-shell .quote-note-card,
[data-chat-theme] .chat-shell .quote-note-card {
  position: relative;
  max-width: min(360px, 100%);
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: #fdfaf5;
  color: #2f2d31;
  padding: 46px 22px 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.chat-shell .ai-response-body .quote-note-card,
[data-chat-theme] .chat-shell .ai-response-body .quote-note-card {
  margin-bottom: 18px;
}

.chat-shell .quote-note-card::before,
[data-chat-theme] .chat-shell .quote-note-card::before {
  content: "edit_note";
  position: absolute;
  top: 16px;
  left: 50%;
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  transform: translateX(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(47, 45, 49, 0.92);
  font-family: "Material Symbols Outlined";
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 28;
}

.chat-shell .quote-note-card header,
[data-chat-theme] .chat-shell .quote-note-card header {
  display: none;
}

.chat-shell .quote-note-card p,
[data-chat-theme] .chat-shell .quote-note-card p {
  margin: 0;
  color: #2f2d31;
  font-family: "FavoriteNoteHand", "GHomeNoteHand", "LXGW WenKai", "Kaiti SC", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-shell .quote-preview-note > button,
[data-chat-theme] .chat-shell .quote-preview-note > button {
  position: absolute;
  top: 8px;
  right: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(47, 45, 49, 0.58);
  padding: 0;
  font-size: 26px;
  line-height: 1;
}

.chat-shell[data-theme="day"] .quote-note-card,
[data-chat-theme="day"] .chat-shell .quote-note-card {
  background: #fffaf8;
  color: #282329;
  box-shadow: 0 18px 46px rgba(112, 74, 88, 0.16);
}

.chat-shell[data-theme="day"] .quote-note-card::before,
[data-chat-theme="day"] .chat-shell .quote-note-card::before {
  color: rgba(40, 35, 41, 0.88);
}

.chat-shell[data-theme="day"] .quote-note-card p,
[data-chat-theme="day"] .chat-shell .quote-note-card p {
  color: #282329;
}

.chat-shell[data-theme="day"] .quote-preview-note > button,
[data-chat-theme="day"] .chat-shell .quote-preview-note > button {
  color: rgba(68, 48, 56, 0.62);
}

/* Photo Studio visual integration. */
.photo-studio-shell.home-shell {
  --studio-panel: rgba(21, 18, 24, 0.82);
  --studio-ink: #f7edf3;
  --studio-muted: rgba(247, 237, 243, 0.58);
  --studio-dim: rgba(223, 190, 200, 0.42);
  --studio-pink: #ff4fa3;
  --studio-pink-soft: #ffb7d0;
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 86px 16px calc(var(--bottom-nav-space) + 34px);
  background:
    radial-gradient(circle at 20% 9%, rgba(255, 79, 163, 0.12), transparent 30%),
    radial-gradient(circle at 84% 72%, rgba(255, 79, 163, 0.08), transparent 28%),
    linear-gradient(180deg, #151218 0%, #0c0a0f 70%, #0a080c 100%);
  color: var(--studio-ink);
}

.photo-studio-shell .photo-studio-head {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 35;
  width: min(430px, 100%);
  min-height: 86px;
  margin: 0;
  padding: 0 16px;
  transform: translateX(-50%);
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(17, 14, 20, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.photo-studio-shell .photo-studio-head h2 {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.photo-studio-intro {
  display: grid;
  gap: 12px;
  padding: 28px 0 30px;
  text-align: center;
}

.photo-shelf-panel header small,
.photo-detail-panel > small,
.photo-developing-view small,
.photo-failure-view small {
  color: rgba(255, 183, 208, 0.78);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.photo-studio-intro small {
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.photo-studio-intro p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.photo-subject-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 24px;
  padding: 5px;
  border: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
}

.photo-subject-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(247, 237, 243, 0.64);
  font-weight: 800;
}

.photo-subject-tabs button.active {
  background: var(--studio-pink);
  color: #1a0d14;
  box-shadow: 0 12px 28px rgba(255, 79, 163, 0.24);
}

.photo-camera-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.photo-camera-card {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px 16px;
  overflow: hidden;
  border: 1px solid rgba(246, 166, 194, 0.10);
  border-radius: 18px;
  background: rgba(17, 17, 22, 0.62);
  color: var(--studio-ink);
  text-align: left;
}

.photo-camera-card.active {
  border-color: rgba(255, 183, 208, 0.52);
  background: rgba(255, 79, 163, 0.07);
  box-shadow: 0 0 28px rgba(255, 79, 163, 0.10);
}

.photo-camera-card > .photo-camera-icon {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--studio-pink-soft);
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.photo-camera-icon.svg-icon {
  font-size: 0;
}

.photo-camera-icon.svg-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  color: inherit;
}

.photo-camera-card strong {
  margin-top: 8px;
  color: rgba(247, 237, 243, 0.92);
  font-size: 18px;
  line-height: 1.05;
}

.photo-camera-card small {
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-camera-card i {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 183, 208, 0.34);
  box-shadow: 0 0 8px rgba(255, 183, 208, 0.18);
  animation: photoPresetStandby 2.8s infinite ease-in-out;
}

.photo-camera-card.active i {
  background: var(--studio-pink-soft);
  box-shadow: 0 0 7px rgba(255, 183, 208, 0.92), 0 0 18px rgba(255, 79, 163, 0.58);
  animation: photoPresetActive 1.9s infinite ease-in-out;
}

@keyframes photoPresetStandby {
  0%, 100% { opacity: 0.32; transform: scale(0.82); }
  50% { opacity: 0.62; transform: scale(1); }
}

@keyframes photoPresetActive {
  0%, 100% {
    opacity: 0.76;
    transform: scale(0.86);
    box-shadow: 0 0 6px rgba(255, 183, 208, 0.72), 0 0 14px rgba(255, 79, 163, 0.38);
  }
  50% {
    opacity: 1;
    transform: scale(1.16);
    box-shadow: 0 0 10px rgba(255, 230, 239, 1), 0 0 24px rgba(255, 79, 163, 0.72);
  }
}

.photo-aspect-section {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.photo-aspect-section > span {
  color: rgba(223, 190, 200, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

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

.photo-aspect-tabs button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(246, 166, 194, 0.11);
  border-radius: 12px;
  background: rgba(17, 17, 22, 0.58);
  color: rgba(247, 237, 243, 0.62);
  text-align: left;
}

.photo-aspect-tabs button.active {
  border-color: rgba(255, 183, 208, 0.42);
  background: rgba(255, 79, 163, 0.08);
  color: var(--studio-pink-soft);
}

.photo-aspect-tabs strong {
  align-self: end;
  font-size: 12px;
  line-height: 1.1;
}

.photo-aspect-tabs small {
  align-self: start;
  color: rgba(223, 190, 200, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 8px;
}

.photo-aspect-shape {
  grid-row: 1 / 3;
  justify-self: center;
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.photo-aspect-shape.landscape {
  width: 24px;
  aspect-ratio: 16 / 9;
}

.photo-aspect-shape.square {
  width: 19px;
  aspect-ratio: 1;
}

.photo-aspect-shape.portrait {
  width: 16px;
  aspect-ratio: 3 / 4;
}

.photo-scene-field {
  position: relative;
  display: block;
  margin-bottom: 16px;
}

.photo-scene-field input {
  width: 100%;
  height: 58px;
  padding: 0 86px 0 18px;
  border: 1px solid rgba(246, 166, 194, 0.11);
  border-radius: 15px;
  background: rgba(8, 7, 11, 0.76);
  color: rgba(247, 237, 243, 0.88);
  outline: 0;
}

.photo-scene-field input:focus {
  border-color: rgba(255, 183, 208, 0.34);
}

.photo-scene-field span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(223, 190, 200, 0.42);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.photo-prompt-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.photo-prompt-trigger .material-symbols-outlined {
  font-size: 17px;
}

.photo-shutter-button,
.photo-primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f6459a, #ff62b2);
  color: #1a0d14;
  font-weight: 900;
  box-shadow: 0 20px 52px rgba(255, 79, 163, 0.28);
}

.photo-shutter-icon {
  display: block;
  width: 34px;
  height: 28px;
  flex: 0 0 auto;
}

.photo-primary-button:disabled {
  opacity: 0.58;
}

.photo-secondary-button {
  min-height: 44px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.80);
  font-weight: 800;
}

.photo-secondary-button.danger {
  color: #ff9cb5;
}

.photo-shelf-card {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(246, 166, 194, 0.12);
  border-radius: 24px;
  background: rgba(17, 17, 22, 0.68);
}

.photo-shelf-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--studio-ink);
  padding: 0;
  text-align: left;
}

.photo-shelf-head .material-symbols-outlined {
  color: var(--studio-pink-soft);
  font-size: 24px;
}

.photo-shelf-head strong {
  color: var(--studio-pink-soft);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.photo-shelf-head small {
  color: rgba(223, 190, 200, 0.58);
  font-size: 11px;
}

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

.photo-shelf-thumb,
.photo-shelf-empty-slot {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--studio-thumb-bg, rgba(255, 255, 255, 0.06));
}

.photo-shelf-thumb span {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  color: rgba(247, 237, 243, 0.78);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.photo-shelf-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-shelf-empty-slot {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: rgba(223, 190, 200, 0.42);
  font-size: 11px;
}

.photo-prompt-drawer,
.photo-shelf-panel,
.photo-detail-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(246, 166, 194, 0.15);
  border-radius: 22px;
  background: rgba(18, 15, 22, 0.92);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.24);
}

.photo-prompt-drawer {
  position: fixed;
  left: 50%;
  top: 86px;
  bottom: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(430px, 100%);
  height: calc(100dvh - 86px);
  max-height: none;
  margin: 0;
  padding: 22px 18px 0;
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 0;
  background: rgba(18, 15, 22, 0.98);
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.44);
  animation: photoDrawerUp 180ms ease-out;
}

.photo-studio-shell:has(.photo-prompt-drawer) .bottom-nav,
body:has(.photo-prompt-drawer) .bottom-nav {
  display: none !important;
}

.photo-prompt-drawer > header,
.photo-prompt-drawer > p {
  min-height: 0;
}

.photo-prompt-fields {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 183, 208, 0.34) transparent;
}

.photo-prompt-save-bar {
  position: relative;
  z-index: 3;
  margin: 0 -18px;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(246, 166, 194, 0.12);
  background: rgba(18, 15, 22, 0.98);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
}

.photo-prompt-save-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 220px);
  min-height: 42px;
  margin: 0 auto;
  border: 1px solid rgba(255, 183, 208, 0.22);
  border-radius: 8px;
  background: #f3a0bd;
  color: #241018;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(255, 79, 163, 0.14);
}

@keyframes photoDrawerUp {
  from { transform: translate(-50%, 18px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes photoBreath {
  0%, 100% { opacity: 0.62; box-shadow: 0 0 0 0 rgba(255, 123, 173, 0.42); }
  50% { opacity: 1; box-shadow: 0 0 0 6px rgba(255, 123, 173, 0); }
}

.photo-prompt-drawer header,
.photo-shelf-panel header,
.photo-detail-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.photo-prompt-drawer header button,
.photo-shelf-panel header button,
.photo-detail-panel header button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--studio-pink-soft);
  font-size: 22px;
}

.photo-prompt-drawer p {
  margin: 0 0 16px;
  color: var(--studio-muted);
  font-size: 12px;
}

.photo-prompt-drawer label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.photo-prompt-drawer label small {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--studio-dim);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.photo-prompt-drawer label small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff7bad;
  box-shadow: 0 0 0 0 rgba(255, 123, 173, 0.42);
  animation: photoBreath 1.8s ease-in-out infinite;
}

.photo-prompt-drawer label.photo-prompt-featured {
  padding: 12px;
  border: 1px solid rgba(255, 183, 208, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 123, 173, 0.12), rgba(255, 255, 255, 0.035));
}

.photo-prompt-drawer label.photo-prompt-featured small {
  color: rgba(255, 205, 223, 0.94);
}

.photo-prompt-drawer textarea {
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(246, 166, 194, 0.13);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(247, 237, 243, 0.82);
  padding: 12px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.55;
  outline: 0;
}

.photo-developing-view,
.photo-failure-view,
.photo-result-view {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: calc(100vh - 210px);
  align-content: center;
  text-align: center;
}

.photo-developing-paper,
.photo-broken-paper {
  position: relative;
  width: min(68vw, 250px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #17131a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

.photo-developing-paper.aspect-landscape {
  width: min(82vw, 340px);
  aspect-ratio: 16 / 9;
}

.photo-developing-paper.aspect-square {
  width: min(68vw, 260px);
  aspect-ratio: 1;
}

.photo-developing-paper.aspect-portrait {
  width: min(62vw, 230px);
  aspect-ratio: 3 / 4;
}

.photo-developing-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 183, 208, 0.26), transparent 24%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: photoDevelopGlow 2.6s infinite ease-in-out;
}

.photo-developing-paper i {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 183, 208, 0.20);
  border-radius: 3px;
}

@keyframes photoDevelopGlow {
  0%, 100% { opacity: 0.22; transform: translateY(-18%); }
  50% { opacity: 0.9; transform: translateY(8%); }
}

.photo-developing-view h3,
.photo-failure-view h3,
.photo-result-meta h3,
.photo-shelf-panel h3 {
  margin: 0;
  color: rgba(247, 237, 243, 0.94);
  font-family: "Songti SC", Georgia, serif;
  font-size: 24px;
}

.photo-result-meta h3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  line-height: 1.12;
}

.photo-result-title-film {
  display: inline-block;
  transform: translateY(0.04em);
}

.photo-developing-view p,
.photo-failure-view p {
  max-width: 270px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 14px;
}

.photo-polaroid-object {
  width: min(100%, 360px);
  padding: 12px 12px 48px;
  border-radius: 4px;
  background: #fdfafb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(-1deg);
}

.photo-polaroid-object.detail {
  width: min(100%, 300px);
  margin: 8px auto 20px;
}

.photo-polaroid-front-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.photo-polaroid-object.is-back {
  padding: 14px 14px 18px;
  transform: rotate(1deg);
}

.photo-polaroid-back {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  gap: 12px;
  min-height: 270px;
  padding: 18px;
  border: 1px solid rgba(214, 151, 171, 0.20);
  background:
    linear-gradient(rgba(214, 151, 171, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #fffafb, #f8eef2);
  background-size: 100% 28px, 100% 100%;
  color: #5d4d55;
}

.photo-polaroid-back small {
  color: rgba(173, 98, 120, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.photo-polaroid-back textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: #5d4d55;
  padding: 0;
  font-family: var(--note-font);
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1.72;
  outline: 0;
}

.photo-polaroid-back textarea::placeholder {
  color: rgba(93, 77, 85, 0.36);
}

.photo-polaroid-back > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.photo-polaroid-back button {
  border: 0;
  background: transparent;
  color: #ad6278;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
}

.photo-generated-frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--studio-result-bg);
  color: rgba(247, 237, 243, 0.86);
  font-family: "Songti SC", Georgia, serif;
  font-size: 30px;
  text-shadow: 0 0 24px rgba(255, 183, 208, 0.28);
}

.photo-generated-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-generated-frame.aspect-landscape {
  aspect-ratio: 16 / 9;
}

.photo-generated-frame.aspect-square {
  aspect-ratio: 1;
}

.photo-generated-frame.aspect-portrait {
  aspect-ratio: 3 / 4;
}

.photo-confirm-backdrop {
  background: rgba(6, 4, 8, 0.68);
  backdrop-filter: blur(12px);
}

.photo-confirm-modal {
  width: min(86vw, 270px);
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 183, 208, 0.2);
  border-radius: 14px;
  background: rgba(18, 15, 22, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  text-align: center;
}

.photo-confirm-modal > span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 183, 208, 0.62);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.photo-confirm-modal p {
  margin: 0;
  color: rgba(247, 237, 243, 0.9);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.photo-confirm-modal small {
  display: block;
  margin-top: 8px;
  color: rgba(247, 237, 243, 0.48);
  font-size: 10px;
  line-height: 1.5;
}

.photo-confirm-modal > div {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.photo-confirm-modal button {
  min-width: 64px;
  height: 30px;
  border: 1px solid rgba(255, 183, 208, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 237, 243, 0.74);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.photo-confirm-modal button:first-child {
  border-color: rgba(255, 123, 173, 0.42);
  background: rgba(255, 123, 173, 0.14);
  color: rgba(255, 205, 223, 0.94);
}

.photo-result-meta {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.photo-result-meta p,
.photo-detail-panel > small,
.photo-detail-meta-line small {
  margin: 0;
  color: var(--studio-dim);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.photo-result-meta blockquote,
.photo-detail-caption {
  max-width: 300px;
  margin: 0;
  color: var(--studio-pink-soft);
  font-family: "Songti SC", Georgia, serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
}

.photo-result-actions,
.photo-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.photo-result-actions .photo-primary-button {
  grid-column: 1 / -1;
}

.photo-result-actions .photo-result-prompt-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: center;
  width: auto;
  min-height: 0;
  margin: 4px 0 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.66);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.photo-result-prompt-button .material-symbols-outlined {
  font-size: 17px;
}

.photo-broken-paper {
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 183, 208, 0.34) 49%, rgba(255, 183, 208, 0.34) 51%, transparent 52%),
    #17131a;
}

.photo-shelf-panel,
.photo-detail-panel {
  min-height: calc(100vh - 240px);
}

.photo-detail-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 86px - var(--bottom-nav-space) - 28px);
  margin: 0;
  padding: 22px 10px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.photo-detail-panel > header {
  padding: 0 4px;
}

.photo-detail-panel .photo-polaroid-object {
  margin-top: 22px;
}

.photo-detail-meta-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
}

.photo-pin-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(247, 237, 243, 0.3);
  box-shadow: none;
  transform: rotate(0deg) scale(1);
  transition: color 140ms ease, transform 140ms ease, text-shadow 140ms ease;
}

.photo-pin-button .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 330, "GRAD" 0, "opsz" 20;
}

.photo-pin-button.active {
  color: #ff7bad;
  text-shadow: 0 0 10px rgba(255, 123, 173, 0.62), 0 0 20px rgba(255, 123, 173, 0.28);
  transform: rotate(24deg) scale(1.04);
}

.photo-pin-button.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 560, "GRAD" 0, "opsz" 20;
}

.photo-detail-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin-top: 18px;
}

.photo-detail-caption-row .photo-detail-caption {
  flex: 1 1 auto;
}

.photo-detail-caption-row button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.78);
  font-size: 12px;
  font-weight: 850;
}

.photo-detail-panel .photo-detail-actions {
  margin-top: auto;
  padding: 28px 4px 8px;
  border-top: 0;
}

.photo-detail-panel .photo-detail-actions .photo-secondary-button {
  justify-self: center;
  width: auto;
  min-height: 0;
  padding: 8px 14px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.68);
  font-size: 12px;
  font-weight: 800;
  box-shadow: none !important;
}

.photo-detail-panel .photo-detail-actions .photo-secondary-button.danger {
  color: rgba(255, 140, 170, 0.78);
}

.photo-shelf-full-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-shelf-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed rgba(246, 166, 194, 0.18);
  border-radius: 18px;
  color: var(--studio-muted);
  text-align: center;
  padding: 18px;
}

.photo-detail-panel header strong {
  min-width: 0;
  color: rgba(247, 237, 243, 0.88);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fiction share cards follow Chat's optional day palette without changing other pages. */
.chat-shell[data-theme="day"] .fiction-share-card,
[data-chat-theme="day"] .chat-shell .fiction-share-card {
  border: 1px solid rgba(118, 86, 154, 0.26);
  background: #f7f1f6;
  color: #302a2e;
}

.chat-shell[data-theme="day"] .fiction-share-cover-shade,
[data-chat-theme="day"] .chat-shell .fiction-share-cover-shade {
  background: linear-gradient(180deg, rgba(247, 241, 246, 0.02), rgba(247, 241, 246, 0.92));
}

.chat-shell[data-theme="day"] .fiction-share-body h4,
[data-chat-theme="day"] .chat-shell .fiction-share-body h4 {
  color: #76569a;
}

.chat-shell[data-theme="day"] .fiction-share-body p,
[data-chat-theme="day"] .chat-shell .fiction-share-body p {
  color: rgba(48, 42, 46, 0.82);
}

.chat-shell[data-theme="day"] .fiction-share-body button,
[data-chat-theme="day"] .chat-shell .fiction-share-body button {
  border-color: rgba(118, 86, 154, 0.28);
  background: rgba(118, 86, 154, 0.07);
  color: #76569a;
}

.chat-shell[data-theme="day"] .quote-fiction-compact,
[data-chat-theme="day"] .chat-shell .quote-fiction-compact {
  border: 0;
  border-left: 2px solid #d986a3;
  border-radius: 0;
  background: transparent;
}

/* Memory Palace v3 handoff adaptation */
.memory-palace-v3 {
  --mem-bg: #0c0a0f;
  --mem-surface: #151218;
  --mem-card: rgba(31, 28, 34, 0.48);
  --mem-ink: #f7edf3;
  --mem-muted: rgba(247, 237, 243, 0.58);
  --mem-dim: rgba(223, 190, 200, 0.38);
  --mem-pink: #f6a6c2;
  --mem-pink-bright: #ffb7d0;
  --mem-line: rgba(255, 255, 255, 0.105);
  --mem-line-soft: rgba(255, 255, 255, 0.075);
  --more-eraser: #f6a6c2;
  --more-eraser-bright: #ffb7d0;
  --more-eraser-soft: rgba(246, 166, 194, 0.13);
  --more-eraser-line: rgba(246, 166, 194, 0.18);
  background:
    radial-gradient(circle at 60% 6%, rgba(246, 166, 194, 0.075), transparent 32%),
    linear-gradient(180deg, #151218 0%, #100e13 100%);
  color: var(--mem-ink);
  overflow-x: hidden;
}

.memory-palace-v3 *,
.memory-palace-v3 *::before,
.memory-palace-v3 *::after {
  box-sizing: border-box;
}

.memory-palace-v3 button,
.memory-palace-v3 input,
.memory-palace-v3 textarea {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.memory-palace-v3 button {
  cursor: pointer;
}

.memory-palace-v3.memory-shell {
  width: min(430px, 100%);
  max-width: 430px;
  min-height: 100vh;
  padding: 86px 16px calc(var(--bottom-nav-space) + 30px);
}

.memory-palace-v3 .memory-control-head {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 86px;
  width: min(430px, 100%);
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10);
  background: rgba(17, 14, 20, 0.80);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.memory-palace-v3 .memory-control-head .more-back {
  justify-self: start;
}

.memory-palace-v3 .memory-control-head h2 {
  justify-self: center;
  margin: 0;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memory-palace-v3 .mem-hero {
  display: grid;
  gap: 12px;
  padding: 28px 0 30px;
  text-align: center;
}

.memory-palace-v3 .mem-hero small {
  color: rgba(223, 190, 200, 0.40);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.memory-palace-v3 .mem-hero p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

.memory-palace-v3 .mem-status-capsules {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-palace-v3 .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.memory-palace-v3 .status-pill b {
  color: var(--mem-pink-bright);
  font-weight: 700;
}

.memory-palace-v3 .status-pill.active {
  border-color: rgba(246, 166, 194, 0.22);
  background: rgba(246, 166, 194, 0.075);
  color: var(--mem-pink);
}

.memory-palace-v3 .status-pill.pending {
  border-color: rgba(210, 187, 255, 0.16);
  background: rgba(210, 187, 255, 0.045);
}

.memory-palace-v3 .mem-carousel-container {
  margin: 20px 0 26px;
}

.memory-palace-v3 .mem-room-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 10px;
}

.memory-palace-v3 .mem-room-carousel::-webkit-scrollbar {
  display: none;
}

.memory-palace-v3 .mem-room-card {
  flex: 0 0 78%;
  min-height: 154px;
  padding: 20px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 22px;
  background: rgba(31, 28, 34, 0.46);
  color: var(--mem-ink);
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.memory-palace-v3 .mem-room-card:not(.active) {
  opacity: 0.62;
  transform: scale(0.94);
}

.memory-palace-v3 .mem-room-card.active {
  border-color: rgba(255, 176, 204, 0.34);
  box-shadow: 0 0 24px rgba(255, 176, 204, 0.055);
  background: rgba(31, 28, 34, 0.58);
}

.memory-palace-v3 .mem-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.memory-palace-v3 .mem-room-icon {
  color: var(--room-color, var(--mem-pink));
  font-size: 22px;
  line-height: 1;
}

.memory-palace-v3 .mem-room-head small {
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.memory-palace-v3 .mem-room-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--mem-ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.memory-palace-v3 .mem-room-card em {
  display: block;
  color: var(--mem-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-palace-v3 .mem-carousel-indicator {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}

.memory-palace-v3 .mem-carousel-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.memory-palace-v3 .mem-carousel-indicator span.active {
  width: 16px;
  background: var(--mem-pink);
  box-shadow: 0 0 10px rgba(255, 176, 204, 0.42);
}

.memory-palace-v3 .mem-summary-widget {
  position: relative;
  margin: 0 0 34px;
  padding: 20px 20px 18px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 24px;
  background: rgba(31, 28, 34, 0.48);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.memory-palace-v3 .mem-summary-widget::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--room-color, var(--mem-pink));
  opacity: 0.78;
}

.memory-palace-v3 .mem-summary-widget header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.memory-palace-v3 .mem-summary-widget .label,
.memory-palace-v3 .mem-list-head h3,
.memory-palace-v3 .mem-filter-group label {
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.memory-palace-v3 .mem-summary-widget header strong {
  display: block;
  margin-top: 6px;
  color: var(--mem-ink);
  font-size: 20px;
  line-height: 1.2;
}

.memory-palace-v3 .summary-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.memory-palace-v3 .btn-action,
.memory-palace-v3 .mem-filter-footer button,
.memory-palace-v3 .mem-maint-item button,
.memory-palace-v3 .memory-entry-actions button {
  border: 0;
  background: transparent;
  color: var(--mem-pink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.memory-palace-v3 .btn-action.strong {
  color: var(--mem-pink-bright);
}

.memory-palace-v3 .quote-text,
.memory-palace-v3 .memory-summary-editor {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--mem-ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1.78;
  resize: vertical;
  outline: none;
}

.memory-palace-v3 .memory-summary-editor::placeholder {
  color: rgba(247, 237, 243, 0.38);
}

.memory-palace-v3 .mem-summary-meta,
.memory-palace-v3 .memory-summary-stale {
  margin-top: 10px;
  color: var(--mem-dim);
  font-size: 11px;
  line-height: 1.5;
}

.memory-palace-v3 .mem-list-section {
  padding: 0;
}

.memory-palace-v3 .mem-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.memory-palace-v3 .mem-list-head h3 {
  margin: 0 0 5px;
}

.memory-palace-v3 .mem-list-head span {
  color: var(--mem-dim);
  font-size: 11px;
}

.memory-palace-v3 .btn-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--mem-ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.memory-palace-v3 .btn-filter-trigger .material-symbols-outlined {
  font-size: 15px;
}

.memory-palace-v3 .mem-filter-strip {
  display: none;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 20px;
  background: rgba(31, 28, 34, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.memory-palace-v3 .mem-filter-strip.open {
  display: grid;
  gap: 14px;
}

.memory-palace-v3 .mem-filter-strip input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--mem-ink);
  outline: none;
}

.memory-palace-v3 .mem-filter-group {
  display: grid;
  gap: 8px;
}

.memory-palace-v3 .mem-filter-group > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-palace-v3 .mem-filter-group button {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--mem-muted);
  font-size: 11px;
  font-weight: 700;
}

.memory-palace-v3 .mem-filter-group button.active {
  border-color: rgba(246, 166, 194, 0.30);
  background: rgba(246, 166, 194, 0.11);
  color: var(--mem-pink-bright);
}

.memory-palace-v3 .mem-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.memory-palace-v3 .mem-filter-footer span {
  color: var(--mem-dim);
  font-size: 10px;
}

.memory-palace-v3 .mem-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.memory-palace-v3 .mem-filter-row label,
.memory-palace-v3 .mem-filter-group label {
  margin: 0;
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.memory-palace-v3 .mem-filter-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-palace-v3 .mem-filter-row-status {
  padding: 1px 0;
}

.memory-palace-v3 .mem-filter-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.memory-palace-v3 .mem-filter-row button,
.memory-palace-v3 .mem-filter-options button {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--mem-muted);
  font-size: 11px;
  font-weight: 500;
}

.memory-palace-v3 .mem-filter-row button.active,
.memory-palace-v3 .mem-filter-options button.active {
  border-color: rgba(246, 166, 194, 0.30);
  background: rgba(246, 166, 194, 0.11);
  color: var(--mem-pink-bright);
}

.memory-palace-v3 .mem-fragment-list.memory-entry-list {
  display: grid;
  gap: 10px;
}

.memory-palace-v3 .memory-entry.fragment-item {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 18px;
  background: rgba(31, 28, 34, 0.42);
  color: var(--mem-ink);
  cursor: pointer;
}

.memory-palace-v3 .memory-entry.fragment-item .item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.memory-palace-v3 .memory-entry.fragment-item .meta-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.memory-palace-v3 .memory-entry.fragment-item .type-label {
  padding: 3px 7px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 6px;
  color: var(--mem-pink);
  white-space: nowrap;
}

.memory-palace-v3 .memory-entry.fragment-item p {
  margin: 0;
  color: rgba(247, 237, 243, 0.88);
  font-size: 14px;
  line-height: 1.66;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.memory-palace-v3 .memory-entry.fragment-item small {
  color: var(--mem-dim);
  font-size: 11px;
  display: block;
  margin: 0;
  letter-spacing: 0.08em;
}

.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
}

.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions button:first-child,
.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.78);
  font-family: var(--ui-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: none;
}

.memory-palace-v3 .mem-empty {
  border-color: var(--mem-line-soft);
  color: var(--mem-muted);
}

.memory-palace-v3 .mem-maintenance-section {
  margin-top: 32px;
  padding: 0;
}

.memory-palace-v3 .mem-maintenance-card {
  overflow: hidden;
  border: 1px solid var(--mem-line-soft);
  border-radius: 22px;
  background: rgba(31, 28, 34, 0.42);
}

.memory-palace-v3 .mem-maint-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--mem-ink);
  text-align: left;
}

.memory-palace-v3 .mem-maint-head strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.memory-palace-v3 .mem-maint-head small {
  color: var(--mem-dim);
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.memory-palace-v3 .mem-maint-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.memory-palace-v3 .mem-maint-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.18);
}

.memory-palace-v3 .mem-maint-item strong {
  display: block;
  color: var(--mem-ink);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.memory-palace-v3 .mem-maint-item span {
  color: var(--mem-dim);
  font-size: 10px;
}

.memory-palace-v3 .mem-maint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.memory-palace-v3 .mem-maint-grid button,
.memory-palace-v3 .mem-maint-global {
  min-height: 46px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--mem-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

@media (min-width: 760px) {
  .memory-palace-v3.memory-shell {
    width: min(430px, calc(100% - 40px));
  }
}

.memory-palace-v3 .mem-maint-global {
  color: rgba(247, 237, 243, 0.6);
}

@media (max-width: 390px) {
  .memory-palace-v3 .mem-hero h1 {
    font-size: 20px;
  }

  .memory-palace-v3 .status-pill {
    padding: 5px 10px;
    font-size: 9px;
  }

  .memory-palace-v3 .mem-room-card {
    flex-basis: 76%;
  }
}

/* Memory Palace v3 refinements */
.memory-palace-v3 .mem-room-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.08);
}

.memory-palace-v3 .mem-room-art-wrap {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--room-color, var(--mem-pink)) 18%, transparent);
}

.memory-palace-v3 .mem-room-icon {
  color: var(--room-color, var(--mem-pink));
}

.memory-palace-v3 .mem-room-icon-mask {
  display: block;
  width: 27px;
  height: 27px;
  background: var(--room-color, var(--mem-pink));
  -webkit-mask-image: var(--room-icon-url);
  mask-image: var(--room-icon-url);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.memory-palace-v3 .mem-room-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.86;
}

.memory-palace-v3 .mem-room-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.memory-palace-v3 .mem-room-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.memory-palace-v3 .mem-room-card strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.memory-palace-v3 .mem-room-card em {
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.memory-palace-v3 .mem-summary-widget {
  padding: 18px 18px 16px;
}

.memory-palace-v3 .quote-text,
.memory-palace-v3 .memory-summary-editor {
  font-size: 14px;
  font-style: normal;
  line-height: 1.66;
}

.memory-palace-v3 .memory-summary-editor {
  min-height: 118px;
}

.memory-palace-v3 .mem-list-section {
  margin-top: 20px;
}

.memory-palace-v3 .mem-list-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 18px;
  background: rgba(31, 28, 34, 0.45);
  color: var(--mem-ink);
  text-align: left;
}

.memory-palace-v3 .mem-list-toggle span:first-child {
  display: grid;
  gap: 4px;
}

.memory-palace-v3 .mem-list-toggle b {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.memory-palace-v3 .mem-list-toggle small {
  color: var(--mem-dim);
  font-size: 11px;
}

.memory-palace-v3 .mem-list-section.open .mem-list-toggle {
  margin-bottom: 14px;
}

.memory-palace-v3 .mem-list-section.open .mem-list-head h3 {
  display: none;
}

.memory-palace-v3 .mem-list-section.open .mem-list-head {
  justify-content: flex-end;
}

.memory-palace-v3 .btn-action,
.memory-palace-v3 .mem-filter-footer button,
.memory-palace-v3 .mem-maint-item button,
.memory-palace-v3 .memory-entry-actions button,
.memory-palace-v3 .memory-summary-pill,
.memory-palace-v3 .btn-filter-trigger,
.memory-palace-v3 .mem-maint-grid button,
.memory-palace-v3 .mem-maint-global {
  font-weight: 500;
}

.memory-palace-v3 .mem-filter-group button {
  font-weight: 500;
}

.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions button:first-child,
.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions button {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.memory-palace-v3 .mem-maintenance-section {
  margin-top: 24px;
}

.memory-palace-v3 .mem-maint-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.memory-palace-v3 .mem-maint-actions button {
  border: 0;
  background: transparent;
  color: var(--mem-pink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.memory-palace-v3 .mem-maint-results {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.memory-palace-v3 .mem-maint-results .home-card,
.memory-palace-v3 .memory-merge-archive-card {
  margin: 0;
  border: 1px solid var(--mem-line-soft);
  border-radius: 18px;
  background: rgba(15, 13, 18, 0.44);
  box-shadow: none;
}

.memory-palace-v3 .mem-maint-results .home-card header,
.memory-palace-v3 .memory-merge-archive-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.memory-palace-v3 .mem-maint-results .home-icon,
.memory-palace-v3 .memory-merge-archive-card .home-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.10);
  color: var(--mem-pink);
}

.memory-palace-v3 .memory-lifecycle-card p,
.memory-palace-v3 .memory-merge-card p {
  color: var(--mem-muted);
  font-size: 12px;
  line-height: 1.55;
}

.memory-palace-v3 .memory-lifecycle-row,
.memory-palace-v3 .memory-lifecycle-stats,
.memory-palace-v3 .memory-lifecycle-coverage {
  font-size: 11px;
}

.memory-palace-v3 .memory-lifecycle-item,
.memory-palace-v3 .memory-merge-item,
.memory-palace-v3 .memory-merge-revert-item {
  border-color: var(--mem-line-soft);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
}

.memory-palace-v3 .memory-merge-item-head strong,
.memory-palace-v3 .memory-lifecycle-item strong,
.memory-palace-v3 .memory-merge-revert-item strong {
  font-size: 13px;
}

.memory-palace-v3 .memory-merge-actions,
.memory-palace-v3 .memory-merge-revert-actions,
.memory-palace-v3 .memory-lifecycle-actions {
  gap: 10px;
}

.memory-palace-v3 .memory-merge-established-detail {
  border-color: var(--mem-line-soft);
  background: rgba(0, 0, 0, 0.16);
}

.memory-palace-v3 .memory-merge-established-detail summary {
  color: var(--mem-pink);
  font-weight: 500;
}

.memory-palace-v3.memory-index-page {
  padding-top: 106px;
}

.memory-palace-v3 .memory-merge-archive-toolbar {
  display: grid;
  gap: 10px;
}

.memory-palace-v3 .memory-merge-archive-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--mem-line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--mem-ink);
  padding: 0 13px;
}

.memory-detail-backdrop {
  align-items: flex-start;
  padding: 70px 16px 24px;
}

.memory-detail-backdrop .memory-detail-modal {
  width: min(430px, 100%);
  max-width: 430px;
  max-height: calc(100vh - 94px);
  padding: 22px 18px;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--room-color), transparent 86%), transparent 34%),
    rgba(12, 10, 15, 0.94);
  color: var(--mem-ink, #f7edf3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.memory-detail-backdrop .memory-detail-head {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.memory-detail-backdrop .memory-detail-head > span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--room-color), transparent 18%);
  color: #fff;
  font-size: 16px;
}

.memory-detail-backdrop .memory-detail-head h3 {
  color: #f7edf3;
  font-size: 20px;
  line-height: 1.25;
}

.memory-detail-backdrop .memory-detail-head small,
.memory-detail-backdrop .memory-detail-block > label,
.memory-detail-backdrop .memory-detail-stats span {
  color: rgba(223, 190, 200, 0.44);
  font-size: 10px;
}

.memory-detail-backdrop .memory-detail-text,
.memory-detail-backdrop .memory-interpretation,
.memory-detail-backdrop .memory-detail-fields input,
.memory-detail-backdrop .memory-detail-fields input:disabled {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
  color: #f7edf3;
}

.memory-detail-backdrop .memory-detail-text {
  min-height: 190px;
  padding: 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.65;
}

.memory-detail-backdrop .memory-choice span,
.memory-detail-backdrop .memory-stars span {
  min-height: 32px;
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 237, 243, 0.66);
  font-weight: 500;
}

.memory-detail-backdrop .memory-choice input:checked + span,
.memory-detail-backdrop .memory-stars input:checked + span {
  border-color: color-mix(in srgb, var(--room-color), white 34%);
  background: color-mix(in srgb, var(--room-color), transparent 78%);
  color: #f7edf3;
}

.memory-detail-backdrop .memory-detail-actions .send,
.memory-detail-backdrop .memory-detail-actions .ghost {
  border: 0;
  background: transparent;
  color: var(--mem-pink, #f6a6c2);
  font-weight: 500;
  box-shadow: none;
}

/* Memory Palace final black-pink cleanup */
.memory-palace-v3 {
  background:
    linear-gradient(180deg, #0d0a10 0%, #0b090d 46%, #0c0a0f 100%) !important;
}

.memory-palace-v3 .mem-list-section,
.memory-palace-v3 .mem-list-section.open {
  background: transparent !important;
  box-shadow: none !important;
}

.memory-palace-v3 .mem-list-toggle {
  background: rgba(17, 14, 20, 0.78) !important;
  border-color: rgba(246, 166, 194, 0.13) !important;
  box-shadow: none !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card,
.memory-palace-v3 .mem-maint-results .memory-merge-card,
.memory-palace-v3 .memory-merge-archive-card {
  width: 100% !important;
  overflow: hidden !important;
  padding: 16px !important;
  border-color: rgba(246, 166, 194, 0.13) !important;
  border-radius: 22px !important;
  background: rgba(14, 12, 17, 0.74) !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header,
.memory-palace-v3 .mem-maint-results .memory-merge-card header,
.memory-palace-v3 .memory-merge-archive-card header {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  margin: 0 0 14px !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header > div:nth-child(2),
.memory-palace-v3 .mem-maint-results .memory-merge-card header > div:nth-child(2),
.memory-palace-v3 .memory-merge-archive-card header > div:nth-child(2) {
  min-width: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header strong,
.memory-palace-v3 .mem-maint-results .memory-merge-card header strong,
.memory-palace-v3 .memory-merge-archive-card header strong {
  display: block !important;
  color: #f7edf3 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  letter-spacing: 0.04em !important;
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header span,
.memory-palace-v3 .mem-maint-results .memory-merge-card header span,
.memory-palace-v3 .memory-merge-archive-card header span {
  display: block !important;
  margin-top: 3px !important;
  color: rgba(223, 190, 200, 0.48) !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
}

.memory-palace-v3 .mem-maint-results .memory-vector-actions,
.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header .memory-summary-pill,
.memory-palace-v3 .mem-maint-results .memory-merge-card header .memory-summary-pill {
  grid-column: 1 / -1 !important;
}

.memory-palace-v3 .mem-maint-results .memory-vector-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 2px !important;
}

.memory-palace-v3 .memory-summary-pill,
.memory-palace-v3 .mem-maint-results button,
.memory-palace-v3 .memory-lifecycle-actions button,
.memory-palace-v3 .memory-merge-actions button,
.memory-palace-v3 .memory-merge-revert-actions button {
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.82) !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.memory-palace-v3 .memory-lifecycle-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 14px !important;
  color: rgba(223, 190, 200, 0.48) !important;
  font-size: 11px !important;
  writing-mode: horizontal-tb !important;
}

.memory-palace-v3 .memory-lifecycle-row label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

.memory-palace-v3 .memory-lifecycle-row input {
  width: 54px !important;
  min-height: 30px !important;
  border: 1px solid rgba(246, 166, 194, 0.14) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #f7edf3 !important;
  text-align: center !important;
}

.memory-palace-v3 .memory-lifecycle-stats {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 0 0 12px !important;
}

.memory-palace-v3 .memory-lifecycle-stats span {
  min-height: 46px !important;
  padding: 8px 4px !important;
  border: 1px solid rgba(246, 166, 194, 0.12) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.025) !important;
  color: rgba(223, 190, 200, 0.45) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 8px !important;
  letter-spacing: 0.12em !important;
  text-align: center !important;
}

.memory-palace-v3 .memory-lifecycle-stats b {
  display: block !important;
  margin-bottom: 2px !important;
  color: #f7edf3 !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}

.memory-palace-v3 .memory-lifecycle-coverage {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
}

.memory-palace-v3 .memory-lifecycle-coverage span {
  color: rgba(223, 190, 200, 0.48) !important;
  font-size: 10px !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card p,
.memory-palace-v3 .mem-maint-results .memory-merge-card p {
  margin: 0 !important;
  color: rgba(247, 237, 243, 0.58) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  writing-mode: horizontal-tb !important;
}

.memory-detail-backdrop .memory-detail-modal {
  background:
    radial-gradient(circle at 50% -10%, rgba(246, 166, 194, 0.08), transparent 38%),
    rgba(12, 10, 15, 0.96) !important;
  border-color: rgba(246, 166, 194, 0.13) !important;
}

.memory-detail-backdrop .memory-detail-head > span {
  background: rgba(246, 166, 194, 0.12) !important;
  color: #f6a6c2 !important;
}

.memory-detail-backdrop .memory-chip-grid,
.memory-detail-backdrop .memory-room-choice-grid,
.memory-detail-backdrop .memory-stars {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.memory-detail-backdrop .memory-choice span,
.memory-detail-backdrop .memory-stars span {
  min-height: 30px !important;
  padding: 6px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: rgba(247, 237, 243, 0.64) !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.memory-detail-backdrop .memory-choice input:checked + span,
.memory-detail-backdrop .memory-stars input:checked + span {
  border-color: rgba(246, 166, 194, 0.42) !important;
  background: rgba(246, 166, 194, 0.12) !important;
  color: #ffd7e6 !important;
  box-shadow: 0 0 18px rgba(246, 166, 194, 0.13) !important;
}

.memory-detail-backdrop .memory-detail-fields input,
.memory-detail-backdrop .memory-detail-fields input:disabled,
.memory-detail-backdrop .memory-interpretation,
.memory-detail-backdrop .memory-source-card {
  border-color: rgba(246, 166, 194, 0.12) !important;
  background: rgba(255, 255, 255, 0.025) !important;
}

.memory-detail-backdrop .memory-detail-stats > div {
  background: rgba(246, 166, 194, 0.06) !important;
  border: 1px solid rgba(246, 166, 194, 0.08) !important;
}

.memory-detail-backdrop .memory-detail-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 42px !important;
}

.memory-detail-backdrop {
  background: rgba(4, 3, 6, 0.78) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

.memory-detail-backdrop .memory-detail-actions .send,
.memory-detail-backdrop .memory-detail-actions .ghost {
  color: rgba(255, 183, 208, 0.9) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Memory Palace compact controls and action icons */
.memory-palace-v3 .mem-filter-row,
.memory-palace-v3 .mem-filter-grid-row {
  display: none !important;
}

.memory-palace-v3 .mem-filter-compact-grid {
  display: grid !important;
  grid-template-columns: 0.72fr 0.95fr 1.05fr;
  gap: 8px 12px;
  align-items: start;
}

.memory-palace-v3 .mem-filter-compact-grid > label {
  margin: 0;
  color: var(--mem-dim);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.memory-palace-v3 .mem-filter-compact-grid .mem-filter-options {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  min-width: 0;
}

.memory-palace-v3 .mem-filter-compact-grid .mem-filter-options button {
  min-width: 0;
  padding: 7px 11px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header,
.memory-palace-v3 .mem-maint-results .memory-merge-card header,
.memory-palace-v3 .memory-merge-archive-card header {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
}

.memory-palace-v3 .memory-action-icon {
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 12px !important;
  background: rgba(246, 166, 194, 0.12) !important;
  color: transparent !important;
}

.memory-palace-v3 .memory-action-icon::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 7px auto;
  background: #f6a6c2;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.memory-palace-v3 .memory-review-icon::before {
  -webkit-mask-image: url("/assets/memory-palace/actions/review.svg");
  mask-image: url("/assets/memory-palace/actions/review.svg");
}

.memory-palace-v3 .memory-merge-icon::before {
  -webkit-mask-image: url("/assets/memory-palace/actions/merge.svg");
  mask-image: url("/assets/memory-palace/actions/merge.svg");
}

.memory-palace-v3 .memory-index-entry {
  justify-self: end !important;
  align-self: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.86) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

.memory-palace-v3 .mem-maint-grid button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 500 !important;
}

.memory-palace-v3 .mem-maint-grid button .material-symbols-outlined {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  color: rgba(246, 166, 194, 0.86) !important;
  font-size: 19px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.memory-detail-backdrop .memory-detail-head {
  align-items: center !important;
}

.memory-detail-backdrop .memory-detail-head > span {
  display: grid !important;
  place-items: center !important;
}

.memory-detail-backdrop .memory-detail-room-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 15px !important;
  background: color-mix(in srgb, var(--room-color, #f6a6c2) 18%, transparent) !important;
}

.memory-detail-backdrop .memory-detail-room-icon .mem-room-icon-mask {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  background: var(--room-color, #f6a6c2) !important;
}

.memory-detail-backdrop .memory-detail-room-icon .mem-room-icon {
  color: var(--room-color, #f6a6c2) !important;
}

.memory-detail-backdrop .memory-detail-head h3 {
  margin: 0 !important;
  transform: translateY(1px);
}

/* Memory Palace maintenance simplification */
.memory-palace-v3 .mem-maint-item {
  min-height: 72px !important;
  padding: 14px 16px !important;
  border-color: rgba(246, 166, 194, 0.10) !important;
  background: rgba(255, 255, 255, 0.018) !important;
}

.memory-palace-v3 .mem-maint-head {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.memory-palace-v3 .mem-maint-head strong,
.memory-palace-v3 .mem-summary-widget h3,
.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header strong,
.memory-palace-v3 .mem-maint-results .memory-merge-card header strong,
.memory-palace-v3 .memory-merge-archive-card header strong {
  font-weight: 500 !important;
}

.memory-palace-v3 .mem-maint-item > div {
  min-width: 0 !important;
}

.memory-palace-v3 .mem-maint-actions {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  white-space: nowrap !important;
}

.memory-palace-v3 .mem-maint-actions button,
.memory-palace-v3 .mem-maint-item button {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.86) !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.memory-palace-v3 .mem-maint-actions button:disabled,
.memory-palace-v3 .mem-maint-item button:disabled {
  opacity: 0.38 !important;
}

.memory-palace-v3 .mem-maint-actions .mem-icon-button {
  display: inline-grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  color: rgba(255, 183, 208, 0.78) !important;
}

.memory-palace-v3 .mem-maint-actions .mem-icon-button .material-symbols-outlined {
  display: block !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.memory-palace-v3 .mem-maint-grid {
  gap: 12px !important;
}

.memory-palace-v3 .mem-maint-grid button {
  min-height: 48px !important;
  border-color: rgba(246, 166, 194, 0.12) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.018) !important;
  color: rgba(247, 237, 243, 0.84) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
}

.memory-palace-v3 .mem-maint-grid button .material-symbols-outlined {
  color: rgba(246, 166, 194, 0.78) !important;
  font-size: 18px !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header,
.memory-palace-v3 .mem-maint-results .memory-merge-card header {
  grid-template-columns: 34px minmax(0, 1fr) !important;
}

.memory-palace-v3 .mem-maint-results .memory-lifecycle-card header .memory-summary-pill,
.memory-palace-v3 .mem-maint-results .memory-merge-card header .memory-summary-pill {
  grid-column: auto !important;
  justify-self: end !important;
  white-space: nowrap !important;
}

.memory-palace-v3 .memory-merge-card .memory-vector-actions {
  display: none !important;
}

.memory-palace-v3 .memory-card-action-row {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  margin-top: 10px !important;
}

.memory-palace-v3 .memory-card-action-row button {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.82) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.memory-palace-v3 .memory-undo-index-icon::before {
  -webkit-mask-image: url("/assets/memory-palace/actions/undo-index.svg");
  mask-image: url("/assets/memory-palace/actions/undo-index.svg");
}

.memory-palace-v3.memory-index-page {
  padding-top: 104px !important;
  min-height: 100vh !important;
  background:
    radial-gradient(circle at 50% 14%, rgba(246, 166, 194, 0.07), transparent 34%),
    linear-gradient(180deg, #0d0a10 0%, #0b090d 56%, #0c0a0f 100%) !important;
}

.memory-palace-v3.memory-index-page .memory-control-head {
  min-height: 82px !important;
  padding: 0 18px !important;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10) !important;
}

.memory-palace-v3.memory-index-page .memory-control-head h2 {
  font-size: 26px !important;
  letter-spacing: 0.04em !important;
}

.memory-palace-v3 .memory-merge-archive-card {
  width: min(100% - 32px, 390px) !important;
  margin: 22px auto 0 !important;
  padding: 18px !important;
  border-color: rgba(246, 166, 194, 0.14) !important;
  background: rgba(14, 12, 17, 0.72) !important;
  border-radius: 22px !important;
}

.memory-palace-v3 .memory-merge-archive-card header {
  grid-template-columns: 38px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.memory-palace-v3 .memory-merge-archive-card header strong {
  font-size: 14px !important;
  letter-spacing: 0.03em !important;
}

.memory-palace-v3 .memory-merge-archive-toolbar {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

.memory-palace-v3 .memory-merge-archive-toolbar input {
  height: 44px !important;
  border-color: rgba(246, 166, 194, 0.12) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  font-size: 13px !important;
}

.memory-palace-v3 .memory-merge-archive-toolbar > .memory-summary-pill {
  align-self: center !important;
  white-space: nowrap !important;
}

.memory-palace-v3 .memory-merge-archive-page {
  grid-column: 1 / -1 !important;
  justify-content: flex-end !important;
}

.memory-palace-v3 .memory-merge-revert-list.memory-merge-archive-list {
  margin-top: 12px !important;
  padding: 0 !important;
  gap: 10px !important;
}

.memory-palace-v3 .memory-merge-revert-item {
  padding: 14px !important;
  border-color: rgba(246, 166, 194, 0.10) !important;
  background: rgba(255, 255, 255, 0.022) !important;
}

.memory-palace-v3 .memory-index-empty {
  min-height: 92px !important;
  display: grid !important;
  place-items: center !important;
  padding: 22px !important;
  border: 1px solid rgba(246, 166, 194, 0.12) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.018) !important;
  color: rgba(247, 237, 243, 0.78) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: center !important;
}

.memory-palace-v3 .memory-lifecycle-progress,
.memory-palace-v3 .memory-retag-progress {
  display: grid !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 12px 0 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(246, 166, 194, 0.16) !important;
  border-radius: 18px !important;
  background: rgba(246, 166, 194, 0.045) !important;
  box-shadow: none !important;
}

.memory-palace-v3 .memory-lifecycle-progress > div,
.memory-palace-v3 .memory-retag-progress > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.memory-palace-v3 .memory-lifecycle-progress strong,
.memory-palace-v3 .memory-retag-progress strong {
  flex: 0 0 auto !important;
  color: rgba(247, 237, 243, 0.9) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

.memory-palace-v3 .memory-lifecycle-progress span,
.memory-palace-v3 .memory-retag-progress span {
  min-width: 0 !important;
  overflow: hidden !important;
  color: rgba(223, 190, 200, 0.58) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.memory-palace-v3 .memory-lifecycle-progress i,
.memory-palace-v3 .memory-retag-progress i {
  height: 7px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.memory-palace-v3 .memory-lifecycle-progress i b,
.memory-palace-v3 .memory-retag-progress i b {
  display: block !important;
  height: 100% !important;
  min-width: 4px !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #f84298, #f6c3d5) !important;
  transition: width 220ms ease !important;
}

.memory-palace-v3 .memory-retag-progress i.indeterminate b {
  width: 34% !important;
  animation: memoryProgressIndeterminate 1.15s ease-in-out infinite !important;
}

.memory-palace-v3 .memory-lifecycle-section {
  gap: 10px !important;
}

.memory-palace-v3 .memory-lifecycle-section > strong {
  color: rgba(223, 190, 200, 0.62) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
}

.memory-palace-v3 .memory-lifecycle-item {
  grid-template-columns: 1fr !important;
  align-items: start !important;
  gap: 12px !important;
  padding: 14px !important;
  overflow: hidden !important;
}

.memory-palace-v3 .memory-lifecycle-item strong {
  font-weight: 500 !important;
}

.memory-palace-v3 .memory-lifecycle-item p,
.memory-palace-v3 .memory-lifecycle-item em,
.memory-palace-v3 .memory-lifecycle-item small {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.memory-palace-v3 .memory-lifecycle-actions {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

.memory-palace-v3 .memory-lifecycle-actions button {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.84) !important;
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.memory-palace-v3 .mem-filter-compact-grid {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
  gap: 9px 12px !important;
}

.memory-palace-v3 .mem-filter-compact-grid > label,
.memory-palace-v3 .mem-filter-compact-grid .mem-filter-options {
  min-width: 0 !important;
}

.memory-palace-v3 .mem-filter-compact-grid .mem-filter-options button {
  padding: 6px 10px !important;
}

.memory-palace-v3 .mem-summary-widget .label {
  font-family: "Inter", "PingFang SC", sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(247, 237, 243, 0.82) !important;
}

.memory-detail-backdrop .memory-detail-room-icon .mem-room-icon-direct {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  object-fit: contain !important;
  opacity: 0.95 !important;
  filter: brightness(0) saturate(100%) invert(80%) sepia(18%) saturate(742%) hue-rotate(294deg) brightness(104%) contrast(96%) !important;
}

.memory-palace-v3 .memory-merge-item,
.memory-palace-v3 .memory-merge-detail,
.memory-palace-v3 .memory-merge-inline-detail,
.memory-palace-v3 .memory-merge-source-row,
.memory-palace-v3 .memory-merge-anchor-list,
.memory-palace-v3 .memory-merge-actions {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.memory-palace-v3 .memory-merge-item *,
.memory-palace-v3 .memory-merge-detail *,
.memory-palace-v3 .memory-merge-inline-detail *,
.memory-palace-v3 .memory-merge-source-row * {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.memory-palace-v3 .memory-merge-item p,
.memory-palace-v3 .memory-merge-item small,
.memory-palace-v3 .memory-merge-item em,
.memory-palace-v3 .memory-merge-item span {
  white-space: normal !important;
}

.memory-palace-v3 .memory-merge-item-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px !important;
}

.memory-palace-v3 .memory-merge-head-pill {
  justify-self: start !important;
}

.memory-palace-v3 .memory-merge-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 24px !important;
}

/* Memory cards stay in a single readable flow on narrow screens. */
.memory-palace-v3 .memory-entry.fragment-item,
.memory-palace-v3 .memory-entry.fragment-item > *,
.memory-palace-v3 .memory-entry.fragment-item > div {
  min-width: 0 !important;
  max-width: 100% !important;
}

.memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions {
  grid-column: 1 !important;
}

.memory-palace-v3 .memory-merge-revert-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

.memory-palace-v3 .memory-merge-revert-actions {
  grid-column: 1 !important;
  width: 100% !important;
  justify-content: flex-start !important;
}

@media (max-width: 640px) {
  .memory-palace-v3 .memory-entry.fragment-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 16px !important;
    overflow: hidden !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .item-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 7px 10px !important;
    width: 100% !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .meta-left {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px 8px !important;
    overflow: visible !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .meta-left span {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .item-meta time {
    justify-self: end !important;
    white-space: nowrap !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item p {
    font-size: 13px !important;
    line-height: 1.62 !important;
    -webkit-line-clamp: 4 !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item small {
    font-size: 9px !important;
    line-height: 1.5 !important;
    letter-spacing: 0.04em !important;
    overflow-wrap: anywhere !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .memory-entry-actions {
    display: flex !important;
    grid-column: 1 !important;
    flex-wrap: wrap !important;
    gap: 12px 20px !important;
    width: 100% !important;
  }
}

@media (max-width: 420px) {
  .memory-palace-v3 .memory-entry.fragment-item .item-meta {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .memory-palace-v3 .memory-entry.fragment-item .item-meta time {
    justify-self: start !important;
  }
}

/* Memory Index actions remain a compact two-column row on mobile. */
.memory-palace-v3 .memory-merge-revert-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: center !important;
}

.memory-palace-v3 .memory-merge-revert-actions .memory-summary-pill {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 6px 8px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* iOS uses a dynamic viewport; leave enough scroll runway above the home indicator. */
.memory-detail-backdrop {
  height: 100dvh !important;
  min-height: 100dvh !important;
  padding:
    max(18px, env(safe-area-inset-top))
    12px
    max(18px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}

.memory-detail-backdrop .memory-detail-modal {
  width: min(430px, 100%) !important;
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}

.memory-detail-backdrop .memory-detail-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.memory-detail-backdrop .memory-detail-actions .send,
.memory-detail-backdrop .memory-detail-actions .ghost {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 8px 4px !important;
  text-align: center !important;
  touch-action: manipulation !important;
}

/* Restore a clear disclosure affordance for index details. */
.memory-palace-v3 .memory-merge-detail > summary,
.memory-palace-v3 .memory-merge-established-detail > summary {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  width: fit-content !important;
  list-style: none !important;
  color: rgba(255, 183, 208, 0.88) !important;
  font-weight: 500 !important;
}

.memory-palace-v3 .memory-merge-detail > summary::-webkit-details-marker,
.memory-palace-v3 .memory-merge-established-detail > summary::-webkit-details-marker {
  display: none !important;
}

.memory-palace-v3 .memory-merge-detail > summary::before,
.memory-palace-v3 .memory-merge-established-detail > summary::before {
  content: "" !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 5px solid transparent !important;
  border-bottom: 5px solid transparent !important;
  border-left: 7px solid #f6a6c2 !important;
  transform-origin: 3px 5px !important;
  transition: transform 0.18s ease !important;
}

.memory-palace-v3 .memory-merge-detail[open] > summary::before,
.memory-palace-v3 .memory-merge-established-detail[open] > summary::before {
  transform: rotate(90deg) !important;
}

/* Candidate indexes use the same semantic rhythm as established index details. */
.memory-palace-v3 .memory-index-candidate {
  gap: 14px !important;
}

.memory-palace-v3 .memory-index-candidate-note,
.memory-palace-v3 .memory-index-candidate-status {
  display: block !important;
  padding-left: 11px !important;
  border-left: 1px solid rgba(246, 166, 194, 0.32) !important;
  color: rgba(247, 237, 243, 0.54) !important;
  font-size: 11px !important;
  line-height: 1.65 !important;
}

.memory-palace-v3 .memory-index-candidate-status.failed {
  color: rgba(255, 183, 208, 0.76) !important;
}

.memory-palace-v3 .memory-index-candidate-preview {
  display: grid !important;
  gap: 8px !important;
  padding: 14px 0 !important;
  border-top: 1px solid rgba(246, 166, 194, 0.10) !important;
  border-bottom: 1px solid rgba(246, 166, 194, 0.10) !important;
}

.memory-palace-v3 .memory-index-candidate-preview > span,
.memory-palace-v3 .memory-merge-detail-body b,
.memory-palace-v3 .memory-merge-sources > b {
  display: block !important;
  margin: 0 0 5px !important;
  color: rgba(255, 183, 208, 0.78) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.memory-palace-v3 .memory-index-candidate-preview p {
  margin: 0 !important;
  color: rgba(247, 237, 243, 0.82) !important;
  font-size: 13px !important;
  line-height: 1.68 !important;
}

.memory-palace-v3 .memory-merge-detail-body {
  display: grid !important;
  gap: 0 !important;
  padding-top: 10px !important;
}

.memory-palace-v3 .memory-merge-detail-body > p,
.memory-palace-v3 .memory-merge-detail-body > small,
.memory-palace-v3 .memory-merge-detail-body > em,
.memory-palace-v3 .memory-merge-detail-body > .memory-merge-anchor-list,
.memory-palace-v3 .memory-merge-detail-body > .memory-merge-sources {
  display: block !important;
  margin: 0 !important;
  padding: 13px 0 !important;
  border-top: 1px solid rgba(246, 166, 194, 0.09) !important;
  color: rgba(247, 237, 243, 0.67) !important;
  font-size: 11px !important;
  font-style: normal !important;
  line-height: 1.65 !important;
}

.memory-palace-v3 .memory-merge-detail-body > :first-child {
  border-top: 0 !important;
}

.memory-palace-v3 .memory-merge-detail-body .memory-merge-anchor-list {
  display: grid !important;
  gap: 7px !important;
}

.memory-palace-v3 .memory-merge-detail-body .memory-merge-anchor-list span {
  padding-left: 11px !important;
  border-left: 1px solid rgba(246, 166, 194, 0.20) !important;
  color: rgba(247, 237, 243, 0.62) !important;
}

.memory-palace-v3 .memory-merge-detail-body .memory-merge-sources {
  display: grid !important;
  gap: 8px !important;
}

/* Index cards: one quiet hierarchy for create, append, and established details. */
.memory-palace-v3 .memory-merge-established-detail {
  margin-top: 14px !important;
  padding-top: 12px !important;
}

.memory-palace-v3 .memory-merge-established-body {
  display: grid !important;
  gap: 0 !important;
  padding-top: 8px !important;
}

.memory-palace-v3 .memory-merge-established-body > p,
.memory-palace-v3 .memory-merge-established-body > .memory-merge-anchor-list,
.memory-palace-v3 .memory-merge-established-body > .memory-index-source-list {
  margin: 0 !important;
  padding: 13px 0 !important;
  border-top: 1px solid rgba(246, 166, 194, 0.09) !important;
  color: rgba(247, 237, 243, 0.76) !important;
  font-size: 12px !important;
  font-style: normal !important;
  line-height: 1.65 !important;
}

.memory-palace-v3 .memory-merge-established-body > :first-child {
  border-top: 0 !important;
}

.memory-palace-v3 .memory-merge-established-body p b,
.memory-palace-v3 .memory-index-detail-section > b {
  display: block !important;
  margin: 0 0 7px !important;
  color: rgba(255, 183, 208, 0.78) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.memory-detail-backdrop .memory-index-source-manager {
  gap: 12px !important;
}

.memory-detail-backdrop .memory-index-source-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.memory-detail-backdrop .memory-index-source-head label {
  margin: 0 !important;
  color: rgba(247, 237, 243, 0.88) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.memory-detail-backdrop .memory-index-source-head .memory-summary-pill {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: rgba(255, 171, 207, 0.88) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.memory-detail-backdrop .memory-index-source-note {
  color: rgba(247, 237, 243, 0.46) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.memory-detail-backdrop .memory-index-source-list {
  display: grid !important;
  gap: 10px !important;
}

.memory-detail-backdrop .memory-index-source-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
  border: 1px solid rgba(246, 166, 194, 0.18) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(9, 7, 12, 0.72) !important;
  padding: 15px 15px 14px 18px !important;
  box-shadow: none !important;
}

.memory-detail-backdrop .memory-index-source-copy {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.memory-detail-backdrop .memory-index-source-card strong,
.memory-detail-backdrop .memory-index-source-card small,
.memory-detail-backdrop .memory-index-source-card em {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.memory-detail-backdrop .memory-index-source-card strong {
  color: rgba(247, 237, 243, 0.9) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.memory-detail-backdrop .memory-index-source-card small {
  color: rgba(255, 183, 208, 0.58) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
  letter-spacing: 0.05em !important;
}

.memory-detail-backdrop .memory-index-source-card em {
  color: rgba(247, 237, 243, 0.52) !important;
  font-size: 13px !important;
  font-style: normal !important;
  line-height: 1.5 !important;
}

.memory-detail-backdrop .memory-index-source-remove {
  width: 32px !important;
  height: 32px !important;
  align-self: center !important;
  border: 1px solid rgba(255, 166, 204, 0.44) !important;
  background: rgba(255, 79, 158, 0.12) !important;
  color: rgba(255, 199, 221, 0.9) !important;
  box-shadow: none !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

.memory-palace-v3 .memory-merge-badges {
  gap: 7px 15px !important;
  padding: 2px 0 !important;
}

.memory-palace-v3 .memory-merge-badges span {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(255, 183, 208, 0.68) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

.memory-palace-v3 .memory-index-append-detail {
  padding-top: 8px !important;
}

.memory-palace-v3 .memory-index-detail-section {
  padding: 13px 0 !important;
  border-top: 1px solid rgba(246, 166, 194, 0.09) !important;
}

.memory-palace-v3 .memory-index-detail-section:first-child {
  border-top: 0 !important;
}

.memory-palace-v3 .memory-index-detail-section p {
  margin: 0 !important;
  color: rgba(247, 237, 243, 0.74) !important;
  font-size: 12px !important;
  line-height: 1.68 !important;
}

.memory-palace-v3 .memory-merge-preview-box > small {
  color: rgba(255, 183, 208, 0.72) !important;
  font-family: "Space Mono", ui-monospace, monospace !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
}

.memory-palace-v3 .memory-merge-preview-box > p {
  color: rgba(247, 237, 243, 0.84) !important;
}

.memory-palace-v3 .memory-merge-preview-box .memory-merge-inline-detail em {
  margin: 0 !important;
  padding: 11px 0 !important;
  border-top: 1px solid rgba(246, 166, 194, 0.09) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 12px !important;
  line-height: 1.68 !important;
}

.memory-palace-v3 .memory-merge-preview-box .memory-merge-inline-detail em:first-of-type {
  margin-top: 8px !important;
}

.memory-palace-v3 .memory-merge-preview-box .memory-merge-anchor-list span {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.memory-palace-v3 .mem-list-section.open .memory-retag-progress + .mem-list-head {
  margin-top: 18px !important;
}

.memory-palace-v3 .mem-list-section.open .mem-list-head {
  position: relative !important;
  z-index: 1 !important;
}

/* Calendar day theme: light paper version, scoped after older calendar locks. */
body[data-app-theme="day"] .calendar-control-shell.home-shell {
  --calendar-day-bg: #fbf6f4;
  --calendar-day-surface: rgba(255, 253, 251, 0.86);
  --calendar-day-surface-strong: rgba(255, 253, 251, 0.95);
  --calendar-day-text: #302a2e;
  --calendar-day-muted: rgba(104, 82, 91, 0.58);
  --calendar-day-line: rgba(96, 72, 82, 0.12);
  --calendar-day-primary: #d986a3;
  --calendar-day-hot: #e65d9c;
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%) !important;
  color: var(--calendar-day-text) !important;
}

body[data-app-theme="day"] .calendar-control-head {
  border-bottom-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 12px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .calendar-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .calendar-back {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background: rgba(255, 253, 251, 0.72) !important;
  color: var(--calendar-day-primary) !important;
  box-shadow: 0 10px 24px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-preview,
body[data-app-theme="day"] .calendar-control-shell .calendar-editor,
body[data-app-theme="day"] .calendar-control-shell .calendar-agenda {
  border-color: var(--calendar-day-line) !important;
  background:
    linear-gradient(180deg, rgba(217, 134, 163, 0.055), transparent 46%),
    var(--calendar-day-surface) !important;
  box-shadow: 0 18px 48px rgba(112, 74, 88, 0.10), 0 0 0 5px rgba(217, 134, 163, 0.025) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-preview header > div:nth-child(2) strong,
body[data-app-theme="day"] .calendar-control-shell .calendar-agenda header strong,
body[data-app-theme="day"] .calendar-control-shell .memo-section-head strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-preview header > div:nth-child(2) span,
body[data-app-theme="day"] .calendar-control-shell .calendar-agenda header span,
body[data-app-theme="day"] .calendar-control-shell .memo-section-head small,
body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid span,
body[data-app-theme="day"] .calendar-control-shell .calendar-chip-section > span {
  color: var(--calendar-day-muted) !important;
}

body[data-app-theme="day"] .calendar-control-shell .home-icon.material-symbols-outlined,
body[data-app-theme="day"] .calendar-control-shell .calendar-editor .home-icon.material-symbols-outlined,
body[data-app-theme="day"] .calendar-control-shell .calendar-agenda .home-icon.material-symbols-outlined {
  color: var(--calendar-day-primary) !important;
  background: rgba(217, 134, 163, 0.12) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-month-actions button {
  border-color: rgba(217, 134, 163, 0.20) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  color: var(--calendar-day-primary) !important;
  box-shadow: 0 8px 20px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-weekdays b {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day {
  border-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 255, 255, 0.44) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day > span:first-child {
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day.selected {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: rgba(255, 253, 251, 0.94) !important;
  box-shadow: 0 10px 24px rgba(112, 74, 88, 0.08), inset 0 0 0 1px rgba(217, 134, 163, 0.08) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day.today {
  border-color: rgba(230, 93, 156, 0.34) !important;
  background: rgba(217, 134, 163, 0.13) !important;
  color: var(--calendar-day-primary) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day.today > span:first-child,
body[data-app-theme="day"] .calendar-control-shell .month-day.birthday > span:first-child,
body[data-app-theme="day"] .calendar-control-shell .birthday-mark {
  color: var(--calendar-day-primary) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-span-bar {
  background: color-mix(in srgb, var(--tag-color, var(--calendar-day-primary)), white 34%) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--tag-color, var(--calendar-day-primary)), transparent 82%) !important;
}

body[data-app-theme="day"] .calendar-control-shell .month-day em i.todo-dot {
  background: rgba(217, 134, 163, 0.72) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-line-fields {
  border-top-color: rgba(96, 72, 82, 0.10) !important;
  border-bottom-color: rgba(96, 72, 82, 0.10) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-line-fields textarea {
  border-top-color: rgba(96, 72, 82, 0.08) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-form input,
body[data-app-theme="day"] .calendar-control-shell .calendar-form textarea,
body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid input,
body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid .memo-picker-trigger {
  border-color: rgba(96, 72, 82, 0.14) !important;
  background: transparent !important;
  color: rgba(48, 42, 46, 0.86) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-form input::placeholder,
body[data-app-theme="day"] .calendar-control-shell .calendar-form textarea::placeholder {
  color: rgba(104, 82, 91, 0.40) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid input[type="text"],
body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid .memo-picker-trigger strong,
body[data-app-theme="day"] .calendar-control-shell .calendar-form-grid .memo-picker-trigger b {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-all-day-toggle {
  border-top-color: rgba(96, 72, 82, 0.10) !important;
  border-bottom-color: rgba(96, 72, 82, 0.10) !important;
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-all-day-toggle i {
  background: rgba(104, 82, 91, 0.16) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-all-day-toggle i::after {
  background: rgba(255, 253, 251, 0.94) !important;
  box-shadow: 0 2px 8px rgba(112, 74, 88, 0.18) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-all-day-toggle.active i {
  background: rgba(230, 93, 156, 0.72) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-chip-section > span {
  background: rgba(217, 134, 163, 0.08) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-chip-picker button {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-chip-picker button.active {
  border-color: rgba(217, 134, 163, 0.48) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-form-actions .memo-add {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-form-actions .ghost {
  border-color: rgba(217, 134, 163, 0.26) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: rgba(104, 82, 91, 0.70) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item {
  border-color: color-mix(in srgb, var(--tag-color, var(--calendar-day-primary)), white 72%) !important;
  background: rgba(255, 255, 255, 0.48) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item strong {
  color: rgba(48, 42, 46, 0.86) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item b {
  background: rgba(217, 134, 163, 0.10) !important;
  color: var(--calendar-day-primary) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item.todo .memo-check {
  border-color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item.todo.done .memo-check {
  border-color: var(--calendar-day-primary) !important;
  background: var(--calendar-day-primary) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item .calendar-edit-pill,
body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-item button.calendar-edit-pill.material-symbols-outlined {
  background: rgba(217, 134, 163, 0.10) !important;
  color: var(--calendar-day-primary) !important;
  -webkit-text-fill-color: var(--calendar-day-primary) !important;
}

body[data-app-theme="day"] .calendar-control-shell .calendar-agenda-empty {
  border: 0 !important;
  background: transparent !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

/* Memo edit modal day theme: used by Calendar agenda todos and Memo board. */
body[data-app-theme="day"] .modal-backdrop {
  background: rgba(66, 39, 54, 0.20);
}

body[data-app-theme="day"] .memo-edit-modal {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background:
    radial-gradient(circle at 52% 4%, rgba(217, 134, 163, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(255, 247, 250, 0.96)) !important;
  color: rgba(48, 42, 46, 0.90) !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-app-theme="day"] .memo-edit-modal h3 {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .memo-edit-modal .field label,
body[data-app-theme="day"] .memo-edit-grid > div > label,
body[data-app-theme="day"] .memo-edit-datetime-row .field label {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .memo-edit-grid > div > label:not(.memory-choice) {
  background: rgba(217, 134, 163, 0.09) !important;
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .memo-edit-modal input,
body[data-app-theme="day"] .memo-edit-modal textarea,
body[data-app-theme="day"] .memo-edit-datetime-row input {
  border-bottom-color: rgba(96, 72, 82, 0.16) !important;
  background: transparent !important;
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .memo-edit-modal input::placeholder,
body[data-app-theme="day"] .memo-edit-modal textarea::placeholder {
  color: rgba(104, 82, 91, 0.40) !important;
}

body[data-app-theme="day"] .memo-edit-grid .memory-choice span {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .memo-edit-grid .memory-choice input:checked + span {
  border-color: rgba(217, 134, 163, 0.56) !important;
  background: rgba(217, 134, 163, 0.12) !important;
  color: rgba(48, 42, 46, 0.86) !important;
}

body[data-app-theme="day"] .memo-edit-actions .send {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .memo-edit-actions .ghost {
  border-color: rgba(217, 134, 163, 0.26) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(104, 82, 91, 0.70) !important;
}

/* Global proactive note day theme: match Chat's readable daylight paper. */
body[data-app-theme="day"] .proactive-envelope,
body[data-app-theme="day"] .proactive-paper,
body[data-app-theme="day"] .favorite-note-card,
body[data-app-theme="day"] .favorite-note-modal-paper {
  color: #3f2a32 !important;
}

body[data-app-theme="day"] .proactive-envelope small,
body[data-app-theme="day"] .proactive-paper small,
body[data-app-theme="day"] .favorite-note-card small,
body[data-app-theme="day"] .favorite-note-modal-paper small {
  color: rgba(61, 39, 48, 0.74) !important;
}

body[data-app-theme="day"] .proactive-paper p,
body[data-app-theme="day"] .favorite-note-card p,
body[data-app-theme="day"] .favorite-note-modal-paper p {
  color: #3f2a32 !important;
}

body[data-app-theme="day"] .proactive-toast:not(.is-open) .proactive-envelope.proactive-envelope-toast {
  border-color: rgba(196, 117, 145, 0.28) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 241, 0.84), transparent 76%),
    rgba(255, 250, 248, 0.94) !important;
  box-shadow: 0 16px 42px rgba(87, 65, 72, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
  color: #3f2a32 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .proactive-toast:not(.is-open) .proactive-envelope-icon {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .proactive-envelope.proactive-envelope-toast strong {
  color: rgba(63, 42, 50, 0.88) !important;
}

body[data-app-theme="day"] .proactive-envelope.proactive-envelope-toast i {
  background: #d986a3 !important;
  box-shadow: 0 0 10px rgba(217, 134, 163, 0.38) !important;
}

body[data-app-theme="day"] .proactive-toast.is-open {
  background: rgba(45, 38, 42, 0.34) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

body[data-app-theme="day"] .proactive-toast.is-open .proactive-paper {
  border: 1px solid rgba(196, 117, 145, 0.20) !important;
  background: #fffaf8 !important;
  box-shadow: 4px 4px 0 rgba(94, 74, 82, 0.12), 0 24px 80px rgba(63, 48, 55, 0.28) !important;
}

body[data-app-theme="day"] .proactive-toast.is-open .proactive-paper p {
  color: #282329 !important;
}

body[data-app-theme="day"] .proactive-toast.is-open .proactive-paper em,
body[data-app-theme="day"] .proactive-toast.is-open .proactive-paper small {
  color: rgba(68, 48, 56, 0.74) !important;
}

body[data-app-theme="day"] .proactive-toast.is-open .proactive-actions button {
  border-color: rgba(68, 48, 56, 0.18) !important;
  background: rgba(255, 250, 248, 0.72) !important;
  color: rgba(40, 35, 41, 0.88) !important;
}

body[data-app-theme="day"] .proactive-toast.is-open .proactive-actions button:last-child {
  background: #242226 !important;
  color: #fff8fb !important;
}

body[data-app-theme="day"] .proactive-paper-close {
  color: rgba(68, 48, 56, 0.66) !important;
}

body[data-app-theme="day"] .proactive-paper-close:hover {
  background: rgba(196, 117, 145, 0.10) !important;
  color: #3f2a32 !important;
}

/* More day theme: light room directory, matching the home/day paper mood. */
body[data-app-theme="day"] .more-control-shell.home-shell {
  --more-eraser: #d986a3;
  --more-eraser-bright: #c96f91;
  --more-eraser-soft: rgba(217, 134, 163, 0.12);
  --more-eraser-line: rgba(196, 117, 145, 0.18);
  background:
    radial-gradient(circle at 60% 4%, rgba(255, 214, 232, 0.58), transparent 34%),
    linear-gradient(180deg, #fff8fb 0%, #f7efed 100%) !important;
  color: #342930 !important;
}

body[data-app-theme="day"] .more-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 248, 251, 0.82) !important;
  box-shadow: 0 10px 30px rgba(90, 62, 72, 0.08) !important;
}

body[data-app-theme="day"] .more-control-head h2 {
  color: #33272d !important;
  text-shadow: none !important;
}

body[data-app-theme="day"] .more-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .more-back:hover {
  color: #c96f91 !important;
}

body[data-app-theme="day"] .more-poem small {
  color: rgba(92, 70, 78, 0.44) !important;
}

body[data-app-theme="day"] .more-poem p {
  color: rgba(55, 42, 49, 0.66) !important;
}

body[data-app-theme="day"] .more-section-title strong {
  color: rgba(184, 91, 127, 0.82) !important;
}

body[data-app-theme="day"] .more-section-title i {
  background: rgba(196, 117, 145, 0.20) !important;
}

body[data-app-theme="day"] .more-section-title.muted strong {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .more-section-title.muted i {
  background: rgba(104, 82, 91, 0.10) !important;
}

body[data-app-theme="day"] .more-line-card,
body[data-app-theme="day"] .more-square-card,
body[data-app-theme="day"] .more-senses-card,
body[data-app-theme="day"] .more-reserved-card {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background:
    radial-gradient(circle at 78% 0%, rgba(255, 226, 239, 0.54), transparent 58%),
    rgba(255, 251, 250, 0.84) !important;
  color: #342930 !important;
  box-shadow:
    0 16px 36px rgba(96, 72, 82, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .more-line-card:hover,
body[data-app-theme="day"] .more-square-card:hover,
body[data-app-theme="day"] .more-senses-card:hover {
  border-color: rgba(217, 134, 163, 0.40) !important;
  box-shadow:
    0 18px 42px rgba(96, 72, 82, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
}

body[data-app-theme="day"] .more-card-icon {
  background: rgba(217, 134, 163, 0.14) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .more-line-card.accent-lavender .more-card-icon {
  background: rgba(171, 139, 224, 0.14) !important;
  color: #8e6fc6 !important;
}

body[data-app-theme="day"] .more-line-card.accent-rose .more-card-icon {
  background: rgba(217, 134, 163, 0.15) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .more-line-card.accent-gold .more-card-icon {
  background: rgba(221, 169, 73, 0.18) !important;
  color: #b98627 !important;
}

body[data-app-theme="day"] .more-line-card.accent-blue .more-card-icon {
  background: rgba(125, 183, 255, 0.18) !important;
  color: #3f7fbd !important;
}

body[data-app-theme="day"] .more-card-copy strong,
body[data-app-theme="day"] .more-square-card strong,
body[data-app-theme="day"] .more-senses-card strong,
body[data-app-theme="day"] .more-reserved-card strong {
  color: rgba(52, 41, 48, 0.92) !important;
}

body[data-app-theme="day"] .more-card-copy small,
body[data-app-theme="day"] .more-square-card small,
body[data-app-theme="day"] .more-senses-card small,
body[data-app-theme="day"] .more-reserved-card small {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .more-card-badge,
body[data-app-theme="day"] .more-reserved-card b {
  background: rgba(217, 134, 163, 0.12) !important;
  color: #b85b7f !important;
  box-shadow: inset 0 0 0 1px rgba(196, 117, 145, 0.14) !important;
}

body[data-app-theme="day"] .more-card-chevron {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .more-square-icon {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .more-senses-card::before {
  background: rgba(217, 134, 163, 0.14) !important;
  filter: blur(38px) !important;
}

.piggy-bank-shell {
  --piggy-gold: #f7c979;
  --piggy-gold-deep: #9b701f;
  --piggy-gold-soft: rgba(245, 194, 102, 0.16);
}

.piggy-bank-head h2 {
  letter-spacing: 0.04em;
}

.piggy-balance-card,
.piggy-bonus-card,
.piggy-action-card,
.piggy-jar-grid button,
.piggy-wish-list article,
.piggy-record-list article > div {
  border: 1px solid rgba(246, 166, 194, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(17, 17, 22, 0.70);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.piggy-balance-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 26px 0 30px;
  border-radius: 18px;
  padding: 32px 26px 30px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.piggy-balance-card::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.10);
  filter: blur(46px);
  pointer-events: none;
}

.piggy-balance-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(246, 166, 194, 0.14);
  color: #ffb7d0;
  position: relative;
  z-index: 1;
}

.piggy-balance-icon svg {
  display: block;
  width: 31px;
  height: 31px;
}

.piggy-balance-card small,
.piggy-section .more-section-title strong {
  color: rgba(223, 190, 200, 0.72);
}

.piggy-balance-card small {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.piggy-balance-card > strong {
  margin: 0;
  color: #ffb7d0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(255, 176, 204, 0.16);
}

.piggy-balance-card button,
.piggy-bonus-card button {
  border: 0;
  border-radius: 14px;
  background: #ff4fa3;
  color: #fff;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.piggy-balance-card button {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  box-shadow: 0 18px 42px rgba(255, 79, 163, 0.22);
}

.piggy-balance-card p {
  margin: 0;
  color: rgba(223, 190, 200, 0.66);
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}

.piggy-bonus-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 10px 0 28px;
  border-radius: 14px;
  padding: 16px;
}

.piggy-bonus-card > .material-symbols-outlined,
.piggy-jar-grid .material-symbols-outlined,
.piggy-wish-list .material-symbols-outlined,
.piggy-record-dot {
  color: #ffb7d0;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.piggy-bonus-card p {
  margin: 0;
  color: rgba(247, 237, 243, 0.88);
  font-size: 14px;
  line-height: 1.45;
}

.piggy-bonus-card button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 58px;
  min-height: 34px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.14);
  color: #ffb7d0;
  padding: 0 14px;
  font-size: 12px;
}

.piggy-bonus-card button span {
  white-space: nowrap;
}

.piggy-bonus-card button:disabled {
  opacity: 1;
}

.piggy-count-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.piggy-count-dots b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stitch-rose, #ffb1c5);
  box-shadow: 0 0 7px rgba(255, 177, 197, 0.42);
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.piggy-count-dots b:nth-child(2) {
  animation-delay: 0.16s;
}

.piggy-count-dots b:nth-child(3) {
  animation-delay: 0.32s;
}

.piggy-action-grid {
  display: grid;
  gap: 16px;
  margin: 0 0 30px;
}

.piggy-action-card {
  display: grid;
  gap: 0;
  border-radius: 18px;
  padding: 18px;
  position: relative;
}

.piggy-form-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
}

.piggy-form-head > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(246, 166, 194, 0.12);
  color: #ffb7d0;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.piggy-form-head strong {
  display: block;
  color: rgba(247, 237, 243, 0.94);
  font-size: 16px;
  font-weight: 800;
}

.piggy-form-head small {
  display: block;
  margin-top: 4px;
  color: rgba(223, 190, 200, 0.50);
  font-size: 12px;
  line-height: 1.35;
}

.piggy-form-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 176, 204, 0.66);
  padding: 0;
  box-shadow: none;
}

.piggy-form-toggle .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.piggy-form-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.piggy-action-card label {
  display: grid;
  gap: 8px;
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.piggy-action-card input,
.piggy-action-card textarea {
  width: 100%;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 12px;
  outline: 0;
  background: rgba(9, 8, 12, 0.46);
  color: rgba(247, 237, 243, 0.90);
  padding: 12px 13px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.piggy-action-card textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.55;
}

.piggy-action-card input::placeholder,
.piggy-action-card textarea::placeholder {
  color: rgba(223, 190, 200, 0.34);
}

.piggy-action-card input:focus,
.piggy-action-card textarea:focus {
  border-color: rgba(246, 166, 194, 0.42);
  box-shadow: 0 0 0 3px rgba(246, 166, 194, 0.07);
}

.piggy-submit {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: #ff4fa3;
  color: #fff;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 15px 34px rgba(255, 79, 163, 0.18);
}

.piggy-submit:disabled {
  opacity: 0.68;
}

.piggy-select {
  position: relative;
  z-index: 12;
}

.piggy-action-card:has(.piggy-select.open) {
  z-index: 30;
}

.piggy-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 12px;
  background: rgba(9, 8, 12, 0.46);
  color: rgba(247, 237, 243, 0.90);
  padding: 0 13px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0;
}

.piggy-select-trigger i {
  color: rgba(255, 176, 204, 0.62);
  font-style: normal;
}

.piggy-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid rgba(255, 176, 204, 0.2);
  border-radius: 12px;
  background: rgba(33, 31, 36, 0.98);
  padding: 5px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.piggy-select-menu button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 237, 243, 0.88);
  padding: 7px 9px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.piggy-select-menu button.active {
  background: rgba(255, 79, 163, 0.76);
  color: #fff;
}

.piggy-action-card .piggy-form-toggle {
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 176, 204, 0.66);
  padding: 0;
  box-shadow: none;
}

.piggy-action-card .piggy-select-trigger {
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 12px;
  background: rgba(9, 8, 12, 0.46);
  color: rgba(247, 237, 243, 0.90);
  box-shadow: none;
}

.piggy-action-card .piggy-select-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(247, 237, 243, 0.88);
  box-shadow: none;
}

.piggy-action-card .piggy-select-menu button.active {
  background: rgba(255, 79, 163, 0.76);
  color: #fff;
}

.piggy-jar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.piggy-jar-grid button {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 106px;
  border-radius: 10px;
  padding: 16px 8px 14px;
  text-align: center;
  color: inherit;
  cursor: pointer;
}

.piggy-jar-grid strong {
  color: rgba(247, 237, 243, 0.92);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.piggy-jar-grid small {
  color: rgba(223, 190, 200, 0.46);
  font-size: 11px;
  line-height: 1.25;
}

.piggy-source-section {
  margin-top: -8px;
  margin-bottom: 8px;
}

.piggy-jar-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 6, 10, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.piggy-jar-detail-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(72vh, 620px);
  overflow: auto;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 79, 163, 0.10), transparent 34%),
    rgba(17, 17, 22, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  padding: 22px;
  color: rgba(247, 237, 243, 0.88);
}

.piggy-jar-detail-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.68);
  font-size: 24px;
  line-height: 1;
}

.piggy-jar-detail-card .piggy-kicker {
  display: block;
  color: rgba(255, 183, 208, 0.62);
  font: 800 10px/1.2 var(--mono);
  letter-spacing: 0.16em;
}

.piggy-jar-detail-card h3 {
  margin: 10px 0 4px;
  color: rgba(247, 237, 243, 0.96);
  font-size: 24px;
}

.piggy-jar-detail-card > small {
  color: rgba(223, 190, 200, 0.58);
  font-size: 12px;
}

.piggy-jar-detail-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.piggy-jar-detail-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: baseline;
  border-top: 1px solid rgba(246, 166, 194, 0.12);
  padding-top: 12px;
}

.piggy-jar-detail-list span {
  color: rgba(223, 190, 200, 0.44);
  font: 500 10px/1.35 var(--mono);
  white-space: nowrap;
}

.piggy-jar-detail-list strong {
  color: rgba(247, 237, 243, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

.piggy-jar-detail-list b {
  color: #f7c979;
  font: 800 13px/1.2 var(--mono);
  white-space: nowrap;
}

.piggy-jar-detail-list em,
.piggy-jar-detail-list p {
  grid-column: 2 / -1;
  margin: 0;
  color: rgba(223, 190, 200, 0.62);
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

.piggy-wish-list,
.piggy-record-list {
  display: grid;
  gap: 13px;
}

.piggy-wish-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border-radius: 14px;
  padding: 18px 16px;
}

.piggy-wish-create-grid {
  margin-bottom: 14px;
}

.piggy-wish-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.piggy-wish-card header small {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #ffb7d0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.piggy-wish-card p {
  margin: 8px 0 0;
  color: rgba(223, 190, 200, 0.54);
  font-size: 12px;
  line-height: 1.45;
}

.piggy-wish-card em {
  display: block;
  margin-top: 9px;
  color: rgba(247, 237, 243, 0.76);
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

.piggy-wish-card b {
  display: inline-block;
  margin-top: 9px;
  color: rgba(255, 183, 208, 0.64);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.piggy-wish-card.ready {
  border-color: rgba(255, 183, 208, 0.28);
  box-shadow:
    0 0 28px rgba(255, 79, 163, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.piggy-wish-card.fulfilled {
  opacity: 0.82;
}

.piggy-wish-card.fulfilled p {
  color: rgba(247, 201, 121, 0.70);
}

.piggy-wish-card.fulfilled .piggy-wish-redeem-note {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(247, 201, 121, 0.18);
  color: rgba(247, 237, 243, 0.82);
}

.piggy-wish-card.paused {
  opacity: 0.68;
}

.piggy-wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.piggy-wish-actions button,
.piggy-wish-fulfill-form button {
  border: 0;
  background: transparent;
  color: #ffb7d0;
  padding: 0;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.piggy-wish-fulfill-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(246, 166, 194, 0.12);
}

.piggy-wish-fulfill-form label {
  display: grid;
  gap: 7px;
  color: rgba(223, 190, 200, 0.54);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.piggy-wish-fulfill-form input,
.piggy-wish-fulfill-form textarea {
  width: 100%;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 12px;
  background: rgba(9, 8, 12, 0.46);
  color: rgba(247, 237, 243, 0.90);
  padding: 11px 12px;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 13px;
  outline: 0;
  resize: vertical;
}

.piggy-wish-fulfill-form > div {
  display: flex;
  gap: 14px;
}

.piggy-wish-list strong {
  display: block;
  color: rgba(247, 237, 243, 0.92);
  font-family: "Songti SC", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.piggy-wish-list small {
  display: block;
  margin-top: 6px;
  color: rgba(223, 190, 200, 0.46);
  font-size: 12px;
}

.piggy-wish-list i {
  display: block;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.piggy-wish-list i::before {
  content: "";
  display: block;
  width: var(--piggy-progress, 0);
  height: 100%;
  border-radius: inherit;
  background: #ffb7d0;
  box-shadow: 0 0 10px rgba(255, 176, 204, 0.36);
}

.piggy-record-list {
  position: relative;
}

.piggy-record-list::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: rgba(246, 166, 194, 0.12);
}

.piggy-record-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  position: relative;
}

.piggy-record-dot {
  z-index: 1;
  display: grid !important;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 50%;
  background: rgba(17, 17, 22, 0.92);
  font-size: 18px !important;
}

.piggy-record-list article > div {
  border-radius: 14px;
  padding: 15px;
}

.piggy-record-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.piggy-record-list header small {
  color: rgba(223, 190, 200, 0.42);
  font-size: 11px;
}

.piggy-record-list header b {
  color: #ffb7d0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
}

.piggy-record-list header b.expense {
  color: rgba(247, 201, 121, 0.92);
}

.piggy-record-list p {
  margin: 12px 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 237, 243, 0.78);
  padding: 11px 12px;
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

.piggy-record-list em {
  color: #ffb7d0;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.piggy-record-more {
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.78);
  font-family: var(--mono) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.13em !important;
  text-transform: none;
  cursor: pointer;
}

.piggy-receipt-entry {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid rgba(246, 166, 194, 0.13);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 79, 163, 0.10), transparent 36%),
    rgba(17, 17, 22, 0.70);
  color: rgba(247, 237, 243, 0.92);
  padding: 16px;
  text-align: left;
}

.piggy-receipt-entry > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(246, 166, 194, 0.12);
  color: #ffb7d0;
}

.piggy-receipt-entry svg {
  width: 26px;
  height: 26px;
}

.piggy-receipt-entry strong {
  display: block;
  font-size: 16px;
  font-weight: 850;
}

.piggy-receipt-entry small {
  display: block;
  margin-top: 4px;
  color: rgba(223, 190, 200, 0.50);
  font-size: 12px;
}

.piggy-receipt-entry i {
  color: #ff4fa3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.piggy-receipt-shell {
  position: relative;
  min-height: 100dvh;
  width: min(430px, 100%);
  margin: 0 auto;
  background: #0c0a0f;
  color: #ffb7d0;
  overflow: hidden;
}

.piggy-receipt-back,
.piggy-receipt-x {
  position: fixed;
  z-index: 20;
  border: 0;
  background: transparent;
  color: rgba(255, 176, 204, 0.58);
  font-family: Inter, "PingFang SC", sans-serif;
}

.piggy-receipt-back {
  top: calc(18px + env(safe-area-inset-top));
  left: max(16px, calc((100vw - 430px) / 2 + 16px));
  width: 38px;
  height: 38px;
  font-size: 34px;
  line-height: 1;
}

.piggy-receipt-x {
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  color: rgba(255, 79, 163, 0.72);
  font-size: 25px;
}

.piggy-receipt-select {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100dvh;
  padding: calc(74px + env(safe-area-inset-top)) 20px calc(36px + env(safe-area-inset-bottom));
  text-align: center;
}

.piggy-receipt-select h2 {
  margin: 0;
  color: #ffb7d0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
}

.piggy-receipt-select p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.34);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.piggy-receipt-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(372px, 100%);
  margin: 34px 0 18px;
  position: relative;
  z-index: 5;
}

.piggy-receipt-date-picker {
  min-width: 0;
}

.piggy-receipt-date-picker .memo-picker-trigger {
  min-height: 52px;
  border-color: rgba(255, 79, 163, 0.28);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 176, 204, 0.92);
}

.piggy-receipt-date-picker .memo-picker-trigger small {
  color: rgba(255, 255, 255, 0.38);
}

.piggy-receipt-date-panel {
  position: fixed;
  top: calc(220px + env(safe-area-inset-top));
  left: 50%;
  right: auto;
  width: min(286px, calc(100vw - 44px));
  transform: translateX(-50%);
  border-color: rgba(255, 79, 163, 0.24);
  background: rgba(17, 15, 20, 0.98);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.46);
}

.piggy-receipt-date-panel .memo-calendar-head {
  margin-bottom: 8px;
}

.piggy-receipt-date-panel .memo-calendar-head strong {
  color: rgba(255, 190, 214, 0.9);
}

.piggy-receipt-date-panel .memo-calendar-head button {
  color: rgba(255, 176, 204, 0.72);
}

.piggy-receipt-date-panel .memo-calendar-grid {
  gap: 5px;
}

.piggy-receipt-date-panel .memo-calendar-grid button,
.piggy-receipt-date-panel .memo-calendar-grid span {
  min-height: 30px;
  border-radius: 9px;
  font-size: 11px;
}

.piggy-receipt-date-panel .memo-calendar-grid button {
  color: rgba(247, 237, 243, 0.78);
}

.piggy-receipt-print-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(372px, 100%);
}

.piggy-receipt-print-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ff4fa3;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.piggy-receipt-vault-link {
  position: fixed;
  z-index: 22;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  color: rgba(255, 176, 204, 0.34);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.20em;
}

.piggy-receipt-shell .bloom-background {
  position: fixed;
  top: 42%;
  left: 50%;
  width: min(620px, 142vw);
  height: min(620px, 142vw);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 79, 163, 0.08), transparent 70%);
  pointer-events: none;
}

.piggy-receipt-shell .status-text {
  position: fixed;
  top: calc(42px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  color: rgba(255, 176, 204, 0.60);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-align: center;
}

.piggy-receipt-shell .light-slit {
  position: fixed;
  top: calc(80px + env(safe-area-inset-top));
  left: 50%;
  width: min(300px, 80vw);
  height: 1px;
  transform: translateX(-50%);
  background: #ff4fa3;
  box-shadow: 0 0 15px #ff4fa3, 0 0 5px #ff4fa3;
  z-index: 3;
}

.piggy-receipt-shell .receipt-container {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  overflow-y: auto;
  padding: calc(92px + env(safe-area-inset-top)) 18px calc(118px + env(safe-area-inset-bottom));
}

.piggy-receipt-shell .receipt-paper {
  position: relative;
  align-self: flex-start;
  width: min(330px, 86vw);
  background: #fdfafb;
  color: #2a282b;
  font-family: "Space Mono", ui-monospace, monospace;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.50);
  margin-top: 0;
}

.piggy-receipt-shell .receipt-paper.printed {
  animation: piggyReceiptPrint 1280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: top center;
}

@keyframes piggyReceiptPrint {
  0% {
    opacity: 0;
    transform: translateY(-132px);
    clip-path: inset(0 0 86% 0);
  }
  22% {
    opacity: 1;
    transform: translateY(-104px);
    clip-path: inset(0 0 68% 0);
  }
  62% {
    opacity: 1;
    transform: translateY(-24px);
    clip-path: inset(0 0 12% 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

.piggy-receipt-shell .receipt-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(rgba(0, 0, 0, 0.012) 0px, rgba(0, 0, 0, 0.012) 1px, transparent 1px, transparent 2px),
    linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.015) 50%, transparent 100%);
}

.piggy-receipt-shell .receipt-content {
  position: relative;
  z-index: 2;
  padding: 34px 22px 44px;
}

.piggy-receipt-shell .receipt-header {
  margin-bottom: 24px;
  text-align: center;
}

.piggy-receipt-shell .receipt-header h2 {
  margin: 0;
  color: #2a282b;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.10em;
}

.piggy-receipt-shell .receipt-header p,
.piggy-receipt-shell .barcode-label {
  color: rgba(42, 40, 43, 0.52);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.piggy-receipt-shell .receipt-divider {
  border-top: 1px dashed #2a282b;
  margin: 18px 0;
}

.piggy-receipt-shell .receipt-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  font-size: 11px;
}

.piggy-receipt-shell .receipt-meta div,
.piggy-receipt-shell .receipt-row,
.piggy-receipt-shell .receipt-summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.piggy-receipt-shell .receipt-body {
  margin-bottom: 24px;
  font-size: 12px;
}

.piggy-receipt-shell .receipt-body header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1.5px solid #2a282b;
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-weight: 800;
}

.piggy-receipt-shell .receipt-row {
  align-items: flex-start;
  margin-bottom: 10px;
  line-height: 1.45;
}

.piggy-receipt-shell .receipt-row .label {
  flex: 1;
}

.piggy-receipt-shell .receipt-row .amt {
  white-space: nowrap;
  font-weight: 800;
}

.piggy-receipt-shell .receipt-row .amt.plus,
.piggy-receipt-shell .receipt-summary .plus {
  color: #ff4fa3;
}

.piggy-receipt-shell .receipt-row .amt.minus,
.piggy-receipt-shell .receipt-summary .minus {
  color: #b68128;
}

.piggy-receipt-shell .receipt-summary {
  display: grid;
  gap: 8px;
  border-top: 2px solid #2a282b;
  padding-top: 12px;
  font-size: 12px;
  font-weight: 800;
}

.piggy-receipt-shell .receipt-summary .total-line {
  margin-top: 4px;
  font-size: 19px;
}

.piggy-receipt-shell .receipt-footer-note {
  margin-top: 34px;
  color: rgba(42, 40, 43, 0.58);
  font-family: "Songti SC", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.75;
  text-align: center;
}

.piggy-receipt-shell .receipt-barcode {
  width: 150px;
  height: 42px;
  margin: 30px auto 0;
  background: repeating-linear-gradient(90deg, #000 0px, #000 1px, transparent 1px, transparent 3px, #000 3px, #000 4px, transparent 4px, transparent 8px);
}

.piggy-receipt-shell .barcode-label {
  margin-top: 8px;
  text-align: center;
}

.piggy-receipt-shell .red-stamp {
  position: absolute;
  z-index: 3;
  top: 52px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 2px solid #ff4fa3;
  border-radius: 50%;
  color: #ff4fa3;
  font-size: 11px;
  font-weight: 900;
  opacity: 0.34;
  transform: rotate(15deg);
}

.piggy-receipt-shell .receipt-tear {
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 18px;
  background:
    linear-gradient(135deg, #fdfafb 50%, transparent 52%) 0 0 / 16px 18px repeat-x,
    linear-gradient(225deg, #fdfafb 50%, transparent 52%) 8px 0 / 16px 18px repeat-x;
  filter: drop-shadow(0 9px 10px rgba(0, 0, 0, 0.20));
}

.piggy-receipt-text-actions {
  position: fixed;
  z-index: 22;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: min(340px, calc(100vw - 48px));
  transform: translateX(-50%);
  text-align: center;
}

.piggy-receipt-shared {
  position: fixed;
  z-index: 22;
  left: 50%;
  bottom: calc(106px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: rgba(255, 176, 204, 0.46);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
}

.piggy-receipt-text-actions button {
  border: 0;
  background: transparent;
  color: rgba(255, 176, 204, 0.78);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.piggy-receipt-text-actions button:disabled {
  opacity: 0.42;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-card,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-bonus-card,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-grid button,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-list article,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list article > div {
  border-color: rgba(217, 134, 163, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 251, 250, 0.72)),
    rgba(255, 251, 250, 0.84);
  box-shadow:
    0 16px 36px rgba(96, 72, 82, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-card::before {
  background: rgba(217, 134, 163, 0.14);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-icon {
  background: rgba(217, 134, 163, 0.14);
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-form-head > .material-symbols-outlined {
  background: rgba(217, 134, 163, 0.12);
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-card small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-section .more-section-title strong {
  color: rgba(184, 91, 127, 0.74);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-card > strong,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list header b,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list em,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-bonus-card > .material-symbols-outlined,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-grid .material-symbols-outlined,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-list .material-symbols-outlined,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-dot {
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-balance-card p,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-bonus-card p {
  color: rgba(82, 65, 75, 0.68);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-bonus-card button {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(217, 134, 163, 0.13);
  color: #b85b7f;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-backdrop {
  background: rgba(246, 225, 232, 0.46);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-card {
  border-color: rgba(217, 134, 163, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 134, 163, 0.12), transparent 34%),
    rgba(255, 253, 251, 0.96);
  box-shadow: 0 24px 70px rgba(96, 72, 82, 0.16);
  color: rgba(52, 41, 48, 0.88);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-close,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-card .piggy-kicker {
  color: rgba(184, 91, 127, 0.72);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-card h3,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-list strong {
  color: rgba(52, 41, 48, 0.92);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-card > small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-list span,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-list em,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-list p {
  color: rgba(104, 82, 91, 0.66);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-detail-list div {
  border-top-color: rgba(217, 134, 163, 0.16);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-grid strong,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-list strong,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-form-head strong {
  color: rgba(52, 41, 48, 0.92);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card header small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card b,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-actions button,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-fulfill-form button {
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-jar-grid small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-list small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list header small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-form-head small,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card label {
  color: rgba(104, 82, 91, 0.54);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card p,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-fulfill-form label {
  color: rgba(104, 82, 91, 0.58);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card em {
  color: rgba(82, 65, 75, 0.74);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card.fulfilled p {
  color: rgba(171, 122, 34, 0.76);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card.fulfilled .piggy-wish-redeem-note {
  border-top-color: rgba(212, 160, 23, 0.18);
  color: rgba(82, 65, 75, 0.78);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-card.ready {
  border-color: rgba(217, 134, 163, 0.30);
  box-shadow:
    0 16px 36px rgba(96, 72, 82, 0.09),
    0 0 26px rgba(217, 134, 163, 0.08);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card input,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card textarea,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-fulfill-form input,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-wish-fulfill-form textarea {
  border-color: rgba(217, 134, 163, 0.22);
  background: rgba(255, 253, 251, 0.78);
  color: rgba(52, 41, 48, 0.90);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-form-toggle {
  color: rgba(184, 91, 127, 0.62);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card .piggy-select-trigger {
  border-color: rgba(217, 134, 163, 0.22);
  background: rgba(255, 253, 251, 0.94);
  color: rgba(52, 41, 48, 0.90);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card .piggy-select-trigger i {
  color: rgba(184, 91, 127, 0.58);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-select-menu {
  border-color: rgba(217, 134, 163, 0.22);
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 18px 42px rgba(96, 72, 82, 0.16);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card .piggy-select-menu button {
  color: rgba(52, 41, 48, 0.82);
  background: transparent;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card .piggy-select-menu button.active {
  background: rgba(217, 134, 163, 0.78);
  color: #fff;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-entry {
  border-color: rgba(217, 134, 163, 0.24);
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 134, 163, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 251, 250, 0.76));
  color: rgba(52, 41, 48, 0.90);
  box-shadow:
    0 16px 36px rgba(96, 72, 82, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-entry > span {
  background: rgba(217, 134, 163, 0.12);
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-entry small {
  color: rgba(104, 82, 91, 0.52);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-entry i {
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-shell {
  background:
    radial-gradient(circle at 50% 10%, rgba(217, 134, 163, 0.14), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 100%);
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-back {
  color: rgba(217, 134, 163, 0.72);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-select h2 {
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-select p,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-vault-link,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-text-actions button,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-shared {
  color: rgba(184, 91, 127, 0.62);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-picker .memo-picker-trigger {
  border-color: rgba(217, 134, 163, 0.28);
  background: rgba(255, 253, 251, 0.76);
  color: #b85b7f;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-picker .memo-picker-trigger small {
  color: rgba(104, 82, 91, 0.54);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-panel {
  border-color: rgba(217, 134, 163, 0.26);
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 22px 54px rgba(96, 72, 82, 0.18);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-panel .memo-calendar-head strong {
  color: rgba(184, 91, 127, 0.88);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-panel .memo-calendar-head button {
  color: rgba(198, 95, 134, 0.72);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-date-panel .memo-calendar-grid button {
  color: rgba(52, 41, 48, 0.78);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-print-actions button {
  color: #c65f86;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-shell .bloom-background {
  background: radial-gradient(circle, rgba(217, 134, 163, 0.10), transparent 70%);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-shell .status-text {
  color: rgba(184, 91, 127, 0.54);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-receipt-shell .light-slit {
  background: #d986a3;
  box-shadow: 0 0 15px rgba(217, 134, 163, 0.62), 0 0 5px rgba(217, 134, 163, 0.76);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card input::placeholder,
body[data-app-theme="day"][data-view="piggyBank"] .piggy-action-card textarea::placeholder {
  color: rgba(104, 82, 91, 0.38);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list header b.expense {
  color: #b68128;
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list p {
  background: rgba(217, 134, 163, 0.08);
  color: rgba(82, 65, 75, 0.76);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-more {
  color: rgba(190, 92, 128, 0.72);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-dot {
  border-color: rgba(217, 134, 163, 0.20);
  background: rgba(255, 251, 250, 0.95);
}

body[data-app-theme="day"][data-view="piggyBank"] .piggy-record-list::before {
  background: rgba(217, 134, 163, 0.16);
}

body[data-app-theme="day"] .more-senses-light {
  background: #80c5a7 !important;
  box-shadow: 0 0 16px rgba(128, 197, 167, 0.42) !important;
}

body[data-app-theme="day"] .more-senses-row i {
  color: rgba(184, 91, 127, 0.72) !important;
}

body[data-app-theme="day"] .more-senses-row i.muted {
  color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .more-reserved-card {
  opacity: 0.72 !important;
}

body[data-app-theme="day"] .more-reserved-card > .material-symbols-outlined {
  color: rgba(104, 82, 91, 0.50) !important;
}

body[data-app-theme="day"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 218, 234, 0.58), transparent 24rem),
    radial-gradient(circle at 84% 8%, rgba(255, 236, 244, 0.78), transparent 24rem),
    linear-gradient(180deg, #fff8fb 0%, #f8eeee 58%, #fffaf8 100%) !important;
}

/* Setting day theme: bright control room with the same card hierarchy. */
body[data-app-theme="day"] .setting-control-shell.home-shell {
  --setting-eraser: #d986a3;
  --setting-eraser-bright: #c96f91;
  --setting-line: rgba(196, 117, 145, 0.18);
  background:
    radial-gradient(circle at 72% 0%, rgba(255, 218, 234, 0.62), transparent 34%),
    radial-gradient(circle at 8% 96%, rgba(255, 238, 244, 0.72), transparent 32%),
    linear-gradient(180deg, #fff8fb 0%, #f7eeee 100%) !important;
  color: #342930 !important;
}

body[data-app-theme="day"] .setting-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 248, 251, 0.84) !important;
  box-shadow: 0 10px 30px rgba(90, 62, 72, 0.08) !important;
}

body[data-app-theme="day"] .setting-control-head h2 {
  color: #33272d !important;
  text-shadow: none !important;
}

body[data-app-theme="day"] .setting-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .setting-back:hover {
  color: #c96f91 !important;
}

body[data-app-theme="day"] .setting-note small {
  color: rgba(92, 70, 78, 0.44) !important;
}

body[data-app-theme="day"] .setting-note p {
  color: rgba(55, 42, 49, 0.66) !important;
}

body[data-app-theme="day"] .setting-section-title strong {
  color: rgba(184, 91, 127, 0.82) !important;
}

body[data-app-theme="day"] .setting-section-title i {
  background: rgba(196, 117, 145, 0.20) !important;
}

body[data-app-theme="day"] .setting-live-card {
  border-color: rgba(196, 117, 145, 0.22) !important;
  background:
    radial-gradient(circle at 78% 0%, rgba(255, 226, 239, 0.58), transparent 58%),
    rgba(255, 251, 250, 0.86) !important;
  color: #342930 !important;
  box-shadow:
    0 18px 42px rgba(96, 72, 82, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

body[data-app-theme="day"] .setting-live-card:hover {
  border-color: rgba(217, 134, 163, 0.42) !important;
  box-shadow:
    0 20px 48px rgba(96, 72, 82, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
}

body[data-app-theme="day"] .setting-live-icon {
  background: rgba(217, 134, 163, 0.14) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .setting-live-top small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .setting-pulse-dots b {
  background: #d986a3 !important;
  box-shadow: 0 0 12px rgba(217, 134, 163, 0.42) !important;
}

body[data-app-theme="day"] .setting-live-copy strong {
  color: rgba(52, 41, 48, 0.94) !important;
}

body[data-app-theme="day"] .setting-live-copy small {
  color: rgba(104, 82, 91, 0.68) !important;
}

body[data-app-theme="day"] .setting-live-action {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .setting-room-card {
  border-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 251, 250, 0.62) !important;
  color: #342930 !important;
  opacity: 0.66 !important;
  filter: saturate(0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active {
  border-color: rgba(196, 117, 145, 0.26) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 226, 239, 0.54), transparent 58%),
    rgba(255, 251, 250, 0.86) !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow:
    0 14px 34px rgba(96, 72, 82, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active:hover {
  border-color: rgba(217, 134, 163, 0.42) !important;
}

body[data-app-theme="day"] .setting-room-icon {
  border-color: rgba(104, 82, 91, 0.14) !important;
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active .setting-room-icon {
  border-color: rgba(217, 134, 163, 0.28) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .setting-room-copy strong,
body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active .setting-room-copy strong {
  color: rgba(52, 41, 48, 0.88) !important;
}

body[data-app-theme="day"] .setting-room-copy small,
body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active .setting-room-copy small {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .setting-room-copy em,
body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active .setting-room-copy em {
  color: rgba(184, 91, 127, 0.78) !important;
}

body[data-app-theme="day"] .setting-room-end,
body[data-app-theme="day"] button.setting-room-card.setting-theme-entry.active .setting-room-end {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .setting-meta {
  color: rgba(104, 82, 91, 0.42) !important;
}

/* API day theme: daylight wiring room, still compact and technical. */
body[data-app-theme="day"] .module-shell:has(.api-config-page) {
  background:
    radial-gradient(circle at 52% 0%, rgba(255, 218, 234, 0.58), transparent 34%),
    linear-gradient(180deg, #fff8fb 0%, #f7eeee 100%) !important;
}

body[data-app-theme="day"] .module-shell:has(.api-config-page) .top-card {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 248, 251, 0.84) !important;
  box-shadow: 0 10px 30px rgba(90, 62, 72, 0.08) !important;
}

body[data-app-theme="day"] .module-shell:has(.api-config-page) .top-card .nav-btn {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .module-shell:has(.api-config-page) .top-card .nav-btn:hover {
  color: #c96f91 !important;
}

body[data-app-theme="day"] .module-shell:has(.api-config-page) .top-card .brand {
  color: #33272d !important;
}

body[data-app-theme="day"] .api-config-page {
  --api-pink: #d986a3;
  --api-soft: rgba(217, 134, 163, 0.14);
  --api-line: rgba(196, 117, 145, 0.20);
  --api-card: rgba(255, 251, 250, 0.86);
  color: #342930 !important;
}

body[data-app-theme="day"] .api-config-intro small {
  color: rgba(92, 70, 78, 0.44) !important;
}

body[data-app-theme="day"] .api-config-intro p {
  color: rgba(55, 42, 49, 0.66) !important;
}

body[data-app-theme="day"] .api-config-section {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 226, 239, 0.54), transparent 58%),
    rgba(255, 251, 250, 0.82) !important;
  box-shadow:
    0 18px 42px rgba(96, 72, 82, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

body[data-app-theme="day"] .api-config-section.open {
  border-color: rgba(196, 117, 145, 0.28) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 226, 239, 0.60), transparent 58%),
    rgba(255, 251, 250, 0.90) !important;
}

body[data-app-theme="day"] .api-config-section.open .api-config-head {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 244, 249, 0.54) !important;
}

body[data-app-theme="day"] .api-config-icon {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .api-config-title strong {
  color: rgba(52, 41, 48, 0.94) !important;
}

body[data-app-theme="day"] .api-config-title small {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .api-status-ready {
  border-color: rgba(128, 197, 167, 0.38) !important;
  background: rgba(128, 197, 167, 0.16) !important;
  color: #3e8a6b !important;
}

body[data-app-theme="day"] .api-status-optional,
body[data-app-theme="day"] .api-status-soon {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: rgba(184, 91, 127, 0.72) !important;
}

body[data-app-theme="day"] .api-status-missing {
  border-color: rgba(207, 91, 105, 0.42) !important;
  background: rgba(207, 91, 105, 0.12) !important;
  color: #a94353 !important;
}

body[data-app-theme="day"] .api-config-chevron {
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .api-config-page .field label {
  color: rgba(104, 82, 91, 0.60) !important;
}

body[data-app-theme="day"] .api-config-page input,
body[data-app-theme="day"] .api-config-page textarea {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.76) !important;
  color: rgba(52, 41, 48, 0.92) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

body[data-app-theme="day"] .api-config-page input::placeholder,
body[data-app-theme="day"] .api-config-page textarea::placeholder {
  color: rgba(104, 82, 91, 0.38) !important;
}

body[data-app-theme="day"] .api-config-page input:focus,
body[data-app-theme="day"] .api-config-page textarea:focus {
  border-color: rgba(217, 134, 163, 0.48) !important;
  box-shadow: 0 0 0 3px rgba(217, 134, 163, 0.12) !important;
}

body[data-app-theme="day"] .api-config-page input[type="checkbox"] {
  accent-color: #d986a3 !important;
}

body[data-app-theme="day"] .api-config-actions .send {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 14px 34px rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .api-config-actions .ghost,
body[data-app-theme="day"] .api-config-actions .pretty-select-trigger,
body[data-app-theme="day"] .api-config-actions .ghost:first-child,
body[data-app-theme="day"] .api-config-actions button[data-fetch-models],
body[data-app-theme="day"] .api-config-actions button[data-fetch-image-models] {
  border-color: rgba(217, 134, 163, 0.28) !important;
  background: rgba(255, 253, 251, 0.68) !important;
  color: #b85b7f !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .api-route-chip,
body[data-app-theme="day"] .api-mini-note,
body[data-app-theme="day"] .api-empty-card,
body[data-app-theme="day"] .api-config-item {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.60) !important;
}

body[data-app-theme="day"] .api-route-chip small {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .api-route-chip strong,
body[data-app-theme="day"] .api-config-select strong,
body[data-app-theme="day"] .api-mini-note strong {
  color: rgba(52, 41, 48, 0.90) !important;
}

body[data-app-theme="day"] .api-route-chip span,
body[data-app-theme="day"] .api-config-select span,
body[data-app-theme="day"] .api-config-item > small,
body[data-app-theme="day"] .api-mini-note span,
body[data-app-theme="day"] .api-mini-note em,
body[data-app-theme="day"] .api-vector-toggle {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .api-config-item.selected {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: rgba(217, 134, 163, 0.12) !important;
}

body[data-app-theme="day"] .api-role-actions button {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.46) !important;
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .api-role-actions button.active {
  border-color: rgba(217, 134, 163, 0.46) !important;
  background: rgba(217, 134, 163, 0.14) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .api-role-actions .danger {
  border-color: rgba(207, 91, 105, 0.22) !important;
  color: #a94353 !important;
}

body[data-app-theme="day"] .api-model-picker,
body[data-app-theme="day"] .api-config-page .model-picker-panel {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.94) !important;
  box-shadow: 0 18px 44px rgba(96, 72, 82, 0.14) !important;
}

body[data-app-theme="day"] .api-config-page .model-option {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.74) !important;
  color: rgba(52, 41, 48, 0.88) !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .api-config-page .model-option:hover {
  border-color: rgba(217, 134, 163, 0.34) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: #342930 !important;
}

body[data-app-theme="day"] .api-vector-status {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .api-vector-status span,
body[data-app-theme="day"] .api-config-page .memory-vector-status-line span {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(217, 134, 163, 0.11) !important;
  color: #7a4358 !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .api-config-footer {
  color: rgba(184, 91, 127, 0.26) !important;
}

/* Theme day theme: the light library should preview itself in daylight. */
body[data-app-theme="day"][data-view="theme"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 218, 234, 0.58), transparent 24rem),
    radial-gradient(circle at 84% 8%, rgba(255, 236, 244, 0.78), transparent 24rem),
    linear-gradient(180deg, #fff8fb 0%, #f8eeee 58%, #fffaf8 100%) !important;
}

body[data-app-theme="day"] .module-shell:has(.theme-room) {
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 218, 234, 0.62), transparent 40%),
    linear-gradient(180deg, #fff8fb 0%, #f7eeee 100%) !important;
}

body[data-app-theme="day"] .module-shell:has(.theme-room) .top-card {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 248, 251, 0.84) !important;
  box-shadow: 0 10px 30px rgba(90, 62, 72, 0.08) !important;
}

body[data-app-theme="day"] .module-shell:has(.theme-room) .top-card .nav-btn {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .module-shell:has(.theme-room) .top-card .nav-btn:hover {
  color: #c96f91 !important;
}

body[data-app-theme="day"] .module-shell:has(.theme-room) .top-card .brand {
  color: #33272d !important;
  text-shadow: none !important;
}

body[data-app-theme="day"] .theme-room.monitor-observation-room {
  color: #342930 !important;
}

body[data-app-theme="day"] .theme-room .monitor-intro span {
  color: rgba(92, 70, 78, 0.44) !important;
}

body[data-app-theme="day"] .theme-room .monitor-intro p {
  color: rgba(55, 42, 49, 0.66) !important;
}

body[data-app-theme="day"] .theme-room .setting-section-title strong {
  color: rgba(184, 91, 127, 0.82) !important;
}

body[data-app-theme="day"] .theme-room .setting-section-title i {
  background: rgba(196, 117, 145, 0.20) !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-card {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 226, 239, 0.54), transparent 58%),
    rgba(255, 251, 250, 0.82) !important;
  color: #342930 !important;
  box-shadow:
    0 18px 42px rgba(96, 72, 82, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .theme-room button.theme-preset-card:hover {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 226, 239, 0.64), transparent 58%),
    rgba(255, 251, 250, 0.92) !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-card.active {
  border-color: rgba(217, 134, 163, 0.44) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 218, 234, 0.72), transparent 58%),
    rgba(255, 251, 250, 0.94) !important;
  box-shadow:
    0 20px 48px rgba(96, 72, 82, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86) !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-future {
  opacity: 0.68 !important;
  filter: saturate(0.82) !important;
}

body[data-app-theme="day"] .theme-room .monitor-card-label {
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .theme-room .monitor-status-pill {
  border: 1px solid rgba(196, 117, 145, 0.16) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: rgba(184, 91, 127, 0.74) !important;
}

body[data-app-theme="day"] .theme-room .monitor-status-pill.ok {
  border-color: rgba(128, 197, 167, 0.38) !important;
  background: rgba(128, 197, 167, 0.16) !important;
  color: #3e8a6b !important;
}

body[data-app-theme="day"] .theme-room .monitor-status-pill.warn {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-icon {
  background: rgba(217, 134, 163, 0.14) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-copy strong {
  color: rgba(52, 41, 48, 0.94) !important;
}

body[data-app-theme="day"] .theme-room .theme-preset-copy small {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .theme-room .theme-swatches i {
  border-color: rgba(104, 82, 91, 0.10) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 6px 14px rgba(96, 72, 82, 0.08) !important;
}

/* Memo day theme: a clean paper desk with daylight pickers. */
body[data-app-theme="day"][data-view="memo"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 218, 234, 0.58), transparent 24rem),
    radial-gradient(circle at 84% 8%, rgba(255, 236, 244, 0.78), transparent 24rem),
    linear-gradient(180deg, #fff8fb 0%, #f8eeee 58%, #fffaf8 100%) !important;
}

body[data-app-theme="day"] .memo-control-shell.home-shell {
  --memo-day-primary: #d986a3;
  --memo-day-hot: #e65d9c;
  --memo-day-text: #302a2e;
  --memo-day-muted: rgba(104, 82, 91, 0.58);
  --memo-day-line: rgba(96, 72, 82, 0.12);
  --memo-day-surface: rgba(255, 253, 251, 0.86);
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%) !important;
  color: var(--memo-day-text) !important;
}

body[data-app-theme="day"] .memo-control-shell .simple-head {
  border-bottom-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 12px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .memo-control-shell .simple-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
  text-shadow: none !important;
}

body[data-app-theme="day"] .memo-control-shell .simple-head .chat-back {
  color: var(--memo-day-primary) !important;
}

body[data-app-theme="day"] .memo-control-shell .simple-head .chat-back:hover {
  color: #c96f91 !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-editor {
  border-color: var(--memo-day-line) !important;
  background:
    linear-gradient(180deg, rgba(217, 134, 163, 0.055), transparent 46%),
    var(--memo-day-surface) !important;
  box-shadow: 0 18px 48px rgba(112, 74, 88, 0.10), 0 0 0 5px rgba(217, 134, 163, 0.025) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-editor input,
body[data-app-theme="day"] .memo-control-shell .memo-editor textarea {
  border-bottom-color: rgba(96, 72, 82, 0.14) !important;
  color: rgba(48, 42, 46, 0.86) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-editor input::placeholder,
body[data-app-theme="day"] .memo-control-shell .memo-editor textarea::placeholder {
  color: rgba(104, 82, 91, 0.40) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-trigger {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-trigger:hover,
body[data-app-theme="day"] .memo-control-shell .memo-picker-trigger:focus-visible {
  background: rgba(217, 134, 163, 0.08) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-trigger .material-symbols-outlined {
  color: var(--memo-day-primary) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-trigger strong {
  color: inherit !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-add {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-panel {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 18px 44px rgba(96, 72, 82, 0.14) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-panel button {
  background: rgba(255, 253, 251, 0.60) !important;
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-panel button:hover {
  background: rgba(217, 134, 163, 0.10) !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-picker-panel button.active {
  background: rgba(217, 134, 163, 0.14) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel {
  border-color: rgba(196, 117, 145, 0.20) !important;
  background: rgba(255, 253, 251, 0.98) !important;
  box-shadow: 0 24px 70px rgba(112, 74, 88, 0.22) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-head strong {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-head button {
  color: var(--memo-day-primary) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-grid b {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-grid button {
  border-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 255, 255, 0.54) !important;
  color: rgba(48, 42, 46, 0.76) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-grid button.today {
  border-color: rgba(230, 93, 156, 0.34) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: var(--memo-day-primary) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-date-panel .memo-calendar-grid button.active {
  border-color: rgba(217, 134, 163, 0.54) !important;
  background: var(--memo-day-primary) !important;
  color: #fff !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-section-head strong {
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-board-today .memo-section-head strong {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-section-head small,
body[data-app-theme="day"] .memo-control-shell .memo-section-head b {
  color: var(--memo-day-muted) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-board:not(.cycle-history) .memo-task {
  border-color: color-mix(in srgb, var(--tag-color), white 74%) !important;
  background: rgba(255, 253, 251, 0.74) !important;
  box-shadow: 0 14px 36px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-check {
  border-color: rgba(104, 82, 91, 0.34) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-task.done .memo-check {
  border-color: var(--tag-color) !important;
  background: var(--tag-color) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-task-title strong {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-task-title span {
  background: color-mix(in srgb, var(--tag-color), white 82%) !important;
  color: color-mix(in srgb, var(--tag-color), black 12%) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-task p {
  color: rgba(104, 82, 91, 0.64) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-task small {
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-delete {
  color: rgba(104, 82, 91, 0.40) !important;
}

body[data-app-theme="day"] .memo-control-shell .memo-delete:hover {
  color: #c75f82 !important;
}

body[data-app-theme="day"] .memo-control-shell .mini-card {
  border-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 255, 255, 0.48) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

/* Diary day theme: daylight letters, draft archive, and date calendar. */
body[data-app-theme="day"][data-view="diary"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 218, 234, 0.58), transparent 24rem),
    radial-gradient(circle at 84% 8%, rgba(255, 236, 244, 0.78), transparent 24rem),
    linear-gradient(180deg, #fff8fb 0%, #f8eeee 58%, #fffaf8 100%) !important;
}

body[data-app-theme="day"] .diary-control-shell.home-shell {
  --diary-day-primary: #d986a3;
  --diary-day-hot: #e65d9c;
  --diary-day-text: #302a2e;
  --diary-day-muted: rgba(104, 82, 91, 0.58);
  --diary-day-line: rgba(96, 72, 82, 0.12);
  --diary-day-surface: rgba(255, 253, 251, 0.86);
  background:
    radial-gradient(circle at 82% 8%, rgba(230, 93, 156, 0.10), transparent 30%),
    radial-gradient(circle at 0 74%, rgba(170, 135, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #fbf6f4 0%, #f8f0f2 100%) !important;
  color: var(--diary-day-text) !important;
}

body[data-app-theme="day"] .diary-control-shell .simple-head {
  border-bottom-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 12px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .diary-control-shell .simple-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
  text-shadow: none !important;
}

body[data-app-theme="day"] .diary-control-shell .simple-head .chat-back {
  color: var(--diary-day-primary) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-intro small {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-intro p {
  color: rgba(55, 42, 49, 0.66) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-view-tabs {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  box-shadow: 0 14px 36px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-view-tabs button {
  color: rgba(104, 82, 91, 0.60) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-view-tabs button.active {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(217, 134, 163, 0.20) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-actions .send {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-actions .ghost,
body[data-app-theme="day"] .weekly-diary-detail-actions .ghost {
  border-color: rgba(217, 134, 163, 0.26) !important;
  background: rgba(255, 253, 251, 0.64) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-filter > i {
  color: rgba(104, 82, 91, 0.32) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-field > span {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-picker .memo-picker-trigger,
body[data-app-theme="day"] .diary-control-shell .diary-filter-clear {
  border-color: rgba(96, 72, 82, 0.14) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(48, 42, 46, 0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-filter-clear .material-symbols-outlined {
  color: var(--diary-day-primary) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel,
body[data-app-theme="day"] .diary-control-shell .diary-date-panel-end {
  border-color: rgba(196, 117, 145, 0.20) !important;
  background: rgba(255, 253, 251, 0.98) !important;
  color: var(--diary-day-text) !important;
  box-shadow: 0 24px 70px rgba(112, 74, 88, 0.22) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-head strong {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-head button {
  color: var(--diary-day-primary) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-grid b {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-grid > button {
  border-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 255, 255, 0.54) !important;
  color: rgba(48, 42, 46, 0.76) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-grid > button.today {
  border-color: rgba(230, 93, 156, 0.34) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: var(--diary-day-primary) !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-panel .memo-calendar-grid > button.active {
  border-color: rgba(217, 134, 163, 0.54) !important;
  background: var(--diary-day-primary) !important;
  color: #fff !important;
}

body[data-app-theme="day"] .diary-control-shell .diary-date-clear {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background: rgba(217, 134, 163, 0.08) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .diary-card,
body[data-app-theme="day"] .weekly-diary-card,
body[data-app-theme="day"] .diary-monthly-placeholder {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background:
    radial-gradient(circle at 88% 24%, rgba(217, 134, 163, 0.09), transparent 22%),
    linear-gradient(180deg, rgba(217, 134, 163, 0.045), transparent 46%),
    rgba(255, 253, 251, 0.78) !important;
  color: var(--diary-day-text) !important;
  box-shadow: 0 14px 36px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .diary-card span,
body[data-app-theme="day"] .diary-card small,
body[data-app-theme="day"] .weekly-diary-card span,
body[data-app-theme="day"] .weekly-diary-card small,
body[data-app-theme="day"] .diary-monthly-placeholder span {
  color: rgba(184, 91, 127, 0.68) !important;
}

body[data-app-theme="day"] .diary-card strong,
body[data-app-theme="day"] .weekly-diary-card strong,
body[data-app-theme="day"] .diary-monthly-placeholder strong {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .diary-card p,
body[data-app-theme="day"] .weekly-diary-card p,
body[data-app-theme="day"] .diary-monthly-placeholder p {
  color: rgba(104, 82, 91, 0.64) !important;
}

body[data-app-theme="day"] .weekly-diary-card small i {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .weekly-diary-status {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.72) !important;
  color: var(--diary-day-text) !important;
  box-shadow: 0 12px 30px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .weekly-diary-status strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .weekly-diary-status p {
  color: rgba(104, 82, 91, 0.60) !important;
}

body[data-app-theme="day"] .diary-draft-backdrop {
  background: rgba(66, 39, 54, 0.20) !important;
}

body[data-app-theme="day"] .diary-draft-modal {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background:
    radial-gradient(circle at 52% 4%, rgba(217, 134, 163, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 251, 0.98), rgba(255, 247, 250, 0.96)) !important;
  color: var(--diary-day-text) !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-app-theme="day"] .diary-draft-head span,
body[data-app-theme="day"] .diary-draft-group h4 {
  color: rgba(184, 91, 127, 0.68) !important;
}

body[data-app-theme="day"] .diary-draft-head h3 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .diary-draft-head small {
  color: rgba(104, 82, 91, 0.64) !important;
}

body[data-app-theme="day"] .diary-draft-group h4 {
  background: rgba(255, 253, 251, 0.94) !important;
}

body[data-app-theme="day"] .diary-draft-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  box-shadow: 0 10px 26px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .diary-draft-card header span {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .diary-draft-card header button {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .diary-draft-card strong {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .diary-draft-card p {
  color: rgba(104, 82, 91, 0.68) !important;
}

body[data-app-theme="day"] .diary-draft-quotes span {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background: rgba(217, 134, 163, 0.08) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .diary-draft-empty {
  border-color: rgba(196, 117, 145, 0.22) !important;
  background: rgba(255, 253, 251, 0.46) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .diary-draft-error {
  color: #a94353 !important;
}

body[data-app-theme="day"] .diary-draft-generate-row .ghost {
  border-color: rgba(217, 134, 163, 0.28) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .diary-draft-modal .heart-modal-close {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .diary-letter-modal {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(217, 134, 163, 0.08) 0,
      rgba(217, 134, 163, 0.08) 1px,
      transparent 1px,
      transparent 60px
    ),
    #fffdfb !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.24) !important;
}

body[data-app-theme="day"] .diary-letter-modal .diary-detail-head span {
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .diary-letter-modal .diary-detail-head strong,
body[data-app-theme="day"] .diary-letter-modal .diary-content,
body[data-app-theme="day"] .diary-letter-modal .diary-content::after {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .diary-letter-actions {
  border-top-color: rgba(96, 72, 82, 0.10) !important;
  background: rgba(255, 253, 251, 0.94) !important;
}

body[data-app-theme="day"] .diary-letter-actions .danger {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .weekly-diary-modal,
body[data-app-theme="day"] .weekly-diary-preview-modal {
  border-color: rgba(217, 134, 163, 0.20) !important;
  background:
    radial-gradient(circle at 78% 12%, rgba(217, 134, 163, 0.10), transparent 24%),
    rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.22) !important;
  color: var(--diary-day-text) !important;
}

body[data-app-theme="day"] .weekly-diary-detail-head span,
body[data-app-theme="day"] .weekly-diary-detail-head span b,
body[data-app-theme="day"] .weekly-diary-detail-head small,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-detail-head span,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-detail-head small {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .weekly-diary-detail-head h3,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-detail-head h3 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .weekly-diary-modal .weekly-diary-summary,
body[data-app-theme="day"] .weekly-diary-section p,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column > div,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column > p,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-section p,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-section:nth-of-type(3) p {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .weekly-diary-modal .weekly-diary-summary {
  border-top-color: rgba(196, 117, 145, 0.12) !important;
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
}

body[data-app-theme="day"] .weekly-diary-section h4,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-section h4 {
  color: rgba(184, 91, 127, 0.62) !important;
}

body[data-app-theme="day"] .weekly-diary-section:nth-of-type(3) p {
  border-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(217, 134, 163, 0.06) !important;
}

body[data-app-theme="day"] .weekly-diary-detail-actions,
body[data-app-theme="day"] .weekly-diary-preview-actions {
  border-top-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 253, 251, 0.94) !important;
}

body[data-app-theme="day"] .weekly-diary-modal .actions.weekly-diary-detail-actions .ghost,
body[data-app-theme="day"] .weekly-diary-modal .actions.weekly-diary-detail-actions .ghost:first-child {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column {
  border-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 253, 251, 0.62) !important;
}

body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column > span {
  background: rgba(217, 134, 163, 0.10) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column > h4,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-column > strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-actions .send,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-actions .send:first-child {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
}

body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-actions .ghost,
body[data-app-theme="day"] .weekly-diary-preview-modal .weekly-diary-preview-actions .ghost:first-child {
  border-color: rgba(217, 134, 163, 0.26) !important;
  background: rgba(255, 253, 251, 0.64) !important;
  color: #b85b7f !important;
}

/* Cycle day theme: soft paper tracking with readable forecast cards. */
body[data-app-theme="day"][data-view="cycle"] {
  background:
    radial-gradient(circle at 16% 12%, rgba(242, 160, 190, 0.18), transparent 32%),
    radial-gradient(circle at 84% 24%, rgba(217, 134, 163, 0.14), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 48%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="cycle"] .bottom-nav {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .cycle-control-shell.home-shell {
  --cycle-rubber: #d986a3;
  --cycle-rubber-soft: #eaa4be;
  --cycle-day-text: rgba(48, 42, 46, 0.92);
  --cycle-day-muted: rgba(104, 82, 91, 0.62);
  --cycle-day-soft: rgba(184, 91, 127, 0.60);
  background:
    radial-gradient(circle at 66% 4%, rgba(217, 134, 163, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 253, 251, 0.96) 54%, rgba(255, 246, 250, 0.98) 100%) !important;
  color: var(--cycle-day-text) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 247, 250, 0.86) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .cycle-control-shell .more-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-hero,
body[data-app-theme="day"] .cycle-control-shell .cycle-prediction {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background:
    radial-gradient(circle at 84% 16%, rgba(217, 134, 163, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 251, 0.86), rgba(255, 247, 250, 0.72)) !important;
  box-shadow: 0 16px 40px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-hero span,
body[data-app-theme="day"] .cycle-control-shell .cycle-prediction header strong {
  color: var(--cycle-day-text) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-hero span i {
  background: #d986a3 !important;
  box-shadow: 0 0 18px rgba(217, 134, 163, 0.38) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-hero small,
body[data-app-theme="day"] .cycle-control-shell .cycle-prediction header span {
  color: var(--cycle-day-muted) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-hero b {
  color: #c75f82 !important;
  text-shadow: 0 0 20px rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-action.is-active {
  border-color: rgba(217, 134, 163, 0.62) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 16px 32px rgba(217, 134, 163, 0.26) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-action.is-dark {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.68) !important;
  color: rgba(104, 82, 91, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-action:disabled {
  opacity: 0.58 !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle {
  fill: rgba(196, 117, 145, 0.16) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-period {
  --cycle-today-color: #d986a3;
  fill: rgba(217, 134, 163, 0.88) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-pms {
  --cycle-today-color: #f08366;
  fill: rgba(240, 131, 102, 0.68) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-ovulation {
  --cycle-today-color: #9f87d7;
  fill: rgba(159, 135, 215, 0.58) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-fertile {
  --cycle-today-color: #7f739d;
  fill: rgba(127, 115, 157, 0.54) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-calm {
  --cycle-today-color: #c9a1b1;
  fill: rgba(201, 161, 177, 0.34) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel circle.cycle-dot-today {
  filter: drop-shadow(0 0 7px rgba(217, 134, 163, 0.38)) drop-shadow(0 0 16px rgba(217, 134, 163, 0.24)) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-center,
body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-center span,
body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-center strong {
  color: var(--cycle-day-text) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-center b {
  color: #c75f82 !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-tag {
  color: rgba(184, 91, 127, 0.36) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-wheel-tag.ovulation {
  color: rgba(127, 115, 157, 0.34) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-range strong {
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-range small {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .memo-section-head strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .memo-section-head small {
  background: rgba(217, 134, 163, 0.10) !important;
  color: rgba(184, 91, 127, 0.68) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .memo-section-head b {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.68) !important;
  box-shadow: 0 12px 30px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row i {
  background: rgba(217, 134, 163, 0.12) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row i::after {
  background: rgba(217, 134, 163, 0.82) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row strong {
  color: rgba(48, 42, 46, 0.80) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row small {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .cycle-history-row > span {
  background: rgba(217, 134, 163, 0.10) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .cycle-control-shell .cycle-history .mini-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: rgba(104, 82, 91, 0.62) !important;
}

/* Favorites day theme: saved words as daylight notes and letters. */
body[data-app-theme="day"][data-view="favorites"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 160, 190, 0.18), transparent 32%),
    radial-gradient(circle at 86% 24%, rgba(217, 134, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 50%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="favorites"] .bottom-nav {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .favorites-control-shell.home-shell {
  --fav-bg: #fff7fa;
  --fav-surface: rgba(255, 253, 251, 0.82);
  --fav-card: rgba(255, 253, 251, 0.72);
  --fav-ink: rgba(48, 42, 46, 0.92);
  --fav-muted: rgba(104, 82, 91, 0.62);
  --fav-dim: rgba(104, 82, 91, 0.42);
  --fav-pink: #d986a3;
  --fav-hot: #e65a9c;
  --fav-line: rgba(196, 117, 145, 0.16);
  background:
    radial-gradient(circle at 64% 4%, rgba(217, 134, 163, 0.15), transparent 34%),
    linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 253, 251, 0.96) 54%, rgba(255, 246, 250, 0.98) 100%) !important;
  color: var(--fav-ink) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 247, 250, 0.86) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .favorites-control-shell .more-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-summary > span {
  color: rgba(184, 91, 127, 0.58) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-summary strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-summary small {
  border-color: rgba(217, 134, 163, 0.18) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: rgba(184, 91, 127, 0.72) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorites-summary small i {
  background: #d986a3 !important;
  box-shadow: 0 0 12px rgba(217, 134, 163, 0.46) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-tabs {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-tabs button {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-tabs button.active {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(217, 134, 163, 0.24) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(217, 134, 163, 0.10), transparent 28%),
    rgba(255, 253, 251, 0.74) !important;
  box-shadow: 0 14px 34px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-card > span {
  background: rgba(217, 134, 163, 0.10) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-card p {
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-card small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-card > button {
  color: rgba(184, 91, 127, 0.44) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-note-wall {
  background: transparent !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-note-card {
  box-shadow: 0 16px 32px rgba(112, 74, 88, 0.12) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-note-card::after {
  box-shadow: 0 2px 7px rgba(112, 74, 88, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.46) !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-note-card strong {
  color: currentColor !important;
  opacity: 0.64 !important;
}

body[data-app-theme="day"] .favorites-control-shell .favorite-note-delete {
  color: currentColor !important;
  opacity: 0.38 !important;
}

body[data-app-theme="day"] .favorites-control-shell .mini-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(104, 82, 91, 0.62) !important;
  box-shadow: 0 12px 30px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .favorite-letter-paper {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background:
    repeating-linear-gradient(0deg, transparent 0 43px, rgba(196, 117, 145, 0.07) 44px 45px),
    linear-gradient(180deg, #fffdfb, #fff4f8) !important;
  color: rgba(48, 42, 46, 0.92) !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.24) !important;
}

body[data-app-theme="day"] .favorite-letter-close {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .favorite-letter-paper::after {
  border-color: rgba(184, 91, 127, 0.12) !important;
  color: rgba(184, 91, 127, 0.30) !important;
}

body[data-app-theme="day"] .favorite-letter-paper header {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
}

body[data-app-theme="day"] .favorite-letter-paper header small,
body[data-app-theme="day"] .favorite-letter-paper em,
body[data-app-theme="day"] .favorite-letter-foot small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .favorite-letter-paper h3,
body[data-app-theme="day"] .favorite-letter-body {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .favorite-letter-foot {
  border-top-color: rgba(196, 117, 145, 0.14) !important;
  color: rgba(104, 82, 91, 0.76) !important;
}

body[data-app-theme="day"] .favorite-letter-actions {
  border-top-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 253, 251, 0.94) !important;
}

body[data-app-theme="day"] .favorite-letter-actions button {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .favorite-letter-actions button:first-child {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .favorite-note-modal-paper {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 241, 0.70), transparent 72%),
    #fffdfb !important;
  box-shadow: 0 26px 80px rgba(112, 74, 88, 0.24) !important;
}

body[data-app-theme="day"] .favorite-note-modal .favorite-note-paper-close {
  color: rgba(104, 82, 91, 0.52) !important;
}

/* Senses / MCP day theme: daylight controls for real-world context. */
body[data-app-theme="day"][data-view="senses"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 160, 190, 0.18), transparent 32%),
    radial-gradient(circle at 84% 26%, rgba(217, 134, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 50%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="senses"] .bottom-nav {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .senses-control-shell.home-shell {
  background:
    radial-gradient(circle at 68% 4%, rgba(217, 134, 163, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 253, 251, 0.96) 54%, rgba(255, 246, 250, 0.98) 100%) !important;
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .senses-control-shell .simple-head {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 247, 250, 0.86) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .senses-control-shell .simple-head .chat-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .senses-control-shell .simple-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
  text-shadow: 0 2px 0 rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-intro small,
body[data-app-theme="day"] .senses-control-shell .senses-section-label {
  color: rgba(184, 91, 127, 0.50) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-intro p {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-section-label::after {
  background: rgba(196, 117, 145, 0.16) !important;
}

body[data-app-theme="day"] .senses-control-shell > .mini-card,
body[data-app-theme="day"] .senses-control-shell .senses-weather-result {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(104, 82, 91, 0.66) !important;
  box-shadow: 0 12px 30px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-weather-result .subtle {
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-card,
body[data-app-theme="day"] .senses-control-shell .senses-planned-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(217, 134, 163, 0.09), transparent 28%),
    rgba(255, 253, 251, 0.72) !important;
  box-shadow: 0 14px 34px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-planned-card.is-live {
  border-color: rgba(255, 45, 85, 0.20) !important;
  background:
    radial-gradient(circle at 86% 4%, rgba(255, 45, 85, 0.08), transparent 36%),
    rgba(255, 253, 251, 0.80) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-card-head {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-icon {
  background: rgba(217, 134, 163, 0.10) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-info strong,
body[data-app-theme="day"] .senses-control-shell .senses-planned-card strong {
  color: rgba(48, 42, 46, 0.86) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-planned-card.is-live strong {
  color: rgba(48, 42, 46, 0.94) !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-info span,
body[data-app-theme="day"] .senses-control-shell .senses-planned-card p {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-card-body {
  border-top-color: rgba(196, 117, 145, 0.12) !important;
}

body[data-app-theme="day"] .senses-control-shell .status-badge {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.56) !important;
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .senses-control-shell .status-badge.connected {
  border-color: rgba(87, 162, 130, 0.28) !important;
  background: rgba(87, 162, 130, 0.10) !important;
  color: #3f8f72 !important;
}

body[data-app-theme="day"] .senses-control-shell .status-badge.ready {
  border-color: rgba(217, 133, 69, 0.26) !important;
  background: rgba(217, 133, 69, 0.10) !important;
  color: #b86d2f !important;
}

body[data-app-theme="day"] .senses-control-shell .status-badge.planned {
  border-color: rgba(217, 134, 163, 0.18) !important;
  color: rgba(184, 91, 127, 0.66) !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-status-light {
  color: #d98545 !important;
  background: #d98545 !important;
  box-shadow: 0 0 9px rgba(217, 133, 69, 0.42), 0 0 1px rgba(217, 133, 69, 0.60) !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-status-light.connected {
  color: #6aa878 !important;
  background: #6aa878 !important;
  box-shadow: 0 0 10px rgba(106, 168, 120, 0.44), 0 0 2px rgba(106, 168, 120, 0.64) !important;
}

body[data-app-theme="day"] .senses-control-shell .sense-status-light.error {
  color: #d95f76 !important;
  background: #d95f76 !important;
  box-shadow: 0 0 10px rgba(217, 95, 118, 0.42), 0 0 2px rgba(217, 95, 118, 0.64) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form label {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form label span,
body[data-app-theme="day"] .senses-control-shell .senses-static-field > span {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input[type="text"],
body[data-app-theme="day"] .senses-control-shell .senses-form input[type="password"],
body[data-app-theme="day"] .senses-control-shell .senses-form input:not([type]) {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.74) !important;
  color: rgba(48, 42, 46, 0.88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input::placeholder {
  color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input[type="checkbox"] {
  border-color: rgba(217, 134, 163, 0.26) !important;
  background: rgba(217, 134, 163, 0.08) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input[type="checkbox"]::after {
  background: rgba(184, 91, 127, 0.42) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input[type="checkbox"]:checked {
  border-color: rgba(87, 162, 130, 0.34) !important;
  background: rgba(87, 162, 130, 0.12) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form input[type="checkbox"]:checked::after {
  background: #6aa878 !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-picker-trigger,
body[data-app-theme="day"] .senses-control-shell .senses-static-pill {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-picker-panel {
  border-color: rgba(217, 134, 163, 0.20) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 18px 48px rgba(112, 74, 88, 0.16) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-picker-panel button {
  color: rgba(104, 82, 91, 0.70) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-picker-panel button.active {
  background: rgba(217, 134, 163, 0.12) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-row {
  border-top-color: rgba(196, 117, 145, 0.12) !important;
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-label {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-row i {
  background: rgba(217, 134, 163, 0.13) !important;
  box-shadow: inset 0 0 0 1px rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-row i::after {
  background: rgba(184, 91, 127, 0.46) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-row[aria-pressed="true"] i {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  box-shadow: 0 0 18px rgba(217, 134, 163, 0.24) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-switch-row[aria-pressed="true"] i::after {
  background: #fff !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-static-pill .material-symbols-outlined {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-static-pill small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form .send {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .senses-control-shell .senses-form .ghost,
body[data-app-theme="day"] .senses-control-shell .senses-form .actions .ghost:first-child,
body[data-app-theme="day"] .senses-control-shell .senses-status-pill {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: #b85b7f !important;
}

/* Photo Studio day theme: a bright little photo room from shutter to shelf. */
body[data-app-theme="day"][data-view="photoStudio"] {
  background:
    radial-gradient(circle at 16% 9%, rgba(242, 160, 190, 0.18), transparent 32%),
    radial-gradient(circle at 86% 28%, rgba(217, 134, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 50%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="photoStudio"] .bottom-nav {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .photo-studio-shell.home-shell {
  --studio-panel: rgba(255, 253, 251, 0.76);
  --studio-ink: rgba(48, 42, 46, 0.92);
  --studio-muted: rgba(104, 82, 91, 0.62);
  --studio-dim: rgba(104, 82, 91, 0.42);
  --studio-pink: #d986a3;
  --studio-pink-soft: #eaa4be;
  background:
    radial-gradient(circle at 68% 4%, rgba(217, 134, 163, 0.14), transparent 34%),
    radial-gradient(circle at 12% 70%, rgba(242, 160, 190, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 253, 251, 0.96) 54%, rgba(255, 246, 250, 0.98) 100%) !important;
  color: var(--studio-ink) !important;
}

body[data-app-theme="day"] .photo-studio-shell .more-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 247, 250, 0.86) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .photo-studio-shell .more-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .photo-studio-shell .more-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .photo-studio-intro small,
body[data-app-theme="day"] .photo-aspect-section > span,
body[data-app-theme="day"] .photo-shelf-panel header small,
body[data-app-theme="day"] .photo-detail-panel > small,
body[data-app-theme="day"] .photo-developing-view small,
body[data-app-theme="day"] .photo-failure-view small {
  color: rgba(184, 91, 127, 0.54) !important;
}

body[data-app-theme="day"] .photo-studio-intro p {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .photo-subject-tabs {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .photo-subject-tabs button {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .photo-subject-tabs button.active {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(217, 134, 163, 0.24) !important;
}

body[data-app-theme="day"] .photo-camera-card,
body[data-app-theme="day"] .photo-aspect-tabs button,
body[data-app-theme="day"] .photo-shelf-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(217, 134, 163, 0.09), transparent 28%),
    rgba(255, 253, 251, 0.72) !important;
  color: rgba(48, 42, 46, 0.86) !important;
  box-shadow: 0 14px 34px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body[data-app-theme="day"] .photo-camera-card.active,
body[data-app-theme="day"] .photo-aspect-tabs button.active {
  border-color: rgba(217, 134, 163, 0.44) !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(217, 134, 163, 0.15), transparent 28%),
    rgba(255, 244, 249, 0.82) !important;
  box-shadow: 0 16px 34px rgba(217, 134, 163, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.76) !important;
}

body[data-app-theme="day"] .photo-camera-card > .photo-camera-icon,
body[data-app-theme="day"] .photo-aspect-tabs button.active,
body[data-app-theme="day"] .photo-shelf-head .material-symbols-outlined,
body[data-app-theme="day"] .photo-shelf-head strong {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .photo-camera-card strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .photo-camera-card small,
body[data-app-theme="day"] .photo-aspect-tabs small,
body[data-app-theme="day"] .photo-shelf-head small {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .photo-camera-card i {
  background: rgba(217, 134, 163, 0.34) !important;
  box-shadow: 0 0 8px rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .photo-camera-card.active i {
  background: #d986a3 !important;
  box-shadow: 0 0 7px rgba(217, 134, 163, 0.72), 0 0 18px rgba(217, 134, 163, 0.34) !important;
}

body[data-app-theme="day"] .photo-scene-field input {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.76) !important;
  color: rgba(48, 42, 46, 0.88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .photo-scene-field input:focus {
  border-color: rgba(217, 134, 163, 0.40) !important;
}

body[data-app-theme="day"] .photo-scene-field input::placeholder,
body[data-app-theme="day"] .photo-scene-field span {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .photo-prompt-trigger,
body[data-app-theme="day"] .photo-result-actions .photo-result-prompt-button {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-shutter-button,
body[data-app-theme="day"] .photo-primary-button {
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 18px 44px rgba(217, 134, 163, 0.26) !important;
}

body[data-app-theme="day"] .photo-secondary-button {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-secondary-button.danger {
  color: #c24f68 !important;
}

body[data-app-theme="day"] .photo-shelf-head {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .photo-shelf-thumb,
body[data-app-theme="day"] .photo-shelf-empty-slot {
  border-color: rgba(255, 255, 255, 0.42) !important;
  box-shadow: 0 8px 18px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .photo-shelf-empty-slot {
  background: rgba(255, 253, 251, 0.46) !important;
  color: rgba(104, 82, 91, 0.48) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer,
body[data-app-theme="day"] .photo-shelf-panel,
body[data-app-theme="day"] .photo-detail-panel {
  border-color: rgba(217, 134, 163, 0.20) !important;
  background:
    radial-gradient(circle at 70% 0%, rgba(217, 134, 163, 0.12), transparent 34%),
    rgba(255, 253, 251, 0.94) !important;
  box-shadow: 0 22px 70px rgba(112, 74, 88, 0.16) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer {
  background:
    radial-gradient(circle at 60% 0%, rgba(217, 134, 163, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 249, 251, 0.99), rgba(255, 253, 251, 0.98)) !important;
}

body[data-app-theme="day"] .photo-prompt-save-bar {
  border-top-color: rgba(196, 117, 145, 0.14) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 -12px 30px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .photo-prompt-save-bar button {
  border-color: rgba(217, 134, 163, 0.36) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer header,
body[data-app-theme="day"] .photo-shelf-panel header,
body[data-app-theme="day"] .photo-detail-panel header {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer header button,
body[data-app-theme="day"] .photo-shelf-panel header button,
body[data-app-theme="day"] .photo-detail-panel header button {
  background: rgba(217, 134, 163, 0.10) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .photo-prompt-drawer p {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer label small {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer label small i {
  background: #d986a3 !important;
  box-shadow: 0 0 0 0 rgba(217, 134, 163, 0.38) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer label.photo-prompt-featured {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background: linear-gradient(135deg, rgba(217, 134, 163, 0.12), rgba(255, 253, 251, 0.62)) !important;
}

body[data-app-theme="day"] .photo-prompt-drawer label.photo-prompt-featured small {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-prompt-drawer textarea {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.74) !important;
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .photo-developing-paper,
body[data-app-theme="day"] .photo-broken-paper {
  background: #fffdfb !important;
  box-shadow: 0 24px 60px rgba(112, 74, 88, 0.20) !important;
}

body[data-app-theme="day"] .photo-developing-paper::after {
  background:
    radial-gradient(circle at 50% 44%, rgba(217, 134, 163, 0.24), transparent 24%),
    linear-gradient(180deg, transparent, rgba(217, 134, 163, 0.16), transparent) !important;
}

body[data-app-theme="day"] .photo-developing-paper i {
  border-color: rgba(217, 134, 163, 0.22) !important;
}

body[data-app-theme="day"] .photo-broken-paper {
  background:
    linear-gradient(135deg, transparent 48%, rgba(217, 134, 163, 0.34) 49%, rgba(217, 134, 163, 0.34) 51%, transparent 52%),
    #fffdfb !important;
}

body[data-app-theme="day"] .photo-developing-view h3,
body[data-app-theme="day"] .photo-failure-view h3,
body[data-app-theme="day"] .photo-result-meta h3,
body[data-app-theme="day"] .photo-shelf-panel h3 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .photo-developing-view p,
body[data-app-theme="day"] .photo-failure-view p,
body[data-app-theme="day"] .photo-result-meta p,
body[data-app-theme="day"] .photo-detail-panel > small,
body[data-app-theme="day"] .photo-detail-meta-line small {
  color: rgba(104, 82, 91, 0.54) !important;
}

body[data-app-theme="day"] .photo-polaroid-object {
  background: #fffdfb !important;
  box-shadow: 0 24px 64px rgba(112, 74, 88, 0.20) !important;
}

body[data-app-theme="day"] .photo-generated-frame {
  color: rgba(255, 253, 251, 0.90) !important;
  text-shadow: 0 0 24px rgba(217, 134, 163, 0.24) !important;
}

body[data-app-theme="day"] .photo-result-meta blockquote,
body[data-app-theme="day"] .photo-detail-caption {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-detail-panel {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .photo-detail-meta-line {
  border-bottom-color: rgba(196, 117, 145, 0.14) !important;
}

body[data-app-theme="day"] .photo-pin-button {
  color: rgba(104, 82, 91, 0.34) !important;
}

body[data-app-theme="day"] .photo-pin-button.active {
  color: #d986a3 !important;
  text-shadow: 0 0 10px rgba(217, 134, 163, 0.42), 0 0 20px rgba(217, 134, 163, 0.18) !important;
}

body[data-app-theme="day"] .photo-detail-panel .photo-detail-actions .photo-secondary-button {
  border: 0 !important;
  background: transparent !important;
  color: #b85b7f !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .photo-detail-panel .photo-detail-actions .photo-secondary-button.danger {
  color: #c24f68 !important;
}

body[data-app-theme="day"] .photo-detail-caption-row button {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-polaroid-back {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background:
    linear-gradient(rgba(217, 134, 163, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #fffdfb, #fff4f8) !important;
  background-size: 100% 28px, 100% 100% !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .photo-polaroid-back small,
body[data-app-theme="day"] .photo-polaroid-back button {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .photo-polaroid-back textarea {
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .photo-polaroid-back textarea::placeholder {
  color: rgba(104, 82, 91, 0.42) !important;
}

body[data-app-theme="day"] .photo-shelf-empty {
  border-color: rgba(196, 117, 145, 0.20) !important;
  background: rgba(255, 253, 251, 0.50) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .photo-detail-panel header strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .photo-confirm-backdrop {
  background: rgba(66, 39, 54, 0.20) !important;
}

body[data-app-theme="day"] .photo-confirm-modal {
  border-color: rgba(217, 134, 163, 0.24) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 22px 70px rgba(112, 74, 88, 0.22) !important;
}

body[data-app-theme="day"] .photo-confirm-modal > span {
  color: rgba(184, 91, 127, 0.58) !important;
}

body[data-app-theme="day"] .photo-confirm-modal p {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .photo-confirm-modal small {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .photo-confirm-modal button {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  color: rgba(104, 82, 91, 0.70) !important;
}

body[data-app-theme="day"] .photo-confirm-modal button:first-child {
  border-color: rgba(217, 134, 163, 0.38) !important;
  background: rgba(217, 134, 163, 0.12) !important;
  color: #b85b7f !important;
}

/* Parallel Fiction day theme: a quiet daylight book room. */
body[data-app-theme="day"][data-view="fiction"] {
  background:
    radial-gradient(circle at 16% 9%, rgba(195, 166, 226, 0.16), transparent 32%),
    radial-gradient(circle at 86% 28%, rgba(217, 134, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #fbf7ff 0%, #fffdfb 50%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="fiction"] .bottom-nav {
  border-color: rgba(168, 132, 203, 0.16) !important;
  background: rgba(255, 253, 251, 0.88) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .fiction-shell {
  --fiction-bg: #fbf7ff;
  --fiction-card: rgba(255, 253, 251, 0.76);
  --fiction-ink: rgba(48, 42, 46, 0.92);
  --fiction-muted: rgba(104, 82, 91, 0.62);
  --fiction-dim: rgba(104, 82, 91, 0.42);
  --fiction-pink: #d986a3;
  --fiction-hot: #d986a3;
  --fiction-line: rgba(168, 132, 203, 0.16);
  --more-eraser-bright: #d986a3;
  background:
    radial-gradient(circle at 50% 10%, rgba(195, 166, 226, 0.13), transparent 24%),
    radial-gradient(circle at 18% 34%, rgba(217, 134, 163, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(251, 247, 255, 0.98), rgba(255, 253, 251, 0.98) 54%, rgba(255, 246, 250, 0.98)) !important;
  color: var(--fiction-ink) !important;
}

body[data-app-theme="day"] .fiction-control-head {
  border-bottom-color: rgba(168, 132, 203, 0.14) !important;
  background: rgba(252, 248, 255, 0.88) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .fiction-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .fiction-shell .more-back {
  color: #a884cb !important;
}

body[data-app-theme="day"] .fiction-hero-card small {
  color: rgba(118, 86, 154, 0.52) !important;
}

body[data-app-theme="day"] .fiction-hero-card p {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .fiction-section-card,
body[data-app-theme="day"] .fiction-reader-card {
  border-color: rgba(168, 132, 203, 0.16) !important;
  background:
    radial-gradient(circle at 90% 8%, rgba(195, 166, 226, 0.10), transparent 30%),
    rgba(255, 253, 251, 0.74) !important;
  box-shadow: 0 16px 40px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body[data-app-theme="day"] .fiction-shelf-section,
body[data-app-theme="day"] .fiction-detail-card,
body[data-app-theme="day"] .fiction-reader-card {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .fiction-section-head strong,
body[data-app-theme="day"] .fiction-detail-hero h3,
body[data-app-theme="day"] .fiction-reading-page h3,
body[data-app-theme="day"] .fiction-generating-page > strong,
body[data-app-theme="day"] .fiction-form-head strong,
body[data-app-theme="day"] .fiction-book-form .fiction-form-head strong {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .fiction-section-head span,
body[data-app-theme="day"] .fiction-form-head span,
body[data-app-theme="day"] .fiction-book-form .fiction-form-head span,
body[data-app-theme="day"] .fiction-generate-card > div span,
body[data-app-theme="day"] .fiction-preset-list article p,
body[data-app-theme="day"] .fiction-preset-empty {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .fiction-section-head small,
body[data-app-theme="day"] .fiction-detail-meta span,
body[data-app-theme="day"] .fiction-chronicle-title,
body[data-app-theme="day"] .fiction-reading-page > span,
body[data-app-theme="day"] .fiction-summary-panel label,
body[data-app-theme="day"] .fiction-generate-card > div strong,
body[data-app-theme="day"] .fiction-form label,
body[data-app-theme="day"] .fiction-preset-box h3,
body[data-app-theme="day"] .fiction-generating-page > small {
  color: rgba(118, 86, 154, 0.58) !important;
}

body[data-app-theme="day"] .fiction-section-head small,
body[data-app-theme="day"] .fiction-detail-meta span {
  border-color: rgba(168, 132, 203, 0.22) !important;
  background: rgba(168, 132, 203, 0.07) !important;
}

body[data-app-theme="day"] .fiction-book-card,
body[data-app-theme="day"] .fiction-empty-book,
body[data-app-theme="day"] .fiction-preset-preview,
body[data-app-theme="day"] .fiction-preset-box,
body[data-app-theme="day"] .fiction-mini-chapters button,
body[data-app-theme="day"] .fiction-chapter-drawer button,
body[data-app-theme="day"] .fiction-preset-list article,
body[data-app-theme="day"] .fiction-boundary-note,
body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters .mini-card {
  border-color: rgba(168, 132, 203, 0.14) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  box-shadow: 0 10px 24px rgba(112, 74, 88, 0.05) !important;
}

body[data-app-theme="day"] .fiction-book-card strong,
body[data-app-theme="day"] .fiction-empty-book strong,
body[data-app-theme="day"] .fiction-preset-preview strong,
body[data-app-theme="day"] .fiction-preset-list article strong,
body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters button strong {
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .fiction-book-card small,
body[data-app-theme="day"] .fiction-book-card p,
body[data-app-theme="day"] .fiction-empty-book p,
body[data-app-theme="day"] .fiction-preset-preview p,
body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters .mini-card {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .fiction-book-cover {
  background:
    radial-gradient(circle at 50% 38%, rgba(217, 134, 163, 0.20), transparent 22%),
    linear-gradient(135deg, rgba(118, 86, 154, 0.92), rgba(62, 47, 78, 0.98)) !important;
  box-shadow: 0 16px 30px rgba(112, 74, 88, 0.18) !important;
}

body[data-app-theme="day"] .fiction-book-cover em {
  color: rgba(255, 245, 250, 0.96) !important;
}

body[data-app-theme="day"] .fiction-shelf-dock {
  background: rgba(255, 253, 251, 0.90) !important;
  box-shadow: 0 18px 52px rgba(112, 74, 88, 0.14) !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button {
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button + button {
  border-left-color: rgba(168, 132, 203, 0.14) !important;
}

body[data-app-theme="day"] .fiction-actions button,
body[data-app-theme="day"] .fiction-back,
body[data-app-theme="day"] .fiction-inline-back,
body[data-app-theme="day"] .fiction-reader-link,
body[data-app-theme="day"] .fiction-preset-form button,
body[data-app-theme="day"] .fiction-empty button,
body[data-app-theme="day"] .fiction-text-actions button,
body[data-app-theme="day"] .fiction-text-actions button:not(.ghost),
body[data-app-theme="day"] .fiction-book-form .fiction-actions button,
body[data-app-theme="day"] .fiction-detail-card .fiction-back {
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-actions button:not(.ghost),
body[data-app-theme="day"] .fiction-empty button,
body[data-app-theme="day"] .fiction-detail-actions .fiction-read-now {
  border-color: rgba(217, 134, 163, 0.42) !important;
  background: linear-gradient(135deg, #ee9bb9, #d986a3) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(217, 134, 163, 0.20) !important;
}

body[data-app-theme="day"] .fiction-detail-actions .ghost {
  border-color: rgba(168, 132, 203, 0.22) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-book-form {
  border-color: rgba(168, 132, 203, 0.16) !important;
  background:
    linear-gradient(135deg, rgba(195, 166, 226, 0.10), rgba(255, 253, 251, 0.72)),
    rgba(255, 253, 251, 0.74) !important;
  box-shadow: 0 16px 40px rgba(112, 74, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74) !important;
}

body[data-app-theme="day"] .fiction-form input,
body[data-app-theme="day"] .fiction-form select,
body[data-app-theme="day"] .fiction-form textarea,
body[data-app-theme="day"] .fiction-summary-panel textarea,
body[data-app-theme="day"] .fiction-generate-card textarea,
body[data-app-theme="day"] .fiction-preset-form input,
body[data-app-theme="day"] .fiction-preset-form textarea,
body[data-app-theme="day"] .fiction-book-form .fiction-field-title input,
body[data-app-theme="day"] .fiction-book-form .fiction-field-description textarea,
body[data-app-theme="day"] .fiction-book-form .field:not(.fiction-field-title):not(.fiction-field-description) textarea {
  border-color: rgba(168, 132, 203, 0.18) !important;
  background: rgba(255, 253, 251, 0.72) !important;
  color: rgba(48, 42, 46, 0.84) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70) !important;
}

body[data-app-theme="day"] .fiction-form input::placeholder,
body[data-app-theme="day"] .fiction-form textarea::placeholder,
body[data-app-theme="day"] .fiction-summary-panel textarea::placeholder,
body[data-app-theme="day"] .fiction-generate-card textarea::placeholder {
  color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .fiction-preset-picker summary {
  border-color: rgba(168, 132, 203, 0.18) !important;
  background:
    linear-gradient(45deg, transparent 50%, rgba(118, 86, 154, 0.46) 50%) right 18px center / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(118, 86, 154, 0.46) 50%, transparent 50%) right 14px center / 6px 6px no-repeat,
    rgba(255, 253, 251, 0.72) !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .fiction-preset-picker summary span {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .fiction-preset-menu {
  border-color: rgba(168, 132, 203, 0.20) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  box-shadow: 0 18px 46px rgba(112, 74, 88, 0.16) !important;
}

body[data-app-theme="day"] .fiction-preset-menu button {
  color: rgba(104, 82, 91, 0.70) !important;
}

body[data-app-theme="day"] .fiction-preset-menu button.active,
body[data-app-theme="day"] .fiction-preset-menu button:hover {
  background: rgba(168, 132, 203, 0.12) !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-existing-presets {
  border-top-color: rgba(168, 132, 203, 0.12) !important;
}

body[data-app-theme="day"] .fiction-existing-presets summary {
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-existing-presets summary b {
  border-color: rgba(168, 132, 203, 0.18) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .fiction-chapter-drawer {
  border-bottom-color: rgba(168, 132, 203, 0.12) !important;
}

body[data-app-theme="day"] .fiction-chapter-drawer button {
  color: rgba(104, 82, 91, 0.50) !important;
}

body[data-app-theme="day"] .fiction-chapter-drawer button.active {
  border-color: rgba(168, 132, 203, 0.24) !important;
  background: rgba(168, 132, 203, 0.12) !important;
  color: #76569a !important;
  box-shadow: 0 0 18px rgba(168, 132, 203, 0.10) !important;
}

body[data-app-theme="day"] .fiction-reading-page div {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .fiction-summary-panel,
body[data-app-theme="day"] .fiction-generate-card,
body[data-app-theme="day"] .fiction-detail-card .fiction-chronicle-title {
  border-top-color: rgba(168, 132, 203, 0.12) !important;
}

body[data-app-theme="day"] .fiction-turning-book {
  border-color: rgba(168, 132, 203, 0.42) !important;
  background: rgba(255, 253, 251, 0.86) !important;
  box-shadow: 0 18px 42px rgba(112, 74, 88, 0.14) !important;
}

body[data-app-theme="day"] .fiction-turning-book > span {
  color: rgba(118, 86, 154, 0.56) !important;
}

body[data-app-theme="day"] .fiction-turning-book i {
  border-left-color: rgba(168, 132, 203, 0.42) !important;
  background: linear-gradient(90deg, rgba(168, 132, 203, 0.04), rgba(168, 132, 203, 0.30)) !important;
}

body[data-app-theme="day"] .fiction-generating-page > p {
  color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .fiction-detail-card blockquote {
  border-color: rgba(168, 132, 203, 0.14) !important;
  background: rgba(255, 253, 251, 0.62) !important;
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters button {
  border-bottom-color: rgba(168, 132, 203, 0.10) !important;
}

body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters button span,
body[data-app-theme="day"] .fiction-detail-card .fiction-mini-chapters button i,
body[data-app-theme="day"] .fiction-boundary-note .material-symbols-outlined,
body[data-app-theme="day"] .fiction-boundary-note p strong {
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-boundary-note p {
  color: rgba(104, 82, 91, 0.62) !important;
}

body[data-app-theme="day"] .fiction-cover-error-backdrop {
  background: rgba(66, 39, 54, 0.20) !important;
}

body[data-app-theme="day"] .fiction-cover-error-modal {
  border-color: rgba(168, 132, 203, 0.24) !important;
  background: rgba(255, 253, 251, 0.96) !important;
  color: rgba(48, 42, 46, 0.90) !important;
  box-shadow: 0 22px 70px rgba(112, 74, 88, 0.22) !important;
}

body[data-app-theme="day"] .fiction-cover-error-kicker,
body[data-app-theme="day"] .fiction-cover-error-icon,
body[data-app-theme="day"] .fiction-cover-error-close {
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-cover-error-modal h3 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .fiction-cover-error-modal p,
body[data-app-theme="day"] .fiction-cover-error-x {
  color: rgba(104, 82, 91, 0.58) !important;
}

/* Parallel Fiction day cleanup: remove double frames and floating dock plate. */
body[data-app-theme="day"] .fiction-mode-create > .fiction-section-card,
body[data-app-theme="day"] .fiction-mode-settings > .fiction-section-card {
  margin: 0 !important;
  padding: 0 18px 42px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .fiction-mode-create .fiction-book-form,
body[data-app-theme="day"] .fiction-mode-settings .fiction-settings-grid {
  margin: 0 !important;
}

body[data-app-theme="day"] .fiction-mode-create .fiction-inline-back,
body[data-app-theme="day"] .fiction-mode-settings .fiction-inline-back {
  margin: 2px 0 18px !important;
  padding-left: 0 !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-mode-settings .fiction-section-head {
  margin: 0 0 22px !important;
  padding: 0 !important;
}

body[data-app-theme="day"] .fiction-mode-settings .fiction-section-head > header {
  padding: 0 !important;
}

body[data-app-theme="day"] .fiction-mode-settings .fiction-preset-box {
  background: rgba(255, 253, 251, 0.58) !important;
}

body[data-app-theme="day"] .fiction-shelf-dock {
  width: min(398px, calc(100vw - 32px)) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button {
  min-height: 42px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button + button {
  border-left-color: rgba(168, 132, 203, 0.16) !important;
}

/* Parallel Fiction shelf cleanup: no outer shelf frame, solid dock surface. */
body[data-app-theme="day"] .fiction-shelf-section.fiction-section-card {
  margin: 0 !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .fiction-book-grid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 178px !important;
}

body[data-app-theme="day"] .fiction-shelf-dock {
  bottom: 108px !important;
  width: min(430px, 100vw) !important;
  padding: 12px 28px 14px !important;
  background:
    radial-gradient(circle at 50% -40%, rgba(195, 166, 226, 0.18), transparent 46%),
    linear-gradient(180deg, #fff8fb 0%, #fffdfb 100%) !important;
  box-shadow: 0 -12px 34px rgba(112, 74, 88, 0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button {
  min-height: 42px !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-shelf-dock button + button {
  border-left-color: rgba(168, 132, 203, 0.14) !important;
}

body[data-app-theme="day"] .fiction-mode-shelf .bottom-nav {
  background: rgba(255, 253, 251, 0.94) !important;
}

/* Memory Palace day theme: daylight rooms, index, lifecycle review, and merge cards. */
body[data-app-theme="day"][data-view="memory"] {
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 160, 190, 0.16), transparent 32%),
    radial-gradient(circle at 84% 26%, rgba(217, 134, 163, 0.12), transparent 30%),
    linear-gradient(180deg, #fff7fa 0%, #fffdfb 50%, #fff4f8 100%) !important;
}

body[data-app-theme="day"][data-view="memory"] .bottom-nav {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.90) !important;
  box-shadow: 0 -18px 46px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .memory-palace-v3 {
  --mem-bg: #fff7fa;
  --mem-surface: rgba(255, 253, 251, 0.84);
  --mem-card: rgba(255, 253, 251, 0.70);
  --mem-ink: rgba(48, 42, 46, 0.92);
  --mem-muted: rgba(104, 82, 91, 0.62);
  --mem-dim: rgba(104, 82, 91, 0.42);
  --mem-pink: #d986a3;
  --mem-pink-bright: #b85b7f;
  --mem-line: rgba(196, 117, 145, 0.16);
  --mem-line-soft: rgba(196, 117, 145, 0.12);
  --more-eraser: #d986a3;
  --more-eraser-bright: #d986a3;
  background:
    radial-gradient(circle at 64% 4%, rgba(217, 134, 163, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 245, 249, 0.98) 0%, rgba(255, 253, 251, 0.96) 54%, rgba(255, 246, 250, 0.98) 100%) !important;
  color: var(--mem-ink) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-control-head {
  border-bottom-color: rgba(196, 117, 145, 0.12) !important;
  background: rgba(255, 247, 250, 0.88) !important;
  box-shadow: 0 10px 34px rgba(112, 74, 88, 0.08) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-control-head h2 {
  color: rgba(48, 42, 46, 0.92) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .more-back {
  color: #d986a3 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-hero small,
body[data-app-theme="day"] .memory-palace-v3 .mem-summary-widget .label,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-toggle b,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-compact-grid > label,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-head h3,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-section > strong,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-preview > span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body b,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-sources > b,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body p b,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section > b {
  color: rgba(184, 91, 127, 0.58) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-hero p,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-toggle small,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-head span,
body[data-app-theme="day"] .memory-palace-v3 .mem-summary-meta,
body[data-app-theme="day"] .memory-palace-v3 .memory-summary-stale,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-row,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-coverage span,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-item span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item-head span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item em,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-revert-item small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-revert-item em,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-note,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-status {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .status-pill {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.66) !important;
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .status-pill b,
body[data-app-theme="day"] .memory-palace-v3 .status-pill.active,
body[data-app-theme="day"] .memory-palace-v3 .status-pill.pending {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card,
body[data-app-theme="day"] .memory-palace-v3 .mem-summary-widget,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-toggle,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-strip,
body[data-app-theme="day"] .memory-palace-v3 .mem-maintenance-card,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-item,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-grid button,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-global,
body[data-app-theme="day"] .memory-palace-v3 .memory-entry.fragment-item,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-lifecycle-card,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-merge-card,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-archive-card,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-revert-item,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-inline-detail,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-detail,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-empty,
body[data-app-theme="day"] .memory-palace-v3 .mem-empty {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.68) !important;
  color: var(--mem-ink) !important;
  box-shadow: 0 12px 30px rgba(112, 74, 88, 0.06) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card:not(.active) {
  opacity: 0.72 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card.active {
  border-color: rgba(217, 134, 163, 0.34) !important;
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 134, 163, 0.11), transparent 30%),
    rgba(255, 253, 251, 0.84) !important;
  box-shadow: 0 16px 34px rgba(112, 74, 88, 0.10) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-art-wrap,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .home-icon,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-archive-card .home-icon,
body[data-app-theme="day"] .memory-palace-v3 .memory-action-icon {
  background: rgba(217, 134, 163, 0.12) !important;
  color: #d986a3 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-icon-mask,
body[data-app-theme="day"] .memory-palace-v3 .memory-action-icon::before {
  background: #d986a3 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-icon-img {
  filter: none !important;
  opacity: 0.78 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card strong,
body[data-app-theme="day"] .memory-palace-v3 .mem-summary-widget header strong,
body[data-app-theme="day"] .memory-palace-v3 .mem-list-toggle,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-head,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-head strong,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-item strong,
body[data-app-theme="day"] .memory-palace-v3 .memory-entry.fragment-item p,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item strong,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item-head strong,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-revert-item strong,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-lifecycle-card header strong,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-merge-card header strong,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-archive-card header strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card em,
body[data-app-theme="day"] .memory-palace-v3 .mem-room-head small,
body[data-app-theme="day"] .memory-palace-v3 .memory-entry.fragment-item small,
body[data-app-theme="day"] .memory-palace-v3 .memory-entry.fragment-item .item-meta,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-lifecycle-card header span,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-merge-card header span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-archive-card header span {
  color: rgba(104, 82, 91, 0.52) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-carousel-indicator span {
  background: rgba(196, 117, 145, 0.18) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-carousel-indicator span.active {
  background: #d986a3 !important;
  box-shadow: 0 0 10px rgba(217, 134, 163, 0.34) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .quote-text,
body[data-app-theme="day"] .memory-palace-v3 .memory-summary-editor {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-summary-editor::placeholder {
  color: rgba(104, 82, 91, 0.36) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .btn-action,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-footer button,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-item button,
body[data-app-theme="day"] .memory-palace-v3 .memory-entry-actions button,
body[data-app-theme="day"] .memory-palace-v3 .memory-summary-pill,
body[data-app-theme="day"] .memory-palace-v3 .btn-filter-trigger,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-actions button,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-actions button,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-actions button,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-revert-actions button,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-entry {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-palace-v3 .btn-filter-trigger,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-group button,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-row button,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-options button,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-stats span,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-coverage span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-badges span {
  border-color: rgba(217, 134, 163, 0.18) !important;
  background: rgba(217, 134, 163, 0.08) !important;
  color: rgba(184, 91, 127, 0.66) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-filter-options button.active,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-group button.active,
body[data-app-theme="day"] .memory-palace-v3 .mem-filter-row button.active {
  border-color: rgba(217, 134, 163, 0.34) !important;
  background: rgba(217, 134, 163, 0.14) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-filter-strip input,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-row input,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-archive-toolbar input {
  border-color: rgba(196, 117, 145, 0.18) !important;
  background: rgba(255, 253, 251, 0.78) !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-stats b {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item p,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item small,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item em,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-lifecycle-card p,
body[data-app-theme="day"] .memory-palace-v3 .mem-maint-results .memory-merge-card p,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-preview p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > em,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-sources,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-index-source-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box .memory-merge-inline-detail em,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box .memory-merge-anchor-list span {
  color: rgba(48, 42, 46, 0.76) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-preview,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > em,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-sources,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-index-source-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box .memory-merge-inline-detail em:first-of-type,
body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-section,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-detail {
  border-color: rgba(196, 117, 145, 0.12) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail > summary,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-detail > summary,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box > small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-badges span {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail > summary::before,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-detail > summary::before {
  border-left-color: #d986a3 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item small {
  color: rgba(184, 91, 127, 0.62) !important;
  opacity: 1 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-item em {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-actions button {
  border-color: rgba(184, 91, 127, 0.18) !important;
  background: transparent !important;
  color: #b85b7f !important;
  opacity: 1 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-actions button:disabled {
  color: rgba(184, 91, 127, 0.38) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-retag-progress {
  border-color: rgba(217, 134, 163, 0.20) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-retag-progress strong {
  color: rgba(48, 42, 46, 0.88) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-retag-progress span {
  color: rgba(104, 82, 91, 0.58) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-retag-progress i {
  background: rgba(217, 134, 163, 0.12) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-lifecycle-progress i b,
body[data-app-theme="day"] .memory-palace-v3 .memory-retag-progress i b {
  background: linear-gradient(90deg, #d986a3, #f0b1c8) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop {
  background: rgba(66, 39, 54, 0.20) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-modal {
  border-color: rgba(217, 134, 163, 0.22) !important;
  background:
    radial-gradient(circle at 50% -10%, rgba(217, 134, 163, 0.12), transparent 38%),
    rgba(255, 253, 251, 0.96) !important;
  color: rgba(48, 42, 46, 0.90) !important;
  box-shadow: 0 24px 70px rgba(112, 74, 88, 0.22) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-head h3,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-head label,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card strong {
  color: rgba(48, 42, 46, 0.90) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-head small,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-block > label,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-stats span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-note,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card small,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card em {
  color: rgba(104, 82, 91, 0.56) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-text,
body[data-app-theme="day"] .memory-detail-backdrop .memory-interpretation,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-fields input,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-fields input:disabled,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.70) !important;
  color: rgba(48, 42, 46, 0.84) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-choice span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-stars span {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-choice input:checked + span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-stars input:checked + span {
  border-color: rgba(217, 134, 163, 0.34) !important;
  background: rgba(217, 134, 163, 0.12) !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-actions .send,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-actions .ghost,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-head .memory-summary-pill {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-remove,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-remove,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row button {
  border-color: rgba(217, 134, 163, 0.28) !important;
  background: rgba(217, 134, 163, 0.10) !important;
  color: #b85b7f !important;
}

/* Memory day theme: preserve each room's own identity color. */
body[data-app-theme="day"] .memory-palace-v3 .mem-room-card .mem-room-art-wrap {
  background: color-mix(in srgb, var(--room-color, #d986a3) 16%, transparent) !important;
  color: var(--room-color, #d986a3) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card .mem-room-icon-mask {
  background: var(--room-color, #d986a3) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card .mem-room-icon {
  color: var(--room-color, #d986a3) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-room-card.active {
  border-color: color-mix(in srgb, var(--room-color, #d986a3) 34%, transparent) !important;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--room-color, #d986a3) 13%, transparent), transparent 30%),
    rgba(255, 253, 251, 0.84) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .mem-summary-widget::before {
  background: var(--room-color, #d986a3) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-entry.fragment-item .type-label {
  border-color: color-mix(in srgb, var(--room-color, #d986a3) 26%, transparent) !important;
  color: var(--room-color, #d986a3) !important;
}

/* Memory detail day readability: keep metadata soft, not invisible. */
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-block > label,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-fields label,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-stats span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card strong {
  color: rgba(184, 91, 127, 0.62) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-vector-toggle span {
  color: rgba(48, 42, 46, 0.72) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-vector-toggle input {
  accent-color: #d986a3 !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-stats > div {
  border-color: rgba(196, 117, 145, 0.16) !important;
  background: rgba(255, 253, 251, 0.68) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-stats strong {
  color: rgba(48, 42, 46, 0.82) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card {
  background: rgba(255, 253, 251, 0.82) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card small {
  color: rgba(104, 82, 91, 0.66) !important;
}

body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-actions .send,
body[data-app-theme="day"] .memory-detail-backdrop .memory-detail-actions .ghost {
  color: #b85b7f !important;
}

/* Memory day detail cards: readable anchors without white tiles. */
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-index-source-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-sources,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-row {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-row {
  border-color: rgba(196, 117, 145, 0.18) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-sources {
  color: rgba(48, 42, 46, 0.78) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-anchor-list b,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-sources b,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card strong,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card strong {
  color: rgba(184, 91, 127, 0.76) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-anchor-list span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row span,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row strong,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card span,
body[data-app-theme="day"] .memory-detail-backdrop .memory-source-card small,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card small,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-card em,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-row strong,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-row small,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-row em {
  color: rgba(48, 42, 46, 0.74) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row small,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row em,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-note {
  color: rgba(104, 82, 91, 0.64) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row {
  background: rgba(217, 134, 163, 0.055) !important;
}

/* Memory day index details: remove boxed delete chips and keep inline links readable. */
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-remove,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-remove,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row button {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b85b7f !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-remove,
body[data-app-theme="day"] .memory-detail-backdrop .memory-index-source-remove {
  width: 28px !important;
  height: 28px !important;
  font-size: 18px !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row button {
  width: 26px !important;
  height: 26px !important;
  font-size: 18px !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-inline-detail > summary {
  color: #b85b7f !important;
  opacity: 0.92 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-inline-detail > summary::marker {
  color: rgba(217, 134, 163, 0.76) !important;
}

/* Memory day nested detail cards should sit on the parent card, not add white sheets. */
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-compact-main > div,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-preview,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > small,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > em,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-detail-body > .memory-merge-sources,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-merge-anchor-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-established-body > .memory-index-source-list,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-append-detail,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section > p,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-anchor-list span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-source-row {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview-box,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-candidate-preview,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-preview,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-anchor-list span,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-source-row,
body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section {
  border-color: rgba(196, 117, 145, 0.12) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-inline-detail {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item--compact > .memory-merge-detail,
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item--compact > .memory-merge-detail[open],
body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item--compact .memory-index-append-detail {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-merge-item--compact > .memory-merge-detail {
  padding: 0 !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section > b {
  color: rgba(184, 91, 127, 0.74) !important;
}

body[data-app-theme="day"] .memory-palace-v3 .memory-index-detail-section > p {
  color: rgba(48, 42, 46, 0.76) !important;
}

/* Fiction reader day actions: text links, not filled buttons. */
body[data-app-theme="day"] .fiction-reader-card .fiction-text-actions button,
body[data-app-theme="day"] .fiction-reader-card .fiction-text-actions button:not(.ghost),
body[data-app-theme="day"] .fiction-reader-card .fiction-summary-panel .fiction-text-actions button,
body[data-app-theme="day"] .fiction-reader-card .fiction-generate-card .fiction-text-actions button {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  color: #76569a !important;
}

body[data-app-theme="day"] .fiction-reader-card .fiction-text-actions button:not(:disabled):hover {
  color: #b85b7f !important;
}

body[data-app-theme="day"] .fiction-reader-card .fiction-text-actions button:disabled {
  background: transparent !important;
  color: rgba(118, 86, 154, 0.36) !important;
  opacity: 1 !important;
}

/* Chat Camera */
.g-typing em {
  display: block;
  margin: 0 0 6px;
  color: rgba(247, 237, 243, 0.78);
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0;
}

.chat-camera-typing {
  grid-template-columns: 24px minmax(0, 1fr) !important;
  max-width: min(92vw, 520px) !important;
}

.chat-camera-typing .g-typing {
  min-height: 0;
  padding: 9px 12px;
  border-radius: 14px 14px 14px 4px;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.chat-camera-typing .g-typing em {
  margin: 0 7px 0 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}

.chat-camera-card {
  width: min(100%, 420px);
  border: 1px solid rgba(255, 183, 208, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 183, 208, 0.12), transparent 32%),
    rgba(18, 14, 20, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  padding: 10px;
  display: grid;
  gap: 12px;
  color: inherit;
  text-align: left;
  appearance: none;
  margin: 14px 0 0;
}

.chat-camera-frame {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 2;
  background: #120f14;
}

.chat-camera-frame img,
.chat-camera-large-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-camera-copy {
  display: grid;
  gap: 5px;
  padding: 0 3px 4px;
}

.chat-camera-copy small,
.chat-camera-photo-sheet small {
  color: rgba(255, 183, 208, 0.72);
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-camera-copy strong {
  color: #f7edf3;
  font-size: 18px;
  line-height: 1.18;
}

.chat-camera-copy em {
  color: rgba(247, 237, 243, 0.72);
  font-style: italic;
  line-height: 1.55;
}

.chat-camera-modal {
  width: min(92vw, 620px);
  border-radius: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 183, 208, 0.28);
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 183, 208, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(30, 22, 30, 0.98), rgba(14, 11, 16, 0.98));
}

.chat-camera-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.86);
  font-size: 24px;
  line-height: 1;
}

.chat-camera-photo-sheet {
  display: grid;
  gap: 16px;
}

.chat-camera-large-frame {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 2;
  background: #100d12;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-camera-photo-sheet h3 {
  margin: 6px 0 8px;
  color: #f7edf3;
  font-size: 28px;
  line-height: 1.1;
}

.chat-camera-photo-sheet p {
  margin: 0;
  color: rgba(247, 237, 243, 0.76);
  font-style: italic;
  line-height: 1.7;
}

.chat-camera-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255, 183, 208, 0.16);
  padding-top: 14px;
}

.chat-camera-actions button {
  border: 0;
  background: transparent;
  color: #ff9ec4;
  font-weight: 800;
  font-size: 15px;
  padding: 8px 0;
}

.chat-camera-actions button:disabled {
  color: rgba(255, 183, 208, 0.48);
}

.soft-error-backdrop {
  place-items: center;
  background: rgba(8, 6, 10, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.soft-error-modal {
  position: relative;
  width: min(480px, calc(100vw - 44px));
  border-radius: 24px;
  border: 1px solid rgba(255, 158, 196, 0.36);
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 158, 196, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(28, 22, 30, 0.98), rgba(14, 11, 16, 0.98));
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.28);
  color: #f7edf3;
}

.soft-error-modal small {
  display: block;
  margin: 0 0 12px;
  color: rgba(255, 183, 208, 0.72);
  font: 700 10px/1.4 var(--mono);
  letter-spacing: 0.14em;
}

.soft-error-modal h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.soft-error-modal p {
  margin: 0;
  color: rgba(247, 237, 243, 0.72);
  line-height: 1.7;
}

.soft-error-close {
  position: absolute;
  top: 13px;
  right: 15px;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.84);
  font-size: 22px;
  line-height: 1;
}

[data-chat-theme="day"] .g-typing em {
  color: rgba(73, 60, 68, 0.72);
}

[data-chat-theme="day"] .chat-camera-card {
  background:
    radial-gradient(circle at 28% 18%, rgba(232, 145, 177, 0.16), transparent 34%),
    rgba(255, 250, 252, 0.92);
  border-color: rgba(217, 142, 170, 0.26);
  box-shadow: 0 18px 44px rgba(176, 112, 139, 0.14);
}

[data-chat-theme="day"] .chat-camera-frame {
  background: #fff7fa;
}

[data-chat-theme="day"] .chat-camera-copy small,
[data-chat-theme="day"] .chat-camera-photo-sheet small {
  color: rgba(190, 92, 128, 0.72);
}

[data-chat-theme="day"] .chat-camera-copy strong,
[data-chat-theme="day"] .chat-camera-photo-sheet h3 {
  color: #493c44;
}

[data-chat-theme="day"] .chat-camera-copy em,
[data-chat-theme="day"] .chat-camera-photo-sheet p {
  color: rgba(73, 60, 68, 0.72);
}

[data-chat-theme="day"] .chat-camera-modal {
  background:
    radial-gradient(circle at 50% 12%, rgba(232, 145, 177, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 249, 0.98));
  border-color: rgba(217, 142, 170, 0.28);
}

[data-chat-theme="day"] .chat-camera-large-frame {
  background: #fff7fa;
  border-color: rgba(217, 142, 170, 0.18);
}

[data-chat-theme="day"] .chat-camera-close,
[data-chat-theme="day"] .chat-camera-actions button {
  color: #bf5a83;
}

[data-chat-theme="day"] .chat-camera-actions button:disabled {
  color: rgba(190, 92, 128, 0.42);
}

[data-chat-theme="day"] .chat-camera-actions {
  border-top-color: rgba(217, 142, 170, 0.18);
}

[data-chat-theme="day"] .soft-error-backdrop {
  background: rgba(80, 63, 72, 0.24);
}

[data-chat-theme="day"] .soft-error-modal,
body[data-app-theme="day"] .soft-error-modal {
  border-color: rgba(217, 142, 170, 0.34);
  background:
    radial-gradient(circle at 82% 0%, rgba(232, 145, 177, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 249, 0.98));
  box-shadow: 0 24px 70px rgba(176, 112, 139, 0.18);
  color: #493c44;
}

[data-chat-theme="day"] .soft-error-backdrop,
body[data-app-theme="day"] .soft-error-backdrop {
  background: rgba(80, 63, 72, 0.24);
}

[data-chat-theme="day"] .soft-error-modal small,
body[data-app-theme="day"] .soft-error-modal small {
  color: rgba(190, 92, 128, 0.72);
}

[data-chat-theme="day"] .soft-error-modal p,
body[data-app-theme="day"] .soft-error-modal p {
  color: rgba(73, 60, 68, 0.72);
}

[data-chat-theme="day"] .soft-error-close,
body[data-app-theme="day"] .soft-error-close {
  color: #bf5a83;
}

/* Home-owned life harness: compact action traces attached to an assistant turn. */
.harness-trace-card {
  --harness-status: #ffb0cc;
  width: min(100%, 820px);
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 204, 0.1);
  border-radius: 16px;
  background: rgba(14, 11, 16, 0.5);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.42);
  color: rgba(231, 224, 232, 0.88);
}

.harness-trace-card[data-status="done"] { --harness-status: #64c983; }
.harness-trace-card[data-status="awaiting"] { --harness-status: #a99be7; }
.harness-trace-card[data-status="failed"] { --harness-status: #ff6f9f; }
.harness-trace-card[data-status="cancelled"] { --harness-status: rgba(223, 190, 200, 0.48); }
.harness-trace-card[data-platform="xiaohongshu"],
.harness-trace-card[data-platform="netease"],
.harness-trace-card[data-platform="netease-cloud-music"] { --harness-status: #ff2d55; }
.harness-trace-card[data-platform="douyin"],
.harness-trace-card[data-platform="tiktok"] { --harness-status: rgba(247, 237, 243, 0.72); }
.harness-trace-card[data-platform="weibo"] { --harness-status: #f7c979; }
.harness-trace-card[data-platform="bilibili"] { --harness-status: #ff9fca; }

.harness-trace-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 15px;
  cursor: pointer;
  list-style: none;
}

.harness-trace-head::-webkit-details-marker { display: none; }

.harness-status-bar {
  width: 2px;
  height: 16px;
  flex: 0 0 2px;
  border-radius: 999px;
  background: var(--harness-status);
  box-shadow: 0 0 9px var(--harness-status);
}

.harness-platform-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.055);
  position: relative;
  display: grid;
  place-items: center;
}

.harness-platform-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.harness-trace-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: rgba(231, 224, 232, 0.9);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harness-trace-status {
  color: rgba(223, 190, 200, 0.48);
  font: 7px/1 var(--mono);
  letter-spacing: 0.06em;
  opacity: 0.72;
  transform: scale(0.82);
  transform-origin: right center;
}

.harness-executing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.harness-executing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffb0cc;
  box-shadow: 0 0 7px rgba(255, 176, 204, 0.48);
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.harness-executing-dots i:nth-child(2) { animation-delay: 0.16s; }
.harness-executing-dots i:nth-child(3) { animation-delay: 0.32s; }

.harness-trace-body {
  display: grid;
  gap: 11px;
  padding: 12px 15px 15px 51px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.harness-trace-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0.62;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.harness-trace-step.active {
  opacity: 1;
  transform: translateX(1px);
}

.harness-step-dot {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  margin-top: 8px;
  border-radius: 50%;
  background: rgba(223, 190, 200, 0.42);
}

.harness-trace-step.active .harness-step-dot {
  background: #ffb0cc;
  box-shadow: 0 0 8px #ff4fa3;
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.harness-step-copy {
  min-width: 0;
  flex: 1;
  color: rgba(231, 224, 232, 0.86);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.6;
}

.harness-step-live-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.harness-step-live-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffb0cc;
  box-shadow: 0 0 7px rgba(255, 176, 204, 0.48);
  animation: stitchTypingBreath 1.25s ease-in-out infinite;
}

.harness-step-live-dots i:nth-child(2) { animation-delay: 0.16s; }
.harness-step-live-dots i:nth-child(3) { animation-delay: 0.32s; }

.harness-step-copy time {
  display: block;
  margin-top: 2px;
  color: rgba(223, 190, 200, 0.4);
  font: 10px/1.3 var(--mono);
  font-style: normal;
}

.harness-step-copy figure {
  width: min(280px, 100%);
  margin: 8px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 204, 0.1);
  border-radius: 11px;
}

.harness-step-copy figure img {
  width: 100%;
  display: block;
}

.harness-trace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  padding-top: 3px;
}

.harness-trace-actions button {
  min-height: 31px;
  padding: 0 14px;
  border: 1px solid rgba(255, 176, 204, 0.16);
  border-radius: 999px;
  background: rgba(255, 176, 204, 0.06);
  color: #ffb0cc;
  font-size: 11px;
  font-weight: 650;
}

.harness-trace-actions button.secondary {
  border-color: transparent;
  background: transparent;
  color: rgba(223, 190, 200, 0.48);
}

.harness-candidate-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 3px;
}

.harness-candidate-option {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(255, 45, 85, 0.14);
  border-radius: 12px;
  background: rgba(255, 45, 85, 0.035);
  color: rgba(247, 237, 243, 0.88);
  text-align: left;
}

.harness-candidate-option.selected {
  border-color: rgba(255, 45, 85, 0.62);
  background: rgba(255, 45, 85, 0.10);
  box-shadow: inset 0 0 18px rgba(255, 45, 85, 0.06);
}

.harness-candidate-option img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.harness-candidate-option img.fallback {
  padding: 10px;
  object-fit: contain;
  background: rgba(255, 45, 85, 0.07);
  filter: invert(35%) sepia(77%) saturate(3186%) hue-rotate(328deg) brightness(105%) contrast(101%);
}

.harness-candidate-option > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.harness-candidate-option strong,
.harness-candidate-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harness-candidate-option strong {
  color: inherit;
  font-size: 11px;
  line-height: 1.35;
}

.harness-candidate-option small {
  color: rgba(223, 190, 200, 0.46);
  font-size: 9px;
}

.harness-candidate-option i {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 176, 204, 0.22);
  border-radius: 50%;
  color: #fff;
  font: 10px/1 sans-serif;
  font-style: normal;
}

.harness-candidate-option.selected i {
  border-color: #ff2d55;
  background: #ff2d55;
  box-shadow: 0 0 9px rgba(255, 45, 85, 0.36);
}

.harness-candidate-confirm {
  grid-column: 1 / -1;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 176, 204, 0.13);
  color: #ffb0cc;
  font-size: 11px;
  font-weight: 700;
}

.harness-candidate-confirm:disabled {
  opacity: 0.36;
}

body[data-app-theme="day"] .harness-trace-card {
  border-color: rgba(203, 113, 147, 0.16);
  background: rgba(255, 251, 252, 0.76);
  box-shadow: inset 0 2px 12px rgba(127, 73, 94, 0.08);
  color: #493c44;
}

body[data-app-theme="day"] .harness-trace-label,
body[data-app-theme="day"] .harness-step-copy {
  color: rgba(73, 60, 68, 0.88);
}

body[data-app-theme="day"] .harness-candidate-option {
  border-color: rgba(203, 113, 147, 0.16);
  background: rgba(255, 255, 255, 0.62);
  color: rgba(73, 60, 68, 0.90);
}

body[data-app-theme="day"] .harness-candidate-option.selected {
  border-color: rgba(255, 45, 85, 0.48);
  background: rgba(255, 45, 85, 0.07);
}

body[data-app-theme="day"] .harness-candidate-option small {
  color: rgba(73, 60, 68, 0.48);
}

body[data-app-theme="day"] .harness-candidate-confirm {
  background: rgba(203, 113, 147, 0.10);
  color: #bf5a83;
}

body[data-app-theme="day"] .harness-trace-body {
  border-top-color: rgba(203, 113, 147, 0.11);
}

body[data-app-theme="day"] .harness-trace-status,
body[data-app-theme="day"] .harness-step-copy time,
body[data-app-theme="day"] .harness-trace-actions button.secondary {
  color: rgba(120, 91, 104, 0.54);
}

body[data-app-theme="day"] .harness-platform-icon {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(203, 113, 147, 0.1);
}

.xhs-system-msg {
  justify-content: center;
}

.xhs-chat-card {
  width: min(100%, 430px);
  margin: 10px auto 0;
  padding: 16px;
  border: 1px solid rgba(255, 45, 85, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 45, 85, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(66, 17, 34, 0.76), rgba(14, 12, 18, 0.94));
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.92);
}

.xhs-ai-msg .ai-response-body {
  display: grid;
  gap: 14px;
}

.xhs-ai-response {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.xhs-ai-response .message-receipt {
  margin-top: 10px;
  padding-inline: 2px;
}

.xhs-ai-response .stitch-message-actions {
  padding-inline: 2px;
}

.xhs-ai-response .xhs-chat-card,
.ai-response-body > .xhs-chat-card {
  width: 100%;
  margin: 4px 0 0;
}

.xhs-chat-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.xhs-chat-icon {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 45, 85, 0.18), 0 10px 24px rgba(255, 45, 85, 0.12);
  position: relative;
  display: grid;
  place-items: center;
}

.xhs-chat-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.xhs-logo-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background: #ff2442;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.harness-platform-icon .xhs-logo-fallback {
  font-size: 7px;
}

.xhs-chat-icon img[hidden],
.harness-platform-icon img[hidden] {
  display: none;
}

.xhs-chat-card small {
  display: block;
  color: rgba(255, 176, 204, 0.72);
  font: 10px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.xhs-chat-card strong {
  display: block;
  margin-top: 4px;
  color: rgba(247, 237, 243, 0.96);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.25;
}

.xhs-chat-card-head span:last-child,
.xhs-chat-card-head div > span {
  display: block;
  margin-top: 5px;
  color: rgba(223, 190, 200, 0.52);
  font-size: 12px;
  line-height: 1.35;
}

.xhs-chat-card figure {
  margin: 16px 0 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 176, 204, 0.12);
}

.xhs-chat-card figure img {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
}

.xhs-summary,
.xhs-reason {
  margin: 14px 0 0;
  color: rgba(247, 237, 243, 0.78);
  font-size: 14px;
  line-height: 1.65;
}

.xhs-reason {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 176, 204, 0.075);
  color: #ffb0cc;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-style: italic;
}

.xhs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 176, 204, 0.10);
}

.xhs-actions a,
.xhs-actions button,
.xhs-actions span {
  border: 0;
  background: transparent;
  color: #ffb0cc;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.xhs-actions button:first-of-type,
.xhs-actions a:first-child {
  color: #ffb0cc;
}

.xhs-actions button:last-child {
  color: rgba(223, 190, 200, 0.52);
}

.xhs-chat-card > time {
  display: block;
  margin-top: 14px;
  color: rgba(223, 190, 200, 0.36);
  font: 10px/1 var(--mono);
}

.xhs-parse-msg {
  justify-content: center;
  padding-block: 8px;
}

.xhs-parse-msg .xhs-parse-card {
  width: min(100%, 520px);
  margin: 0 auto;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 45, 85, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(30, 24, 32, 0.82), rgba(14, 12, 18, 0.94));
  border-color: rgba(255, 176, 204, 0.18);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.xhs-inline-parse-cards {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.xhs-user-share-msg .user-response .xhs-chat-card {
  width: 100%;
  margin: 0;
  text-align: left;
}

.xhs-user-share-msg .user-response .xhs-parse-card {
  border-color: rgba(255, 45, 85, 0.18);
}

.xhs-user-share-msg .user-response .xhs-chat-card figure img {
  max-height: 220px;
}

.xhs-parse-card .xhs-summary {
  color: rgba(247, 237, 243, 0.72);
}

.xhs-read-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.xhs-read-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 176, 204, 0.075);
  color: rgba(255, 176, 204, 0.82);
  font-size: 11px;
  font-weight: 700;
}

.xhs-image-state {
  margin: 10px 0 0;
  color: rgba(223, 190, 200, 0.56);
  font-size: 12px;
  line-height: 1.5;
}

.xhs-sense-mode {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 45, 85, 0.18);
  border-radius: 14px;
  background: rgba(255, 45, 85, 0.06);
}

.xhs-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: start center;
  padding: clamp(22px, 5dvh, 54px) 16px 94px;
  background: rgba(5, 4, 7, 0.54);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.xhs-panel-card {
  position: relative;
  width: min(100%, 520px);
  max-height: min(74dvh, 690px);
  overflow: auto;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 45, 85, 0.13), transparent 28%),
    rgba(15, 12, 18, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  padding: 18px;
}

.xhs-panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: block;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  appearance: none;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(246, 166, 194, 0.86);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.xhs-panel-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding-right: 28px;
}

.xhs-panel-head small {
  display: block;
  color: rgba(246, 166, 194, 0.56);
  font: 10px/1.2 var(--mono);
  letter-spacing: 0.18em;
}

.xhs-panel-head h3 {
  margin: 4px 0 2px;
  color: rgba(247, 237, 243, 0.94);
  font-size: 22px;
  line-height: 1.15;
}

.xhs-panel-head p {
  margin: 0;
  color: rgba(223, 190, 200, 0.54);
  font-size: 13px;
}

.xhs-sense-mode strong {
  color: rgba(247, 237, 243, 0.92);
  font-size: 14px;
}

.xhs-sense-mode span {
  color: rgba(223, 190, 200, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.xhs-cookie-box {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
}

.xhs-cookie-box > div:first-child {
  display: grid;
  gap: 5px;
}

.xhs-cookie-box strong {
  color: rgba(247, 237, 243, 0.92);
  font-size: 14px;
}

.xhs-cookie-box span,
.xhs-cookie-box p {
  margin: 0;
  color: rgba(223, 190, 200, 0.56);
  font-size: 12px;
  line-height: 1.55;
}

.xhs-cookie-box textarea {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 12px;
  background: rgba(10, 8, 12, 0.42);
  color: rgba(247, 237, 243, 0.84);
  font: 11px/1.55 var(--mono);
  resize: vertical;
}

.xhs-cookie-box textarea::placeholder {
  color: rgba(223, 190, 200, 0.34);
}

.xhs-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xhs-cookie-actions button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(246, 166, 194, 0.20);
  border-radius: 999px;
  background: rgba(246, 166, 194, 0.08);
  color: rgba(255, 176, 204, 0.90);
  font-size: 11px;
  font-weight: 720;
}

.xhs-paper-form textarea,
.xhs-paper-form .senses-picker-trigger {
  width: 100%;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.9);
  font: inherit;
}

.xhs-paper-form .senses-picker {
  width: 100%;
}

.xhs-paper-form .senses-picker-trigger {
  min-height: 44px;
  padding: 0 14px;
  justify-content: space-between;
}

.xhs-paper-form .senses-picker-panel {
  left: 0;
  right: auto;
  width: min(232px, 100%);
  padding: 8px;
  border: 1px solid rgba(216, 52, 139, 0.34);
  border-radius: 18px;
  background: rgba(18, 15, 21, 0.98);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
}

.xhs-paper-form .senses-picker-panel button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(247, 237, 243, 0.80);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.02em;
  text-align: left;
}

.xhs-paper-form .senses-picker-panel button.active {
  background: linear-gradient(135deg, #f04aa1, #c92f7f);
  color: #fff;
}

.xhs-paper-form textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.xhs-paper-form textarea::placeholder {
  color: rgba(223, 190, 200, 0.36);
}

.xhs-recent-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.xhs-recent-list > small {
  color: rgba(223, 190, 200, 0.42);
  font: 9px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.xhs-recent-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.xhs-recent-list strong {
  color: rgba(247, 237, 243, 0.9);
  font-size: 13px;
}

.xhs-recent-list span {
  color: rgba(223, 190, 200, 0.50);
  font-size: 11px;
}

.xhs-candidate-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.xhs-candidate-list > small {
  color: rgba(223, 190, 200, 0.42);
  font: 9px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.xhs-candidate-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 45, 85, 0.16);
  border-radius: 14px;
  background: rgba(255, 45, 85, 0.045);
}

.xhs-candidate-list article > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.xhs-candidate-list strong {
  color: rgba(247, 237, 243, 0.9);
  font-size: 13px;
}

.xhs-candidate-list span {
  color: rgba(223, 190, 200, 0.52);
  font-size: 11px;
  line-height: 1.45;
}

.xhs-candidate-list button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 176, 204, 0.24);
  border-radius: 999px;
  background: rgba(255, 176, 204, 0.08);
  color: rgba(255, 176, 204, 0.92);
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

body[data-app-theme="day"] .xhs-chat-card {
  border-color: rgba(255, 45, 85, 0.18);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 45, 85, 0.10), transparent 38%),
    linear-gradient(145deg, rgba(255, 246, 250, 0.96), rgba(255, 253, 253, 0.98));
  box-shadow: 0 18px 42px rgba(138, 91, 103, 0.10);
  color: #493c44;
}

body[data-app-theme="day"] .xhs-chat-card strong {
  color: #493c44;
}

body[data-app-theme="day"] .xhs-chat-card small,
body[data-app-theme="day"] .xhs-actions a,
body[data-app-theme="day"] .xhs-actions button,
body[data-app-theme="day"] .xhs-actions span {
  color: #c65683;
}

body[data-app-theme="day"] .xhs-chat-card-head div > span,
body[data-app-theme="day"] .xhs-summary {
  color: rgba(73, 60, 68, 0.62);
}

body[data-app-theme="day"] .xhs-parse-msg .xhs-parse-card {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 45, 85, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(255, 249, 251, 0.98), rgba(255, 253, 253, 0.98));
  border-color: rgba(203, 113, 147, 0.16);
  box-shadow: 0 16px 36px rgba(138, 91, 103, 0.08);
}

body[data-app-theme="day"] .xhs-read-meta span {
  background: rgba(255, 45, 85, 0.055);
  color: #c65683;
}

body[data-app-theme="day"] .xhs-image-state {
  color: rgba(120, 91, 104, 0.56);
}

body[data-app-theme="day"] .xhs-reason {
  background: rgba(255, 45, 85, 0.055);
  color: #b94f78;
}

body[data-app-theme="day"] .xhs-sense-mode {
  border-color: rgba(203, 113, 147, 0.16);
  background: rgba(255, 45, 85, 0.045);
}

body[data-app-theme="day"] .xhs-panel-backdrop {
  background: rgba(255, 241, 247, 0.62);
}

body[data-app-theme="day"] .xhs-panel-card {
  border-color: rgba(203, 113, 147, 0.18);
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 45, 85, 0.08), transparent 30%),
    rgba(255, 253, 251, 0.97);
  box-shadow: 0 26px 72px rgba(112, 74, 88, 0.18);
}

body[data-app-theme="day"] .xhs-panel-close {
  color: #c65683;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-app-theme="day"] .xhs-panel-head small {
  color: rgba(184, 91, 127, 0.58);
}

body[data-app-theme="day"] .xhs-panel-head h3 {
  color: rgba(48, 42, 46, 0.90);
}

body[data-app-theme="day"] .xhs-panel-head p {
  color: rgba(104, 82, 91, 0.56);
}

body[data-app-theme="day"] .xhs-sense-mode strong,
body[data-app-theme="day"] .xhs-recent-list strong,
body[data-app-theme="day"] .xhs-candidate-list strong {
  color: #493c44;
}

body[data-app-theme="day"] .xhs-sense-mode span,
body[data-app-theme="day"] .xhs-recent-list span,
body[data-app-theme="day"] .xhs-recent-list > small,
body[data-app-theme="day"] .xhs-candidate-list span,
body[data-app-theme="day"] .xhs-candidate-list > small,
body[data-app-theme="day"] .xhs-cookie-box span,
body[data-app-theme="day"] .xhs-cookie-box p {
  color: rgba(120, 91, 104, 0.58);
}

body[data-app-theme="day"] .xhs-paper-form textarea,
body[data-app-theme="day"] .xhs-paper-form .senses-picker-trigger,
body[data-app-theme="day"] .xhs-recent-list article,
body[data-app-theme="day"] .xhs-candidate-list article,
body[data-app-theme="day"] .xhs-cookie-box textarea {
  border-color: rgba(203, 113, 147, 0.14);
  background: rgba(255, 255, 255, 0.70);
  color: #493c44;
}

body[data-app-theme="day"] .xhs-candidate-list button {
  border-color: rgba(203, 113, 147, 0.18);
  background: rgba(255, 248, 251, 0.82);
  color: #bf5a83;
}

body[data-app-theme="day"] .xhs-cookie-box {
  border-color: rgba(203, 113, 147, 0.14);
  background: rgba(255, 255, 255, 0.56);
}

body[data-app-theme="day"] .xhs-cookie-box strong {
  color: #493c44;
}

body[data-app-theme="day"] .xhs-cookie-actions button {
  border-color: rgba(203, 113, 147, 0.18);
  background: rgba(255, 248, 251, 0.82);
  color: #bf5a83;
}

body[data-app-theme="day"] .xhs-paper-form textarea::placeholder {
  color: rgba(104, 82, 91, 0.36);
}

body[data-app-theme="day"] .xhs-paper-form .senses-picker-panel {
  border-color: rgba(203, 113, 147, 0.22);
  background: rgba(255, 251, 253, 0.98);
  box-shadow: 0 18px 42px rgba(112, 74, 88, 0.16);
}

body[data-app-theme="day"] .xhs-paper-form .senses-picker-panel button {
  color: rgba(73, 60, 68, 0.76);
  background: rgba(255, 255, 255, 0.42);
}

body[data-app-theme="day"] .xhs-paper-form .senses-picker-panel button.active {
  background: linear-gradient(135deg, #f4a7c1, #d85c91);
  color: #fff;
}

/* XHS modal uses chat-like controls; keep it isolated from global button chrome. */
.xhs-panel-card .xhs-panel-close,
.xhs-panel-card button.xhs-panel-close,
body[data-app-theme="day"] .xhs-panel-card .xhs-panel-close,
body[data-app-theme="day"] .xhs-panel-card button.xhs-panel-close {
  all: unset;
  position: absolute;
  top: 16px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: rgba(246, 166, 194, 0.86);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 24px;
  font-weight: 520;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
}

body[data-app-theme="day"] .xhs-panel-card .xhs-panel-close,
body[data-app-theme="day"] .xhs-panel-card button.xhs-panel-close {
  color: #c65683;
}

.xhs-panel-card .xhs-paper-form .senses-picker-trigger {
  min-height: 42px;
  border-radius: 14px;
  border-color: rgba(246, 166, 194, 0.18);
  background: rgba(16, 13, 18, 0.72);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.18);
}

.xhs-panel-card .xhs-paper-form .senses-picker-trigger strong {
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.01em;
}

.xhs-panel-card .xhs-paper-form .senses-picker-panel {
  width: 136px;
  padding: 4px 0;
  border-radius: 12px;
  border-color: rgba(255, 176, 204, 0.24);
  background: rgba(33, 31, 36, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.xhs-panel-card .xhs-paper-form .senses-picker-panel button {
  all: unset;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 0;
  box-sizing: border-box;
  color: rgba(247, 237, 243, 0.88);
  font-family: "Inter", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}

.xhs-panel-card .xhs-paper-form .senses-picker-panel button.active {
  background: rgba(255, 176, 204, 0.10);
  color: #ffb0cc;
}

.xhs-panel-card .xhs-paper-form .senses-picker-panel button:hover {
  background: rgba(255, 176, 204, 0.10);
  color: #ffb0cc;
}

body[data-app-theme="day"] .xhs-panel-card .xhs-paper-form .senses-picker-trigger {
  border-color: rgba(203, 113, 147, 0.18);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 8px rgba(174, 107, 134, 0.06);
}

body[data-app-theme="day"] .xhs-panel-card .xhs-paper-form .senses-picker-panel {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 253, 251, 0.98);
  box-shadow: 0 18px 54px rgba(112, 74, 88, 0.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-app-theme="day"] .xhs-panel-card .xhs-paper-form .senses-picker-panel button {
  color: rgba(48, 42, 46, 0.86);
}

body[data-app-theme="day"] .xhs-panel-card .xhs-paper-form .senses-picker-panel button.active {
  background: rgba(217, 134, 163, 0.09);
  color: var(--stitch-hot);
}

body[data-app-theme="day"] .xhs-panel-card .xhs-paper-form .senses-picker-panel button:hover {
  background: rgba(217, 134, 163, 0.09);
  color: var(--stitch-hot);
}

@media (max-width: 520px) {
  .harness-trace-head { padding-inline: 12px; }
  .harness-trace-body { padding: 11px 12px 13px 48px; }
  .harness-step-copy { font-size: 13px; }
  .harness-candidate-picker { grid-template-columns: minmax(0, 1fr); }
  .xhs-panel-backdrop {
    padding: 18px 12px 92px;
  }
  .xhs-panel-card {
    width: min(100%, 420px);
    max-height: min(72dvh, 620px);
    padding: 16px;
    border-radius: 22px;
  }
  .xhs-panel-head {
    grid-template-columns: 42px minmax(0, 1fr);
    margin-bottom: 14px;
  }
  .xhs-panel-head h3 {
    font-size: 20px;
  }
  .xhs-paper-form textarea {
    min-height: 82px;
  }
}

/* Chat precision pass: make desktop chat and composer feel lighter and less oversized. */
.chat-shell .ai-response-body,
.chat-shell .user-response .ai-response-body,
.chat-shell .bubble {
  font-size: 14.5px;
  line-height: 1.66;
}

.chat-shell .ai-response-body p {
  margin-bottom: 13px;
}

.chat-shell .composer {
  grid-template-columns: 34px minmax(0, 1fr) 48px;
  grid-template-rows: auto minmax(38px, auto) 34px;
  gap: 6px 8px;
  margin: 7px 14px calc(10px + env(safe-area-inset-bottom));
  padding: 8px 10px 10px;
  border-radius: 23px;
}

.chat-shell .composer textarea {
  min-height: 38px;
  max-height: 104px;
  padding: 2px 4px;
  font-size: 16px;
  line-height: 20px;
}

.chat-shell .chat-plus,
.chat-shell .icon-send {
  width: 34px;
  height: 34px;
  min-width: 34px;
}

.chat-shell .chat-plus {
  font-size: 22px;
}

.chat-shell .icon-send.respond {
  width: 48px;
  min-width: 48px;
  box-shadow: 0 6px 18px rgba(255, 176, 204, 0.18);
}

.chat-shell .icon-send.respond svg {
  width: 16px;
  height: 16px;
}

.chat-stop-square {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.chat-shell[data-theme="day"] .icon-send.respond,
[data-chat-theme="day"] .chat-shell .icon-send.respond,
.chat-shell[data-theme="day"] .icon-send.respond.is-stopping,
[data-chat-theme="day"] .chat-shell .icon-send.respond.is-stopping {
  box-shadow: 0 8px 22px rgba(217, 134, 163, 0.24);
}

.door-tray-shell {
  --door-tray-accent: #f6a6c2;
  --door-tray-bright: #ffb7d0;
  --door-tray-hot: #ff4fa3;
  --door-tray-line: rgba(246, 166, 194, 0.20);
  --door-tray-soft: rgba(246, 166, 194, 0.12);
  --door-tray-card: rgba(29, 25, 31, 0.74);
}

.door-tray-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 8px 28px;
  text-align: center;
}

.door-tray-hero-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(246, 166, 194, 0.26);
  border-radius: 50%;
  color: var(--door-tray-hot);
  background: rgba(246, 166, 194, 0.10);
  box-shadow: 0 0 44px rgba(255, 79, 163, 0.13);
}

.door-tray-hero-orb::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  background: rgba(255, 79, 163, 0.10);
  filter: blur(22px);
}

.door-tray-hero-orb svg {
  position: relative;
  width: 46px;
  height: 46px;
}

.door-tray-hero strong {
  margin-top: 6px;
  color: #f7edf3;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.door-tray-hero small {
  color: rgba(255, 183, 208, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.door-tray-hero p {
  margin: 0;
  max-width: 300px;
  color: rgba(247, 237, 243, 0.72);
  font-size: 16px;
  line-height: 1.8;
}

.door-tray-grid {
  display: grid;
  gap: 18px;
}

.door-tray-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--door-tray-line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--door-tray-card);
  color: rgba(247, 237, 243, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012), 0 18px 52px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.door-tray-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.door-tray-card-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.door-tray-card-head strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f7edf3;
  font-size: 17px;
  line-height: 1.3;
}

.door-tray-card-head strong .material-symbols-outlined {
  color: var(--door-tray-bright);
  font-size: 19px;
}

.door-tray-card-head small {
  color: rgba(247, 237, 243, 0.52);
  font-size: 12px;
}

.door-tray-card-head b {
  flex: 0 0 auto;
  color: var(--door-tray-bright);
  font-size: 22px;
  line-height: 1.15;
  white-space: nowrap;
}

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

.door-tray-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.door-tray-row span {
  color: rgba(247, 237, 243, 0.92);
  font-size: 15px;
  font-weight: 700;
}

.door-tray-row i {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 999px;
  background: rgba(154, 3, 80, 0.44);
  color: rgba(255, 183, 208, 0.96);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.door-tray-jar-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.door-tray-jar-pills span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 237, 243, 0.70);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.door-tray-jar-pills span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--door-tray-bright);
  box-shadow: 0 0 10px rgba(255, 183, 208, 0.42);
}

.door-tray-jar-list {
  display: grid;
  gap: 10px;
}

.door-tray-jar-line {
  appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(247, 237, 243, 0.90);
  font-family: inherit;
  text-align: left;
}

.door-tray-jar-line > .material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(246, 166, 194, 0.12);
  color: var(--door-tray-bright);
  font-size: 20px;
}

.door-tray-jar-line div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.door-tray-jar-line strong,
.door-tray-jar-line small,
.door-tray-jar-line i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.door-tray-jar-line strong {
  color: #f7edf3;
  font-size: 15px;
  line-height: 1.2;
}

.door-tray-jar-line small {
  color: rgba(247, 237, 243, 0.56);
  font-size: 12px;
}

.door-tray-jar-line i {
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 999px;
  background: rgba(154, 3, 80, 0.30);
  color: rgba(255, 183, 208, 0.90);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.door-tray-wish-note {
  padding: 18px 14px;
  border: 1px dashed rgba(246, 166, 194, 0.30);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.030);
  color: rgba(247, 237, 243, 0.84);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.65;
  text-align: center;
}

.door-tray-primary-action,
.door-tray-action-pair button,
.door-tray-debug-link {
  appearance: none;
  font-family: inherit;
}

.door-tray-primary-action {
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4fa3, #b7046c);
  color: #fff7fb;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 30px rgba(255, 79, 163, 0.24);
}

.door-tray-action-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.door-tray-action-pair button {
  min-height: 44px;
  border: 1px solid rgba(246, 166, 194, 0.32);
  border-radius: 11px;
  background: rgba(17, 17, 22, 0.40);
  color: rgba(255, 183, 208, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.door-tray-echo {
  position: relative;
  margin-top: 34px;
  padding: 28px 18px 20px;
  border: 1px solid rgba(246, 166, 194, 0.14);
  border-radius: 16px;
  background: rgba(17, 17, 22, 0.42);
  text-align: center;
}

.door-tray-echo span {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 999px;
  background: #151218;
  color: var(--door-tray-bright);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.door-tray-echo p {
  margin: 0;
  color: rgba(247, 237, 243, 0.72);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 14px;
  line-height: 1.8;
}

.door-tray-debug-link {
  display: block;
  width: fit-content;
  margin: 30px auto 0;
  border: 0;
  background: transparent;
  color: rgba(247, 237, 243, 0.24);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.door-tray-jar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 18px;
  background: rgba(9, 8, 11, 0.54);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.door-tray-jar-detail {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(390px, 100%);
  max-height: min(78vh, 680px);
  overflow: auto;
  padding: 22px 18px 18px;
  border: 1px solid rgba(246, 166, 194, 0.22);
  border-radius: 18px 18px 12px 12px;
  background: #151218;
  color: #f7edf3;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.36);
}

.door-tray-jar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 183, 208, 0.88);
  font-size: 20px;
}

.door-tray-detail-kicker {
  color: var(--door-tray-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.door-tray-jar-detail h3 {
  margin: 0;
  padding-right: 38px;
  color: #f7edf3;
  font-size: 24px;
  line-height: 1.15;
}

.door-tray-jar-detail > p {
  margin: 0;
  color: rgba(247, 237, 243, 0.58);
  font-size: 13px;
}

.door-tray-wish-list {
  display: grid;
  gap: 10px;
}

.door-tray-idea-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(246, 166, 194, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.door-tray-idea-form label {
  display: grid;
  gap: 7px;
}

.door-tray-idea-form label span {
  color: rgba(255, 183, 208, 0.84);
  font-size: 12px;
  font-weight: 850;
}

.door-tray-idea-form input,
.door-tray-idea-form textarea {
  width: 100%;
  border: 1px solid rgba(246, 166, 194, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 237, 243, 0.92);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.door-tray-idea-form input {
  height: 42px;
  padding: 0 12px;
}

.door-tray-idea-form textarea {
  min-height: 70px;
  padding: 10px 12px;
  resize: vertical;
}

.door-tray-idea-form button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff4fa3, #b7046c);
  color: #fff7fb;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
}

.door-tray-wish-item {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.door-tray-idea-item {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.door-tray-idea-item header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.door-tray-idea-item header div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.door-tray-idea-item strong {
  color: rgba(247, 237, 243, 0.94);
  font-size: 15px;
  line-height: 1.35;
}

.door-tray-idea-item span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(154, 3, 80, 0.42);
  color: rgba(255, 183, 208, 0.94);
  font-size: 11px;
  font-weight: 850;
}

.door-tray-idea-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 183, 208, 0.96);
}

.door-tray-idea-icon:disabled {
  opacity: 0.62;
}

.door-tray-idea-icon .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 650, "GRAD" 0, "opsz" 24;
}

.door-tray-idea-item p,
.door-tray-idea-item small {
  margin: 0;
  color: rgba(247, 237, 243, 0.64);
  font-size: 13px;
  line-height: 1.65;
}

.door-tray-wish-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.door-tray-wish-item strong {
  color: rgba(247, 237, 243, 0.94);
  font-size: 15px;
  line-height: 1.35;
}

.door-tray-wish-item span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(154, 3, 80, 0.42);
  color: rgba(255, 183, 208, 0.94);
  font-size: 11px;
  font-weight: 850;
}

.door-tray-wish-item p,
.door-tray-wish-item small {
  margin: 0;
  color: rgba(247, 237, 243, 0.64);
  font-size: 13px;
  line-height: 1.65;
}

.door-tray-empty-jar {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 14px;
  border: 1px dashed rgba(246, 166, 194, 0.25);
  border-radius: 12px;
  color: rgba(247, 237, 243, 0.62);
  text-align: center;
}

.door-tray-empty-jar .material-symbols-outlined {
  color: var(--door-tray-bright);
  font-size: 28px;
}

.door-tray-empty-jar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.door-tray-detail-action {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4fa3, #b7046c);
  color: #fff7fb;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
}

.door-tray-context-backdrop {
  background: rgba(9, 8, 11, 0.54);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.door-tray-context-modal {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(430px, calc(100vw - 36px));
  padding: 24px 22px 22px;
  border: 1px solid rgba(246, 166, 194, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    #151218;
  color: #f7edf3;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.door-tray-context-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(246, 166, 194, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 183, 208, 0.88);
  font-size: 20px;
}

.door-tray-context-modal small {
  color: var(--door-tray-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.door-tray-context-modal h3 {
  margin: 0;
  padding-right: 38px;
  color: #f7edf3;
  font-size: 22px;
  line-height: 1.25;
}

.door-tray-context-lines {
  padding: 14px;
  border: 1px dashed rgba(246, 166, 194, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 237, 243, 0.78);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.75;
}

body[data-app-theme="day"] .door-tray-shell {
  --door-tray-accent: #d986a3;
  --door-tray-bright: #c96f91;
  --door-tray-hot: #d93b8b;
  --door-tray-line: rgba(196, 117, 145, 0.18);
  --door-tray-soft: rgba(217, 134, 163, 0.12);
  --door-tray-card: rgba(255, 252, 251, 0.78);
}

body[data-app-theme="day"] .door-tray-hero-orb {
  border-color: rgba(196, 117, 145, 0.22);
  background: rgba(217, 134, 163, 0.12);
  color: #d93b8b;
  box-shadow: 0 18px 42px rgba(173, 98, 120, 0.10);
}

body[data-app-theme="day"] .door-tray-hero strong,
body[data-app-theme="day"] .door-tray-card-head strong {
  color: #33272d;
}

body[data-app-theme="day"] .door-tray-hero small {
  color: rgba(201, 111, 145, 0.78);
}

body[data-app-theme="day"] .door-tray-hero p,
body[data-app-theme="day"] .door-tray-card-head small,
body[data-app-theme="day"] .door-tray-echo p {
  color: rgba(55, 42, 49, 0.62);
}

body[data-app-theme="day"] .door-tray-card {
  border-color: rgba(196, 117, 145, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    rgba(255, 252, 251, 0.76);
  color: #342930;
  box-shadow: 0 18px 44px rgba(90, 62, 72, 0.08);
}

body[data-app-theme="day"] .door-tray-card-head b,
body[data-app-theme="day"] .door-tray-card-head strong .material-symbols-outlined {
  color: #c96f91;
}

body[data-app-theme="day"] .door-tray-row,
body[data-app-theme="day"] .door-tray-jar-pills span,
body[data-app-theme="day"] .door-tray-jar-line,
body[data-app-theme="day"] .door-tray-wish-note {
  border-color: rgba(196, 117, 145, 0.13);
  background: rgba(255, 255, 255, 0.54);
  color: #3f343a;
}

body[data-app-theme="day"] .door-tray-row span {
  color: #3f343a;
}

body[data-app-theme="day"] .door-tray-row i {
  border-color: rgba(217, 134, 163, 0.24);
  background: rgba(255, 225, 239, 0.72);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-jar-pills span {
  color: rgba(55, 42, 49, 0.68);
}

body[data-app-theme="day"] .door-tray-jar-line > .material-symbols-outlined {
  background: rgba(217, 134, 163, 0.12);
  color: #c96f91;
}

body[data-app-theme="day"] .door-tray-jar-line strong {
  color: #3f343a;
}

body[data-app-theme="day"] .door-tray-jar-line small {
  color: rgba(55, 42, 49, 0.55);
}

body[data-app-theme="day"] .door-tray-jar-line i {
  border-color: rgba(217, 134, 163, 0.22);
  background: rgba(255, 225, 239, 0.70);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-wish-note {
  color: rgba(55, 42, 49, 0.78);
}

body[data-app-theme="day"] .door-tray-primary-action {
  background: linear-gradient(135deg, #d93b8b, #c96f91);
  color: #fff8fb;
  box-shadow: 0 12px 26px rgba(217, 59, 139, 0.18);
}

body[data-app-theme="day"] .door-tray-action-pair button {
  border-color: rgba(196, 117, 145, 0.22);
  background: rgba(255, 252, 251, 0.56);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-echo {
  border-color: rgba(196, 117, 145, 0.14);
  background: rgba(255, 252, 251, 0.50);
}

body[data-app-theme="day"] .door-tray-echo span {
  border-color: rgba(196, 117, 145, 0.18);
  background: #fff8fb;
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-debug-link {
  color: rgba(55, 42, 49, 0.28);
}

body[data-app-theme="day"] .door-tray-jar-backdrop {
  background: rgba(55, 42, 49, 0.20);
}

body[data-app-theme="day"] .door-tray-jar-detail {
  border-color: rgba(196, 117, 145, 0.18);
  background: #fff8fb;
  color: #33272d;
  box-shadow: 0 -18px 52px rgba(90, 62, 72, 0.14);
}

body[data-app-theme="day"] .door-tray-jar-close {
  border-color: rgba(196, 117, 145, 0.18);
  background: rgba(255, 255, 255, 0.62);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-jar-detail h3,
body[data-app-theme="day"] .door-tray-wish-item strong {
  color: #33272d;
}

body[data-app-theme="day"] .door-tray-jar-detail > p,
body[data-app-theme="day"] .door-tray-wish-item p,
body[data-app-theme="day"] .door-tray-wish-item small,
body[data-app-theme="day"] .door-tray-empty-jar {
  color: rgba(55, 42, 49, 0.62);
}

body[data-app-theme="day"] .door-tray-wish-item {
  border-color: rgba(196, 117, 145, 0.13);
  background: rgba(255, 255, 255, 0.58);
}

body[data-app-theme="day"] .door-tray-idea-form {
  border-color: rgba(196, 117, 145, 0.22);
  background: rgba(255, 255, 255, 0.50);
}

body[data-app-theme="day"] .door-tray-idea-form label span {
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-idea-form input,
body[data-app-theme="day"] .door-tray-idea-form textarea {
  border-color: rgba(196, 117, 145, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #33272d;
}

body[data-app-theme="day"] .door-tray-idea-form button {
  background: linear-gradient(135deg, #d93b8b, #c96f91);
  color: #fff8fb;
}

body[data-app-theme="day"] .door-tray-idea-item {
  border-color: rgba(196, 117, 145, 0.13);
  background: rgba(255, 255, 255, 0.58);
}

body[data-app-theme="day"] .door-tray-idea-item strong {
  color: #33272d;
}

body[data-app-theme="day"] .door-tray-idea-item p,
body[data-app-theme="day"] .door-tray-idea-item small {
  color: rgba(55, 42, 49, 0.62);
}

body[data-app-theme="day"] .door-tray-idea-item span {
  background: rgba(255, 225, 239, 0.72);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-idea-icon {
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-wish-item span {
  background: rgba(255, 225, 239, 0.72);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-empty-jar {
  border-color: rgba(196, 117, 145, 0.22);
}

body[data-app-theme="day"] .door-tray-detail-action {
  background: linear-gradient(135deg, #d93b8b, #c96f91);
  color: #fff8fb;
}

body[data-app-theme="day"] .door-tray-context-backdrop {
  background: rgba(55, 42, 49, 0.18);
}

body[data-app-theme="day"] .door-tray-context-modal {
  border-color: rgba(196, 117, 145, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.28)),
    #fff8fb;
  color: #33272d;
  box-shadow: 0 22px 64px rgba(90, 62, 72, 0.16);
}

body[data-app-theme="day"] .door-tray-context-close {
  border-color: rgba(196, 117, 145, 0.18);
  background: rgba(255, 255, 255, 0.64);
  color: #b85b7f;
}

body[data-app-theme="day"] .door-tray-context-modal h3 {
  color: #33272d;
}

body[data-app-theme="day"] .door-tray-context-lines {
  border-color: rgba(196, 117, 145, 0.20);
  background: rgba(255, 255, 255, 0.56);
  color: rgba(55, 42, 49, 0.72);
}

/* iOS fullscreen correction: backgrounds may enter the status bar; headers must not. */
body[data-view]:not([data-view="home"]) .more-control-shell.home-shell,
body[data-view]:not([data-view="home"]) .setting-control-shell.home-shell,
body[data-view]:not([data-view="home"]) .cycle-control-shell.home-shell {
  padding-top: calc(86px + env(safe-area-inset-top)) !important;
}

body[data-view="memo"] .memo-control-shell.home-shell,
body[data-view="diary"] .diary-control-shell.home-shell {
  padding-top: calc(106px + env(safe-area-inset-top)) !important;
}

body[data-view="senses"] .senses-control-shell.home-shell {
  padding-top: calc(104px + env(safe-area-inset-top)) !important;
}

body[data-view="calendar"] .calendar-control-shell.home-shell {
  padding-top: calc(42px + env(safe-area-inset-top)) !important;
}

body[data-view]:not([data-view="home"]) .more-control-head,
body[data-view]:not([data-view="home"]) .setting-control-head,
body[data-view="memo"] .memo-control-shell .simple-head,
body[data-view="diary"] .diary-control-shell .simple-head,
body[data-view="senses"] .senses-control-shell .simple-head {
  min-height: calc(86px + env(safe-area-inset-top)) !important;
  height: auto !important;
  padding-top: env(safe-area-inset-top) !important;
}

body[data-view="senses"] .senses-control-shell .simple-head {
  height: calc(86px + env(safe-area-inset-top)) !important;
}

/* iOS fullscreen named-page header locks. Keep backgrounds full-bleed, keep controls below Dynamic Island. */
body[data-view="chat"] .chat-shell .chat-head {
  flex-basis: calc(64px + env(safe-area-inset-top)) !important;
  height: calc(64px + env(safe-area-inset-top)) !important;
  padding-top: calc(8px + env(safe-area-inset-top)) !important;
}

body[data-view="chat"] .chat-shell .messages {
  height: calc(100dvh - 64px - env(safe-area-inset-top) - 88px - env(safe-area-inset-bottom)) !important;
}

body[data-view="chat"] .chat-search-panel {
  top: calc(72px + env(safe-area-inset-top)) !important;
}

body[data-view="chat"] .chat-bridge-panel {
  top: calc(76px + env(safe-area-inset-top)) !important;
}

body[data-view="api"] .module-shell:has(.api-config-page) .top-card,
body[data-view="monitor"] .module-shell:has(.monitor-observation-room) .top-card,
body[data-view="theme"] .module-shell:has(.theme-room) .top-card {
  min-height: calc(86px + env(safe-area-inset-top)) !important;
  padding-top: env(safe-area-inset-top) !important;
}

body[data-view="api"] .module-shell:has(.api-config-page) .app-page,
body[data-view="monitor"] .module-shell:has(.monitor-observation-room) .app-page,
body[data-view="theme"] .module-shell:has(.theme-room) .app-page {
  padding-top: calc(86px + env(safe-area-inset-top)) !important;
}

body[data-view="memory"] .memory-palace-v3.memory-shell {
  padding-top: calc(86px + env(safe-area-inset-top)) !important;
}

body[data-view="memory"] .memory-palace-v3 .memory-control-head {
  min-height: calc(86px + env(safe-area-inset-top)) !important;
  padding-top: env(safe-area-inset-top) !important;
}

body[data-view="calendar"] .calendar-control-head {
  padding-top: env(safe-area-inset-top) !important;
}

body[data-view="senses"] .xhs-panel-backdrop {
  padding-top: calc(18px + env(safe-area-inset-top)) !important;
}

body[data-view="senses"] .xhs-panel-card {
  max-height: calc(100dvh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
}

/* iOS fullscreen final alignment: title/control centerline = safe area + visible bar center. */
body[data-view="calendar"] .calendar-control-head {
  min-height: calc(86px + env(safe-area-inset-top)) !important;
  height: auto !important;
  padding-top: env(safe-area-inset-top) !important;
}

body[data-view="calendar"] .calendar-control-head h2 {
  top: calc(env(safe-area-inset-top) + 43px) !important;
  transform: translate(-50%, -50%) !important;
}

body[data-view="chat"] .chat-head .chat-identity,
body[data-view="chat"] .chat-head > div:not(.chat-head-actions) {
  top: calc(env(safe-area-inset-top) + 7px) !important;
}

body[data-view="chat"] .chat-head .chat-back {
  top: calc(env(safe-area-inset-top) + 32px) !important;
  transform: translateY(-50%) !important;
}

body[data-view="chat"] .chat-head-actions {
  top: calc(env(safe-area-inset-top) + 32px) !important;
  transform: translateY(-50%) !important;
}

body[data-view="api"] .module-shell:has(.api-config-page) .top-card .brand,
body[data-view="monitor"] .module-shell:has(.monitor-observation-room) .top-card .brand,
body[data-view="theme"] .module-shell:has(.theme-room) .top-card .brand {
  align-self: center !important;
}

body[data-view="api"] .module-shell:has(.api-config-page) .top-card .nav-btn,
body[data-view="monitor"] .module-shell:has(.monitor-observation-room) .top-card .nav-btn,
body[data-view="theme"] .module-shell:has(.theme-room) .top-card .nav-btn {
  align-self: center !important;
}

body[data-view="memory"] .memory-palace-v3 .memory-control-head h2 {
  align-self: center !important;
}

body[data-view="senses"] .xhs-panel-backdrop {
  align-items: start !important;
}

/* iOS fullscreen microfix: overlays cover the full screen, while sheet content keeps the safe-area gap. */
body[data-view="chat"] .chat-search-panel,
body[data-view="chat"] .chat-bridge-panel {
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  min-height: 100svh !important;
  height: 100dvh !important;
}

body[data-view="chat"] .chat-search-panel {
  background: rgba(21, 18, 24, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

body[data-view="chat"] .chat-bridge-panel {
  background: rgba(21, 18, 24, 0.88) !important;
}

@media (max-width: 620px) {
  body[data-view="chat"] .chat-bridge-panel {
    padding: max(8px, env(safe-area-inset-top)) 0 0 !important;
  }

  body[data-view="chat"] .chat-bag-sheet {
    height: calc(100dvh - max(8px, env(safe-area-inset-top))) !important;
  }
}

body[data-view="calendar"] .calendar-control-shell.home-shell {
  padding-top: calc(118px + env(safe-area-inset-top)) !important;
}

body[data-view="senses"][data-app-theme="night"] .xhs-panel-card .xhs-browse-row input,
body[data-view="senses"][data-app-theme="night"] .xhs-panel-card input[data-xhs-browse-query] {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1px solid rgba(246, 166, 194, 0.22) !important;
  background: rgba(8, 7, 10, 0.72) !important;
  color: #f7edf3 !important;
  -webkit-text-fill-color: #f7edf3 !important;
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.28) !important;
}

body[data-view="senses"][data-app-theme="night"] .xhs-panel-card .xhs-browse-row input::placeholder,
body[data-view="senses"][data-app-theme="night"] .xhs-panel-card input[data-xhs-browse-query]::placeholder {
  color: rgba(223, 190, 200, 0.42) !important;
  -webkit-text-fill-color: rgba(223, 190, 200, 0.42) !important;
}

/* Chat iOS keyboard rebound: keep the browser backplate painted below the composer. */
html[data-chat-theme="night"],
html[data-chat-theme="night"] body,
html[data-chat-theme="night"] #app,
body[data-view="chat"][data-chat-theme="night"],
body[data-view="chat"][data-chat-theme="night"] #app {
  background-color: #151218 !important;
}

html[data-chat-theme="day"],
html[data-chat-theme="day"] body,
html[data-chat-theme="day"] #app,
body[data-view="chat"][data-chat-theme="day"],
body[data-view="chat"][data-chat-theme="day"] #app {
  background-color: #f8f0f2 !important;
}

body[data-view="chat"],
body[data-view="chat"] #app,
body[data-view="chat"] .chat-shell,
body[data-view="chat"] .chat-shell .app-page,
body[data-view="chat"] .chat-shell .panel.main {
  min-height: var(--app-vvh, 100svh) !important;
}

body[data-view="chat"]::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(132px, calc(92px + env(safe-area-inset-bottom)));
  z-index: 0;
  pointer-events: none;
  background: inherit;
}

body[data-view="chat"] .chat-shell {
  background-color: var(--stitch-bg, #151218) !important;
}

/* Chat composer anchor: prevent iOS focus/keyboard rebound from scrolling the page shell. */
body[data-view="chat"] {
  width: 100% !important;
  height: var(--app-vvh, 100svh) !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body[data-view="chat"] .chat-shell {
  width: min(100vw, 620px) !important;
  max-width: 620px !important;
  height: var(--app-vvh, 100svh) !important;
  min-height: var(--app-vvh, 100svh) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-view="chat"] .chat-shell .app-page,
body[data-view="chat"] .chat-shell .panel.main {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body[data-view="chat"] .chat-shell .panel.main {
  display: flex !important;
  flex-direction: column !important;
}

body[data-view="chat"] .chat-shell .messages {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding-bottom: 18px !important;
  scroll-padding-bottom: 18px !important;
  -webkit-overflow-scrolling: touch;
}

body[data-view="chat"] .chat-shell .composer {
  flex: 0 0 auto !important;
  margin-bottom: calc(max(10px, env(safe-area-inset-bottom)) + 2px) !important;
}

body[data-view="chat"] .chat-shell .quote-preview,
body[data-view="chat"] .chat-shell .attachment-preview {
  grid-column: 1 / -1 !important;
  margin-bottom: 0 !important;
}

body[data-view="chat"] .chat-shell .quote-preview {
  grid-row: 1 !important;
}

body[data-view="chat"] .chat-shell .attachment-preview {
  grid-row: 1 !important;
}

body[data-view="chat"] .chat-shell .chat-plus {
  grid-column: 1 !important;
  grid-row: 3 !important;
}

body[data-view="chat"] .chat-shell .composer textarea {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

body[data-view="chat"] .chat-shell .icon-send.respond {
  grid-column: 3 !important;
  grid-row: 3 !important;
}

body[data-view="chat"] .chat-shell .composer:has(.quote-preview):has(.attachment-preview) {
  grid-template-rows: auto auto minmax(48px, auto) 48px !important;
}

body[data-view="chat"] .chat-shell .composer:has(.quote-preview):has(.attachment-preview) .attachment-preview {
  grid-row: 2 !important;
}

body[data-view="chat"] .chat-shell .composer:has(.quote-preview):has(.attachment-preview) textarea {
  grid-row: 3 !important;
}

body[data-view="chat"] .chat-shell .composer:has(.quote-preview):has(.attachment-preview) .chat-plus,
body[data-view="chat"] .chat-shell .composer:has(.quote-preview):has(.attachment-preview) .icon-send.respond {
  grid-row: 4 !important;
}
