:root {
  color-scheme: dark;
  --bg: #0d0d18;
  --panel: #151523;
  --panel-2: #1b1b2d;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(139, 92, 246, 0.28);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.56);
  --faint: rgba(255, 255, 255, 0.36);
  --purple: #8b5cf6;
  --purple-2: #4f46e5;
  --purple-soft: rgba(139, 92, 246, 0.16);
  --indigo-soft: rgba(99, 102, 241, 0.12);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.13);
  --teal: #22d3ee;
  --teal-soft: rgba(34, 211, 238, 0.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #05050b;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.62;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-shell {
  width: min(100vw, 430px);
  height: 100vh;
  min-height: 680px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 90px rgba(0, 0, 0, 0.45);
}

.tab-view {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--bg);
}

.tab-view.is-active {
  display: flex;
  flex-direction: column;
}

.scroll-view {
  overflow: auto;
  padding: 22px 18px 106px;
}

.chat-top {
  min-height: 86px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 24, 0.94);
  backdrop-filter: blur(16px);
  flex: 0 0 auto;
}

.ai-avatar,
.profile-avatar,
.avatar-sm {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #3730a3;
  color: #ddd6fe;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.ai-avatar {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 15px;
}

.top-copy {
  min-width: 0;
  flex: 1;
}

.top-copy h1,
.page-header h1,
.profile-card h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 700;
}

.top-copy p,
.page-header p,
.profile-card p {
  margin: 5px 0 0;
  color: #a78bfa;
  font-size: 13px;
  line-height: 1.35;
}

.ghost-action {
  min-width: 78px;
  min-height: 36px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  padding: 0 12px;
}

.message-list {
  flex: 1;
  overflow: auto;
  padding: 12px 18px 10px;
}

.record-hero {
  flex: 0 0 auto;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(13, 13, 24, 0.18));
}

.record-hero-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.record-hero-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
}

.record-hero-kicker b {
  color: rgba(253, 230, 138, 0.96);
  font-weight: 650;
}

.record-hero-title {
  margin: 10px 0 6px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 760;
}

.record-hero-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.record-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.record-hero-stats span {
  min-width: 0;
  padding: 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.record-hero-stats b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}

.record-hero-hint {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.45;
  font-size: 12px;
}

.record-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.record-hero-actions button {
  min-height: 46px;
  border-radius: 18px;
  color: var(--text);
  font-weight: 680;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}

.record-hero-actions .is-done {
  border-color: rgba(74, 222, 128, 0.36);
  background: rgba(34, 197, 94, 0.15);
}

.record-hero-actions .is-not-done {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.record-hero-actions button.is-current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 26px rgba(0, 0, 0, 0.16);
}

.record-hero-secondary {
  display: flex;
  gap: 9px;
  margin-top: 10px;
}

.record-hero-secondary button {
  flex: 1;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
}

.record-selector-card {
  cursor: default;
}

.record-hero-selector {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.record-overview-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.record-overview-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.record-overview-item span {
  min-width: 0;
}

.record-overview-item b,
.record-overview-item small {
  display: block;
}

.record-overview-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.record-overview-item small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 12px;
}

.record-overview-item em {
  min-width: 48px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.record-overview-item.is-done {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.08);
}

.record-overview-item.is-partial {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.075);
}

.record-overview-item.is-not_done {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(248, 113, 113, 0.07);
}

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

