﻿:root {
  --bg: #f6f7f9;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-soft: #fafbfc;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-muted: #f2f4f7;
  --font-display: "KaiTi", "STKaiti", "BiauKai", "Kaiti SC", "Noto Serif CJK SC", serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ink-primary: #111827;
  --ink-secondary: #667085;
  --brand-500: #66758b;
  --brand-600: #515f74;
  --brand-highlight: rgba(102, 117, 139, 0.08);
  --line-soft: rgba(15, 23, 42, 0.055);
  --line-strong: rgba(15, 23, 42, 0.14);
  --line-faint: rgba(15, 23, 42, 0.035);
  --danger: #9d6767;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.05), 0 2px 8px rgba(15, 23, 42, 0.03);
  --shadow-strong: 0 22px 52px rgba(15, 23, 42, 0.11), 0 8px 18px rgba(15, 23, 42, 0.05);
  --record-1: #f0f4f6;
  --record-2: #f0f2ee;
  --record-3: #f5f1eb;
  --record-4: #f2f0f5;
  --record-5: #f4eef0;
  --record-6: #f3f1ed;
  --record-line-1: rgba(108, 123, 136, 0.42);
  --record-line-2: rgba(119, 130, 114, 0.42);
  --record-line-3: rgba(153, 138, 120, 0.4);
  --record-line-4: rgba(128, 123, 145, 0.4);
  --record-line-5: rgba(146, 126, 132, 0.4);
  --record-line-6: rgba(142, 136, 122, 0.4);
  --radius-xl: 22px;
  --radius-lg: 21px;
  --radius-md: 16px;
  --radius-sm: 13px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink-primary);
  font-family: var(--font-display);
  background:
    radial-gradient(circle at top left, rgba(15, 23, 42, 0.025), transparent 34%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

input,
textarea,
button,
.subtitle,
.card-footer,
.history-session-meta,
.history-detail-meta,
.auth-tip,
.filter-row,
.legend,
.remember-row,
.text-btn,
.detail-date,
.history-message-role {
  font-family: var(--font-ui);
}

.title,
.auth-gate-card h1,
.card-text .text,
.summary-text,
.modal-header h2,
.range-title,
.summary-card h3,
.history-session-title,
.history-detail-title,
.detail-text {
  font-family: var(--font-display);
}

.app-shell {
  min-height: 100dvh;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 92px;
}

.app-shell.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.auth-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-gate.hidden {
  display: none;
}

.auth-gate-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.028);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
  padding: 24px;
}

.auth-gate-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 620;
}

.auth-gate-card p {
  margin: 8px 0 14px;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.gate-login-btn {
  width: 100%;
  margin-top: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.03);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .title-wrap {
  display: grid;
  gap: 3px;
}

.title {
  font-size: 26px;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.subtitle {
  color: var(--ink-secondary);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.icon-btn:hover,
.icon-btn:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong);
}

.main {
  flex: 1;
  padding: 14px 12px 18px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: block;
}

#chatTab {
  display: none;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100dvh - 176px);
}

#chatTab.active {
  display: flex;
}

#recordsTab,
#reviewTab {
  min-height: calc(100dvh - 176px);
  overflow-y: auto;
  scroll-padding-top: 10px;
}

#recordsTab {
  scroll-snap-type: y proximity;
}

#reviewTab {
  scroll-snap-type: y proximity;
}

.search-row {
  display: none;
  margin-bottom: 10px;
}

.search-row.active {
  display: block;
}

.search-row input,
.chat-input input,
#tagInput,
.custom-range input,
.modal-body textarea {
  width: 100%;
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink-primary);
}

.search-row input {
  padding: 10px 12px;
}

.search-row input:focus,
.chat-input input:focus,
#tagInput:focus,
.custom-range input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: rgba(47, 95, 159, 0.24);
  box-shadow: 0 0 0 3px rgba(47, 95, 159, 0.12);
}

.card-list {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.record-card {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid transparent;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28));
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.record-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  z-index: 20;
}

.record-card::before,
.record-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.56;
}

.record-card::before {
  left: 16px;
  top: 14px;
  width: 56px;
  height: 36px;
  border-top: 1.5px solid var(--record-line);
  border-left: 1.5px solid var(--record-line);
  border-top-left-radius: 18px;
}

.record-card::after {
  right: 16px;
  bottom: 14px;
  width: 70px;
  height: 40px;
  background:
    linear-gradient(var(--record-line), var(--record-line)) right 0 top 0 / 1.5px 24px no-repeat,
    linear-gradient(var(--record-line), var(--record-line)) left 18px bottom 0 / 46px 1.5px no-repeat;
}

