:root {
  color-scheme: light;
  --bg: #fbf3ed;
  --surface: #fffdfb;
  --primary: #edb2a6;
  --primary-strong: #e78a83;
  --primary-soft: #fce9e4;
  --ink: #5a4742;
  --muted: #8e6d66;
  --line: rgba(153, 105, 94, .16);
  --shadow: 0 18px 50px rgba(126, 83, 72, .13);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "PingFang SC", serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, .9), transparent 28%),
    linear-gradient(145deg, #fbf3ed, #f7dfd8);
}

.preview-layout.formal-entry {
  position: fixed;
  top: var(--formal-viewport-top, 0px);
  right: 0;
  left: 0;
  width: auto;
  height: var(--formal-viewport-height, 100dvh);
  min-height: 0;
  padding: 0;
  display: block;
  gap: 0;
}

.device.formal-device {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-template-rows: auto minmax(0, 1fr);
}

.formal-entry .app-header {
  min-height: 72px;
  padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}

.formal-entry .route-view {
  display: block;
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.preview-chat-shell.formal-chat-shell {
  position: absolute;
  inset: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 10px;
  height: auto;
  min-height: 0;
  padding: 12px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
}

.formal-message-list {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 2px 12px;
}

.formal-entry .preview-composer {
  margin-top: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.formal-entry .preview-composer textarea { overflow-y: auto; }

.desktop-entry {
  position: fixed;
  inset: 0;
  width: auto;
  height: var(--formal-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.desktop-root,
.desktop-screen,
.desktop-app-screen { width: 100%; height: 100%; min-height: 0; }

.formal-identity-screen {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: #65484a;
}

.formal-identity-card {
  display: grid;
  gap: 14px;
  width: min(100%, 360px);
  box-sizing: border-box;
  padding: 26px 22px;
  border: 1px solid rgba(151, 94, 88, .28);
  border-radius: 22px;
  background: rgba(255, 252, 248, .88);
  box-shadow: 0 14px 34px rgba(126, 73, 72, .16);
  text-align: center;
}

.formal-identity-title { margin: 0; font-size: 21px; line-height: 1.35; }
.formal-identity-copy { margin: 0; color: #805f60; font-size: 14px; line-height: 1.7; }
.formal-identity-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.formal-identity-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 16px;
  border: 1px solid rgba(159, 88, 87, .34);
  border-radius: 999px;
  color: #73494b;
  background: rgba(255, 247, 243, .96);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.formal-identity-action:focus-visible { outline: 3px solid rgba(181, 86, 84, .54); outline-offset: 3px; }
.formal-identity-action:disabled { cursor: not-allowed; opacity: .58; }

.device-recovery-card {
  width: min(100%, 560px);
  max-height: min(100%, 720px);
  overflow: auto;
  text-align: left;
}

.device-recovery-card .formal-identity-title,
.device-recovery-card .formal-identity-copy { text-align: center; }

.device-recovery-list { display: grid; gap: 12px; }
.device-recovery-status,
.device-recovery-warning,
.device-recovery-metadata { margin: 0; color: #805f60; font-size: 13px; line-height: 1.55; }
.device-recovery-warning { padding-top: 4px; border-top: 1px solid rgba(153, 105, 94, .16); }
.device-recovery-candidate {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(153, 105, 94, .2);
  border-radius: 16px;
  background: rgba(255, 253, 251, .74);
}
.device-recovery-candidate.is-selected { border-color: rgba(181, 86, 84, .64); background: var(--primary-soft); }
.device-recovery-candidate-title { margin: 0 0 2px; font-size: 16px; line-height: 1.35; }
.device-recovery-select { justify-self: start; margin-top: 5px; }
.device-recovery-actions { justify-content: center; }

@media (prefers-color-scheme: dark) {
  .formal-identity-screen { color: #f5dedb; }
  .formal-identity-card { border-color: rgba(255, 220, 214, .24); background: rgba(54, 40, 45, .9); box-shadow: 0 14px 34px rgba(0, 0, 0, .26); }
  .formal-identity-copy { color: #dfc0bd; }
  .formal-identity-action { border-color: rgba(255, 207, 202, .32); color: #ffe3df; background: rgba(109, 69, 73, .86); }
  .device-recovery-status,
  .device-recovery-warning,
  .device-recovery-metadata { color: #dfc0bd; }
  .device-recovery-candidate { border-color: rgba(255, 220, 214, .24); background: rgba(54, 40, 45, .72); }
  .device-recovery-candidate.is-selected { border-color: rgba(255, 181, 174, .72); background: rgba(109, 69, 73, .86); }
}

@media (max-width: 480px) {
  .device-recovery-screen { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .device-recovery-card { max-height: 100%; padding: 20px 16px; border-radius: 18px; }
  .device-recovery-actions .formal-identity-action { flex: 1 1 130px; }
}

.desktop-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #65484a;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, .16), rgba(255, 247, 242, .48)),
    var(--desktop-wallpaper-light) center / cover;
}

.desktop-screen::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(250, 223, 220, .28));
  pointer-events: none;
}

.desktop-menu-title {
  z-index: 2;
  align-self: center;
  justify-self: stretch;
  margin: 0;
  padding: 0 4px 5px;
  color: #873f43;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "FZKai-Z03", serif;
  font-size: clamp(24px, 6.6vw, 36px);
  font-weight: 700;
  letter-spacing: .32em;
  line-height: 1;
  text-indent: .32em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .84), 0 4px 11px rgba(128, 61, 62, .13);
}

.desktop-menu-title::after {
  display: block;
  width: clamp(64px, 44%, 148px);
  height: 1px;
  margin: 9px auto 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(135, 63, 67, .66), transparent);
}

.desktop-version {
  position: absolute;
  z-index: 2;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  color: rgba(101, 72, 74, .68);
  font-size: 10px;
  letter-spacing: .04em;
  pointer-events: none;
}

.desktop-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: clamp(5px, 1.2vw, 11px);
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: max(44px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.desktop-decoration {
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(100%, 142px);
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.desktop-decoration-apple-pie { width: min(124%, 176px); transform: rotate(-4deg); }
.desktop-decoration-fruit-parfait { width: min(136%, 142px); transform: rotate(4deg); }
.desktop-decoration-tea-cup { width: min(130%, 148px); transform: rotate(-5deg); }
.desktop-decoration-apple-drink { width: min(136%, 156px); transform: rotate(5deg); }

.desktop-app-card {
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: end;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  padding: 5px 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.desktop-app-icon-frame {
  position: relative;
  display: grid;
  align-self: end;
  place-items: center;
  box-sizing: border-box;
  width: min(88%, 116px);
  aspect-ratio: 1;
  padding: clamp(5px, 1.8vw, 10px);
  border: 3px double rgba(151, 94, 88, .48);
  border-radius: 32px 32px 25px 25px;
  background: linear-gradient(145deg, rgba(255, 254, 251, .84), rgba(255, 243, 237, .54));
  box-shadow: 0 7px 16px rgba(126, 73, 72, .12), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.desktop-app-icon-frame::after {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(151, 94, 88, .28);
  border-radius: 26px 26px 20px 20px;
  content: "";
  pointer-events: none;
}

.desktop-app-icon-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(105, 61, 60, .12));
  transition: transform 160ms ease, filter 160ms ease;
}

.desktop-app-card:focus-visible { outline: 3px solid rgba(181, 86, 84, .54); outline-offset: 4px; border-radius: 20px; }
.desktop-app-card:active img { transform: scale(.93); }

.desktop-app-label {
  max-width: 100%;
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid rgba(154, 92, 91, .18);
  border-radius: 999px;
  background: rgba(255, 253, 250, .68);
  box-shadow: 0 5px 12px rgba(105, 61, 60, .08);
  backdrop-filter: blur(8px);
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-app-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
}

.desktop-app-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 251, .92);
}

.desktop-shell-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 251, .84);
  cursor: pointer;
}

.desktop-more-button { justify-self: end; font-weight: 800; letter-spacing: .04em; }
.desktop-app-title { overflow: hidden; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 21px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.desktop-app-root { position: relative; min-height: 0; overflow: hidden; }

.formal-entry .back-button[hidden] { display: block; visibility: hidden; pointer-events: none; }

.formal-communication-shell {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(180deg, rgba(252, 233, 228, .38), transparent 40%);
}

.communication-scroll-content {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
}
.communication-bottom-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.communication-heading { display: grid; gap: 4px; }
.communication-title { margin: 0; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 28px; font-weight: 600; }
.communication-copy { margin: 0; color: var(--muted); font-size: 13px; }
.communication-section { display: grid; gap: 10px; }
.communication-section-title { margin: 2px 2px -2px; font-size: 15px; }
.communication-contact-list { display: grid; gap: 10px; }
.communication-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 253, 251, .9);
  box-shadow: 0 8px 24px rgba(126, 83, 72, .06);
  text-align: left;
  cursor: pointer;
}
.communication-contact-copy { display: grid; min-width: 0; gap: 3px; }
.communication-contact-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.communication-contact-copy small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.communication-chevron { color: var(--primary-strong); font-size: 24px; line-height: 1; }
.communication-group-avatar { display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.communication-notice { margin: 0; padding: 10px 12px; border: 1px solid rgba(130, 86, 48, .18); border-radius: 13px; color: #6e4c44; background: #ffe6a8; font-size: 12px; line-height: 1.55; }

button { font: inherit; }

.preview-notice {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  color: #6e4c44;
  background: #ffe6a8;
  border-bottom: 1px solid rgba(130, 86, 48, .18);
  font-size: 13px;
  text-align: center;
}

.preview-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(320px, 430px);
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 7vw, 90px);
  min-height: calc(100vh - 42px);
  padding: 38px 28px;
}

.preview-copy { max-width: 420px; }
.eyebrow { margin: 0 0 8px; color: var(--primary-strong); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: clamp(42px, 6vw, 68px); font-weight: 600; line-height: 1.08; }
.version-line { display: inline-flex; gap: 8px; margin: 14px 0 22px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 251, .7); font-size: 12px; }
.preview-copy > p:last-of-type { color: var(--muted); font-size: 14px; line-height: 1.75; }

.preview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0;
}

.preview-facts div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 251, .72); }
.preview-facts dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.preview-facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 800; }
.registry-list { display: flex; flex-wrap: wrap; gap: 7px; }
.registry-chip { padding: 6px 9px; border-radius: 999px; color: #7b554d; background: var(--primary-soft); font-size: 11px; }

.device {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: min(720px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid rgba(133, 87, 76, .18);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 251, .94);
}

.app-header > div { display: grid; gap: 2px; }
.app-header strong { font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 20px; }
.app-header span { color: var(--muted); font-size: 10px; }
.back-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); cursor: pointer; }
.back-button:disabled { opacity: .35; cursor: default; }
.mock-badge { padding: 5px 7px; border-radius: 999px; color: #8a5a26 !important; background: #ffe6a8; font-weight: 800; letter-spacing: .06em; }

.route-view {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 24px 18px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(252, 233, 228, .38), transparent 40%);
}

