

:root {
  color-scheme: light;
  --ink: #1d2430;
  --muted: #6d7280;
  --line: rgba(37, 43, 55, 0.12);
  --paper: #f4f6f4;
  --panel: rgba(255, 255, 255, 0.88);
  --accent: #0d5d85;
  --warm: #c7582b;
  --shadow: 0 28px 80px rgba(26, 34, 44, 0.14);
  --soft-shadow: 0 14px 36px rgba(26, 34, 44, 0.08);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(29, 36, 48, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 36, 48, 0.028) 1px, transparent 1px),
    linear-gradient(128deg, #f8faf8 0%, #edf4f1 34%, #f5f1e8 67%, #eef2f7 100%);
  background-size: 48px 48px, 48px 48px, cover;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(112deg, transparent 0 21%, rgba(13, 93, 133, 0.08) 21.2% 21.6%, transparent 21.8% 100%),
    linear-gradient(112deg, transparent 0 45%, rgba(199, 88, 43, 0.07) 45.1% 45.45%, transparent 45.65% 100%),
    linear-gradient(112deg, transparent 0 73%, rgba(29, 36, 48, 0.055) 73.1% 73.35%, transparent 73.55% 100%),
    repeating-linear-gradient(112deg, rgba(29, 36, 48, 0.025) 0 1px, transparent 1px 18px);
  opacity: 0.74;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(244, 246, 244, 0.12)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 30%, rgba(255, 255, 255, 0.24)),
    linear-gradient(145deg, rgba(13, 93, 133, 0.06), transparent 38%, rgba(199, 88, 43, 0.055));
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  min-height: clamp(390px, 44vw, 540px);
  display: grid;
  align-items: center;
  padding: clamp(34px, 5vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top-color: rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(104deg, rgba(255, 255, 255, 0.96) 0 56%, rgba(255, 255, 255, 0.68) 56% 100%),
    linear-gradient(132deg, rgba(13, 93, 133, 0.12), transparent 34%, rgba(199, 88, 43, 0.1));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "Dream";
  position: absolute;
  right: clamp(22px, 5vw, 72px);
  bottom: clamp(18px, 4vw, 52px);
  color: rgba(13, 93, 133, 0.055);
  font-size: clamp(80px, 14vw, 190px);
  font-weight: 900;
  line-height: 0.8;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto clamp(28px, 5vw, 72px) clamp(24px, 4vw, 52px) auto;
  width: min(36vw, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 93, 133, 0.42), rgba(199, 88, 43, 0.36));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.subtitle {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.manifesto-label {
  display: inline-flex;
  margin-top: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(199, 88, 43, 0.22);
  border-radius: 999px;
  background: rgba(255, 246, 239, 0.72);
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
}

.manifesto {
  max-width: 700px;
  margin-top: 12px;
  padding-left: 18px;
  border-left: 3px solid rgba(199, 88, 43, 0.48);
  color: #2f3947;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.82;
  font-weight: 650;
}

.user-bar {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  padding: 9px 10px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.user-bar button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #1d2430;
  color: #fff;
  font-weight: 760;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-top: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(29, 36, 48, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 36, 48, 0.022) 1px, transparent 1px),
    linear-gradient(112deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
    linear-gradient(135deg, rgba(13, 93, 133, 0.09), transparent 48%, rgba(199, 88, 43, 0.08));
  background-size: 34px 34px, 34px 34px, cover, cover;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.auth-panel::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), #0d7c66, #d6b100, var(--warm));
  opacity: 0.42;
}

.auth-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 12px;
}

.auth-copy h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.auth-copy p:last-child {
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-top-color: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
    linear-gradient(135deg, rgba(13, 93, 133, 0.08), transparent 54%, rgba(199, 88, 43, 0.08));
  box-shadow: 0 18px 44px rgba(26, 34, 44, 0.12);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(29, 36, 48, 0.06);
}

.auth-tab {
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 760;
}

.auth-tab.active {
  background: linear-gradient(135deg, #1d2430, var(--accent));
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 93, 133, 0.18);
}

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

.auth-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.auth-form input {
  border-color: rgba(37, 43, 55, 0.12);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(13, 93, 133, 0.56);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 93, 133, 0.1);
}

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

.auth-grid > div {
  display: grid;
  gap: 9px;
}