.checkin-chip {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.checkin-chip b {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.checkin-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.checkin-chip.is-done {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(34, 197, 94, 0.13);
}

.checkin-chip.is-done b {
  background: rgba(74, 222, 128, 0.2);
  color: #bbf7d0;
}

.checkin-chip.is-not_done {
  border-color: rgba(251, 191, 36, 0.27);
  background: rgba(251, 191, 36, 0.08);
}

.checkin-chip.is-not_done b {
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
}

.date-divider {
  width: fit-content;
  margin: 2px auto 18px;
  padding: 4px 10px;
  color: var(--faint);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.msg-block {
  margin-bottom: 18px;
}

.msg-block.align-right {
  text-align: right;
}

.ai-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bubble-ai,
.bubble-user {
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 20px;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  font-size: 16px;
}

.bubble-ai {
  display: inline-block;
  background: var(--indigo-soft);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--text);
}

.bubble-user {
  display: inline-block;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.32);
  color: #f5f3ff;
}

.msg-time {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.typing {
  width: 74px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4b5fd;
  opacity: 0.35;
  animation: typing-dot 1.1s infinite ease-in-out;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.quick-replies {
  min-height: 46px;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.quick-replies[hidden] {
  display: none;
}

.record-target-bar {
  display: none;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 0 18px 10px;
  flex: 0 0 auto;
}

.record-target-bar[hidden] {
  display: none;
}

.record-target-bar.is-visible {
  display: flex;
}

.record-target-label {
  min-width: max-content;
  color: var(--faint);
  font-size: 12px;
}

.record-target-chip {
  min-width: max-content;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.66);
  padding: 0 12px;
}

.record-target-chip.is-active {
  color: #fff;
  border-color: rgba(196, 181, 253, 0.72);
  background: rgba(139, 92, 246, 0.24);
}

.record-target-chip.is-detail,
.record-target-chip.is-create {
  border-color: rgba(251, 191, 36, 0.28);
  color: rgba(253, 230, 138, 0.92);
  background: rgba(251, 191, 36, 0.08);
}

.reply-chip {
  min-width: max-content;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.64);
  padding: 0 14px;
}

.input-bar {
  padding: 14px 18px calc(88px + env(safe-area-inset-bottom));
  background: rgba(13, 13, 24, 0.96);
  flex: 0 0 auto;
}

.input-wrap {
  min-height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  padding: 8px 8px 8px 18px;
}

.input-wrap textarea {
  flex: 1;
  min-height: 38px;
  max-height: 112px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text);
  padding: 8px 0;
  line-height: 1.45;
}

.input-wrap textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.send-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #4338ca;
  color: white;
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(74px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: rgba(13, 13, 24, 0.98);
  z-index: 20;
}

.tab-item {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
}

.tab-item span {
  height: 19px;
  font-size: 18px;
  line-height: 1;
}

.tab-item b {
  font-size: 12px;
  font-weight: 500;
}

.tab-item.is-active {
  color: #8b5cf6;
}

.page-header {
  padding: 6px 2px 18px;
}

.page-header h1 {
  font-size: 30px;
}

.page-header p {
  color: var(--muted);
  margin: 0 0 8px;
}

.focus-card,
.mini-card,
.panel-section,
.profile-card,
.status-row article,
.safety-note,
.menu-list button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  border-radius: var(--radius);
}

.focus-card {
  padding: 20px;
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.card-kicker,
.section-head span,
.mini-card span,
.identity-box span,
.status-row span {
  color: var(--muted);
  font-size: 12px;
}

.focus-card h2 {
  margin: 10px 0 6px;
  font-size: 26px;
  line-height: 1.18;
}

.focus-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.tiny-action {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.tiny-action span,
.tiny-action strong {
  display: block;
}

.tiny-action span {
  color: rgba(167, 243, 208, 0.82);
  font-size: 12px;
  margin-bottom: 5px;
}

.tiny-action strong {
  font-size: 16px;
  line-height: 1.45;
}

.two-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.mini-card {
  min-height: 98px;
  padding: 14px;
}

.mini-card strong {
  display: block;
  margin-top: 9px;
  line-height: 1.45;
  font-size: 15px;
}

.panel-section {
  margin-top: 18px;
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.25;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 150px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-list,
.report-list,
.skill-grid,
.contract-list,
.menu-list {
  display: grid;
  gap: 12px;
}

.insight-item,
.report-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.report-section {
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(52, 211, 153, 0.055);
}

.insight-item strong,
.report-item b {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.insight-item p,
.report-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.behavior-section {
  border-color: rgba(34, 211, 238, 0.16);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.055), rgba(139, 92, 246, 0.045));
}

.behavior-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.insight-card {
  width: 100%;
  min-height: 156px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.075), rgba(139, 92, 246, 0.055)),
    rgba(7, 7, 17, 0.5);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.insight-card:active {
  transform: translateY(1px);
}

.insight-card-eyebrow {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.2;
}

.insight-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.28;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.insight-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.insight-card-bottom em {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.insight-thumb {
  min-width: 0;
  flex: 1;
}

.insight-dot-row {
  display: grid;
  grid-template-columns: repeat(14, minmax(5px, 1fr));
  gap: 4px;
  align-items: end;
}

.insight-dot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 10px;
}

.insight-dot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.insight-dot-legend span::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  content: "";
}

