:root {
  --ink: #202124;
  --muted: #666b70;
  --line: #d9ddd7;
  --surface: #f4f6f1;
  --surface-strong: #ffffff;
  --green: #3f7f68;
  --green-soft: #e2eee8;
  --rose: #b35d6d;
  --rose-soft: #f4e5e8;
  --amber: #b9852a;
  --amber-soft: #f5ead6;
  --blue: #476f9f;
  --blue-soft: #e3ebf5;
  --violet: #7258a8;
  --violet-soft: #ece7f5;
  --shadow: 0 18px 70px rgba(32, 33, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(247, 248, 245, 0.9)),
    repeating-linear-gradient(135deg, #eef2ed 0 1px, transparent 1px 22px);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

.phone-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(860px, calc(100vh - 56px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(32, 33, 36, 0.14);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 26px 22px 14px;
  background: var(--surface);
  border-bottom: 1px solid rgba(32, 33, 36, 0.06);
}

.top-bar h1,
.workspace-panel h2,
.workspace-panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.top-bar h1 {
  font-size: 28px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 98px;
}

.screen.is-active {
  display: block;
}

.screen:target {
  display: block;
}

body:has(#sceneScreen:target) #nowScreen,
body:has(#assessScreen:target) #nowScreen,
body:has(#discoverScreen:target) #nowScreen,
body:has(#mineScreen:target) #nowScreen {
  display: none;
}

.tab-bar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.tab {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  text-decoration: none;
}

.tab.is-active {
  color: var(--ink);
  background: var(--green-soft);
  font-weight: 650;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-strong);
}

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

.card {
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 16px;
}

.card.soft-green {
  background: var(--green-soft);
}

.card.soft-rose {
  background: var(--rose-soft);
}

.card.soft-amber {
  background: var(--amber-soft);
}

.card.soft-blue {
  background: var(--blue-soft);
}

.app-home-hero {
  margin: 0 -14px 14px;
  padding: 18px 18px 40px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(33, 78, 92, 0.76), rgba(63, 127, 104, 0.88)),
    linear-gradient(135deg, #78b9d9, #d7e6b8 58%, #f3dbc8);
}

.home-stack {
  gap: 12px;
}

.top-meta-bar {
  display: grid;
  grid-template-columns: 1.2fr 1.35fr 0.9fr 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 0 0 16px 16px;
  background: #fff;
}

.top-meta-bar div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.top-meta-bar strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-meta-bar span {
  color: var(--muted);
  font-size: 11px;
}

.assistant-core {
  display: grid;
  gap: 12px;
  min-height: 284px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.brand-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.brand-row strong {
  font-size: 24px;
}

.brand-row span {
  color: var(--muted);
  font-size: 12px;
}

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

.thread-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
  text-align: left;
}

.thread-list span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.thread-list small {
  color: var(--muted);
}

.assistant-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: auto;
}

.assistant-input {
  min-height: 68px;
  resize: vertical;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 10px;
  padding: 10px;
  line-height: 1.5;
}

.clean-core-card {
  margin-top: 0;
  padding: 10px;
  border-radius: 14px;
}

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

.core-function {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 72px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.core-function.is-selected {
  border-color: rgba(63, 127, 104, 0.36);
  background: var(--green-soft);
}

.core-function span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.core-function strong {
  font-size: 12px;
}

.core-panel-host {
  display: grid;
}

.core-panel {
  display: grid;
  gap: 12px;
}

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

.date-cell {
  display: grid;
  gap: 3px;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 10px;
  background: #fff;
}

.date-cell.is-selected {
  color: #fff;
  background: var(--green);
}

.date-cell span {
  font-size: 11px;
}

.hour-planner,
.reminder-list,
.dossier-grid,
.settings-list {
  display: grid;
  gap: 8px;
}

.account-auth-grid {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.realtime-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.realtime-action-row .action {
  padding: 8px 12px;
}

.portrait-topic-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.likert-scale-note {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

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

.likert-keyword {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.likert-keyword h3,
.likert-item p {
  margin: 0;
}

.likert-item {
  display: grid;
  gap: 10px;
}

.likert-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 1fr));
  gap: 6px;
}

.likert-options label {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.likert-options label.is-selected {
  border-color: var(--green);
  background: rgba(71, 139, 112, 0.12);
}

.likert-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hour-planner div,
.reminder-list div,
.dossier-grid div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.hour-planner span,
.reminder-list span,
.reminder-list small,
.dossier-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.memoir-input {
  min-height: 74px;
}

.reminder-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.barnum-card {
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: var(--green-soft);
  padding: 14px;
}

.barnum-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.signal-row,
.scene-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-row span {
  border-radius: 999px;
  background: #fff;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.portrait-theme-list section,
.discover-post {
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.scene-chip-grid .chip {
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.scene-chip-grid .chip span {
  color: var(--muted);
  font-size: 11px;
}

.discover-hero,
.mine-header-card {
  border-radius: 0 0 16px 16px;
  background: #fff;
  padding: 18px;
}

.discover-hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.discover-hero p,
.discover-post p,
.share-composer p {
  color: var(--muted);
  line-height: 1.6;
}

.mine-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(32, 33, 36, 0.08);
}

.mine-header-card div {
  display: grid;
  gap: 4px;
}

.mine-header-card strong {
  font-size: 22px;
}

.mine-header-card span {
  color: var(--muted);
  font-size: 12px;
}

.dossier-main-card {
  border-color: rgba(63, 127, 104, 0.2);
}

.privacy-vault-card {
  border-color: rgba(179, 93, 109, 0.22);
  background: var(--rose-soft);
}

.settings-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
}

.settings-list span {
  color: var(--muted);
  font-size: 12px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px 8px 8px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(32, 33, 36, 0.12);
}

.home-search span {
  color: var(--muted);
  font-size: 15px;
}

.home-search button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  font-weight: 650;
}

.hero-copy {
  margin-top: 12px;
}

.hero-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.45;
}

.rhythm-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: -28px 0 10px;
  position: relative;
  z-index: 2;
}

.rhythm-node {
  min-width: 0;
  min-height: 58px;
  padding: 9px 8px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(32, 33, 36, 0.08);
}

.rhythm-node strong,
.rhythm-node span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rhythm-node strong {
  color: var(--ink);
  font-size: 13px;
}

.rhythm-node span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.rhythm-node.is-current {
  border-color: rgba(54, 122, 94, 0.38);
  background: var(--green-soft);
}

.floating-service-card {
  margin-top: -36px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: 0 12px 34px rgba(32, 33, 36, 0.12);
  overflow: hidden;
}

.core-service-card {
  padding: 14px 12px 16px;
}

.core-service-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 10px;
}

.core-service-head strong {
  color: var(--ink);
  font-size: 18px;
}

.core-service-head span {
  color: var(--muted);
  font-size: 12px;
}

.core-utility-grid {
  padding: 8px 0 4px;
}

.service-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f1f3ef;
}

.service-tabs button {
  min-height: 48px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 650;
}

.service-tabs button.is-active {
  color: var(--green);
  background: #fff;
}

.service-body {
  padding: 16px;
}

.route-like-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid rgba(32, 33, 36, 0.08);
}

.route-like-row strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.route-like-row span {
  color: var(--muted);
  font-size: 12px;
}

.swap-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 800;
}