.auth-form button {
  min-height: 44px;
  margin-top: 4px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1d2430, var(--accent));
  color: #fff;
  font-weight: 780;
  box-shadow: 0 12px 26px rgba(13, 93, 133, 0.2);
}

.auth-form button:hover {
  filter: brightness(1.04);
}

.sync-status {
  display: none;
}

.sync-status[data-tone="online"] {
  background: rgba(13, 124, 102, 0.12);
  color: #0d6a58;
}

.sync-status[data-tone="busy"] {
  background: rgba(13, 93, 133, 0.12);
  color: var(--accent);
}

.sync-status[data-tone="error"] {
  background: rgba(199, 88, 43, 0.12);
  color: #9d3e19;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(37, 43, 55, 0.08);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.summary div {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.summary span {
  font-size: 34px;
  line-height: 1;
  font-weight: 850;
}

.summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.tab {
  min-height: 42px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-weight: 760;
}

.tab.active {
  background: linear-gradient(135deg, #1d2430, #0d5d85);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 93, 133, 0.2);
}

.add-form,
.category-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
}

.add-form {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px) auto;
}

.category-form {
  grid-template-columns: minmax(0, 1fr) 48px auto;
}

input,
select {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(37, 43, 55, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 12px;
  border-radius: 6px;
}

input[type="color"] {
  padding: 4px;
}

button[type="submit"],
.ghost {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 760;
  white-space: nowrap;
}

.category-form button {
  background: var(--warm);
}

.board {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.sidebar,
.list-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 8px;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 14px;
}

.filter {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: left;
  font-weight: 700;
}

.filter.active {
  background: linear-gradient(135deg, #1d2430, #0d5d85);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 93, 133, 0.2);
}

.category-filters {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.category-filter {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.count {
  color: var(--muted);
  font-size: 13px;
}

.list-panel {
  min-height: 520px;
}

.view[hidden],
[hidden] {
  display: none !important;
}

.panel-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 22px;
}

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

.ghost {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-lite {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1d2430, #0d5d85);
  color: #fff;
  font-weight: 760;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(13, 93, 133, 0.18);
}

.dream-list {
  display: grid;
  gap: 10px;
  padding: 20px 22px 24px;
}

.category-section {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 8px 18px;
  align-items: start;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(37, 43, 55, 0.08);
}

.category-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.category-section-head {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  align-items: start;
  padding: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.category-section-head .dream-category {
  justify-self: start;
  font-size: 15px;
  padding: 7px 12px;
}

.category-dreams {
  display: grid;
  gap: 10px;
}

.status-group {
  grid-column: 2;
  display: grid;
  gap: 8px;
}

.status-group:empty {
  display: none;
}

.status-group-head {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-group-head span {
  color: var(--ink);
}

.status-group-head small {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(29, 36, 48, 0.08);
  color: var(--muted);
}

.dream-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(37, 43, 55, 0.12);
  border-left: 4px solid rgba(13, 93, 133, 0.34);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(49, 39, 29, 0.06);
}

.personal-dream-item {
  padding-top: 13px;
}

.check-wrap {
  position: relative;
  width: 30px;
  height: 30px;
  margin-top: 1px;
}

.dream-check {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.custom-check {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid #8d91a0;
  background: #fff;
}

.dream-check:checked + .custom-check::after {
  content: "";
  display: block;
  width: 16px;
  height: 9px;
  margin: 6px 0 0 5px;
  border-left: 4px solid #ff1c18;
  border-bottom: 4px solid #ff1c18;
  transform: rotate(-45deg);
}

.dream-main {
  display: grid;
  gap: 8px;
}

.dream-main > .media-item {
  width: max-content !important;
  justify-self: start !important;
  display: inline-block !important;
}

.dream-title {
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 17px;
  line-height: 1.45;
  background: transparent;
}

.dream-item.done .dream-title {
  color: #777;
  text-decoration: line-through;
}

.dream-category {
  justify-self: start;
  max-width: 100%;
  padding: 5px 10px;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 760;
  text-shadow: none;
}

.share-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.share-row label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.share-row input {
  width: auto;
  min-height: auto;
}

.share-row select {
  width: min(180px, 100%);
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.share-row button,
.social-actions button,
.comment-form button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(29, 36, 48, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.share-row button:disabled,
.social-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.dream-item.readonly {
  grid-template-columns: 18px minmax(0, 1fr);
}

.readonly-title {
  font-size: 18px;
  line-height: 1.45;
}

.dream-photo-thumb {
  width: min(360px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  background: #edf2ef;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #c7582b;
  background: #fff;
}

.status-dot.complete {
  border-color: #0d7c66;
  background: #0d7c66;
}

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

.social-actions select {
  width: min(190px, 100%);
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.like-btn {
  background: #fff0e8 !important;
  color: #8b3f1f !important;
}

.follow-btn {
  background: #e9f4f1 !important;
  color: #0d5d50 !important;
}

.comments {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(37, 43, 55, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.comment,
.comment-empty {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
}

.comment strong {
  color: var(--ink);
}

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

.comment-form input {
  min-height: 36px;
}

.private-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(13, 93, 133, 0.12);
  border-radius: 8px;
  background: rgba(233, 244, 241, 0.58);
}

.private-message-form input {
  min-height: 36px;
}

.private-message-form button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  background: #0d5d50;
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.private-message-form button:disabled,
.private-message-form input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.private-message-form small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

/* 微信风格聊天面板 */
.wechat-chat {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  border: 1px solid rgba(200, 200, 200, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.wechat-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 左侧侧边栏 - 聊天列表 */
.wechat-sidebar {
  width: 320px;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e5e5;
}

.wechat-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e5;
  background: #f7f7f7;
}

.wechat-sidebar-header h2 {
  font-size: 16px;
  margin: 0;
  color: #333;
  font-weight: 600;
}

.wechat-chat-list {
  flex: 1;
  overflow-y: auto;
}

/* 聊天会话项 */
.wechat-chat-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

.wechat-chat-item:hover {
  background-color: #f5f5f5;
}

.wechat-chat-item.active {
  background-color: rgba(13, 93, 133, 0.1);
}

.wechat-chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d5d85, #0a4a6d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.wechat-chat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wechat-chat-name {
  font-weight: 500;
  color: #333;
  font-size: 15px;
  margin-bottom: 4px;
}

.wechat-chat-preview {
  color: #999;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wechat-chat-time {
  color: #bbb;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* 右侧内容区 */
.wechat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #e5e5e5;
  position: relative;
}

/* 空状态 */
.wechat-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  background: #f7f7f7;
}

.wechat-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.wechat-empty p {
  font-size: 16px;
  margin: 0;
}

/* 聊天详情框 */
.wechat-chat-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 聊天头部 */
.wechat-chat-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
}

.wechat-back-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 8px;
  border-radius: 4px;
}

.wechat-back-btn:hover {
  background-color: #e5e5e5;
}

.wechat-chat-header .wechat-chat-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
  margin-right: 8px;
}

.wechat-chat-header .wechat-chat-name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

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

.wechat-action-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.wechat-action-btn:hover {
  background-color: #e5e5e5;
}

/* 消息区域 */
.wechat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #e5e5e5;
}

/* 消息项 */
.wechat-message {
  display: flex;
  gap: 10px;
}

.wechat-message.self {
  flex-direction: row-reverse;
}

.wechat-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d5d85, #0a4a6d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.wechat-message.self .wechat-message-avatar {
  background: linear-gradient(135deg, #0d5d85, #0a4a6d);
}

.wechat-message-content {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.wechat-message.self .wechat-message-content {
  align-items: flex-end;
}

.wechat-message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  word-break: break-all;
}

.wechat-message.self .wechat-message-bubble {
  background: #0d5d85;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.wechat-message.other .wechat-message-bubble {
  background: #fff;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wechat-message-time {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

.wechat-message.self .wechat-message-time {
  text-align: right;
}

/* 输入栏 */
.wechat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #f7f7f7;
  border-top: 1px solid #e5e5e5;
}

.wechat-input-tools {
  display: flex;
  gap: 12px;
}

.wechat-tool-icon {
  font-size: 24px;
  cursor: pointer;
}

.wechat-input-bar input {
  flex: 1;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #dcdcdc;
  border-radius: 18px;
  font-size: 14px;
  outline: none;
}

.wechat-input-bar input:focus {
  border-color: #0d5d85;
}

.wechat-input-bar button[type="submit"] {
  height: 36px;
  padding: 0 24px;
  border: none;
  border-radius: 18px;
  background: #0d5d85;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.wechat-input-bar button[type="submit"]:hover {
  background: #0a4a6d;
}

.wechat-input-bar button:disabled {
  background: #dcdcdc;
  color: #999;
  cursor: not-allowed;
}

/* 表情面板 */
.emoji-panel {
  position: absolute;
  bottom: 60px;
  left: 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
}

.emoji-panel.show {
  display: grid;
}

.emoji-item {
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  border-radius: 4px;
}

.emoji-item:hover {
  background: rgba(13, 93, 133, 0.1);
}

.photo-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(220px, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed rgba(13, 93, 133, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 93, 133, 0.07), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.72);
}

.photo-hint {
  grid-column: 1 / -1;
  color: #41505f;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 720;
}

.photo-row input:not([type="file"]) {
  min-height: 36px;
}

.photo-row button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  background: #0d5d85;
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.photo-row .media-pick-btn {
  min-height: 40px;
  padding: 0 14px;
  background: linear-gradient(135deg, #0d5d85, #0a6f62);
  box-shadow: 0 10px 24px rgba(13, 93, 133, 0.18);
}

.media-file-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
}

.gallery-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.2fr) minmax(180px, 0.8fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(49, 39, 29, 0.08);
  padding: 14px;
}

.gallery-card video {
  display: block;
  width: min(180px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf2ef;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-radius: 8px;
}

.gallery-card .media-item {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.gallery-card .media-thumb {
  display: block;
  width: min(180px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf2ef;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-radius: 8px;
  cursor: pointer;
}

.gallery-card .media-delete-btn {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
}

.gallery-card .media-item:hover .media-delete-btn {
  opacity: 1;
  visibility: visible;
}

.gallery-card .media-delete-btn:hover {
  background-color: #c82333;
  transform: scale(1.1);
}

.gallery-dream-info,
.gallery-upload {
  display: grid;
  gap: 8px;
}

.gallery-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
}

.gallery-card p {
  color: var(--muted);
  font-size: 13px;
}

.gallery-media-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 118px;
  overflow-x: auto;
  padding: 8px;
  border: 1px dashed rgba(13, 93, 133, 0.24);
  border-radius: 8px;
  background: rgba(237, 242, 239, 0.54);
}

.gallery-empty-slot {
  width: 100%;
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 720;
  text-align: center;
}

.gallery-upload-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0d5d85, #0a6f62);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  box-shadow: 0 10px 24px rgba(13, 93, 133, 0.18);
}

.gallery-upload-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.45;
}

.inbox-section-title {
  margin: 6px 0 -4px;
  color: var(--ink);
  font-size: 16px;
}

.friend-panel {
  display: grid;
  gap: 10px;
}

.message-people-section {
  display: grid;
  gap: 12px;
}

.message-people-head {
  display: grid;
  gap: 4px;
  padding: 0 4px;
}

.message-people-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.message-people-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.message-people-grid {
  display: grid;
  gap: 10px;
}

.friend-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-left: 4px solid #0d5d50;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(49, 39, 29, 0.05);
}

.friend-card-main {
  display: grid;
  gap: 5px;
}

.friend-card-main strong {
  color: var(--ink);
  font-size: 18px;
}

.friend-card-main span,
.friend-card-main small {
  color: var(--muted);
  font-weight: 680;
}

.friend-action {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: #0d5d50;
  color: #fff;
  font-weight: 760;
}

.friend-groups {
  display: grid;
  gap: 10px;
}

.friend-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.friend-group strong {
  color: var(--ink);
  font-size: 14px;
}

.friend-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friend-group span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(13, 93, 133, 0.1);
  color: #0d5d50;
  font-size: 13px;
  font-weight: 760;
}

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

.message-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  border-left: 4px solid #0d5d50;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(49, 39, 29, 0.05);
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.message-meta strong {
  color: var(--ink);
}

.message-item p {
  color: #3f4856;
  line-height: 1.55;
}

.celebration-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-left: 5px solid #0d7c66;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 248, 0.9)),
    linear-gradient(90deg, rgba(13, 124, 102, 0.08), rgba(240, 214, 21, 0.08));
  box-shadow: 0 22px 60px rgba(26, 34, 44, 0.18);
  color: var(--ink);
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(18px);
}