.insight-dot-legend .is-done::before {
  background: #34d399;
}

.insight-dot-legend .is-partial::before {
  background: #fbbf24;
}

.insight-dot-legend .is-not_done::before {
  background: rgba(251, 113, 133, 0.72);
}

.insight-dot-legend .is-empty::before {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.insight-dot {
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.16);
}

.insight-dot.is-done {
  background: linear-gradient(180deg, #86efac, #34d399);
}

.insight-dot.is-partial {
  height: 12px;
  background: linear-gradient(180deg, #fde68a, #fbbf24);
}

.insight-dot.is-not_done {
  height: 8px;
  background: rgba(251, 113, 133, 0.5);
}

.insight-dot.is-empty {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.insight-mini-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.insight-mini-metrics span {
  min-height: 58px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--faint);
  font-size: 11px;
}

.insight-mini-metrics b {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

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

.insight-day-cell {
  min-width: 0;
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.insight-day-cell small,
.insight-day-cell b {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-day-cell small {
  color: var(--faint);
  font-size: 9px;
}

.insight-day-cell i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.insight-day-cell b {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.insight-day-cell.is-done {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.08);
}

.insight-day-cell.is-done i {
  background: #34d399;
}

.insight-day-cell.is-partial {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.07);
}

.insight-day-cell.is-partial i {
  background: #fbbf24;
}

.insight-day-cell.is-not_done {
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.055);
}

.insight-day-cell.is-not_done i {
  background: rgba(251, 113, 133, 0.72);
}

.insight-day-cell.is-empty i {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.detail-lead,
.detail-empty {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.detail-row {
  padding: 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.detail-row span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  margin-bottom: 5px;
}

.detail-row b {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.detail-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.recording-proposal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.recording-proposal-signals {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 2px solid rgba(251, 191, 36, 0.48);
  border-radius: 0 10px 10px 0;
  background: rgba(251, 191, 36, 0.07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.recording-proposal-actions button {
  min-height: 34px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.15);
  color: #ede9fe;
  font-size: 12px;
}

.recording-proposal-actions button[data-recording-cancel] {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.recording-proposal-state {
  margin-top: 7px;
  color: var(--faint);
  font-size: 11px;
}

.evidence-thumb,
.slot-thumb,
.friction-thumb,
.condition-thumb {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-height: 28px;
}

.evidence-thumb i,
.slot-thumb i,
.friction-thumb i,
.condition-thumb i {
  display: block;
  width: 34px;
  border-radius: 12px 12px 8px 8px;
  background: rgba(255, 255, 255, 0.11);
}

.evidence-thumb i:nth-child(1) {
  height: 16px;
  background: rgba(251, 191, 36, 0.48);
}

.evidence-thumb i:nth-child(2) {
  height: 24px;
  background: rgba(52, 211, 153, 0.54);
}

.evidence-thumb i:nth-child(3) {
  height: 20px;
  background: rgba(34, 211, 238, 0.5);
}

.slot-thumb i {
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.slot-thumb i.is-done {
  background: #34d399;
}

.slot-thumb i.is-partial {
  background: #fbbf24;
}

.slot-thumb i.is-not_done {
  background: rgba(251, 113, 133, 0.55);
}

.friction-thumb i:nth-child(1) {
  height: 12px;
  background: rgba(251, 113, 133, 0.5);
}

.friction-thumb i:nth-child(2) {
  height: 25px;
  background: rgba(139, 92, 246, 0.5);
}

.friction-thumb i:nth-child(3) {
  height: 16px;
  background: rgba(251, 191, 36, 0.4);
}

.condition-thumb i:nth-child(1) {
  height: 14px;
  background: rgba(34, 211, 238, 0.42);
}

.condition-thumb i:nth-child(2) {
  height: 26px;
  background: rgba(52, 211, 153, 0.52);
}

.condition-thumb i:nth-child(3) {
  height: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.dash-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(7, 7, 17, 0.48);
  overflow: hidden;
}

.dash-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-card header span {
  display: block;
  color: var(--faint);
  font-size: 11px;
}

.dash-card h3 {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.25;
}

.dash-expand {
  min-width: 46px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.metric-mini {
  min-height: 64px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.metric-mini span,
.metric-mini b {
  display: block;
}

.metric-mini span {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.3;
}

.metric-mini b {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1;
}

.metric-mini.is-green {
  border-color: rgba(52, 211, 153, 0.22);
  background: var(--green-soft);
}

.metric-mini.is-purple {
  border-color: rgba(139, 92, 246, 0.28);
  background: var(--purple-soft);
}

.metric-mini.is-amber {
  border-color: rgba(251, 191, 36, 0.25);
  background: var(--amber-soft);
}

.dash-note {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 12px;
  line-height: 1.55;
}

.river-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px 7px;
}

.river-day {
  min-width: 0;
  min-height: 44px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--faint);
  padding: 0;
}

.river-day span {
  font-size: 10px;
  line-height: 1;
}

.river-stone {
  width: 15px;
  height: 12px;
  display: block;
  border-radius: 56% 44% 50% 48%;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.river-stone.is-medium {
  width: 19px;
  height: 15px;
}

.river-stone.is-large {
  width: 24px;
  height: 18px;
}

.river-stone.is-happened,
.river-legend i.is-happened {
  background: linear-gradient(135deg, #34d399, #22d3ee);
}

.river-stone.is-friction,
.river-legend i.is-friction {
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
}

.river-stone.is-mixed,
.river-legend i.is-mixed {
  background: linear-gradient(135deg, #34d399 0 46%, #8b5cf6 54% 100%);
}

.river-stone.is-miss,
.river-legend i.is-miss {
  background: rgba(255, 255, 255, 0.18);
}

.river-stone.is-empty {
  background: rgba(255, 255, 255, 0.08);
}

.river-stone.is-today {
  outline: 2px solid rgba(251, 191, 36, 0.72);
  outline-offset: 3px;
}

.river-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 11px;
}

.river-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.river-legend i {
  width: 10px;
  height: 8px;
  border-radius: 50%;
}

.bar-list,
.friction-list,
.chain-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 46px 1fr 38px;
  align-items: center;
  gap: 9px;
}

.bar-label,
.bar-row b {
  color: var(--faint);
  font-size: 11px;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-track i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #34d399);
}

.friction-item {
  padding: 11px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.09);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.friction-item span {
  color: #ddd6fe;
  font-size: 13px;
  font-weight: 650;
}

.friction-item b {
  float: right;
  color: #c4b5fd;
  font-size: 13px;
}

.friction-item p {
  clear: both;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chain-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
}

.chain-row i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: #a5f3fc;
  font-style: normal;
  font-size: 12px;
}

.chain-row span,
.chain-row b {
  display: block;
}

.chain-row span {
  color: var(--faint);
  font-size: 11px;
}

.chain-row b {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.42;
}

.radar-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.radar-svg {
  width: min(100%, 210px);
  height: auto;
}

.radar-grid {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.radar-grid.faint {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.08);
}

.radar-shape {
  fill: rgba(34, 211, 238, 0.22);
  stroke: #22d3ee;
  stroke-width: 2;
}

.radar-svg text {
  fill: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.radar-scores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.radar-scores span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--faint);
  font-size: 10px;
}

.skill-grid {
  grid-template-columns: repeat(3, 1fr);
}

.skill-item {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.skill-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.skill-item b {
  font-size: 13px;
  line-height: 1.25;
}

.skill-item.is-active {
  border-color: rgba(52, 211, 153, 0.3);
  background: var(--green-soft);
}

.skill-item.is-active i {
  background: var(--green);
}

.contract-list {
  margin-top: 12px;
}

.contract-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.contract-item span,
.contract-item b {
  font-size: 12px;
  line-height: 1.35;
}

.contract-item span {
  color: var(--muted);
}

.contract-item b {
  color: #a7f3d0;
  white-space: nowrap;
}

.wide-action {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(139, 92, 246, 0.34);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: #ede9fe;
  font-weight: 650;
  margin-top: 16px;
}

.wide-action.quiet {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-top: 8px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  font-size: 20px;
  font-weight: 700;
}

.status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.status-row article {
  min-height: 76px;
  padding: 12px;
}

.status-row strong {
  display: block;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.25;
}

.identity-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.identity-box strong {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.bot-channel-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.09), rgba(255, 255, 255, 0.025));
}

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

.bot-channel-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.bot-channel-head strong {
  display: block;
  margin-top: 4px;
}

.bot-channel-head i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.72);
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.08);
}

.bot-channel-panel.is-pending .bot-channel-head i {
  background: #fbbf24;
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.1);
}

.bot-channel-panel.is-active .bot-channel-head i {
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.1);
}

.bot-channel-panel.is-blocked .bot-channel-head i {
  background: #fb7185;
  box-shadow: 0 0 0 5px rgba(251, 113, 133, 0.1);
}

.bot-channel-panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.bot-channel-panel .wide-action {
  margin-top: 12px;
}

.reminder-schedule-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.reminder-schedule-head,
.reminder-habit-toggle,
.reminder-master-toggle {
  display: flex;
  align-items: center;
}

.reminder-schedule-head {
  justify-content: space-between;
  gap: 12px;
}

.reminder-schedule-head span,
.reminder-schedule-head strong {
  display: block;
}

.reminder-schedule-head span {
  color: var(--faint);
  font-size: 12px;
}

.reminder-schedule-head strong {
  margin-top: 3px;
}

.reminder-schedule-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.reminder-empty {
  padding: 13px;
  border: 1px dashed var(--line);
  border-radius: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.reminder-schedule-card {
  position: relative;
  width: 100%;
  padding: 13px 38px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.reminder-schedule-card.is-disabled {
  opacity: 0.62;
}

.reminder-schedule-card span,
.reminder-schedule-card b,
.reminder-schedule-card p,
.reminder-schedule-card small {
  display: block;
}

.reminder-schedule-card span,
.reminder-schedule-card small {
  color: var(--faint);
  font-size: 11px;
}

.reminder-schedule-card b {
  margin-top: 3px;
  font-size: 15px;
}

.reminder-schedule-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.reminder-schedule-card i {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--faint);
  font-size: 24px;
  font-style: normal;
  transform: translateY(-50%);
}

.reminder-editor-form {
  gap: 14px;
}

.reminder-master-toggle {
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.reminder-master-toggle input,
.reminder-habit-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.reminder-habit-editor-list {
  display: grid;
  gap: 10px;
}

.reminder-habit-editor {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
}

.reminder-habit-toggle {
  gap: 10px;
}

.reminder-habit-toggle span,
.reminder-habit-toggle b,
.reminder-habit-toggle small {
  display: block;
}

.reminder-habit-toggle small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}

.reminder-habit-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.reminder-habit-fields[hidden] {
  display: none;
}

.reminder-habit-fields fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.reminder-habit-fields legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.reminder-weekdays label {
  position: relative;
}

.reminder-weekdays input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.reminder-weekdays span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

.reminder-weekdays input:checked + span {
  border-color: rgba(139, 92, 246, 0.52);
  background: rgba(139, 92, 246, 0.18);
  color: var(--text);
}

.reminder-confirm-list {
  display: grid;
  gap: 9px;
}

.reminder-confirm-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.reminder-confirm-list b,
.reminder-confirm-list span {
  display: block;
}

.reminder-confirm-list span,
.reminder-confirm-list p,
.reminder-confirm-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.reminder-confirm-list span {
  margin-top: 4px;
}

.reminder-confirm-list p {
  margin: 6px 0 0;
}

.reminder-confirm-note {
  margin: 12px 0 0;
}

.reminder-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.reminder-confirm-actions .wide-action {
  margin: 0;
}

.dev-auth-panel,
.dev-clock-panel,
.db-verify-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px dashed rgba(167, 139, 250, 0.36);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.dev-auth-panel[hidden],
.dev-clock-panel[hidden],
.db-verify-panel[hidden] {
  display: none;
}

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

.dev-auth-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.dev-auth-head strong {
  display: block;
  margin-top: 4px;
}

.dev-auth-head b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
}

.tiny-link {
  border: 0;
  background: transparent;
  color: #c4b5fd;
  font-size: 13px;
  padding: 6px 0;
}

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

.mock-user-buttons button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.mock-user-buttons button.is-active {
  border-color: rgba(196, 181, 253, 0.7);
  background: rgba(139, 92, 246, 0.24);
}

.dev-clock-panel label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.dev-clock-panel input {
  width: 100%;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 16px;
  background: rgba(251, 191, 36, 0.08);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
}

.dev-clock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.dev-clock-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.db-habit-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.db-habit-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
}

.db-habit-item b,
.db-habit-item small {
  display: block;
}

.db-habit-item small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.reminder-form {
  display: grid;
  gap: 9px;
}

.reminder-form label {
  color: var(--muted);
  font-size: 12px;
}

.reminder-form input,
.reminder-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
  padding: 12px 13px;
  resize: vertical;
}

