/*
 * This is a manifest file that'll be compiled into application.css.
 */

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg:              #0e0e14;
  --surface:         #17171f;
  --surface-2:       #202030;
  --border:          #2e2e44;
  --border-focus:    #5a5a8a;
  --text:            #f0ece6;
  --text-dim:        #b8b4c6;
  --text-muted:      #7d7990;
  --accent:          #c9a96e;
  --accent-hover:    #d4b882;
  --accent-bg:       rgba(201, 169, 110, 0.10);
  --accent-bg-hover: rgba(201, 169, 110, 0.18);
  --accent-glow:     rgba(201, 169, 110, 0.14);
  --danger-border:   #991b1b;
  --danger-hover:    rgba(153, 27, 27, 0.10);
  --danger-text:     #f87171;

  --font:       'Pretendard Variable', Pretendard, system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --font-serif: 'NanumPen', Georgia, serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', Menlo, monospace;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow:       0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 3px var(--accent-glow);

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --duration:      0.28s;
  --duration-slow: 0.5s;
  --duration-fast: 0.15s;
}

/* ── Dawn Mode (11pm–4am) ─────────────────────────────────── */
:root.dawn-mode {
  --bg:              #06060d;
  --surface:         #0c0c18;
  --surface-2:       #111120;
  --border:          #252538;
  --border-focus:    #4a4a7a;
  --accent:          #8b78f5;
  --accent-hover:    #9e8ef8;
  --accent-bg:       rgba(139, 120, 245, 0.10);
  --accent-bg-hover: rgba(139, 120, 245, 0.18);
  --accent-glow:     rgba(139, 120, 245, 0.16);
  background-image:
    radial-gradient(ellipse 140% 35% at 50% 0%,
      rgba(139, 120, 245, 0.07) 0%,
      transparent 70%);
}

/* ── Base ─────────────────────────────────────────────────── */
html {
  font-size: 18px;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 140% 35% at 50% 0%,
      rgba(201, 169, 110, 0.07) 0%,
      transparent 70%);
  background-attachment: fixed;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 9998;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────── */
main {
  padding: 1.75rem 1.25rem 7rem;
}

@media (min-width: 640px) {
  main {
    max-width: 640px;
    margin: 0 auto;
    padding: 3.5rem 2rem 9rem;
  }
}


/* ── Bottom Nav ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 640px) {
  .bottom-nav {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  min-height: 56px;
  font-family: var(--font);
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}

.bottom-nav-item:hover { color: var(--text); }

.bottom-nav-item--active { color: var(--accent); }

.bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bottom-nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 17px;
  height: 17px;
  background: #f87171;
  color: #fff;
  border-radius: 9px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
  line-height: 1;
  letter-spacing: 0;
}

.bottom-nav-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ── Wordmark ─────────────────────────────────────────────── */
.wordmark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.wordmark-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: lowercase;
}

.wordmark-nav {
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}

.wordmark-nav:hover { color: var(--accent); }

/* ── Wordmark Ghost Prefix ────────────────────────────────── */
/* "un" = 억압된 것. 희미하게 존재하며, 가까이 볼수록 드러난다. */
.wm-prefix {
  opacity: 0.2;
  filter: blur(0.4px);
  transition: opacity 1s var(--ease), filter 1s var(--ease);
}

/* 마지막 세 글자 t·e·n은 서로 다른 위상으로 사라졌다 나타난다. */
/* 단어는 결코 완전히 쓰여지지 않는다. */
.wm-fade { animation: wm-breathe 9s ease-in-out infinite; }

.wm-fade--1 { animation-delay: 0s; }
.wm-fade--2 { animation-delay: 3s; }
.wm-fade--3 { animation-delay: 6s; }

@keyframes wm-breathe {
  0%, 35%, 100% { opacity: 1; }
  65%           { opacity: 0.38; }
}

/* 가까이 볼 때만 완전해진다 */
.wordmark:hover .wm-prefix {
  opacity: 0.65;
  filter: blur(0);
}

.wordmark:hover .wm-fade {
  animation-play-state: paused;
  opacity: 1;
}

/* 새벽에는 억압된 것들이 수면 위로 올라온다 */
:root.dawn-mode .wm-prefix {
  opacity: 0.55;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .wm-fade { animation: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), margin-bottom 0.3s var(--ease);
}

.hero-text {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  word-break: keep-all;
}

.hero-sub {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Mode selector ────────────────────────────────────────── */
.mode-selector {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.mode-tabs {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  max-height: 80px;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), padding 0.3s var(--ease);
}

.mode-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-pill) - 2px);
  cursor: pointer;
  font-family: var(--font);
  text-align: center;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  color: var(--text-muted);
}

.mode-tab:hover {
  background: var(--surface-2);
  color: var(--text-dim);
}

.mode-tab--active {
  background: var(--accent-bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(201, 169, 110, 0.2);
}

:root.dawn-mode .mode-tab--active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(139, 120, 245, 0.25);
}

.mode-tab-icon { font-size: 1.5rem; line-height: 1; }

.mode-tab-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.mode-tab-verb {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.mode-tab--active .mode-tab-verb { color: var(--accent); }

.mode-panel { animation: fadein 0.2s var(--ease) both; }

.mode-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ── Channel steps ────────────────────────────────────────── */
.channel-steps {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
}

.channel-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.channel-step-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  min-width: 5.5rem;
  flex-shrink: 0;
}