.primary-wide {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--green);
  font-size: 17px;
  font-weight: 700;
}

.shortcut-strip {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.context-chips span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #2f5e4a;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 650;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 8px;
  padding: 12px 8px 14px;
}

.utility {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 8px 4px;
}

.utility.is-selected {
  border-color: rgba(63, 127, 104, 0.36);
  background: var(--green-soft);
  font-weight: 650;
}

.utility-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: var(--blue);
  font-size: 20px;
  font-weight: 700;
}

.utility:nth-child(2) .utility-icon,
.utility:nth-child(7) .utility-icon {
  background: var(--green);
}

.utility:nth-child(3) .utility-icon,
.utility:nth-child(8) .utility-icon {
  background: var(--amber);
}

.utility:nth-child(4) .utility-icon,
.utility:nth-child(9) .utility-icon {
  background: var(--violet);
}

.utility:nth-child(5) .utility-icon,
.utility:nth-child(10) .utility-icon {
  background: var(--rose);
}

.utility span:last-child {
  max-width: 64px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.notice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
}

.module-detail-card {
  display: grid;
  gap: 12px;
}

.module-detail-card h2,
.scene-workbench-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.module-detail-card p,
.scene-workbench-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.module-columns > div {
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.module-columns strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

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

.module-row {
  display: grid;
  grid-template-columns: 34px 72px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
}

.module-row.is-selected {
  border-color: rgba(63, 127, 104, 0.36);
  background: var(--green-soft);
}

.module-row-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(63, 127, 104, 0.12);
}

.module-row strong {
  font-size: 14px;
}

.module-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.scene-workbench-card {
  display: grid;
  gap: 12px;
  border-color: rgba(185, 133, 42, 0.24);
  background: var(--amber-soft);
}

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

.decision-flow span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  line-height: 1.25;
}

.notice-badge {
  color: var(--rose);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
}

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

.home-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 2px 8px;
}