.reminder-form input:focus,
.reminder-form textarea:focus {
  border-color: rgba(139, 92, 246, 0.44);
}

.hint-text {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

.menu-list {
  margin-top: 18px;
}

.menu-list button {
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  text-align: left;
}

.menu-list b {
  color: var(--faint);
  font-size: 24px;
  font-weight: 400;
}

.safety-note {
  margin-top: 18px;
  padding: 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.zoom-modal {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 60;
}

.zoom-modal.is-open {
  display: block;
}

.zoom-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(8px);
}

.zoom-panel {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 16, 30, 0.98);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
}

.zoom-panel h2 {
  margin: 0 44px 14px 0;
  font-size: 20px;
}

.zoom-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 20px;
}

.zoom-body .dash-expand {
  display: none;
}

.zoom-body .dash-card {
  border: 0;
  background: transparent;
  padding: 0;
}

.zoom-body .river-grid {
  gap: 12px 8px;
}

.zoom-body .river-day {
  min-height: 52px;
}

.habit-modal {
  display: grid;
  gap: 14px;
}

.habit-summary {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(7, 7, 17, 0.48);
}

.habit-summary span,
.habit-form label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.habit-summary b {
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}

.habit-summary p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

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

.habit-action-row button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.habit-action-row button.is-done {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(34, 197, 94, 0.12);
}