.celebration-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.celebration-toast strong {
  font-size: 17px;
}

.celebration-toast span {
  color: #3f4856;
  font-size: 15px;
  line-height: 1.6;
}

.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  overflow: visible;
}

.media-item {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.media-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(37, 43, 55, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
  display: block;
}

.media-thumb:hover {
  transform: scale(1.05);
}

.media-delete-btn {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
}

.media-item:hover .media-delete-btn {
  opacity: 1;
  visibility: visible;
}

.media-delete-btn:hover {
  background-color: #c82333;
  transform: scale(1.1);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
}

.image-viewer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.image-viewer-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.image-viewer-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  position: relative;
  z-index: 101;
  cursor: zoom-in;
  transition: transform 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-viewer-img.zoomed {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
  transform: scale(1.5);
}

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(29, 36, 48, 0.44);
  backdrop-filter: blur(12px);
}

.export-dialog {
  width: min(1060px, 100%);
  max-height: min(92vh, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(248, 250, 248, 0.96);
  box-shadow: 0 32px 90px rgba(12, 18, 28, 0.3);
}

.export-head,
.export-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.export-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.export-canvas-wrap {
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(29, 36, 48, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(29, 36, 48, 0.035) 1px, transparent 1px),
    #edf2ef;
  background-size: 30px 30px;
}

.export-canvas-wrap canvas {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 18px 54px rgba(24, 32, 42, 0.18);
}

.export-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.export-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 760;
}