.home-section-label h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.home-section-label span {
  color: var(--muted);
  font-size: 12px;
}

.feed-card {
  min-height: 138px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.feed-visual {
  height: 74px;
  background:
    linear-gradient(135deg, rgba(63, 127, 104, 0.18), rgba(181, 93, 109, 0.14)),
    linear-gradient(45deg, #f4f6f1, #fff);
}

.feed-card h3 {
  margin: 10px 10px 4px;
  font-size: 14px;
}

.feed-card p {
  margin: 0 10px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-hero {
  margin: 0 -14px 14px;
  padding: 26px 18px 24px;
  color: #fff;
  background: linear-gradient(135deg, #3f7f68, #476f9f);
}

.compact-hero.assess {
  background: linear-gradient(135deg, #b35d6d, #7258a8);
}

.compact-hero.mine {
  background: linear-gradient(135deg, #476f9f, #3f7f68);
}

.compact-hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}

.compact-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.compact-hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

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

.scene-tile {
  min-height: 126px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.scene-tile span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--green-soft);
  margin-bottom: 10px;
}

.scene-tile h3,
.service-detail-card h3,
.assessment-list strong,
.profile-summary strong {
  margin: 0;
  letter-spacing: 0;
}

.scene-tile h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.scene-tile p,
.service-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.service-detail-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

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

.assessment-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 72px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.assessment-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.assessment-list button {
  grid-row: span 2;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: var(--rose);
}

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

.profile-summary div {
  min-height: 86px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.profile-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.profile-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  letter-spacing: 0;
}

.card h2 {
  font-size: 22px;
  line-height: 1.2;
}

.card h3 {
  font-size: 17px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

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

.chip,
.pill,
.action {
  min-height: 42px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
}

.chip {
  padding: 8px 12px;
  text-align: left;
}

.chip.is-selected,
.pill.is-selected {
  border-color: rgba(63, 127, 104, 0.45);
  background: var(--green-soft);
  font-weight: 650;
}

.pill {
  padding: 9px 12px;
  text-align: center;
  font-size: 13px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action {
  padding: 10px 14px;
  color: #fff;
  border-color: transparent;
  background: var(--green);
}

.action.secondary {
  color: var(--ink);
  border-color: rgba(32, 33, 36, 0.12);
  background: var(--surface-strong);
}

.action.rose {
  background: var(--rose);
}

.action.amber {
  background: var(--amber);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

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

.metric span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
}

.memory-item {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 8px;
  background: var(--surface-strong);
}

.memory-item strong {
  font-size: 14px;
}

.memory-item span {
  color: var(--muted);
  font-size: 12px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid rgba(32, 33, 36, 0.08);
}

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

.toggle {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #d7d9d2;
  padding: 3px;
}

.toggle::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s ease;
}

.toggle.is-on {
  background: var(--green);
}

.toggle.is-on::before {
  transform: translateX(20px);
}

.workspace-panel {
  display: grid;
  gap: 14px;
}

.panel-block {
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.panel-block h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.panel-block h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.panel-block p,
.panel-block li {
  color: var(--muted);
  line-height: 1.65;
}

.panel-block ul {
  margin: 0;
  padding-left: 18px;
}

.panel-block.compact {
  font-size: 12px;
}

.memory-ingest-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.memory-input {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.memory-input:focus {
  outline: 2px solid rgba(48, 105, 92, 0.18);
  border-color: rgba(48, 105, 92, 0.42);
}

.text-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
}

.text-input:focus {
  outline: 2px solid rgba(48, 105, 92, 0.18);
  border-color: rgba(48, 105, 92, 0.42);
}

.feedback-row {
  margin-top: 12px;
}

.memory-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(32, 33, 36, 0.08);
}

.candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.action.danger {
  color: #8b2f3d;
  border-color: rgba(139, 47, 61, 0.24);
  background: rgba(244, 229, 232, 0.8);
}

.scene-validation-card {
  border-color: rgba(71, 111, 159, 0.22);
}

.validation-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.validation-grid div,
.validation-block {
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  padding: 10px;
}

.validation-grid strong,
.validation-grid span,
.validation-block strong {
  display: block;
}

.validation-grid span,
.validation-block p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
  word-break: break-word;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .top-meta-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .core-function-grid {
    grid-template-columns: repeat(5, minmax(54px, 1fr));
    overflow-x: auto;
  }

  .assistant-input-row,
  .reminder-compose {
    grid-template-columns: 1fr;
  }

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

  .decision-flow {
    grid-template-columns: 1fr;
  }

  .module-row {
    grid-template-columns: 34px 64px 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .workspace-panel {
    display: none;
  }
}