.habit-action-row button.is-not-done {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.09);
}

.habit-form {
  display: grid;
  gap: 10px;
}

.habit-form [hidden] {
  display: none;
}

.habit-form-hint {
  margin: -2px 2px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.habit-evidence-form {
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 18px;
  background: rgba(251, 191, 36, 0.045);
}

.habit-form input,
.habit-form select,
.habit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
  padding: 11px 12px;
}

.habit-form textarea {
  resize: vertical;
}

.habit-form input:focus,
.habit-form select:focus,
.habit-form textarea:focus {
  border-color: rgba(139, 92, 246, 0.44);
}

/* Sprint review: one compact entry point, with the full evidence kept in its detail modal. */
.sprint-review-entry-list,
.sprint-review-history-list {
  display: grid;
  gap: 10px;
}

.sprint-review-entry,
.sprint-review-history-item {
  position: relative;
  width: 100%;
  padding: 13px 38px 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.sprint-review-entry::after,
.sprint-review-history-item::after {
  position: absolute;
  top: 50%;
  right: 15px;
  color: rgba(255, 255, 255, 0.35);
  content: "›";
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
}

.sprint-review-entry > span,
.sprint-review-history-item > span,
.sprint-review-history-item > small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
}

.sprint-review-entry > b,
.sprint-review-history-item > b {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.35;
}