.channel-step-arrow {
  color: var(--border-focus);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.channel-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Form ─────────────────────────────────────────────────── */
.note-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field { position: relative; }

textarea {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(126, 121, 144, 0.14);
  border-bottom: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.9;
  padding: 1.125rem 1rem;
  resize: none;
  min-height: 160px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

@media (min-width: 640px) {
  textarea { min-height: 260px; }
}

textarea:focus {
  outline: none;
  border-color: rgba(126, 121, 144, 0.22);
  border-bottom-color: var(--border-focus);
  box-shadow: 0 4px 20px -4px rgba(201, 169, 110, 0.12);
}

textarea::placeholder { color: var(--text-muted); }

.char-count {
  display: block;
  text-align: right;
  margin-top: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--duration);
}

.char-count--warn { color: var(--danger-text); }

/* ── Form options row ─────────────────────────────────────── */
.form-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-options-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .form-options-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

.form-options:has(input[value="private_note"]:checked) .private-hint {
  display: block;
}

/* ── Visibility toggle pill ───────────────────────────────── */
.visibility-toggle {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
  padding: 3px;
  gap: 2px;
}

.toggle-opt { flex: 1; }
.toggle-opt input { display: none; }

.toggle-opt span {
  display: block;
  padding: 0.35rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  border-radius: var(--radius-pill);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  white-space: nowrap;
}

.toggle-opt input:checked + span {
  background: var(--accent-bg);
  color: var(--accent);
}

/* ── Select inputs ────────────────────────────────────────── */
.select-input {
  appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  padding: 0.45rem 2.25rem 0.45rem 1rem;
  cursor: pointer;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d7990' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  transition: border-color var(--duration), color var(--duration), box-shadow var(--duration);
}

@media (min-width: 480px) {
  .select-input { width: auto; }
}

.select-input:focus {
  outline: none;
  border-color: var(--border-focus);
  color: var(--text);
  box-shadow: var(--shadow-focus);
}

/* ── Form hints ───────────────────────────────────────────── */
.submit-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.7;
  margin-bottom: -0.25rem;
}

.private-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  opacity: 0.85;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); opacity: 0.9; }

.btn--primary {
  background: var(--accent);
  color: #0c0904;
  width: 100%;
  padding: 0.9rem;
  font-size: 0.9625rem;
  box-shadow: 0 2px 12px rgba(201, 169, 110, 0.25);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.38);
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-dim);
}

.btn--ghost:hover {
  border-color: var(--border-focus);
  color: var(--text);
  background: var(--surface);
}

.btn--copy {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  flex-shrink: 0;
}

.btn--copy:hover {
  color: var(--accent);
  border-color: var(--border-focus);
}

.btn--burn {
  background: transparent;
  border: 1.5px solid var(--danger-border);
  color: var(--danger-text);
  width: 100%;
  padding: 0.9rem;
}

.btn--burn:hover {
  background: var(--danger-hover);
  border-color: var(--danger-text);
}

/* ── Burn confirm modal ───────────────────────────────────── */
.burn-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 6, 13, 0.94);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.burn-modal--open { display: flex; }

.burn-modal-inner {
  text-align: center;
  max-width: 320px;
  animation: just-created-rise 0.3s var(--ease) both;
}

.burn-modal-glyph {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--danger-text);
  opacity: 0.6;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.burn-modal-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.burn-modal-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.burn-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.burn-modal-actions .btn--burn {
  width: auto;
  padding: 0.65rem 1.5rem;
}

.has-modal { overflow: clip; }

/* ── Note card ────────────────────────────────────────────── */
.note-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .note-card { padding: 2.25rem 2rem; }
}

.note-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.note-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ── Countdown ────────────────────────────────────────────── */
.burn-zone {
  text-align: center;
  padding: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.burn-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
  text-transform: uppercase;
}

.burn-timer {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1;
}

@media (min-width: 640px) {
  .burn-timer { font-size: 3.25rem; }
}

.burn-zone.expired .burn-timer {
  color: var(--text-muted);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

/* ── Note actions ─────────────────────────────────────────── */
.note-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.private-url-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.25rem 0.125rem;
  opacity: 0.8;
}

.secret-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.375rem 0.375rem 1rem;
}

.secret-link-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-link-input:focus { outline: none; }

/* ── Feed ─────────────────────────────────────────────────── */
.feed-header { margin-bottom: 2rem; }

.feed-back {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color var(--duration);
}

.feed-back:hover { color: var(--accent); }