.stats-panel {
  margin-top: 18px;
  min-height: 520px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.stat-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--soft-shadow);
}

.stat-card strong {
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.bar-chart {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.bar-label strong {
  color: var(--ink);
}

.bar-track {
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 43, 55, 0.1);
}

.bar-done {
  background: #0d7c66;
}

.bar-open {
  background: #d9893d;
}

.delete-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: #8b1a1a;
  background: #fff1ed;
  font-weight: 700;
}

.empty-state {
  padding: 46px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .controls,
  .board {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 28px, 720px);
  }

  .sidebar,
  .category-section-head {
    position: static;
    max-height: none;
  }

  .dream-list {
    padding: 16px;
  }

  .category-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .status-group {
    grid-column: 1;
  }

  .hero {
    min-height: auto;
    padding: 30px 24px 34px;
  }

  .hero::before {
    font-size: 82px;
    right: 18px;
    bottom: 22px;
  }

  .hero::after {
    width: 180px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 68px);
  }

  .manifesto {
    padding-left: 14px;
    font-size: 16px;
    line-height: 1.72;
  }

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

  .auth-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

  .stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add-form,
  .category-form {
    grid-template-columns: 1fr;
  }

  .dream-item {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 14px 12px;
  }

  .share-row,
  .meta-row,
  .social-actions {
    gap: 9px;
  }

  .share-row select,
  .social-actions select {
    width: 100%;
    max-width: 260px;
  }

  .friend-card {
    grid-template-columns: 1fr;
  }

  .delete-btn {
    grid-column: 2;
    justify-self: start;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .private-message-form {
    grid-template-columns: 1fr;
  }

  .photo-row {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    grid-template-columns: 1fr;
  }

  .gallery-media-strip {
    min-height: 112px;
  }
}

@media (max-width: 520px) {
  .wechat-chat {
    height: calc(100vh - 180px);
  }
  
  .wechat-layout {
    flex-direction: column;
  }
  
  .wechat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    max-height: 200px;
  }
  
  .wechat-content {
    flex: 1;
  }

  .app-shell {
    width: min(100% - 18px, 720px);
    padding-top: 16px;
  }

  .hero {
    padding: 26px 18px 30px;
  }

  .summary,
  .tabs {
    grid-template-columns: 1fr;
  }

  .list-panel,
  .sidebar,
  .auth-panel,
  .controls,
  .summary,
  .tabs {
    border-radius: 7px;
  }

  .panel-head {
    align-items: stretch;
  }

  .panel-actions {
    width: 100%;
  }

  .panel-actions button,
  .share-row button,
  .social-actions button,
  .comment-form button {
    min-height: 40px;
  }

  .share-row select,
  .share-row button {
    width: 100%;
  }

  .dream-title,
  .readonly-title {
    font-size: 16px;
  }
}
 