.sprint-review-entry > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sprint-review-entry > em {
  display: inline-flex;
  margin-top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 11px;
  font-style: normal;
}

.sprint-review-entry > em.is-confirmed {
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

.sprint-review-entry-action {
  display: block;
  margin-top: 9px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 650;
}

.sprint-review-entry-action span {
  margin-left: 3px;
}

.sprint-review-history-item {
  padding-right: 35px;
}

.sprint-review-history-item.is-active {
  border-color: rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.1);
}

.sprint-review-history-item > b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.sprint-review-history-item > small {
  margin-top: 6px;
}

.sprint-review-copy-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.sprint-review-copy-list article {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.sprint-review-copy-list span {
  display: block;
  color: var(--faint);
  font-size: 11px;
}

.sprint-review-copy-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sprint-review-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
}

.sprint-review-actions button,
.sprint-review-empty button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 650;
}

.sprint-review-actions .primary,
.sprint-review-empty .primary {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.2);
  color: #ede9fe;
}

.sprint-review-evidence {
  padding-top: 2px;
}

.sprint-review-uncertainty,
.sprint-review-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.06);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.55;
}

.sprint-review-notice {
  margin-top: 14px;
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.07);
  color: #a7f3d0;
}

.sprint-review-empty {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.sprint-review-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Insight: three stable questions, one surface layer. */
.insight-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

#insightView > .focus-card,
#insightView > .two-grid {
  display: none !important;
}

