.daily-card,
.class-pulse,
.weekly-summary {
  margin-bottom: 13px;
  padding: 17px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--sh-card);
}

.home-daily {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.home-daily .daily-kicker {
  letter-spacing: .02em;
}

.home-daily h2 {
  font-size: 15.5px;
}

.home-daily p {
  margin-top: 2px;
  font-size: 11.5px;
}

.daily-go {
  flex: 0 0 auto;
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.home-daily:active {
  transform: scale(.99);
  background: var(--row-hover);
}

.daily-top,
.pulse-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.daily-kicker,
.pulse-kicker {
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 850;
}

.daily-card h2,
.class-pulse h2,
.weekly-summary h2 {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.4;
}

.daily-card p,
.class-pulse p,
.weekly-summary p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.weekly-summary {
  position: relative;
}

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.summary-tags span,
.online-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--input);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
}

.summary-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.chat-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.chat-list {
  min-height: 280px;
  margin-bottom: 13px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--sh-card);
  overflow: hidden;
}

.chat-msg {
  padding: 13px 16px;
}

.chat-msg + .chat-msg {
  border-top: 1px solid var(--line);
}

.chat-text {
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg .rev-foot {
  margin-top: 6px;
}

.chat-compose {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r-card);
  background: var(--bar);
  box-shadow: var(--sh-pop);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.chat-compose textarea {
  min-height: 46px;
  max-height: 120px;
  padding: 11px 13px;
  resize: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-ctrl);
  background: var(--input);
  color: var(--ink);
  outline: none;
}

.chat-compose textarea:focus {
  border-color: var(--forum);
  background: var(--surface);
}

.chat-compose button {
  min-width: 72px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: var(--forum);
  color: #fff;
  font-weight: 800;
}

.ai-hero {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ai-mark {
  flex: 0 0 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--grad-plum);
  box-shadow: var(--sh-btn-plum);
  color: #fff;
  font-size: 24px;
}

.ai-clear {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--input);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ai-privacy {
  margin-bottom: 13px;
  padding: 15px 17px;
  border-radius: var(--r-card);
  background: var(--forum-tint);
  color: var(--forum-ink);
  box-shadow: var(--sh-sm);
}

.ai-privacy strong {
  display: block;
  font-size: 14px;
}

.ai-privacy p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.65;
}

.ai-messages {
  min-height: 320px;
  max-height: min(54dvh, 560px);
  padding: 18px 14px;
  overflow-y: auto;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--sh-card);
  scroll-behavior: smooth;
}

.ai-message + .ai-message {
  margin-top: 15px;
}