.preview-chat-shell {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 390px;
  padding: 4px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 247, .48), rgba(255, 250, 247, .18)),
    url("./assets/chat/paper-wash.webp") center / cover;
}

.preview-chat-day {
  justify-self: center;
  margin: 0 0 2px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 251, .62);
  font-size: 11px;
}

.preview-message-row { display: flex; align-items: flex-end; gap: 8px; margin: 0 2px; }
.preview-message-row.user { justify-content: flex-end; }
.preview-message-row.user.has-reply-version-controls { flex-wrap: wrap; row-gap: 4px; }
.reply-version-controls { display: inline-flex; align-items: center; gap: 4px; margin: 0 2px; color: var(--muted); font-size: 12px; line-height: 1; }
.preview-message-row.user.has-reply-version-controls .reply-version-controls { flex-basis: 100%; justify-content: flex-end; }
.reply-version-controls button { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: inherit; background: rgba(255, 253, 251, .72); font: inherit; font-size: 17px; line-height: 1; }
.reply-version-controls button:disabled { cursor: default; opacity: .45; }
.reply-version-count { min-width: 28px; text-align: center; }
.preview-avatar { width: 33px; height: 33px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg, #f8dce3, #dda7b7); }
.preview-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-bubble {
  max-width: min(78%, 560px);
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 253, 251, .94);
  box-shadow: 0 4px 12px rgba(126, 83, 72, .05);
  font-size: 15px;
  line-height: 1.63;
  overflow-wrap: anywhere;
}
.preview-message-row.user .preview-bubble { border-color: transparent; border-radius: 18px 18px 6px 18px; color: #fff; background: var(--primary-strong); }
.preview-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 8px;
  margin-top: auto;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 251, .82);
  box-shadow: 0 8px 24px rgba(126, 83, 72, .08);
  backdrop-filter: blur(18px);
}
.preview-composer textarea { width: 100%; min-height: 40px; max-height: 110px; resize: none; padding: 10px 12px; border: 0; border-radius: 14px; color: var(--ink); background: rgba(255, 255, 255, .62); font: inherit; font-size: 14px; line-height: 1.4; }
.preview-composer textarea::placeholder { color: var(--muted); opacity: 1; }
.preview-send { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--primary-strong); font-size: 11px; }
.preview-send:disabled { opacity: .72; }