.insight-period {
  margin-bottom: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--faint);
  font-size: 11px;
}

.behavior-section {
  margin-top: 22px;
  border: 0;
  background: transparent;
}

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

.insight-card {
  position: relative;
  min-height: 0;
  gap: 11px;
  padding: 18px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(18, 18, 32, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.1);
}

.insight-card--performance {
  min-height: 184px;
  background: linear-gradient(145deg, rgba(45, 55, 72, 0.48), rgba(18, 18, 32, 0.92));
}

.insight-card--patterns {
  min-height: 180px;
  background: linear-gradient(145deg, rgba(48, 48, 58, 0.64), rgba(18, 18, 32, 0.92));
}

.insight-card--identity {
  min-height: 142px;
  border-color: rgba(251, 191, 36, 0.13);
  background: linear-gradient(145deg, rgba(76, 60, 42, 0.22), rgba(18, 18, 32, 0.94));
}

.insight-card--identity.is-growing {
  border-color: rgba(251, 191, 36, 0.2);
  background: linear-gradient(145deg, rgba(96, 69, 43, 0.32), rgba(18, 18, 32, 0.94));
}

.insight-card--identity.is-grown {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(145deg, rgba(120, 83, 43, 0.38), rgba(24, 22, 32, 0.96));
}

.insight-card--profile {
  align-content: initial;
}

.insight-card-main {
  display: grid;
  width: 100%;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.insight-card-main:active {
  transform: translateY(1px);
}

.profile-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-rewrite-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: rgba(253, 230, 138, 0.96);
  font-size: 12px;
  font-weight: 700;
}

.profile-service-notice {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(251, 191, 36, 0.17);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.075);
  color: rgba(253, 230, 138, 0.88) !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  animation: profile-service-flash 3.2s ease both;
}

.profile-service-panel {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 18px;
  background: rgba(251, 191, 36, 0.05);
}

.profile-service-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-service-panel span {
  color: var(--faint);
  font-size: 12px;
}

.profile-service-panel b {
  color: rgba(253, 230, 138, 0.9);
  font-size: 12px;
}

.profile-service-panel > p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@keyframes profile-service-flash {
  0%, 100% { opacity: 0; }
  12%, 84% { opacity: 1; }
}

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

.insight-card-topline i {
  color: rgba(255, 255, 255, 0.34);
  font-size: 15px;
  font-style: normal;
}

.insight-card-eyebrow {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.insight-card strong {
  max-width: 92%;
  font-size: 20px;
  line-height: 1.28;
}

.insight-card p {
  max-width: 96%;
  line-height: 1.58;
}

.insight-card .insight-card-caption {
  color: rgba(255, 255, 255, 0.47);
  font-size: 11px;
}

.insight-card .insight-card-note {
  color: rgba(216, 205, 190, 0.78);
  font-size: 12px;
}

.insight-card-bottom em {
  min-width: 0;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.64);
  font-weight: 600;
}

.insight-card-bottom em.is-action {
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.09);
  color: rgba(253, 230, 138, 0.9);
}

.insight-pattern-lines {
  display: grid;
  gap: 8px;
}

