:root {
  --sea-deep:      #061422;
  --sea-mid:       #0B2138;
  --sea-surface:   #123454;
  --parchment:     #EFE6D2;
  --parchment-dim: #C9BFA6;
  --glass-teal:    #7FB69E;
  --ember:         #E2984B;
  --ink:           #1B1108;
  --ink-soft:      #8a7a55;
  --line-ink:      rgba(27, 17, 8, 0.22);
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body:     'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  background: radial-gradient(120% 100% at 50% 0%, var(--sea-surface) 0%, var(--sea-mid) 45%, var(--sea-deep) 100%);
  font-family: var(--font-body);
  color: var(--parchment);
  overflow-x: hidden;
  line-height: 1.6;
}

.app {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px 72px;
}

button { font-family: inherit; }

/* ---------- Header ---------- */
.hero {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 64px 24px 26px;
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--glass-teal);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 6vw, 56px);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.hero p {
  font-size: 15px;
  color: var(--parchment-dim);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}
.hero.compact { padding: 42px 24px 18px; }
.hero.compact h1 { font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 6px; }
.hero.compact p { font-size: 13px; max-width: 420px; }

/* ---------- Ocean ---------- */
.ocean {
  position: relative;
  height: 62vh;
  min-height: 440px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}
.ocean::before {
  content: ";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 26px);
  pointer-events: none;
}

.bottles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.bottle {
  position: absolute;
  bottom: -90px;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  border: 0;
  background: none;
  --size: 46px;
  --glow: 10px;
  animation: drift linear infinite;
  filter: drop-shadow(0 0 10px rgba(127,182,158,0.35));
  transition: filter 0.25s ease;
}
.bottle:hover { filter: drop-shadow(0 0 calc(var(--glow) + 10px) rgba(127,182,158,0.7)); }
.bottle svg { display: block; width: var(--size); height: auto; }
.bottle .glow-pulse { animation: pulse 3.2s ease-in-out infinite; }

.bottle .note {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  padding: 4px 9px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: opacity 0.2s ease;
}
.bottle:hover .note,
.bottle:focus-visible .note { opacity: 1; }
.bottle .note-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.bottle .note-progress { color: var(--ink-soft); }
.bottle .note-progress.hot { color: var(--ember); font-weight: 600; }

@keyframes drift {
  0%   { transform: translateY(0) translateX(0) rotate(-6deg); }
  25%  { transform: translateY(-22vh) translateX(18px) rotate(4deg); }
  50%  { transform: translateY(-42vh) translateX(-14px) rotate(-5deg); }
  75%  { transform: translateY(-62vh) translateX(10px) rotate(3deg); }
  100% { transform: translateY(-84vh) translateX(0) rotate(-6deg); opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.empty-bottle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment-dim);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.ocean-actions {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 10px;
}

#ocean-message {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 6;
  min-width: 240px;
  max-width: 90%;
  text-align: center;
}

/* ---------- Throw button ---------- */
.throw-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ember);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(226,152,75,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.throw-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(226,152,75,0.5); }
.throw-btn:active { transform: translateY(0); }

/* ---------- Completed strip ---------- */
.completed-strip { margin-top: 36px; }
.strip-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--glass-teal);
  margin-bottom: 14px;
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(18, 52, 84, 0.45);
  border: 1px solid rgba(127, 182, 158, 0.25);
  border-radius: 6px;
  color: var(--parchment);
  text-decoration: none;
  margin-bottom: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.strip-item:hover {
  border-color: var(--glass-teal);
  background: rgba(24, 66, 104, 0.6);
}
.strip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glass-teal);
  flex: none;
}
.strip-title-text {
  flex: 1;
  font-family: var(--font-display);
  font-size: 16px;
}
.strip-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-dim);
}

/* ---------- 管理入口（仅主界面底部） ---------- */
.home-admin {
  display: block;
  text-align: center;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--parchment-dim);
  opacity: 0.45;
  text-decoration: none;
  padding: 8px 12px;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.home-admin:hover { opacity: 0.9; color: var(--parchment); }

.quota-line {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--parchment-dim);
  opacity: 0.7;
}
.quota-line.quota-full {
  opacity: 1;
  color: #ffc9ad;
}