.record-card:nth-child(6n + 1) {
  --record-line: var(--record-line-1);
  background: linear-gradient(180deg, rgba(240, 244, 246, 0.98), rgba(255, 255, 255, 0.93));
}

.record-card:nth-child(6n + 2) {
  --record-line: var(--record-line-2);
  background: linear-gradient(180deg, rgba(240, 242, 238, 0.98), rgba(255, 255, 255, 0.93));
}

.record-card:nth-child(6n + 3) {
  --record-line: var(--record-line-3);
  background: linear-gradient(180deg, rgba(245, 241, 235, 0.98), rgba(255, 255, 255, 0.93));
}

.record-card:nth-child(6n + 4) {
  --record-line: var(--record-line-4);
  background: linear-gradient(180deg, rgba(242, 240, 245, 0.98), rgba(255, 255, 255, 0.93));
}

.record-card:nth-child(6n + 5) {
  --record-line: var(--record-line-5);
  background: linear-gradient(180deg, rgba(244, 238, 240, 0.98), rgba(255, 255, 255, 0.93));
}

.record-card:nth-child(6n + 6) {
  --record-line: var(--record-line-6);
  background: linear-gradient(180deg, rgba(243, 241, 237, 0.98), rgba(255, 255, 255, 0.93));
}

.card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
}

.card-text {
  min-width: 0;
  padding-top: 6px;
}

.mood {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.62);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}

.card-text .text {
  margin: 0;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.tag {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: rgba(17, 24, 39, 0.72);
  padding: 5px 10px;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-menu {
  position: relative;
  z-index: 30;
}

.menu-btn {
  width: 32px;
  height: 32px;
  font-size: 17px;
}

.menu {
  position: absolute;
  right: 0;
  top: 34px;
  min-width: 92px;
  border-radius: 12px;
  border: 1px solid var(--line-faint);
  padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-strong);
  display: none;
  z-index: 15;
}

.card-menu.open .menu {
  display: block;
}

.card-menu.open {
  z-index: 40;
}

.record-card.menu-active {
  z-index: 45;
}

.menu-item {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
  color: var(--ink-primary);
  background: transparent;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--surface-muted);
}

.card-footer {
  font-size: 12px;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

.fab {
  position: fixed;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: 92px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  box-shadow: var(--shadow-strong);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  z-index: 35;
}

.fab:hover {
  transform: translateY(-1px);
}

.fab:active {
  transform: scale(0.98);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 32;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--line-faint);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-item {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 14px;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.nav-item.active {
  background: rgba(17, 24, 39, 0.06);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.nav-item:active {
  transform: scale(0.98);
}

.chat-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 2px;
}

.chat-messages {
  flex: 1;
  min-height: 52vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 8px 2px 84px;
  position: relative;
}

.chat-messages::before {
  content: "今天也辛苦了，慢慢说。";
  align-self: center;
  border-radius: 999px;
  border: 1px solid var(--line-faint);
  padding: 6px 11px;
  color: var(--ink-secondary);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.chat-bubble {
  max-width: 78%;
  border-radius: 16px;
  padding: 10px 12px;
  line-height: 1.58;
  font-size: 14px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  animation: bubbleIn 0.16s ease;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.94);
}

.chat-bubble.user {
  align-self: flex-end;
  background: rgba(240, 243, 246, 0.95);
  color: var(--ink-primary);
}

.chat-input {
  position: sticky;
  bottom: 84px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.03);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.chat-input input {
  padding: 10px 11px;
}

.range-card,
.summary-card {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.028);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: var(--shadow-soft);
}

.range-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  scroll-snap-align: start;
}

.range-title,
.summary-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

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

.pill,
.ghost-btn,
.mood-option {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-secondary);
  cursor: pointer;
}

.pill {
  padding: 6px 12px;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  position: relative;
}

.pill.active {
  border-color: rgba(102, 117, 139, 0.08);
  background: rgba(102, 117, 139, 0.08);
  color: var(--ink-primary);
}

.pill.active::after {
  content: none;
}

.pill:active {
  transform: scale(0.98);
}

.custom-range {
  display: none;
  gap: 9px;
}

.custom-range.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.custom-range label {
  display: grid;
  gap: 5px;
  color: var(--ink-secondary);
  font-size: 12px;
}

.custom-range input {
  padding: 9px 10px;
}

.style-card {
  display: grid;
  gap: 8px;
}

.style-hint {
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.style-hint.warning {
  color: var(--danger);
}

.style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-tag {
  padding: 6px 12px;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}

.style-tag.active {
  border-color: rgba(102, 117, 139, 0.08);
  background: rgba(102, 117, 139, 0.08);
  color: var(--ink-primary);
}

.style-tag.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary-btn {
  border: 1px solid rgba(15, 23, 42, 0.045);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-primary);
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease;
  font-weight: 540;
  letter-spacing: 0.02em;
}