.insight-pattern-line {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.insight-pattern-line small {
  color: var(--faint);
  font-size: 10px;
}

.insight-pattern-line b {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-pattern-line em {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-style: normal;
}

.insight-pattern-line.is-help {
  border-color: rgba(167, 180, 132, 0.16);
}

.insight-pattern-line.is-block {
  border-color: rgba(196, 154, 146, 0.15);
}

.identity-seed {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 30px;
}

.identity-seed i {
  width: 26px;
  height: 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
}

.identity-seed.is-growing i:nth-child(1),
.identity-seed.is-grown i:nth-child(1) {
  height: 11px;
  background: rgba(251, 191, 36, 0.36);
}

.identity-seed.is-growing i:nth-child(2),
.identity-seed.is-grown i:nth-child(2) {
  height: 18px;
  background: rgba(167, 180, 132, 0.42);
}

.identity-seed.is-grown i:nth-child(3) {
  height: 25px;
  background: rgba(219, 174, 106, 0.55);
}

.insight-status-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 15px;
  background: rgba(251, 191, 36, 0.055);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.insight-status-note button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.insight-card-skeleton {
  min-height: 164px;
  pointer-events: none;
}

.insight-card-skeleton > * {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: insight-shimmer 1.4s ease-in-out infinite;
}

.insight-card-skeleton i { width: 34%; }
.insight-card-skeleton b { width: 72%; height: 22px; }
.insight-card-skeleton span:nth-last-child(2) { width: 94%; }
.insight-card-skeleton span:last-child { width: 62%; }

@keyframes insight-shimmer {
  to { background-position: -200% 0; }
}

.zoom-modal.is-insight-detail .zoom-scrim {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(5px);
}

.zoom-modal.is-insight-detail .zoom-panel {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100% - 38px);
  max-height: none;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 28px 28px 0 0;
  background: rgba(16, 16, 28, 0.995);
  overscroll-behavior: contain;
}

.zoom-modal.is-insight-detail .zoom-panel::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.zoom-modal.is-insight-detail .zoom-panel h2 {
  margin-bottom: 18px;
  font-size: 22px;
}

.insight-range-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.insight-range-switch button,
.insight-habit-filter button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--faint);
}

.insight-range-switch button.is-active,
.insight-habit-filter button.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.insight-detail-summary {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(87, 67, 49, 0.18), rgba(255, 255, 255, 0.035));
}

.insight-detail-summary span {
  display: block;
  color: var(--faint);
  font-size: 11px;
}

.insight-detail-summary strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.35;
}

.insight-detail-summary p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.insight-detail-section {
  margin-top: 22px;
}

.insight-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.insight-detail-heading span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.insight-detail-heading b {
  color: var(--faint);
  font-size: 11px;
}

.insight-habit-grid,
.insight-pattern-detail-list {
  display: grid;
  gap: 10px;
}

.insight-habit-card {
  position: relative;
  width: 100%;
  padding: 14px 38px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.insight-habit-card > span {
  color: var(--faint);
  font-size: 10px;
}

.insight-habit-card > b {
  display: block;
  margin-top: 5px;
  font-size: 15px;
}

.insight-habit-card > p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.insight-habit-card > i {
  position: absolute;
  top: 50%;
  right: 15px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 24px;
  font-style: normal;
  transform: translateY(-50%);
}

.insight-back {
  min-height: 36px;
  margin: -5px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(216, 205, 190, 0.84);
  font-size: 13px;
}

.insight-habit-filter {
  display: flex;
  gap: 7px;
  margin: 0 -2px 15px;
  padding: 0 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.insight-habit-filter::-webkit-scrollbar {
  display: none;
}

.insight-habit-filter button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.insight-pattern-detail {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
}

.insight-pattern-detail.is-helping { border-color: rgba(167, 180, 132, 0.17); }
.insight-pattern-detail.is-blocking { border-color: rgba(196, 154, 146, 0.16); }

.insight-pattern-detail span,
.insight-pattern-detail small {
  display: block;
  color: var(--faint);
  font-size: 10px;
}

.insight-pattern-detail b {
  display: block;
  margin-top: 6px;
  font-size: 14px;
}

.insight-pattern-detail p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (min-width: 700px) {
  body {
    padding: 24px;
  }

  .mobile-shell {
    border-radius: 34px;
  }

  .behavior-dashboard {
    grid-template-columns: 1fr;
  }

  .dash-card.is-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .bubble-ai,
  .bubble-user {
    max-width: 86%;
    font-size: 15px;
  }

  .skill-grid,
  .status-row {
    grid-template-columns: 1fr;
  }

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

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

  .bar-row {
    grid-template-columns: 42px 1fr 32px;
  }
}
