/* ==========================================================================
   Modern Epistolary UI — 静かな薄暮の海と夜空の文通空間
   ========================================================================== */

:root {
  --bg-surface: rgba(15, 23, 42, 0.60);
  --bg-surface-glass: rgba(15, 23, 42, 0.50);
  --bg-subtle: rgba(255, 255, 255, 0.08);
  --ink-main: #ffffff;         /* 澄んだルミナスホワイト */
  --ink-secondary: #cbd5e1;   /* 読みやすいライトスレートグレー */
  --ink-muted: #94a3b8;
  --accent-navy: #38bdf8;
  --accent-gold: #f59e0b;      /* 雨の街明かりのような温かいアンバーゴールド */
  --accent-rose: #fb7185;
  --border-glass: rgba(255, 255, 255, 0.20);
  --border-light: rgba(255, 255, 255, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.40);
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.20);
  --font-serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --font-sans: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body {
  color: var(--ink-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* モバイル・iOSでもブレずに完全固定される背景レイヤー */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: 
    linear-gradient(rgba(10, 15, 29, 0.08), rgba(10, 15, 29, 0.22)),
    url('../assets/nyc_night.jpg') no-repeat center center;
  background-size: cover;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  transition: background 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

/* 時間帯テーマごとの背景・光彩 */
body.theme-morning::before {
  background: 
    linear-gradient(rgba(15, 23, 42, 0.08), rgba(30, 41, 59, 0.22)),
    url('../assets/nyc_morning.jpg') no-repeat center center;
  background-size: cover;
}

body.theme-day::before {
  background: 
    linear-gradient(rgba(15, 23, 42, 0.10), rgba(30, 41, 59, 0.26)),
    url('../assets/nyc_day.jpg') no-repeat center center;
  background-size: cover;
}

body.theme-sunset::before {
  background: 
    linear-gradient(rgba(24, 15, 30, 0.10), rgba(20, 10, 25, 0.26)),
    url('../assets/nyc_sunset.jpg') no-repeat center center;
  background-size: cover;
}

body.theme-night::before {
  background: 
    linear-gradient(rgba(10, 15, 29, 0.08), rgba(10, 15, 29, 0.24)),
    url('../assets/nyc_night.jpg') no-repeat center center;
  background-size: cover;
}

/* -------------------------------------------------------------
   ヘッダー（夜空に溶け込むすりガラスナビ）
   ------------------------------------------------------------- */
.site-header {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 640px) {
  .header-inner {
    padding: 10px 14px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-symbol {
  font-size: 22px;
  color: var(--accent-gold);
  line-height: 1;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.8px;
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 1.2px;
  font-weight: 400;
  margin-top: 1px;
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 14.5px;
  }
  .brand-subtitle {
    font-size: 9.5px;
    letter-spacing: 0.8px;
  }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .header-nav {
    gap: 6px;
  }
}

.nav-user-label {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------
   ボタン & リンク
   ------------------------------------------------------------- */
.solid-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.solid-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.solid-btn:active:not(:disabled) {
  transform: translateY(0);
}

.solid-btn.primary {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.4);
}

.solid-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55);
}

.solid-btn.accent {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.solid-btn.large {
  padding: 12px 28px;
  font-size: 14.5px;
}

.solid-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  border-color: rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.solid-btn.btn-dimmed {
  opacity: 0.65;
  filter: grayscale(0.2);
}
.solid-btn.btn-dimmed:hover {
  opacity: 0.9;
  filter: none;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.ghost-btn.danger:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.15);
}

.subtle-link {
  color: #94a3b8;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.subtle-link:hover {
  color: #f8fafc;
}

/* -------------------------------------------------------------
   共通コンテナ
   ------------------------------------------------------------- */
.main-container {
  max-width: 960px;
  width: 92%;
  margin: 32px 0 60px 4.5vw;
  flex: 1;
}

@media (max-width: 1024px) {
  .main-container {
    max-width: 100%;
    margin: 24px auto 60px;
  }
}

.serif-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.5;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.serif-lead {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

/* -------------------------------------------------------------
   1. 認証画面（ログイン / 登録）
   ------------------------------------------------------------- */
.auth-section {
  max-width: 460px;
  margin: 48px 0 48px 5vw;
}

@media (max-width: 860px) {
  .auth-section {
    margin: 40px auto;
  }
}

.auth-card {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 42px 38px;
  box-shadow: var(--shadow-glass);
}

.auth-intro {
  text-align: center;
  margin-bottom: 30px;
}

.input-field {
  margin-bottom: 20px;
}

.input-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.input-field input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14.5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-field input:focus {
  background: rgba(15, 23, 42, 0.85);
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.field-hint {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 5px;
  line-height: 1.4;
}

.error-text {
  color: #e11d48;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

/* -------------------------------------------------------------
   2. 感性アンケート画面
   ------------------------------------------------------------- */
.survey-section {
  max-width: 760px;
  margin: 20px auto;
}

.survey-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 46px 42px;
  box-shadow: var(--shadow-glass);
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.survey-q-block {
  margin-bottom: 32px;
}

.q-label {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.q-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #f59e0b;
  font-size: 12px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: #f1f5f9;
  transition: all 0.2s ease;
}

.radio-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #f59e0b;
  transform: translateX(3px);
}

.radio-card input[type="radio"]:checked + .radio-content {
  color: #f59e0b;
  font-weight: 600;
}

.survey-submit-area {
  text-align: center;
  margin-top: 36px;
}

/* -------------------------------------------------------------
   3. マッチング待機画面
   ------------------------------------------------------------- */
.waiting-section {
  max-width: 600px;
  margin: 60px auto;
}

.waiting-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 50px 38px;
  text-align: center;
  box-shadow: var(--shadow-glass);
}

.waiting-icon {
  font-size: 46px;
  margin-bottom: 16px;
}

.waiting-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------
   4. メイン文通空間（メールボックス）
   ------------------------------------------------------------- */
.penpal-header-bar {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-glass);
}

.penpal-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.penpal-role-tag {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-weight: 600;
}

.penpal-name-display {
  font-family: var(--font-serif);
  font-size: 22px;
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.penpal-trip-stat {
  font-size: 12.5px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
}

/* 配達中バナー（深みのあるトワイライトブルー） */
.transit-banner {
  background: rgba(30, 58, 138, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* 10往復達成シークレットバナー */
.secret-meet-banner {
  background: rgba(131, 24, 67, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(244, 114, 182, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.meet-rose-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.secret-meet-banner h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #f472b6;
  margin-bottom: 6px;
}

.secret-meet-banner p {
  font-size: 13px;
  color: #fce7f3;
  margin-bottom: 14px;
}

/* 2カラムワークスペース */
.letters-workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: 600px;
}

@media (max-width: 860px) {
  .letters-workspace {
    grid-template-columns: 1fr;
  }
}

/* 左ペイン：手紙一覧 */
.letters-sidebar {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-switcher {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.5);
}

.tab-btn {
  flex: 1;
  padding: 13px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 -2px 0 #f59e0b inset;
}

.tab-count {
  background: var(--accent-gold);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.letters-list-container {
  flex: 1;
  overflow-y: auto;
  max-height: 580px;
}

.letters-list {
  list-style: none;
}

.letter-item {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s ease;
}

.letter-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.letter-item.active {
  background: rgba(59, 130, 246, 0.2);
  border-left: 3px solid #60a5fa;
}

.letter-item-subject {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 5px;
  line-height: 1.4;
}

.letter-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* 右ペイン：便箋ビュー */
.letter-paper-article {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.paper-sheet {
  padding: 46px 52px;
  background: transparent;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .paper-sheet {
    padding: 24px 20px;
  }
}

.paper-header {
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.paper-subject-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.paper-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.paper-body-content {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 2.3;
  color: #f1f5f9;
  white-space: pre-wrap;
  letter-spacing: 0.05em;
  flex: 1;
  min-height: 220px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.paper-footer-action {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.reply-status-hint {
  font-size: 13px;
}

.paper-empty-state {
  padding: 120px 20px;
  text-align: center;
  color: var(--ink-muted);
  font-family: var(--font-serif);
}

.paper-empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* -------------------------------------------------------------
   手紙執筆モーダル（便箋エディタ）
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.compose-sheet-dialog {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  background: rgba(15, 23, 42, 0.70);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compose-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
}

.compose-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

.compose-to-name {
  font-family: var(--font-serif);
  color: #ffffff;
  font-size: 16.5px;
}

.compose-header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.delay-select-label {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.minimal-select {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  font-size: 12.5px;
  color: #ffffff;
  outline: none;
}

.close-icon-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
}

.close-icon-btn:hover {
  color: #ffffff;
}

.compose-topic-hint {
  margin: 12px 24px 4px 24px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  color: #f1f5f9;
}

.topic-hint-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.topic-hint-content {
  font-size: 12.5px;
  color: #e2e8f0;
}

.topic-hint-content ul {
  margin: 4px 0 6px 18px;
  padding: 0;
}

.topic-hint-content li {
  margin-bottom: 2px;
}

.topic-prompt-lead {
  color: #38bdf8;
  font-weight: 500;
  margin-top: 6px;
}

.compose-covenant-hint {
  margin: 6px 24px 8px 24px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.compose-subject-line input {
  width: 100%;
  padding: 18px 30px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  background: transparent;
}

.compose-subject-line input::placeholder {
  color: #64748b;
  font-weight: normal;
}

.compose-body-area {
  flex: 1;
  padding: 24px 30px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.2);
}

.compose-body-area textarea {
  width: 100%;
  min-height: 300px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 2.3;
  color: #f8fafc;
  letter-spacing: 0.04em;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
}

.compose-body-area textarea::placeholder {
  color: #64748b;
  font-size: 15px;
}

.compose-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count-pill {
  font-size: 12.5px;
  font-weight: 500;
}

.char-count-pill.invalid {
  color: #fb7185;
}

.char-count-pill.valid {
  color: #4ade80;
}

.compose-actions {
  display: flex;
  gap: 10px;
}

/* -------------------------------------------------------------
   開示リクエストダイアログ
   ------------------------------------------------------------- */
.disclosure-dialog {
  width: 100%;
  max-width: 520px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.disclosure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.disclosure-header h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--accent-rose);
}

.disclosure-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.disclosure-body textarea {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: 18px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
}

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

/* -------------------------------------------------------------
   下部テスト補助バー
   ------------------------------------------------------------- */
.demo-bar {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 12px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-label {
  color: #fbbf24;
}

.demo-bar button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.demo-bar button:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* -------------------------------------------------------------
   文通の小さな約束 & 設定モーダル
   ------------------------------------------------------------- */
.covenant-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px auto;
  max-width: 480px;
  text-align: left;
}

.covenant-title {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.covenant-list {
  list-style: none;
  font-size: 13px;
  line-height: 1.8;
  color: #cbd5e1;
}

.covenant-list li {
  position: relative;
  padding-left: 16px;
}

.covenant-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #f59e0b;
}

.compose-covenant-hint {
  padding: 10px 20px;
  background: rgba(245, 158, 11, 0.1);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 12.5px;
  color: #fef3c7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-hint-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #e2e8f0;
  margin-bottom: 24px;
}

.settings-sub-note {
  font-size: 12px;
  color: #94a3b8;
  display: inline-block;
  margin-top: 4px;
}

/* ユーティリティ */
.hidden {
  display: none !important;
}

/* -------------------------------------------------------------
   時間帯切り替えコントロール
   ------------------------------------------------------------- */
.time-mode-container {
  position: relative;
  display: inline-flex;
}

.time-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.time-mode-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.time-mode-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  padding: 8px;
  min-width: 210px;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.time-mode-dropdown.show {
  display: flex;
}

.time-mode-dropdown-header {
  font-size: 11px;
  color: var(--ink-muted);
  padding: 4px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.time-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--ink-main);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.time-option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.time-option-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  font-weight: 600;
}

.time-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-option-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