.empty-state,
.route-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 251, .9);
  box-shadow: 0 8px 24px rgba(126, 83, 72, .06);
}

.empty-state h2,
.route-card h2 { margin: 0 0 8px; font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 25px; font-weight: 600; }
.empty-state p,
.route-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.route-proof { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.route-proof li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--primary-soft); font-size: 11px; }
.route-proof strong { color: var(--primary-strong); }
.tool-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tool-link { display: grid; gap: 4px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); text-align: left; cursor: pointer; }
.tool-link span { color: var(--muted); font-size: 10px; }

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  min-height: 72px;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 251, .97);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.bottom-nav button.active { color: #b96a5d; background: var(--primary-soft); }
.bottom-nav img { width: 25px; height: 25px; opacity: .72; }
.bottom-nav button.active img { opacity: 1; }
.tab-label { font-size: 11px; }

@media (max-width: 820px) {
  .preview-notice { align-items: center; flex-direction: column; gap: 2px; }
  .preview-layout { grid-template-columns: minmax(0, 430px); align-items: start; padding: 24px 14px 34px; }
  .preview-copy { padding: 0 8px; }
  .device { min-height: 660px; border-radius: 28px; }
}

@media (max-width: 430px) {
  .preview-notice, .preview-copy { display: none; }
  .preview-layout { display: block; min-height: 100svh; padding: 0; }
  .device { min-height: 100svh; border: 0; border-radius: 0; }
  .app-header { min-height: 62px; padding: max(7px, env(safe-area-inset-top)) 12px 7px; }
  .route-view { padding: 12px; }
  .preview-chat-shell { min-height: 410px; }
}

@media (max-width: 355px) {
  .preview-bubble { max-width: 82%; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #2d252a; --surface: #40343a; --primary-strong: #f1c4d0; --primary-soft: #59434d; --ink: #fff8f6; --muted: #d5c1c5; --line: rgba(255, 246, 245, .14); --shadow: 0 18px 50px rgba(0, 0, 0, .28); }
  body { background: radial-gradient(circle at 4% -8%, rgba(180, 100, 123, .17), transparent 28rem), linear-gradient(145deg, #2d252a, #3c3037); }
  .desktop-screen { color: #fff5f0; background: linear-gradient(180deg, rgba(48, 29, 36, .26), rgba(45, 29, 36, .58)), var(--desktop-wallpaper-dark) center / cover; }
  .desktop-screen::after { background: linear-gradient(180deg, rgba(35, 25, 31, .1), rgba(34, 23, 31, .4)); }
  .desktop-menu-title { color: #ffe4dc; text-shadow: 0 1px 0 rgba(65, 39, 46, .7), 0 4px 11px rgba(0, 0, 0, .22); }
  .desktop-menu-title::after { background: linear-gradient(90deg, transparent, rgba(255, 228, 220, .7), transparent); }
  .desktop-app-icon-frame { border-color: rgba(255, 237, 235, .35); background: linear-gradient(145deg, rgba(84, 59, 68, .86), rgba(59, 42, 49, .55)); box-shadow: 0 7px 16px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 240, 239, .1); }
  .desktop-app-icon-frame::after { border-color: rgba(255, 237, 235, .18); }
  .desktop-app-label { border-color: rgba(255, 237, 235, .2); background: rgba(61, 43, 52, .68); box-shadow: 0 7px 18px rgba(0, 0, 0, .18); }
  .desktop-version { color: rgba(255, 242, 238, .72); }
  .desktop-app-header { background: rgba(64, 52, 58, .96); }
  .desktop-shell-button { background: rgba(45, 37, 42, .7); }
  .app-header, .bottom-nav, .empty-state, .route-card, .communication-contact { background: rgba(64, 52, 58, .96); }
  .preview-chat-shell { background: linear-gradient(180deg, rgba(45, 37, 42, .58), rgba(45, 37, 42, .32)); }
  .preview-chat-day, .preview-bubble, .preview-composer { background: rgba(64, 52, 58, .86); }
  .reply-version-controls button { background: rgba(45, 37, 42, .56); }
  .preview-composer textarea { color: var(--ink); background: rgba(45, 37, 42, .56); }
  .preview-message-row.user .preview-bubble { color: #2d252a; }
}

.phase1-tools-header { display: grid; gap: 10px; margin-bottom: 12px; }
.phase1-tools-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
.phase1-tools-tabs button { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }
.phase1-tools-tabs button.active { color: var(--ink); background: var(--primary-soft); border-color: var(--primary-strong); }
.phase1-domain-panel { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow); }
.phase1-balance { margin: 0; color: var(--primary-strong); font-size: 24px; font-weight: 800; }
.phase1-domain-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.phase1-domain-item, .phase1-domain-empty { padding: 9px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); font-size: 13px; }
.phase1-domain-empty { color: var(--muted); }
.phase1-form { display: grid; gap: 9px; }
.phase1-field { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.phase1-field input, .phase1-field textarea { box-sizing: border-box; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; color: var(--ink); background: color-mix(in srgb, var(--bg) 72%, transparent); font: inherit; }
.phase1-field textarea { min-height: 78px; resize: vertical; }
.phase1-field input[type="checkbox"] { width: auto; justify-self: start; accent-color: var(--primary-strong); }