/* ---------- Parchment panel ---------- */
.panel {
  width: min(600px, 92vw);
  margin: 24px auto 40px;
  background: var(--parchment);
  color: var(--ink);
  border-radius: 6px;
  padding: 34px 34px 30px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  animation: unroll 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes unroll {
  from { transform: scaleY(0.35); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
.panel .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 14px;
}
.panel .lede {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 22px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

/* ---------- Parchment modal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 34, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.scroll-card {
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--parchment);
  color: var(--ink);
  border-radius: 6px;
  padding: 34px 32px 26px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: unroll 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.scroll-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.scroll-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 14px;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.status-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  min-height: 16px;
}
.btn-row { display: flex; gap: 10px; flex: none; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button.primary {
  background: var(--ink);
  color: var(--parchment);
}
.button.primary:hover:not(:disabled) { background: #332414; }
.button.ghost,
.button.secondary {
  background: transparent;
  border: 1px solid var(--line-ink);
  color: var(--ink);
}
.button.ghost:hover:not(:disabled),
.button.secondary:hover:not(:disabled) { border-color: var(--ink); background: rgba(27, 17, 8, 0.05); }
.button.glass {
  background: rgba(127, 182, 158, 0.14);
  border: 1px solid rgba(127, 182, 158, 0.45);
  color: var(--parchment);
  backdrop-filter: blur(4px);
}
.button.glass:hover:not(:disabled) {
  background: rgba(127, 182, 158, 0.28);
  border-color: var(--glass-teal);
}
.button.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button.full { width: 100%; }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button:focus-visible,
.throw-btn:focus-visible,
.bottle:focus-visible {
  outline: 2px solid var(--glass-teal);
  outline-offset: 2px;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.hint { color: var(--ink-soft); font-size: 13px; font-weight: 400; }

input[type=text],
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: #faf5e6;
  border: 1px solid rgba(27, 17, 8, 0.22);
  border-radius: 4px;
}
input[type=text]:focus,
textarea:focus {
  outline: 2px solid var(--glass-teal);
  outline-offset: 1px;
  border-color: transparent;
}
textarea { min-height: 120px; resize: vertical; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  border: 1px solid var(--line-ink);
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.stepper button:hover:not(:disabled) { border-color: var(--ink); background: rgba(27, 17, 8, 0.05); }
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper .value {
  min-width: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Story / progress ---------- */
.story-title { margin: 0 0 6px; font-size: 26px; line-height: 1.35; }
.story-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.story-head { margin-bottom: 18px; }
.prompt-box {
  background: rgba(226, 152, 75, 0.16);
  border-left: 3px solid var(--ember);
  border-radius: 0 4px 4px 0;
  padding: 10px 14px;
  margin: 14px 0 0;
  color: #7a4a14;
  font-size: 15px;
}

.progress { margin: 4px 0 20px; }
.progress .label { font-size: 14px; }
.progress .bar {
  height: 8px;
  background: rgba(27, 17, 8, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--glass-teal), #4a8f77);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.counter {
  text-align: right;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.counter.over { color: #a34a12; font-weight: 600; }

/* ---------- Result sentences ---------- */
.story-body { margin-top: 4px; }
.sentence {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 2px solid rgba(27, 17, 8, 0.14);
  background: transparent;
  padding: 12px 4px 12px 14px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}
.sentence:hover { background: rgba(127, 182, 158, 0.14); }
.sentence .text { font-family: var(--font-display); }
.sentence .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-right: 12px;
  font-variant-numeric: tabular-nums;
}
.sentence .who {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4a7d68;
  margin-top: 6px;
  font-weight: 600;
}
.sentence.revealed .who { display: block; }

/* ---------- Messages / misc ---------- */
.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 4px;
  background: rgba(226, 152, 75, 0.16);
  border: 1px solid rgba(226, 152, 75, 0.5);
  color: #7a4a14;
  font-weight: 600;
  font-size: 14px;
}
.message.error {
  background: rgba(150, 50, 30, 0.1);
  border-color: rgba(150, 50, 30, 0.45);
  color: #8f2f16;
}
.message.glass {
  background: rgba(13, 32, 56, 0.82);
  border-color: rgba(127, 182, 158, 0.4);
  color: var(--parchment);
}
.message.glass.error {
  background: rgba(90, 30, 20, 0.65);
  border-color: rgba(255, 150, 110, 0.5);
  color: #ffc9ad;
}

.loading { color: var(--parchment-dim); font-family: var(--font-mono); font-size: 13px; }
.empty-hint { color: var(--parchment-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 72px 20px 20px; }
  .hero.compact { padding: 56px 20px 14px; }
  .hero h1 { font-size: clamp(30px, 9vw, 42px); }
  .ocean { height: 56vh; min-height: 400px; }
  .bottle { --size: 44px; }
  .bottle .note {
    opacity: 1;
    flex-direction: row;
    gap: 6px;
    bottom: -22px;
  }
  .bottle .note-title { font-size: 11px; }
  .bottle .note-progress { font-size: 9px; }
  .ocean-actions { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .throw-btn { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding: 12px 18px; font-size: 13px; }
  .panel { padding: 26px 20px 24px; margin-top: 18px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .button { width: 100%; }

  /* 固定头部收窄，避免遮挡标题 */
  .hero-me { top: 10px; left: 10px; padding: 5px 10px; font-size: 11px; max-width: 38vw; }
  .hero-me-link { top: 10px; right: 10px; font-size: 11px; padding: 5px 10px; }
  .me-editor { top: 48px; left: 10px; min-width: 0; width: min(88vw, 300px); }
  .home-admin { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  /* 弹窗改为底部抽屉 */
  .overlay { align-items: flex-end; }
  .scroll-card {
    width: 100%;
    max-height: 90dvh;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    padding: 26px 18px 22px;
    animation: sheet-up 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.05);
  }
  @keyframes sheet-up {
    from { transform: translateY(60px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .modal-actions .status-line { text-align: left; }
  .btn-row { flex-direction: column; gap: 8px; width: 100%; }
  .btn-row .button { width: 100%; }

  /* 触控目标放大 */
  .like-btn, .report-btn { font-size: 13px; padding: 7px 12px; top: 8px; }
  .like-btn { right: 66px; }
  .report-btn { right: 8px; }
  .sentence { padding: 14px 8px 14px 12px; }
  .sentence .text { font-size: 16px; }
  .report-reason-row { flex-direction: column; align-items: stretch; }
  .report-reason-row select { width: 100%; }
  .report-detail { min-width: 0; max-width: none; width: 100%; }
  .context-report-group { flex-wrap: wrap; }
  .context-report-group .report-detail { min-width: 0; max-width: none; width: 100%; }

  /* 档案统计紧凑 */
  .profile-stats { gap: 8px; }
  .stat-card { padding: 10px 6px; }
  .stat-num { font-size: 24px; }
}

@media (pointer: coarse) {
  .bottle .note { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bottle { animation: none; bottom: 30px; }
  .glow-pulse { animation: none; }
  .panel { animation: none; }
  .scroll-card { animation: none; }
}

/* ---------- Mode picker (create) ---------- */
.mode-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.mode-option {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line-ink);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mode-option.active {
  background: var(--ink);
  color: var(--parchment);
  border-color: var(--ink);
}
#mode-hint { display: block; margin-top: 8px; }

/* ---------- Context blocks (上一句 / 已用意象) ---------- */
.context-block { margin: 0 0 16px; }
.context-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.context-quote {
  background: rgba(27, 17, 8, 0.06);
  border-left: 3px solid var(--glass-teal);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.context-quote.first {
  border-left-color: var(--ember);
  color: var(--ink-soft);
  font-style: italic;
}
.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(127, 182, 158, 0.28);
  border: 1px solid rgba(127, 182, 158, 0.55);
  color: var(--ink);
}

/* ---------- Mode badge ---------- */
.mode-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ember);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: 1px;
}

/* ---------- Report / hidden sentence ---------- */
.sentence { position: relative; }
.report-btn {
  position: absolute;
  top: 10px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sentence:hover .report-btn,
.sentence:focus-within .report-btn { opacity: 1; }
.report-btn:hover { color: #a33; border-color: rgba(170, 51, 51, 0.4); }
.report-btn:disabled { opacity: 0.55; cursor: default; }
.hidden-sentence {
  color: var(--ink-soft);
  font-style: italic;
  background: rgba(27, 17, 8, 0.05);
  cursor: default;
}
.hidden-sentence .num { color: var(--ink-soft); }

@media (pointer: coarse) {
  .report-btn { opacity: 1; }
}

/* ---------- 上一句举报按钮 ---------- */
.context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.context-head .context-label { margin-bottom: 0; }
.context-report {
  position: static;
  opacity: 1;
  font-size: 11px;
  padding: 1px 8px;
}

/* 举报后引导「换个瓶子」的脉冲高亮 */
.pulse {
  animation: pulse-hint 0.9s ease-in-out 3;
}
@keyframes pulse-hint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 182, 158, 0); }
  50% { box-shadow: 0 0 0 4px rgba(127, 182, 158, 0.55); }
}
.context-report:hover { color: #a33; border-color: rgba(170, 51, 51, 0.4); }


/* ---------- 举报理由下拉 ---------- */
.context-report-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.report-reason {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(127, 182, 158, 0.35);
  border-radius: 4px;
  padding: 1px 4px;
}
.report-reason-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--ink-soft);
}
.report-reason-row select {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(127, 182, 158, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
}
.report-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.1;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(127, 182, 158, 0.35);
  border-radius: 0;
  padding: 0 2px 1px;
  min-width: 200px;
  max-width: 280px;
  outline: none;
  transition: border-color 0.2s ease;
}
.report-detail::placeholder {
  color: rgba(127, 182, 158, 0.5);
}
.report-detail:focus {
  border-bottom-style: solid;
  border-bottom-color: rgba(127, 182, 158, 0.85);
}
.context-report-group .report-detail {
  min-width: 160px;
  max-width: 240px;
}

/* ---------- 用户名徽章 / 署名提示 ---------- */
.hero-me {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment-dim);
  background: rgba(10, 22, 18, 0.55);
  border: 1px solid rgba(127, 182, 158, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  max-width: 40vw;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}
.hero-me:hover { border-color: rgba(127, 182, 158, 0.8); }
.me-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(127, 182, 158, 0.8);
  flex: none;
}
.me-name { overflow: hidden; text-overflow: ellipsis; }
.me-edit { opacity: 0.6; font-size: 11px; }

.me-editor {
  position: fixed;
  top: 44px;
  left: 16px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 22, 18, 0.94);
  border: 1px solid rgba(127, 182, 158, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 220px;
}
.me-editor input {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment);
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(127, 182, 158, 0.4);
  border-radius: 0;
  padding: 2px 2px;
  outline: none;
}
.me-editor input::placeholder {
  color: var(--parchment-dim);
  opacity: 0.7;
}
.me-editor input:focus {
  border-bottom-style: solid;
  border-bottom-color: rgba(127, 182, 158, 0.85);
}
.me-editor-actions { display: flex; gap: 6px; }
.me-error { font-size: 11px; color: #e0a35c; }
.name-card {
  width: min(440px, 92vw);
}
.name-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.6;
}
.name-card input {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(127, 182, 158, 0.5);
  border-radius: 0;
  padding: 4px 2px;
  width: 100%;
  outline: none;
  margin-bottom: 8px;
}
.name-card input:focus {
  border-bottom-style: solid;
  border-bottom-color: rgba(127, 182, 158, 0.9);
}
.name-error {
  font-size: 12px;
  color: #b4452c;
  margin-bottom: 10px;
}
.name-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---------- 管理后台 ---------- */

.admin-report {
  border: 1px solid rgba(127, 182, 158, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(27, 17, 8, 0.25);
}
.admin-report.is-hidden { opacity: 0.6; }
.admin-report-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.admin-title { font-weight: 600; color: var(--parchment); }
.admin-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-left: auto;
}
.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #a33;
  border: 1px solid rgba(170, 51, 51, 0.4);
  border-radius: 3px;
  padding: 1px 6px;
}
.admin-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--parchment);
  margin-bottom: 6px;
}
.admin-reasons { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.admin-author {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-detail {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}


/* ---------- 头像色块 / 关键词徽章 / 词云 / 贡献者名单 ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  background: hsl(var(--hue) 52% 40%);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1;
  user-select: none;
  vertical-align: -3px;
  margin-right: 5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.sentence .who { display: flex; align-items: center; }
.sentence .who .avatar { margin-right: 4px; vertical-align: -2px; }

.keywords-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.keywords-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-right: 2px;
}

.wordcloud-card {
  margin-top: 24px;
  padding: 14px;
  background: rgba(6, 20, 34, 0.92);
  border: 1px solid rgba(127, 182, 158, 0.35);
  border-radius: 10px;
}
.wordcloud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wordcloud-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--glass-teal);
}
#wordcloud {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #0B2138;
}

.contributors {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(27, 17, 8, 0.25);
}
.contributors-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.contributors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.contributor {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}
.contributor .avatar { margin-right: 6px; }
.contributor-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 同名善意提示 ---------- */
.name-hint {
  font-size: 12px;
  color: #8a6d2f;
  margin: -2px 0 10px;
}
.me-hint {
  font-size: 11px;
  color: #e0c07a;
}


/* ---------- 约束卡 / 终点词 ---------- */
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(27, 17, 8, 0.3);
  border-radius: 4px;
  padding: 6px 8px;
  width: 100%;
  max-width: 340px;
}
.challenge-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(226, 152, 75, 0.18);
  border: 1px dashed rgba(226, 152, 75, 0.65);
}
.challenge-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #a3621a;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 7px;
  flex: none;
}
.challenge-text {
  font-size: 14px;
  color: #7a4a14;
  font-weight: 600;
}
.challenge-swap {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a3621a;
  background: transparent;
  border: 1px solid rgba(226, 152, 75, 0.55);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.challenge-swap:hover:not(:disabled) {
  border-color: #a3621a;
  background: rgba(226, 152, 75, 0.12);
}
.challenge-swap:disabled {
  opacity: 0.5;
  cursor: default;
}
.ending-banner {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(127, 182, 158, 0.16);
  border-left: 3px solid var(--glass-teal);
  font-size: 13px;
  color: #2f6b54;
  font-weight: 600;
}
.acrostic-banner {
  margin: 10px 0 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(226, 152, 75, 0.14);
  border-left: 3px solid #e2984b;
  font-size: 14px;
  color: #7a4a14;
  font-weight: 600;
}
.acrostic-word {
  letter-spacing: 0.12em;
  color: #a3621a;
}
.acrostic-note {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(122, 74, 20, 0.7);
}
.acrostic-char {
  font-weight: 700;
  color: #a3621a;
}

/* ---------- 成品页点赞 / 最受欢迎 ---------- */
.like-btn {
  position: absolute;
  top: 10px;
  right: 52px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sentence:hover .like-btn,
.sentence:focus-within .like-btn { opacity: 1; }
.like-btn:hover { color: #b34a5e; border-color: rgba(179, 74, 94, 0.45); }
.like-btn.liked { color: #b34a5e; opacity: 1; }
.like-btn:disabled { opacity: 0.55; cursor: default; }
@media (pointer: coarse) {
  .like-btn { opacity: 1; }
}
.top-liked-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #b34a5e;
  border: 1px solid rgba(179, 74, 94, 0.5);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* ---------- 我的漂流入口 / 档案页 ---------- */
.hero-me-link {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 40;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--parchment-dim);
  text-decoration: none;
  border: 1px solid rgba(127, 182, 158, 0.3);
  border-radius: 4px;
  padding: 3px 10px;
  background: rgba(27, 17, 8, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.hero-me-link:hover { color: var(--parchment); border-color: rgba(127, 182, 158, 0.7); }

.profile-stats {
  display: flex;
  gap: 12px;
  margin: 6px 0 20px;
  flex-wrap: wrap;
}
.stat-card {
  flex: 1 1 120px;
  text-align: center;
  background: rgba(127, 182, 158, 0.14);
  border: 1px solid rgba(127, 182, 158, 0.4);
  border-radius: 8px;
  padding: 14px 10px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: #2f6b54;
  line-height: 1.1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.profile-list { display: flex; flex-direction: column; gap: 8px; }
.profile-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(127, 182, 158, 0.08);
  border: 1px solid rgba(27, 17, 8, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.profile-item:hover { background: rgba(127, 182, 158, 0.18); border-color: rgba(127, 182, 158, 0.6); }
.profile-pos {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  flex: none;
}
.profile-content {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
}
.profile-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  flex: none;
}