.feed-heading {
  margin-top: 1.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.feed-sub {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0.01em;
  font-style: italic;
}

.feed-list { list-style: none; }
.feed-sentinel { display: block; height: 1px; visibility: hidden; }

.feed-item {
  padding: 1.25rem 1.125rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  cursor: pointer;
  margin-bottom: 0.625rem;
  animation: note-appear 0.45s var(--ease) both;
  transition: background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.feed-item:hover {
  background: var(--surface-2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .feed-item { animation: none; }
}

/* ── Mood inset shadow ────────────────────────────────────── */
.feed-item:not(.feed-item--archived)[data-mood="confession"] { box-shadow: inset 2px 0 0 rgba(248, 113, 113, 0.55); }
.feed-item:not(.feed-item--archived)[data-mood="regret"]     { box-shadow: inset 2px 0 0 rgba(129, 140, 248, 0.55); }
.feed-item:not(.feed-item--archived)[data-mood="rage"]       { box-shadow: inset 2px 0 0 rgba(251, 146,  60, 0.55); }
.feed-item:not(.feed-item--archived)[data-mood="desire"]     { box-shadow: inset 2px 0 0 rgba(244, 114, 182, 0.55); }
.feed-item:not(.feed-item--archived)[data-mood="secret"]     { box-shadow: inset 2px 0 0 rgba(167, 139, 250, 0.55); }

/* ── Mood background overlay ──────────────────────────────── */
.feed-item[data-mood="confession"] { background: linear-gradient(135deg, rgba(248, 113, 113, 0.04) 0%, var(--surface) 60%); }
.feed-item[data-mood="regret"]     { background: linear-gradient(135deg, rgba(129, 140, 248, 0.04) 0%, var(--surface) 60%); }
.feed-item[data-mood="rage"]       { background: linear-gradient(135deg, rgba(251, 146,  60, 0.04) 0%, var(--surface) 60%); }
.feed-item[data-mood="desire"]     { background: linear-gradient(135deg, rgba(244, 114, 182, 0.04) 0%, var(--surface) 60%); }
.feed-item[data-mood="secret"]     { background: linear-gradient(135deg, rgba(167, 139, 250, 0.04) 0%, var(--surface) 60%); }

/* ── Archived card ────────────────────────────────────────── */
.feed-item--archived {
  border: 1px solid rgba(201, 169, 110, 0.45);
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.08);
}

.feed-item:first-child { border-top: none; }

.feed-item-link {
  display: block;
  margin-bottom: 0.875rem;
  transition: opacity var(--duration);
}

.feed-item-link:hover { opacity: 1; }

.feed-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.feed-actions turbo-frame,
.feed-actions .resonance-form {
  display: contents;
}

.feed-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0;
  padding-inline: 0.75rem;
  height: 2rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
}

.feed-reply-btn:hover {
  border-color: var(--border-focus);
  color: var(--text);
}

.feed-reply-icon { font-size: 0.85rem; line-height: 1; }

.feed-reply-label { font-weight: 500; letter-spacing: 0.02em; }

.feed-reply-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.feed-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.85;
  color: var(--text);
  overflow-wrap: break-word;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.feed-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.feed-reply-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  transition: color var(--duration), border-color var(--duration);
}

.feed-reply-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.empty-state {
  padding: 5rem 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Feed empty state ─────────────────────────────────────── */
.feed-empty {
  padding: 4rem 0 5rem;
  text-align: center;
}

.feed-empty-glyph {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--text);
  opacity: 0.06;
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.feed-empty-text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.625rem;
}

.feed-empty-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.feed-empty-btn {
  margin-top: 0;
}

/* ── Focus visible (keyboard navigation) ─────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Ambient manifesto (desktop art direction) ────────────── */
.ambient-manifesto {
  display: none;
}

@media (min-width: 1024px) {
  .ambient-manifesto {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: fixed;
    left: max(1.5rem, calc(50% - 380px));
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.045;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: 0.18em;
  }
}

/* ── Burned / Not found / Void ───────────────────────────── */
.void-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68vh;
  text-align: center;
  gap: 0.875rem;
}

.void-back {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color var(--duration);
}

.void-back:hover { color: var(--accent); }

.void-glyph {
  font-size: 2.25rem;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.void-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.void-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Flash ────────────────────────────────────────────────── */
.flash {
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-bg);
  border-bottom: 1px solid rgba(201, 169, 110, 0.18);
  text-align: center;
}

/* ── Errors ───────────────────────────────────────────────── */
.form-errors {
  background: rgba(153, 27, 27, 0.08);
  border: 1.5px solid var(--danger-border);
  border-radius: var(--radius);
  padding: 0.875rem 1.125rem;
  font-size: 0.875rem;
  color: var(--danger-text);
}

/* ── Top bar (about + locale) ─────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0.9rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .top-bar {
    top: 1.5rem;
    right: calc(50% - 320px + 1.75rem);
  }
}

.about-link {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid rgba(126, 121, 144, 0.3);
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.65rem;
  transition: all var(--duration) var(--ease);
}

.about-link:hover,
.about-link--active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Locale switcher ──────────────────────────────────────── */
.locale-switch {
  position: static;
  z-index: auto;
  background: transparent;
  border: 1px solid rgba(126, 121, 144, 0.3);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.65rem;
  transition: all var(--duration) var(--ease);
}

.locale-switch:hover {
  color: var(--text);
  border-color: var(--border-focus);
}

/* ── Writing prompt ──────────────────────────────────────── */
.writing-prompt {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--accent);
  opacity: 0;
  font-style: italic;
  margin-bottom: 0.625rem;
  letter-spacing: 0.01em;
  min-height: 1.6rem;
  transition: opacity 0.35s var(--ease);
}

.writing-prompt--visible { opacity: 0.7; }