.ai-message.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ai-label {
  margin: 0 5px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.ai-bubble {
  width: fit-content;
  max-width: min(86%, 470px);
  padding: 11px 14px;
  border-radius: 16px 16px 16px 5px;
  background: var(--input);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-message.user .ai-bubble {
  border-radius: 16px 16px 5px 16px;
  background: var(--grad-plum);
  color: #fff;
}

.ai-thinking {
  width: min(92%, 500px);
  margin-bottom: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--forum-tint);
  color: var(--forum-ink);
}

.ai-thinking summary {
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ai-thinking summary::-webkit-details-marker {
  display: none;
}

.ai-thinking summary::before {
  content: "✦";
  display: inline-block;
  margin-right: 7px;
  color: var(--plum);
}

.ai-thinking-text {
  max-height: 260px;
  padding: 9px 12px 11px;
  overflow: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-message.pending .ai-thinking summary::before {
  animation: skpulse .9s ease-in-out infinite alternate;
}

.ai-message.assistant .ai-bubble[hidden] {
  display: none;
}

.ai-message.pending .ai-bubble {
  color: var(--muted);
  animation: skpulse .9s ease-in-out infinite alternate;
}

.ai-empty {
  min-height: 280px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.ai-empty b {
  color: var(--ink);
  font-size: 17px;
}

.ai-empty span {
  max-width: 390px;
  font-size: 12px;
  line-height: 1.7;
}

.ai-compose {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--r-card);
  background: var(--bar);
  box-shadow: var(--sh-pop);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.ai-compose textarea {
  width: 100%;
  min-height: 48px;
  max-height: 150px;
  padding: 11px 13px;
  resize: vertical;
  border: 1.5px solid transparent;
  border-radius: var(--r-ctrl);
  background: var(--input);
  color: var(--ink);
  line-height: 1.5;
  outline: none;
}

.ai-compose textarea:focus {
  border-color: var(--forum);
  background: var(--surface);
}

.ai-compose button {
  min-width: 72px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: var(--grad-plum);
  color: #fff;
  font-weight: 800;
}

.ai-compose button:disabled {
  opacity: .55;
  cursor: wait;
}

.person-ai-summary {
  margin-bottom: 13px;
  padding: 17px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--sh-card);
}

.summary-kicker {
  color: var(--forum-ink);
  font-size: 11px;
  font-weight: 850;
}

.person-ai-summary h2 {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.4;
}

.person-ai-text {
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.7;
}

.person-ai-note {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.activity-count {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 9px 11px;
  border-radius: var(--r-ctrl);
  background: var(--input);
  color: var(--muted);
  text-align: right;
  font-size: 11px;
}

.activity-count b {
  display: block;
  color: var(--accent-ink);
  font-size: 21px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.daily-actions,
.pulse-actions,
.content-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-actions,
.pulse-actions {
  margin-top: 14px;
}

.soft-btn,
.action-btn {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--input);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  transition: transform .16s var(--ease), background .16s var(--ease), color .16s var(--ease);
}

.soft-btn.primary {
  background: var(--accent);
  color: #fff;
}

.soft-btn:active,
.action-btn:active {
  transform: scale(.95);
}

.action-btn.report {
  color: var(--muted);
}

.content-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.rev-foot .content-actions {
  margin-left: 0;
}

.progress-track {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--input);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.pulse-number {
  flex: 0 0 auto;
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 12px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.word-cloud span {
  color: var(--accent-ink);
  font-size: calc(13px + var(--weight, 0) * 1px);
  font-weight: 800;
}

.sensitive-box {
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--r-ctrl);
  background: var(--input);
  color: var(--muted);
  font-size: 12px;
}

.sensitive-content {
  display: none;
}

.sensitive-box.revealed .sensitive-content {
  display: block;
  margin-top: 10px;
  color: var(--ink);
}

.deep-target {
  animation: targetPulse 1.2s var(--ease) 2;
}

@keyframes targetPulse {
  50% { background: var(--forum-tint); }
}

.growth-dialog {
  width: min(92vw, 470px);
  max-height: min(88dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-pop);
}

.growth-dialog::backdrop {
  background: rgba(35, 18, 27, .58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.dialog-head h2 {
  flex: 1;
  font-size: 17px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--input);
  font-size: 20px;
}

.dialog-body {
  padding: 16px;
}

.share-preview {
  display: block;
  width: min(100%, 320px);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  object-fit: cover;
  border-radius: var(--r-ctrl);
  background: var(--input);
}

.share-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.share-option[hidden] {
  display: none;
}

.share-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.share-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.dialog-actions {
  margin-top: 15px;
  flex-wrap: wrap;
}

.dialog-actions .soft-btn {
  flex: 1 1 120px;
}

.report-reasons {
  display: grid;
  gap: 8px;
}

.report-reasons button {
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: var(--input);
  color: var(--ink);
  text-align: left;
  font-weight: 750;
}

.report-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-item {
  padding: 15px 17px;
}

.report-item .report-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.report-item .report-preview {
  margin-top: 7px;
  line-height: 1.6;
  word-break: break-word;
}

.report-item .report-reason-line {
  margin-top: 7px;
  color: var(--danger);
  font-size: 12px;
}

.report-item .dialog-actions {
  justify-content: flex-end;
}

@media (max-width: 420px) {
  .daily-top,
  .pulse-top { align-items: stretch; }
  .activity-count { min-width: 74px; }
  .content-actions { gap: 5px; }
  .action-btn { padding: 0 10px; }
  .ai-hero { align-items: flex-start; }
  .ai-messages { min-height: 300px; max-height: 48dvh; padding: 14px 10px; }
  .ai-bubble { max-width: 91%; }
  .ai-compose { grid-template-columns: minmax(0, 1fr) 68px; }
  .ai-compose button { min-width: 0; }
  .ai-clear { padding: 0 9px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .deep-target { animation: none; background: var(--forum-tint); }
}