.primary-btn:hover {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.primary-btn:active {
  transform: scale(0.98);
}

.ghost-btn {
  padding: 6px 11px;
  transition: transform 0.14s ease;
  letter-spacing: 0.02em;
}

.ghost-btn:active {
  transform: scale(0.98);
}

.ghost-btn.danger {
  border-color: rgba(183, 85, 85, 0.14);
  color: var(--danger);
  background: rgba(183, 85, 85, 0.07);
}

.auth-btn {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  min-width: 72px;
}

.summary-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  scroll-snap-type: y proximity;
}

.summary-card {
  padding: 14px;
  scroll-snap-align: start;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-actions {
  display: flex;
  gap: 8px;
}

.summary-text {
  margin-top: 10px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.chart-row {
  display: grid;
  grid-template-columns: 154px 1fr;
  gap: 14px;
  align-items: center;
}

.pie {
  width: 154px;
  height: 154px;
}

.legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.tag-cloud button {
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-secondary);
  padding: 6px 11px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.tag-cloud button.cloud-item:hover {
  transform: translateY(-1px) scale(1.02) rotate(0deg);
  border-color: rgba(47, 95, 159, 0.12);
}

.filter-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.22);
  z-index: 40;
}

.modal.open {
  display: flex;
}

.modal-content {
  width: min(700px, 100%);
  max-height: 90vh;
  border: 1px solid rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
  box-shadow: var(--shadow-strong);
  display: grid;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.03);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.modal-body {
  padding: 14px;
  overflow: auto;
}

.history-modal-content {
  width: min(860px, 100%);
}

.history-modal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  min-height: min(68vh, 560px);
}

.history-header-tip {
  color: var(--ink-secondary);
  font-size: 12px;
}

.history-sessions {
  border-right: 1px solid var(--line-faint);
  padding-right: 14px;
  overflow: auto;
}

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

.history-session-item {
  border: 1px solid rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.history-session-item.active {
  border-color: rgba(102, 117, 139, 0.08);
  background: rgba(241, 244, 246, 0.92);
  box-shadow: var(--shadow-soft);
}

.history-session-item:hover {
  transform: translateY(-1px);
}

.history-session-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-primary);
}

.history-session-meta,
.history-session-preview,
.history-empty,
.history-loading,
.history-error,
.history-placeholder,
.history-empty-detail {
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.history-session-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-detail {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.history-detail-head {
  display: grid;
  gap: 4px;
}

.history-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.history-detail-meta {
  color: var(--ink-secondary);
  font-size: 12px;
}

.history-message-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 6px;
}

.history-message {
  border: 1px solid rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 12px;
}

.history-message.user {
  background: rgba(241, 244, 246, 0.95);
}

.history-message.ai {
  background: rgba(255, 255, 255, 0.94);
}

.history-message-role {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.history-message-content {
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-modal-content {
  width: min(420px, 100%);
}

.confirm-modal-body {
  display: grid;
  gap: 18px;
}

.confirm-modal-body p {
  margin: 0;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.auth-code-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.pwd-toggle-btn {
  min-width: 44px;
  padding: 9px 8px;
  font-size: 16px;
  line-height: 1;
}

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

@media (max-width: 720px) {
  .history-modal-body {
    grid-template-columns: 1fr;
  }

  .history-sessions {
    border-right: none;
    border-bottom: 1px solid var(--line-faint);
    padding-right: 0;
    padding-bottom: 14px;
    max-height: 220px;
  }

  .history-detail {
    min-height: 240px;
  }
}

.remember-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
  font-size: 13px;
}

.remember-row input {
  width: 16px;
  height: 16px;
}

.auth-switch-row {
  margin-top: 10px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}

.text-btn:active {
  transform: scale(0.98);
}

.auth-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.modal-body textarea {
  min-height: 156px;
  padding: 11px;
}

.field {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--ink-secondary);
  font-size: 13px;
}

.mood-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-option {
  padding: 6px 10px;
}

.mood-option.active {
  border-color: rgba(102, 117, 139, 0.08);
  background: rgba(102, 117, 139, 0.08);
  color: var(--ink-primary);
}

#addCustomMood {
  justify-self: start;
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.image-preview img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.detail {
  display: grid;
  gap: 12px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.detail-date {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-bottom: 5px;
}

.detail-text {
  line-height: 1.6;
}

.detail-tags,
.detail-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-images img {
  width: 118px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .app-shell {
    max-width: 100%;
  }

  .title {
    font-size: 24px;
  }

  .main {
    padding: 10px 10px 14px;
  }

  .chart-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .fab {
    right: 12px;
  }
}