/* ── Rate limit card ──────────────────────────────────────── */
.rate-limit-card {
  background: rgba(201, 169, 110, 0.06);
  border: 1.5px solid rgba(201, 169, 110, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.rate-limit-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.rate-limit-body {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Progressive Form Reveal ──────────────────────────── */
.note-options {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  /* 숨겨진 상태에서 flex gap이 빈 공간을 만들지 않도록 상쇄 */
  margin-top: -1.25rem;
  margin-bottom: -1.25rem;
  transition:
    grid-template-rows 0.35s var(--ease),
    opacity 0.25s var(--ease),
    margin 0.35s var(--ease);
}

.note-options-inner {
  overflow: hidden;
  min-height: 0; /* grid 0fr collapse에 필수 */
  /* 내부 섹션 간 간격: note-form gap과 동일하게 */
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.note-options.note-options--visible {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Keyboard-open: 모바일 키보드 열릴 때 레이아웃 압축 ─── */
/* visualViewport 높이가 window 높이의 75% 미만이면 body.keyboard-open 적용 */

body.keyboard-open .page-new .hero {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

body.keyboard-open .mode-tabs {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

/* mode-selector gap이 빈 공간으로 남지 않도록 음수 마진으로 상쇄 */
body.keyboard-open .mode-selector {
  gap: 0;
}

body.keyboard-open textarea {
  min-height: 120px;
}

/* ── Silence counter ──────────────────────────────────────── */
.feed-silence {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.archive-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.5rem;
  opacity: 0.8;
}

.silence-count {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 1.25rem 0;
  opacity: 0.75;
  font-style: italic;
}

/* ── Feed controls (sort + mood) ─────────────────────────── */
.feed-controls {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sort-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sort-tabs::-webkit-scrollbar { display: none; }

.feed-controls-row {
  display: flex;
  align-items: center;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 0.4rem 2rem 0.4rem 0.875rem;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237d7990' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
}

.sort-select:hover { border-color: var(--border-focus); }
.sort-select:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--shadow-focus); }

.sort-tab {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--duration) var(--ease);
}

.sort-tab:hover { color: var(--text); border-color: var(--border-focus); }
.sort-tab--active { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); }

/* ── Resonance ────────────────────────────────────────────── */
@keyframes heart-pop {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.6); }
  55%  { transform: scale(0.88); }
  80%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.resonance-form { display: block; }

.resonance-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0;
  padding-inline: 0.75rem;
  height: 2rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
}

.resonance-btn:hover {
  border-color: rgba(248, 113, 113, 0.4);
  color: rgba(248, 113, 113, 0.75);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.1);
}

.resonance-btn--active {
  border-color: #f87171;
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.18), inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.resonance-heart { font-size: 0.85rem; line-height: 1; }

.resonance-btn--active .resonance-heart {
  animation: heart-pop 0.55s var(--ease);
}

.resonance-label { font-weight: 500; }

.resonance-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.resonance-btn--active .resonance-count {
  color: #f87171;
  animation: count-flip 0.5s var(--ease);
}

@keyframes count-flip {
  0%   { opacity: 0; transform: translateY(6px); }
  60%  { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Reaction bar ─────────────────────────────────────────── */
.reaction-bar {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.625rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font);
  transition: all var(--duration) var(--ease);
}

.reaction-btn:hover { border-color: var(--border-focus); background: var(--surface-2); color: var(--text-dim); }
.reaction-btn--reacted { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }

.reaction-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* ── Channel CTA (home page) ──────────────────────────────── */
.channel-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.channel-cta-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.channel-cta-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Channel page ─────────────────────────────────────────── */
/*
 * bottom-nav height ≈ 0.75rem top-pad + 22px icon + 0.3rem gap + 12px label + 0.75rem bottom-pad
 *                   ≈ 12 + 22 + 5 + 12 + 12 = 63px ≈ 3.9375rem
 * We use padding-bottom on page-channel so the flex layout naturally
 * stays above the fixed bottom nav without any per-component hacks.
 */
.page-channel {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0 !important;
  padding-inline: 0 !important;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
}

@media (min-width: 640px) {
  .page-channel { max-width: 640px; margin: 0 auto; }
}

/* ── Channel header ── */
/* top-padding matches other detail pages so wordmark aligns with top-bar */
.channel-header {
  flex-shrink: 0;
  padding: 1.75rem 1.25rem 0.875rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .channel-header { padding: 3.5rem 2rem 0.875rem; }
}

/* .wordmark already has margin-bottom: 1.5rem — reduce it here */
.channel-header .wordmark { margin-bottom: 0.25rem; }

/* Meta row: 당신은 🦑 · 남은 시간  |  링크 복사  방 닫기 */
.channel-meta-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.channel-meta-identity {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

.channel-meta-sep {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.75rem;
  line-height: 1;
}

/* Copy + close pushed to the right */
.channel-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* button_to wraps in <form> — make it transparent to flex layout */
.channel-actions form { display: contents; }

.channel-expiry {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.channel-identity-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.channel-identity-emoji { line-height: 1; }

.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0;
  color: var(--text-muted);
  transition: color var(--duration);
}

.btn-link:hover { color: var(--text); }
.btn-link--danger:hover { color: var(--danger-text); }

/* ── Channel notes list ───────────────────────────────────── */
.channel-notes {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.25rem;
}

/* flex spacer — pushes messages to bottom when few exist, collapses when list overflows */
.channel-notes::before {
  content: '';
  display: block;
  flex: 1 1 auto;
}

@media (min-width: 640px) {
  .channel-notes { padding-inline: 2rem; }
}

.channel-empty {
  margin: auto;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.channel-empty { transition: opacity 0.3s ease; }
.channel-empty:not(:only-child) { opacity: 0; pointer-events: none; height: 0; overflow: hidden; }

.channel-empty-glyph {
  display: block;
  font-size: 2rem;
  opacity: 0.2;
  margin-bottom: 0.5rem;
}

.channel-note {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.125rem 0;
}

.channel-note--mine { flex-direction: row-reverse; }

.channel-note-emoji {
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
  margin-bottom: 0.2rem;
}

.channel-note-body {
  max-width: 75%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
}

.channel-note--mine .channel-note-body {
  background: var(--accent-bg);
  border-color: rgba(201, 169, 110, 0.25);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-sm);
}

.channel-note-text {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.channel-note-time {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ── Channel form — single-row messenger style ────────────── */
.channel-form-wrap {
  flex-shrink: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
}

@media (min-width: 640px) {
  .channel-form-wrap { padding-inline: 2rem; }
}

.channel-form {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.channel-form-emoji {
  font-size: 1.375rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Fixed single-line height: font-size(15px) * line-height(1.5) + padding(8px * 2) = ~38.5px */
.channel-textarea {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 2.5rem;
  max-height: 120px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 1.5;
  padding: 0.4375rem 1rem;
  resize: none;
  overflow-y: auto;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.channel-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.channel-textarea::placeholder { color: var(--text-muted); }

/* Send button — compact, pill shape matching textarea */
.btn--send {
  flex-shrink: 0;
  height: 2.5rem;
  padding: 0 1.25rem;
  font-size: 0.875rem;
  border-radius: var(--radius-pill);
}

.btn--send {
  width: auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ── Live page ("지금 여기") ──────────────────────────────── */
.live-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.25rem 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .live-header { padding: 2rem 2rem 0.75rem; }
}

.live-header-top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.live-back {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color var(--duration);
  flex-shrink: 0;
}

.live-back:hover { color: var(--text); }

.live-heading {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.live-my-emoji {
  margin-left: auto;
  font-size: 1.25rem;
  line-height: 1;
}

/* pulsing live indicator dot */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* same pulsing dot for nav */
.live-nav-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: live-pulse 2s ease-in-out infinite;
}

/* ── Presence bar ── */
.live-presence-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.live-presence-emoji {
  font-size: 1.125rem;
  line-height: 1;
}

.live-presence-emoji:nth-child(n+6) { display: none; }
@media (min-width: 640px) { .live-presence-emoji:nth-child(n+6) { display: inline; } }

.live-presence-overflow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-left: 0.125rem;
}

.live-presence-count {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  margin-left: 0.375rem;
  padding-left: 0.5rem;
}

.live-presence-empty {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* ── Read warning inline ──────────────────────────────────── */
.void-page--inline {
  min-height: auto;
  padding: 2.5rem 0;
}

/* ── Confession Box (new form CTA) ───────────────────────── */
.cb-create-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.875rem;
}

.cb-create-textarea {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.625rem 0.875rem;
  resize: none;
  min-height: auto;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.cb-create-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.cb-create-textarea::placeholder { color: var(--text-muted); }

.cb-create-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Confession Box (creator view) ───────────────────────── */
.cb-creator {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.cb-share-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.375rem 0.375rem 1rem;
}

.cb-confessions-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.cb-confessions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ── Confession Item ──────────────────────────────────────── */
.confession-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.confession-item-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.confession-item-body {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  border-top-left-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
}

.confession-item-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

.confession-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
}

/* ── Confession Box (visitor view) ───────────────────────── */
.cb-count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.cb-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Confession Box (privacy notice) ─────────────────────── */
.cb-privacy-notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(201, 169, 110, 0.05);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.cb-privacy-icon {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cb-privacy-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.cb-privacy-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ── Confession Box (submitted state) ────────────────────── */
.cb-submitted {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
  gap: 0.625rem;
}

.cb-submitted-glyph {
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.cb-submitted-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
}

.cb-submitted-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Note engagement (resonance + reactions on show page) ─── */
.note-engagement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ── Reply section ────────────────────────────────────────── */
.reply-section {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.reply-heading {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.reply-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.reply-empty {
  font-family: var(--font-serif);
  font-style: normal;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 2rem 0;
  text-align: center;
  letter-spacing: 0.01em;
}

.reply-list:has(> .reply-item) .reply-empty { display: none; }
.cb-confessions-list:has(> .confession-item) .reply-empty { display: none; }

.reply-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.reply-item-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.reply-item-body {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  border-top-left-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
}

.reply-item-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

.reply-item-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
}

.reply-item-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.reply-delete-form { display: inline; margin: 0; }

.reply-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0;
  transition: color var(--duration);
}

.reply-delete-btn:hover { color: var(--danger-text); }

/* ── Reply form ───────────────────────────────────────────── */
.reply-form-wrap {
  margin-top: 1rem;
}

.reply-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.reply-form-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.reply-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reply-textarea {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.6;
  padding: 0.625rem 0.875rem;
  resize: none;
  min-height: auto;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.reply-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.reply-textarea::placeholder { color: var(--text-muted); }

.reply-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Fade-in ──────────────────────────────────────────────── */
@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

main { animation: fadein 0.3s var(--ease) both; }

/* ── Mine (내 글) ─────────────────────────────────────────── */
.mine-item {
  border-bottom: 1px solid var(--border);
  transition: opacity var(--duration);
}

.mine-item:first-child { border-top: 1px solid var(--border); }

.mine-item--faded  { opacity: 0.45; }
.mine-item--active { border-left: 2px solid var(--accent); padding-left: 0.75rem; }

.mine-item-link {
  display: block;
  padding: 1.375rem 0;
  transition: background var(--duration);
}

.mine-item-link:hover { background: var(--surface); }

.mine-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.mine-item-text {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  flex: 1;
}

.mine-activity-badge {
  flex-shrink: 0;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.mine-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mine-item-kind {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.mine-item-status { margin-left: auto; }

.mine-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.mine-status--alive    { color: var(--accent); }
.mine-status--burned   { color: var(--text-muted); }
.mine-status--expired  { color: var(--text-muted); }
.mine-status--archived {
  background: linear-gradient(135deg, #b8933f 0%, #e8c97a 40%, #f0d898 60%, #c9a96e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.mine-item:has(.mine-status--archived) {
  border-color: rgba(201, 169, 110, 0.18);
  background: linear-gradient(90deg, transparent 0%, rgba(201, 169, 110, 0.025) 100%);
}

.mine-manage-hint {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  opacity: 0.6;
}

/* ── Waiting page ────────────────────────────────────────── */
.page-waiting {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.75rem 1.25rem 4rem;
}

@media (min-width: 640px) {
  .page-waiting { max-width: 640px; margin: 0 auto; padding: 3.5rem 2rem 6rem; }
}

.waiting-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem 0;
}

@keyframes waiting-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.18); }
}

.waiting-glyph {
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: waiting-pulse 2.2s ease-in-out infinite;
}

.waiting-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.5;
}

.waiting-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 30ch;
  line-height: 1.65;
}

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40% { opacity: 1; transform: scale(1); }
}

.waiting-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.waiting-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: 0.2s; }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; }

.waiting-skip {
  margin-top: 2.5rem;
  padding: 0.75rem 2rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.6;
  white-space: nowrap;
  transition: opacity var(--duration);
}

.waiting-skip:hover { opacity: 1; }

/* ── Connection countdown ─────────────────────────────────── */
.connection-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.connection-countdown-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.connection-countdown-time {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ── Connection page ──────────────────────────────────────── */
.page-connection {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

.connection-header {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.connection-label {
  font-size: 1.375rem;
  color: var(--text);
  letter-spacing: 0.03em;
}

.connection-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.connection-notes {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.connection-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.connection-note--mine {
  border-color: #4a4a6a;
  background: rgba(100, 100, 160, 0.06);
}

.connection-note-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.connection-note-text { color: var(--text); line-height: 1.75; }

.connection-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 0.75rem 0;
  opacity: 0.4;
}

/* ── Anonymous chat (connection messages) ─────────────────── */
.chat-section {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-height: 420px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-empty {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 1.5rem 0;
  opacity: 0.6;
}

.chat-list:has(.chat-message) .chat-empty { display: none; }

.chat-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.chat-message--mine {
  align-items: flex-end;
}

.chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  padding: 0.75rem 1rem;
  max-width: 80%;
}

.chat-message--mine .chat-bubble {
  background: rgba(100, 100, 160, 0.1);
  border-color: rgba(100, 100, 180, 0.25);
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
}

.chat-bubble-text {
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  font-size: 0.9375rem;
}

.chat-bubble-text p { margin: 0; }

.chat-message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.chat-form-wrap { padding-top: 0.5rem; }

.chat-form { display: flex; flex-direction: column; gap: 0; width: 100%; }

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.chat-input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
  outline: none;
  box-sizing: border-box;
}

.chat-input:focus { border-color: #4a4a6a; }

.chat-send-btn {
  flex-shrink: 0;
  background: #818cf8;
  color: #fff;
  border: none;
  border-radius: 2rem;
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-send-btn:hover { background: #6366f1; }

.chat-error {
  font-size: 0.8rem;
  color: var(--danger-text, #f87171);
  margin: 0 0 0.375rem;
}

.connection-expires {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-top: 2rem;
}

/* ── Archive notice (on note show page) ───────────────────── */
.archive-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--accent-bg);
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

.archive-notice-glyph {
  font-size: 1.375rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.archive-notice-text {
  font-size: 0.875rem;
  color: var(--accent);
  line-height: 1.5;
}

/* ── Archive feed tab ─────────────────────────────────────── */
.sort-tab--archive {
  border-color: rgba(201, 169, 110, 0.4);
  color: var(--accent);
  background: rgba(201, 169, 110, 0.05);
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
  margin-left: 0.25rem;
}

.sort-tab--archive:hover {
  background: rgba(201, 169, 110, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.sort-tab--archive.sort-tab--active {
  background: var(--accent-bg);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.15);
  color: var(--accent);
}

/* ── Connection reveal card (on note show page) ───────────── */
@keyframes connection-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.1); }
}

.connection-reveal-card {
  background: rgba(100, 100, 180, 0.07);
  border: 1.5px solid rgba(100, 100, 180, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.connection-reveal-glyph {
  font-size: 2.25rem;
  color: #818cf8;
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: connection-pulse 2.5s ease-in-out infinite;
}

.connection-reveal-heading {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.5;
}

.connection-reveal-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.connection-reveal-btn {
  background: #818cf8;
  box-shadow: 0 2px 12px rgba(129, 140, 248, 0.3);
}

.connection-reveal-btn:hover {
  background: #6366f1;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.45);
}

/* ── Connection page entrance animation ───────────────────── */
@keyframes connection-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-connection[data-connection-new] .connection-header {
  animation: connection-enter 0.45s var(--ease) 0.15s both;
}

.page-connection[data-connection-new] .connection-note:first-child {
  animation: connection-enter 0.45s var(--ease) 0.42s both;
}

.page-connection[data-connection-new] .connection-divider {
  animation: connection-enter 0.45s var(--ease) 0.58s both;
}

.page-connection[data-connection-new] .connection-note:last-child {
  animation: connection-enter 0.45s var(--ease) 0.72s both;
}

/* ── Note creation ceremony (1-A) ────────────────────────── */
@keyframes just-created-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes creation-glow {
  0%   { opacity: 0.6; }
  100% { opacity: 0; }
}

.page-show--just-created .note-card {
  animation: just-created-rise 0.5s var(--ease) 0.1s both;
}

.page-show--just-created .silence-count {
  animation: just-created-rise 0.5s var(--ease) 0.3s both;
}

.page-show--just-created .burn-zone {
  animation: just-created-rise 0.5s var(--ease) 0.25s both;
}

.page-show--just-created .note-actions {
  animation: just-created-rise 0.5s var(--ease) 0.4s both;
}

.page-show--just-created::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(201, 169, 110, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: creation-glow 1.5s var(--ease) both;
}

/* ── Dawn mode crossfade transition (1-B) ────────────────── */
@keyframes dawn-crossfade {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  65%  { opacity: 1; }
  100% { opacity: 0; }
}

html.dawn-transitioning::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(139, 92, 246, 0.18) 0%, var(--bg) 68%);
  animation: dawn-crossfade 0.7s ease both;
}

/* ── Dawn particle sparkles ───────────────────────────────── */
@keyframes dawn-particle {
  0%   { opacity: 0; transform: translateY(0) scale(0.4); }
  25%  { opacity: 0.9; transform: translateY(-12px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-38px) scale(0.6); }
}

.dawn-particle {
  position: fixed;
  font-family: var(--font-serif);
  color: var(--accent);
  pointer-events: none;
  z-index: 9998;
  animation: dawn-particle 1.2s var(--ease) both;
  user-select: none;
}

/* ── About Page ───────────────────────────────────────────── */
.page-about {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-hero {
  padding-top: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
}

.about-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.about-hero-sub {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.about-body {
  color: var(--text-dim);
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .about-features {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.about-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.about-feature:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.about-feature-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  opacity: 0.85;
}

.about-feature:hover .about-feature-icon { opacity: 1; }

.about-feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.about-feature-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── About Pillars ────────────────────────────────────────── */
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .pillar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.pillar {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.pillar:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.pillar-glyph {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.65;
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
  transition: opacity var(--duration);
}

.pillar:hover .pillar-glyph { opacity: 1; }

.pillar-glyph--resonance {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.pillar-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.pillar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  word-break: keep-all;
}

.about-faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-faq-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 1rem 0 0.3rem;
  border-top: 1px solid var(--border);
}

.about-faq-q:first-child { border-top: none; padding-top: 0; }

.about-faq-a {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  padding-bottom: 0.75rem;
}

.about-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.about-cta-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.about-cta-body {
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ── Submit Ceremony Overlay ──────────────────────────────── */
/* 말이 세상으로 녹아드는 순간. 안개에서 와서, 안개로 돌아간다. */
.submit-ceremony {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
  filter: blur(0px);
  transition: opacity 0.9s var(--ease), filter 0.9s var(--ease);
}

.submit-ceremony--visible { opacity: 1; pointer-events: all; }
.submit-ceremony--fade    { opacity: 0; filter: blur(14px); }

/* 텍스트는 흐림 속에서 나타나 흐림 속으로 사라진다 */
.submit-ceremony-text {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--text);
  letter-spacing: 0.04em;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(8px);
  transition: opacity 0.7s var(--ease), filter 0.7s var(--ease), transform 0.7s var(--ease);
}

.submit-ceremony-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(5px);
  transition: opacity 0.7s var(--ease) 0.18s, filter 0.7s var(--ease) 0.18s, transform 0.7s var(--ease) 0.18s;
}

.submit-ceremony--visible .submit-ceremony-text,
.submit-ceremony--visible .submit-ceremony-sub {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ── Desktop ambient vertical lines ──────────────────────── */
@media (min-width: 900px) {
  main::before, main::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
    opacity: 0.35;
    pointer-events: none;
  }

  main::before { left: calc(50% - 340px); }
  main::after  { right: calc(50% - 340px); }
}

/* ── Ambient manifesto enhancement ───────────────────────── */
@media (min-width: 1024px) {
  .ambient-manifesto {
    opacity: 0.09;
    font-size: 1rem;
  }
}

/* ── Feed item stagger animation ──────────────────────────── */
@keyframes note-appear {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feed-item:nth-child(1) { animation-delay: 0.00s; }
.feed-item:nth-child(2) { animation-delay: 0.05s; }
.feed-item:nth-child(3) { animation-delay: 0.10s; }
.feed-item:nth-child(4) { animation-delay: 0.15s; }
.feed-item:nth-child(5) { animation-delay: 0.20s; }
.feed-item:nth-child(6) { animation-delay: 0.25s; }
.feed-item:nth-child(7) { animation-delay: 0.28s; }
.feed-item:nth-child(8) { animation-delay: 0.30s; }

/* ── Burned / Dissolved page ──────────────────────────────── */
@keyframes dissolve-out {
  0%   { opacity: 1; filter: blur(0px);   transform: scale(1);    letter-spacing: inherit; text-shadow: none; }
  20%  { opacity: 1; filter: blur(0px);   transform: scale(1.04); text-shadow: 0 0 12px rgba(201, 169, 110, 0.4); }
  55%  { opacity: 0.5; filter: blur(5px);  transform: scale(1.1);  letter-spacing: 0.4em; text-shadow: 0 0 24px rgba(201, 169, 110, 0.2); }
  80%  { opacity: 0.15; filter: blur(12px); transform: scale(1.18); letter-spacing: 0.8em; }
  100% { opacity: 0; filter: blur(18px);  transform: scale(1.28); letter-spacing: 1.2em; }
}

@keyframes scatter-in {
  0%   { opacity: 0; filter: blur(8px);  transform: translateY(6px); letter-spacing: 0.3em; }
  50%  { opacity: 0.6; filter: blur(2px); transform: translateY(1px); letter-spacing: 0.04em; }
  100% { opacity: 1; filter: blur(0);    transform: translateY(0);   letter-spacing: normal; }
}

.burned-glyph {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--text-muted);
  animation: dissolve-out 3s var(--ease) 0.3s both;
  line-height: 1;
}

.burned-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-dim);
  animation: scatter-in 0.9s var(--ease) 2.4s both;
  opacity: 0;
  line-height: 1.5;
}

.burned-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  animation: fadein 0.7s var(--ease) 3s both;
  opacity: 0;
  margin-bottom: 1.5rem;
}

/* ── Resonance particle effect ────────────────────────────── */
.resonance-btn {
  position: relative;
}

.resonance-btn:active::before {
  content: '♥';
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 0.7rem;
  color: #f87171;
  animation: resonance-particle 0.6s var(--ease) both;
  pointer-events: none;
}

@keyframes resonance-particle {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  60%  { opacity: 0.8; transform: translate(-50%, -180%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -280%) scale(0.8); }
}

/* ── Desktop site header (1024px+) ───────────────────────── */
.site-header { display: none; }

@media (min-width: 1024px) {
  .site-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: rgba(14, 14, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 200;
  }

  .site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
  }

  .site-header-wordmark {
    font-family: var(--font-serif);
    font-size: 0.875rem;
    letter-spacing: 0.22em;
    color: var(--accent);
    flex-shrink: 0;
  }

  .site-header-wordmark .wm-prefix {
    opacity: 0.25;
    filter: blur(0.3px);
  }

  .site-header-nav {
    display: flex;
    gap: 0.125rem;
    padding-right: 1rem;
    margin-right: 0.5rem;
    border-right: 1px solid var(--border);
  }

  .site-header-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: all var(--duration) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .site-header-link:hover {
    color: var(--text);
    background: var(--surface);
  }

  .site-header-link--active {
    color: var(--accent);
    background: var(--accent-bg);
    font-weight: 600;
  }

  .site-header-utils {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* Hide mobile elements on desktop */
  .bottom-nav { display: none; }
  .top-bar { display: none; }

  /* Offset main content below fixed header */
  main { padding-top: calc(54px + 3rem); padding-bottom: 5rem; }

  /* page-channel overrides padding-top: 0 — restore header offset on desktop */
  .page-channel { padding-top: 54px !important; }

  /* Widen content column on desktop */
  main { max-width: 760px; }

  /* Primary button: not full-width on desktop */
  .btn--primary { max-width: 320px; margin-left: auto; margin-right: auto; }

  /* Hero text larger on desktop */
  .hero-text { font-size: 4rem; }

  /* Sort tabs wrap instead of scroll on desktop */
  .sort-tabs { overflow-x: visible; flex-wrap: wrap; }

  /* page-channel: breathing room below site header */
  .page-channel { padding-top: calc(54px + 1rem) !important; }
}

/* ── Desktop ambient aside (right column) ─────────────────── */
.ambient-aside { display: none; }

@media (min-width: 1024px) {
  .ambient-aside {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: fixed;
    right: max(1.5rem, calc(50% - 380px));
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.07;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--text);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    letter-spacing: 0.18em;
  }
}

/* ── Circular char counter arc ────────────────────────────── */
.char-arc {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.375rem;
}

.char-arc-svg {
  transform: rotate(-90deg);
  overflow: visible;
  flex-shrink: 0;
}

.char-arc-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}

.char-arc-ring {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 69.12;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.25s var(--ease), stroke 0.25s var(--ease);
}

.char-arc-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  min-width: 2ch;
  text-align: right;
  transition: color 0.25s var(--ease);
}

.char-arc--warn .char-arc-ring { stroke: var(--danger-text); }
.char-arc--warn .char-arc-num  { color: var(--danger-text); }


/* ── Feed masonry layout (1280px+, public feed only) ──────── */
@media (min-width: 1280px) {
  #feed-list {
    columns: 2;
    column-gap: 0.875rem;
  }

  #feed-list .feed-item {
    break-inside: avoid;
    margin-bottom: 0.875rem;
  }
}


