/* ========================================================
   日記交換 — トンマナはflask-diaryを参考に
   - 明朝体（Shippori Mincho B1）
   - 紙のような #fdfdfb / 落ち着いた #333
   - 余白多め、letter-spacing 0.15em、line-height 2.0
   - 動きは控えめ、フェードのみ
   ======================================================== */

* {
  box-sizing: border-box;
}

/* ページ遷移を滑らかなクロスフェードに（対応ブラウザのみ。
   非対応ブラウザでは無視され通常の遷移にフォールバック） */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: ease;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--diary-font, 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif);
  letter-spacing: 0.22em;
  background-color: #fdfdfb;
  color: #202020;
  line-height: 2.15;
  font-size: 13.5px;
  min-height: 100vh;
}

/* ユーザー設定でフォント切り替え */
body[data-font="mincho"] {
  --diary-font: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}
body[data-font="gothic"] {
  --diary-font: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  letter-spacing: 0.12em;
}
body[data-font="maru"] {
  --diary-font: 'Kiwi Maru', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  letter-spacing: 0.10em;
}
body[data-font="koshu"] {
  --diary-font: 'Hina Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  letter-spacing: 0.20em;
}
body[data-font="teinei"] {
  --diary-font: 'Klee One', 'Hiragino Mincho ProN', 'Yu Mincho', cursive;
  letter-spacing: 0.08em;
}
body[data-font="kawaii"] {
  --diary-font: 'Yomogi', 'Hiragino Mincho ProN', 'Yu Mincho', cursive;
  letter-spacing: 0.08em;
}

/* 文字の大きさ（自分の日記・だれかの日記の日付と本文だけに適用）
   --entry-body-size を変えると content も entry-date も連動する（日付は本文の 1.3 倍） */
body[data-font-size="small"]  { --entry-body-size: 0.88em; }
body[data-font-size="large"]  { --entry-body-size: 1.18em; }
/* 'normal' はそのまま（既定 1em） */

body .entry .content { font-size: var(--entry-body-size, 1em); }

.font-size-sample[data-size="small"]  { font-size: 0.88em; }
.font-size-sample[data-size="large"]  { font-size: 1.18em; }

/* 設定画面のフォントプレビュー */
.settings-subtitle {
  margin: 28px 0 6px;
  font-size: 0.95em;
  color: #555;
  letter-spacing: 0.18em;
  font-weight: 500;
}

/* 日記のデザイン プレビュー */
.design-preview {
  margin: 16px 0 24px;
  padding: 14px 18px;
  background: #f3f3f0;
  border-radius: 6px;
}

.design-preview-date {
  color: #444;
}

.settings-options-fonts label {
  letter-spacing: 0.05em;
}

.font-sample[data-font="mincho"] {
  font-family: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}
.font-sample[data-font="gothic"] {
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}
.font-sample[data-font="maru"] {
  font-family: 'Kiwi Maru', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}
.font-sample[data-font="koshu"] {
  font-family: 'Hina Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}
.font-sample[data-font="teinei"] {
  font-family: 'Klee One', 'Hiragino Mincho ProN', 'Yu Mincho', cursive;
}
.font-sample[data-font="kawaii"] {
  font-family: 'Yomogi', 'Hiragino Mincho ProN', 'Yu Mincho', cursive;
}

a {
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

a:hover {
  border-bottom-color: #aaa;
}

/* ------- レイアウト ------- */
.centered {
  max-width: 540px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
  animation: page-fade-in 700ms ease-out both;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* ------- トップバー ------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #ececea;
  background: rgba(253, 253, 251, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .brand {
  font-size: 1.05em;
  letter-spacing: 0.3em;
  color: #444;
}

.topbar .brand a {
  color: inherit;
  border-bottom: none;
}

.topbar .brand a:hover {
  color: #202020;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92em;
}

.topnav .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-bottom: none;
  border-radius: 50%;
  opacity: 0.55;
  transition: opacity 0.25s ease, background 0.25s ease;
  position: relative;
}

/* 更新バッジ（admin にだけ付く赤丸） */
.topnav .icon-link.has-badge::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #d04949;
  border-radius: 50%;
  border: 1.5px solid #fdfdfb;
}

.topnav .icon-link:hover {
  opacity: 0.9;
}

.topnav .icon-link.is-active {
  opacity: 1;
  background: #ececea;
  animation: tab-active-in 0.45s ease both;
}

@keyframes tab-active-in {
  from { background: rgba(236, 236, 234, 0); opacity: 0.55; }
  to   { background: rgba(236, 236, 234, 1); opacity: 1; }
}

.topnav .icon-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* bookmark / settings は他のアイコンより視覚的に大きく見えるので 0.9倍に。
   transform を使うので当たり判定（ボタン領域・背景丸）はそのまま。 */
.topnav .icon-link img[src$="bookmark.png"],
.topnav .icon-link img[src$="settings.png"] {
  transform: scale(0.9);
}

/* ------- タイトル ------- */
.title-vertical {
  font-weight: 500;
  font-size: 1.35em;
  margin: 0 0 32px;
  line-height: 2.4;
  color: #202020;
  letter-spacing: 0.24em;
}

/* 行末の句読点で視覚的に左寄せに見えるのを補正 */
.title-vertical-shift-r {
  padding-left: 0.6em;
}

/* ワードマーク（オンボーディング）— SVG ロゴ */
.wordmark {
  display: flex;
  justify-content: center;
  margin: 0 0 32px;
  padding-top: 8px;
}

.wordmark-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

.landing-sea {
  display: block;
  margin: 0 auto 32px;
  width: 60px;
  height: auto;
  opacity: 0.85;
  animation: sea-sway 3.6s ease-in-out infinite;
}

@keyframes sea-sway {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-2px) rotate(1deg); }
}

@media (max-width: 480px) {
  .wordmark-img {
    max-width: 220px;
  }
  .landing-sea {
    width: 52px;
  }
}

.section-title {
  font-size: 1.05em;
  font-weight: 500;
  color: #555;
  margin: 48px 0 18px;
  letter-spacing: 0.2em;
}

.section-title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.7;
}

.section-title:first-child {
  margin-top: 24px;
}

/* ------- 文章 ------- */
.lead {
  color: #404040;
  margin: 28px 0;
  letter-spacing: 0.22em;
}

.lead.lead-small {
  font-size: 0.9em;
}

.lead.lead-xs {
  font-size: 0.8em;
}

.lead + .lead {
  margin-top: 36px;
}

.hint {
  color: #888;
  font-size: 0.88em;
  margin-top: 8px;
}

.empty {
  color: #999;
  text-align: center;
  padding: 32px 0;
}

.status {
  min-height: 1.6em;
  color: #777;
  font-size: 0.88em;
  margin-top: 12px;
}

/* 空のときはスペースを取らない（メッセージ表示時だけ場所を確保） */
.status:empty {
  display: none;
}

/* アプリ内ブラウザ警告（パスキー失敗時に表示） */
.webview-warning {
  margin: 18px auto 0;
  max-width: 420px;
  background: #fdf7ec;
  border: 1px solid #e8d9b4;
  border-radius: 8px;
  padding: 14px 18px;
  text-align: left;
  color: #4a3f25;
  font-size: 0.92em;
  line-height: 1.7;
}

.webview-warning-title {
  margin: 0 0 6px;
  font-weight: 600;
}

.webview-warning-body {
  margin: 0 0 8px;
  color: #5d4f33;
}

.webview-warning-sub {
  margin: 0 0 10px;
  color: #7a6c4f;
  font-size: 0.82em;
  line-height: 1.6;
}

.webview-warning-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.webview-warning-status {
  font-size: 0.88em;
  color: #888;
}

/* ------- ボタン ------- */
.btn-primary {
  display: inline-block;
  font-family: inherit;
  font-size: 1em;
  letter-spacing: 0.2em;
  background: #333;
  color: #fdfdfb;
  border: none;
  padding: 12px 36px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: #555;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-text {
  font-family: inherit;
  font-size: 0.92em;
  letter-spacing: 0.15em;
  background: transparent;
  color: #666;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.btn-text:hover {
  color: #333;
  border-bottom-color: #ccc;
}

.btn-icon {
  font-family: inherit;
  font-size: 0.85em;
  letter-spacing: 0.18em;
  background: transparent;
  color: #888;
  border: 1px solid #e1e1de;
  padding: 4px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn-icon:hover {
  color: #333;
  border-color: #aaa;
}

.btn-icon.is-active {
  color: #fdfdfb;
  background: #555;
  border-color: #555;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin: 56px 0 32px;
}

/* .actions 内のセカンダリ・リンク（はじめる/ログイン下のテキストリンク） */
.actions a.btn-text {
  font-size: 0.82em;
  letter-spacing: 0.18em;
  color: #707070;
  border-bottom: none;
  padding: 4px 8px;
}

.actions a.btn-text:hover {
  color: #333;
}

/* ------- エディタ ------- */
.editor-block {
  margin-top: 32px;
}

textarea#editor {
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 1em;
  line-height: 2.0;
  letter-spacing: 0.12em;
  color: #333;
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 6px;
  resize: vertical;
}

textarea#editor:focus {
  outline: none;
  border-color: #b8b8b0;
}

.editor-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.88em;
  color: #888;
  flex-wrap: wrap;
  gap: 8px;
}

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

/* ------- 受信 ------- */
.placeholder-card {
  border: 1px dashed #d9d9d3;
  border-radius: 6px;
  padding: 28px 20px;
  text-align: center;
  color: #888;
  font-size: 0.92em;
  margin: 24px 0;
}

/* きょう届いた日記（薄グレーで区別） */
.entry-today {
  background: #efefec;
  border-radius: 8px;
  padding: 20px 22px;
  margin: 8px 0 40px;
  position: relative;
}

.entry-today .entry-header {
  align-items: center;
}

.entry-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.today-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78em;
  letter-spacing: 0.25em;
  color: #888;
}

.today-label-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  opacity: 0.85;
}

.entry-today + .bookmarks-block .entry:first-child,
.entry + .entry {
  margin-top: 28px;
}

.entry-bookmark-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  max-height: 80px;
  overflow: hidden;
  transition: max-height 0.28s ease, margin-top 0.28s ease, opacity 0.28s ease;
}

/* メモ欄の直後に来るときは、本文→メモ欄と同じ 10px に揃える */
.memo-area + .entry-bookmark-row {
  margin-top: 10px;
}

/* メモが確定保存されている（エリア表示中・非編集）なら、ボタン行をふわっと畳む */
.memo-area:not([hidden]):not(.is-editing) + .entry-bookmark-row {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

/* メモエリア（しおり） */
.memo-area {
  margin-top: 10px;
}

/* メモボタンのアイコン切り替え（編集中＝check.png、それ以外＝draft.png） */
.memo-btn .memo-icon-confirm { display: none; }
.memo-btn.is-editing .memo-icon-default { display: none; }
.memo-btn.is-editing .memo-icon-confirm { display: inline; }

/* メモが確定保存されたあとはボタン行ごと畳む（具体的なアニメは .entry-bookmark-row 側で定義） */

.memo-input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: calc(var(--entry-body-size, 1em) * 0.8);
  letter-spacing: inherit;
  line-height: 1.7;
  color: #404040;
  background: #f7f7f4;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 10px;
  resize: none;
  /* 50文字なので長くても3行程度。中でスクロールさせず、内容に応じて伸ばす */
  overflow: hidden;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* 編集中は枠線あり */
.memo-area.is-editing .memo-input {
  background: #f7f6f1;
  border-color: #e3e1d8;
}

.memo-area.is-editing .memo-input:focus {
  border-color: #999;
  background: #fdfdfb;
}

/* ------- エントリー ------- */
.entry {
  margin: 0 0 40px;
  opacity: 0.96;
}

.entry-date {
  font-size: calc(var(--entry-body-size, 1em) * 1.3);
  color: #202020;
  margin: 0;
  letter-spacing: 0.18em;
  font-weight: 400;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

/* ⋯メニュー */
.entry-menu {
  position: relative;
}

.entry-menu-toggle {
  font-family: inherit;
  font-size: 1.1em;
  color: #888;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  letter-spacing: 0;
}

.entry-menu-toggle:hover {
  color: #333;
}

.entry-menu-list {
  list-style: none;
  position: absolute;
  top: 24px;
  right: 0;
  background: #fdfdfb;
  border: 1px solid #e1e1de;
  border-radius: 6px;
  padding: 6px 0;
  margin: 0;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 20;
}

.entry-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.15em;
  color: #555;
  background: transparent;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
}

.entry-menu-item:hover {
  background: #f5f5f0;
  color: #202020;
}

.content {
  white-space: pre-line;
}

.entry.draft {
  border-left: 2px solid #e6d8a0;
  padding-left: 18px;
  background: rgba(255, 252, 240, 0.4);
  border-radius: 0 4px 4px 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.entry.draft::before {
  content: '下書き';
  display: inline-block;
  font-size: 0.78em;
  color: #b09a4a;
  letter-spacing: 0.3em;
  margin-bottom: 4px;
}

.entry-actions, .entry-meta {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ------- 設定 ------- */
.settings-block {
  margin: 0 0 56px;
  padding-bottom: 16px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.inline-form input[type="text"] {
  flex: 1 1 200px;
  font-family: inherit;
  font-size: 1em;
  padding: 8px 12px;
  border: 1px solid #e6e6e2;
  border-radius: 6px;
  background: #fdfdfb;
  color: #333;
  letter-spacing: 0.1em;
}

.inline-form input[type="text"]:focus {
  outline: none;
  border-color: #b8b8b0;
}

/* ------- 設定: 日付フォーマット ------- */
.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
}

.settings-label {
  width: 60px;
  flex-shrink: 0;
  font-size: 0.92em;
  color: #666;
  letter-spacing: 0.18em;
}

.settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.settings-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9em;
  color: #444;
  cursor: pointer;
  letter-spacing: 0.1em;
}

.settings-options input[type="radio"] {
  margin: 0;
  accent-color: #555;
}

.settings-block .hint #date-preview {
  display: inline-block;
  background: #efefec;
  padding: 4px 14px;
  border-radius: 4px;
  font-feature-settings: "tnum" 1, "lnum" 1;
  color: #202020;
  font-size: 1.02em;
  letter-spacing: 0.18em;
  margin-left: 6px;
}

.settings-logout {
  margin-top: 64px;
  margin-bottom: 24px;
  text-align: center;
}

/* 引き継ぎコード表示 */
.transfer-code {
  margin: 16px 0;
  padding: 18px 20px;
  background: #efefec;
  border-radius: 8px;
}

.transfer-code.is-expired {
  opacity: 0.5;
}

.transfer-code-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.transfer-code code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.4em;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #202020;
  background: #fdfdfb;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #d8d8d4;
  user-select: all;
}

.transfer-notes {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 0.86em;
  color: #888;
}

.transfer-notes li {
  position: relative;
  padding: 4px 0 4px 1.2em;
}

.transfer-notes li::before {
  content: '・';
  position: absolute;
  left: 0;
}

.transfer-url {
  word-break: break-all;
  overflow-wrap: anywhere;
  color: #666;
}

/* ログイン画面のコード入力 */
.redeem-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ececea;
}

.redeem-input-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.redeem-input-row input[type="text"] {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 14px;
  width: 200px;
  border: 1px solid #d8d8d4;
  border-radius: 6px;
  background: #fdfdfb;
  color: #202020;
}

.redeem-input-row input[type="text"]:focus {
  outline: none;
  border-color: #888;
}

/* ------- フッター ------- */
.page-foot-link {
  margin-top: 64px;
  text-align: center;
  font-size: 0.7em;
  letter-spacing: 0.2em;
  color: #aaa;
}

.page-foot-link a {
  color: #aaa;
  border-bottom: none;
}

.page-foot-link a:hover {
  color: #666;
}

.page-foot-link-tiny {
  margin-top: 48px;
}

/* footnote の上余白を詰めるバリアント（landingで使用） */
.footnote-tight {
  margin-top: 36px;
}

/* ------- アカウント削除 ------- */
.settings-danger {
  margin-top: 0;
  padding-bottom: 0;
  text-align: center;
}

/* admin 限定のデバッグ情報セクション */
.settings-debug {
  margin-top: 48px;
  background: #f7f7f3;
  border: 1px dashed #d6d6d0;
  border-radius: 8px;
  padding: 18px 20px;
}

.settings-debug .section-title {
  color: #666;
  font-size: 0.95em;
}

.debug-list {
  margin: 0;
  font-size: 0.9em;
  color: #444;
}

.debug-list dt {
  font-weight: 600;
  color: #555;
  margin-top: 14px;
}

.debug-list dt:first-of-type {
  margin-top: 0;
}

.debug-list dd {
  margin: 4px 0 0;
  padding-left: 0;
}

.debug-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #ececea;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
  word-break: break-all;
}

.debug-list .hint {
  margin: 4px 0 0;
  font-size: 0.86em;
  color: #888;
  line-height: 1.7;
}

.danger-text {
  color: #b85a4a;
  font-size: 0.88em;
  line-height: 1.95;
  margin: 0 0 14px;
}

.btn-danger-link,
.btn-danger {
  display: inline-block;
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.18em;
  color: #b85a4a;
  background: transparent;
  border: 1px solid #d8a89c;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-danger-link:hover,
.btn-danger:hover {
  background: #b85a4a;
  color: #fdfdfb;
  border-color: #b85a4a;
}

.export-links {
  margin-top: 14px;
  font-size: 0.92em;
  letter-spacing: 0.18em;
}

.export-links a {
  color: #555;
  border-bottom: 1px solid #ccc;
  padding: 2px 6px;
}

.export-links a:hover {
  color: #202020;
  border-bottom-color: #555;
}

.export-sep {
  color: #bbb;
  margin: 0 6px;
}

.text-link-danger {
  display: inline-block;
  font-size: 0.82em;
  letter-spacing: 0.18em;
  color: #b85a4a;
  border-bottom: none;
  padding: 4px 0;
}

.text-link-danger:hover {
  color: #8a3f33;
  border-bottom-color: transparent;
}

.account-delete-page {
  max-width: 540px;
  padding-top: 40px;
}

.account-delete-page form {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ------- プライバシーポリシー ------- */
.privacy-page {
  max-width: 720px;
  padding-top: 56px;
  padding-bottom: 80px;
}

.privacy-title {
  font-size: 1.4em;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin: 0 0 18px;
  color: #202020;
}

.privacy-lead {
  color: #555;
  font-size: 0.92em;
  margin: 0 0 36px;
}

.privacy-section {
  margin: 32px 0;
}

.privacy-section h2 {
  font-size: 1em;
  font-weight: 500;
  color: #444;
  letter-spacing: 0.18em;
  margin: 0 0 10px;
}

.privacy-section p,
.privacy-section li {
  font-size: 0.92em;
  color: #404040;
  line-height: 2.0;
}

.privacy-section ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.privacy-section ul li {
  position: relative;
  padding-left: 1.2em;
  margin: 4px 0;
}

.privacy-section ul li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: #aaa;
}

.privacy-section a {
  color: #404040;
  border-bottom: 1px solid #ccc;
}

.privacy-section a:hover {
  border-bottom-color: #666;
}

.privacy-updated {
  margin-top: 48px;
  font-size: 0.82em;
  color: #999;
  letter-spacing: 0.15em;
}

.privacy-back {
  margin-top: 32px;
  font-size: 0.92em;
}

.footnote {
  margin-top: 64px;
  font-size: 0.88em;
  color: #888;
  text-align: left;
}

.footnote summary {
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.25em;
  margin-bottom: 18px;
}

/* 開くときのアニメーション（summary 以外の中身をふわっと出す） */
@keyframes footnoteOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.footnote[open] > *:not(summary) {
  animation: footnoteOpen 320ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .footnote[open] > *:not(summary) { animation: none; }
}

.footnote ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 2 つの ul を分けて書いたときの間隔 */
.footnote ul + ul {
  margin-top: 18px;
}

.footnote li {
  position: relative;
  padding: 6px 0 6px 1.4em;
  margin: 6px 0;
}

.footnote li::before {
  content: '・';
  position: absolute;
  left: 0;
  top: 6px;
  color: #bbb;
}

/* ------- レスポンシブ ------- */
@media (max-width: 600px) {
  body { font-size: 13px; }
  .container { padding: 18px 18px 60px; }
  .topbar { padding: 14px 18px; }
  .title-vertical { font-size: 1.18em; }
  .btn-primary { padding: 10px 28px; }
}

/* ========================================================
   FAB（投稿ボタン）
   ======================================================== */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fdfdfb;
  border: 1px solid #e1e1de;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.fab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.85;
}

@media (max-width: 480px) {
  .fab {
    bottom: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
  }
}

/* ========================================================
   モーダル
   ======================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;  /* 中央寄せだと内容が増えたとき上方向にも伸びてしまうため上端固定 */
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(50, 50, 48, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: #fdfdfb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 80px);  /* .modal の上下padding(40px×2)に合わせる */
  overflow-y: auto;
  padding: 40px 32px 32px;
}

@media (max-width: 480px) {
  .modal { padding: 20px 14px; }
  .modal-panel { padding: 32px 22px 24px; max-height: calc(100vh - 40px); }
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.modal-close:hover {
  color: #333;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

/* 投稿モーダルのコントロール行（日付＋アクション） */
.compose-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.compose-controls .modal-actions {
  margin-top: 0;
}

/* 日付ピッカー：見た目は下線つき数字、実体は input をオーバーレイで透明配置。
   label の for 属性で input と確実に紐づけ、iOS でもタップで picker が開く。 */
.date-picker-wrap {
  position: relative;
  display: inline-block;
}

.date-picker {
  display: inline-block;
  cursor: pointer;
  position: relative;
  z-index: 2;
  font-size: 0.95em;
  letter-spacing: 0.14em;
  color: #404040;
  font-feature-settings: "tnum" 1, "lnum" 1;
  padding: 4px 8px 3px;
  min-width: 56px;
  text-align: center;
  border-bottom: 1px solid #aaa;
}

.date-picker:hover {
  border-bottom-color: #555;
  color: #202020;
}

.date-picker-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 16px; /* iOS のフォーカス時ズーム抑止 */
  z-index: 1; /* labelの裏。クリックは label.for で input にフォワード */
}

/* 投稿モーダル下のプライベートチェック */
.private-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.private-toggle {
  display: inline-flex; /* ラベル幅を内容ぶんだけにして、外側クリックで反応させない */
  align-items: center;
  gap: 6px;
  font-size: 0.66em;
  color: #777;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.private-toggle input[type="checkbox"] {
  width: 12px;
  height: 12px;
  margin: 0;
  cursor: pointer;
  accent-color: #555;
}

.editor-error {
  color: #b85a4a;
  font-size: 0.88em;
  margin: 8px 0 0;
}

/* テキストエリア。iOS ズームは viewport meta の maximum-scale=1 で抑止しているので、
   font-size を本文の80%程度まで下げてもOK */
#compose-modal textarea#editor,
#edit-modal textarea#edit-editor {
  width: 100%;
  min-height: 220px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 0.8em;
  line-height: 2.0;
  letter-spacing: 0.18em;
  color: #202020;
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
  margin-top: 8px;
}

#compose-modal textarea#editor::placeholder {
  color: #aaa;
  font-size: 1em;
}

#compose-modal textarea#editor:focus,
#edit-modal textarea#edit-editor:focus {
  outline: none;
  border-color: #b8b8b0;
}

.edit-hint {
  margin: 0 0 4px;
  font-size: 0.82em;
  color: #888;
}

/* 下書きリスト */
.draft-list-section {
  margin-top: 36px;
  border-top: 1px solid #ececea;
  padding-top: 24px;
}

.draft-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  font-weight: 500;
  color: #555;
  margin: 0 0 6px;
  letter-spacing: 0.2em;
}

.draft-section-title img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.draft-list {
  margin-top: 14px;
}

.draft-item {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 1行・複数行どちらでも縦中央で揃える */
  gap: 12px;
  padding: 14px 16px;
  margin: 8px 0;
  background: #f3f3f0;
  border: 1px solid #e6e6e2;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.draft-item:hover {
  background: #ececea;
  border-color: #d6d6d2;
}

.draft-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.draft-date {
  font-size: 0.78em;
  color: #999;
  letter-spacing: 0.18em;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.draft-content {
  font-size: 0.92em;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.8;
}

.draft-item .delete-draft-btn {
  flex-shrink: 0;
  font-size: 0.78em;
}

/* 受信モーダル */
.receipt-bottle {
  text-align: center;
  margin: 4px 0 14px;
}

.receipt-bottle-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: inline-block;
  animation: bottle-bob 2.4s ease-in-out infinite;
}

@keyframes bottle-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-3px) rotate(2deg); }
}

.modal-receipt .receipt-label {
  font-size: 0.88em;
  color: #888;
  text-align: center;
  margin: 0 0 22px;
  letter-spacing: 0.2em;
}

.modal-receipt .receipt-content {
  white-space: pre-line;
  line-height: 2.0;
  font-size: 1em;
  color: #202020;
  margin-bottom: 28px;
  padding: 4px 4px;
}

.modal-receipt .receipt-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* 画像アイコン付きボタン */
.btn-icon-img {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.18em;
  color: #555;
  background: transparent;
  border: 1px solid #e1e1de;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn-icon-img img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.btn-icon-img:hover {
  color: #202020;
  border-color: #aaa;
}

.btn-icon-img.is-active {
  color: #fdfdfb;
  background: #555;
  border-color: #555;
}

.btn-icon-img.is-active img {
  filter: invert(1) brightness(1.6);
  opacity: 0.95;
}

/* ========================================================
   管理画面
   ======================================================== */
.admin-page { max-width: 980px; }

.bootstrap-id-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.bootstrap-label {
  font-size: 0.92em;
  color: #666;
  letter-spacing: 0.18em;
}

.bootstrap-id-row code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95em;
  background: #efefec;
  padding: 8px 14px;
  border-radius: 4px;
  user-select: all;
  color: #202020;
}

.admin-badge {
  font-size: 0.78em;
  letter-spacing: 0.3em;
  padding: 4px 12px;
  background: #efefec;
  border-radius: 9999px;
  color: #888;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat-card {
  padding: 16px 18px;
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.78em;
  letter-spacing: 0.2em;
  color: #888;
}

.stat-value {
  font-size: 1.8em;
  letter-spacing: 0.05em;
  color: #202020;
  margin: 6px 0;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.stat-sub {
  font-size: 0.78em;
  color: #888;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.92em;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ececea;
  vertical-align: top;
}

.admin-table th {
  font-weight: 500;
  color: #666;
  font-size: 0.85em;
  letter-spacing: 0.15em;
  background: #f7f7f4;
}

.admin-table .nowrap { white-space: nowrap; }
.admin-table .mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #555;
  font-size: 0.92em;
}

.admin-table .diary-body {
  white-space: pre-line;
  line-height: 1.8;
  color: #202020;
}

/* 投稿された日記カード */
.diary-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diary-card {
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diary-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  font-size: 0.85em;
  color: #777;
}

.diary-card-date {
  color: #444;
}

.diary-card-user {
  color: #888;
}

.diary-card-len {
  color: #999;
}

.diary-card-received {
  color: #999;
  font-size: 0.92em;
  word-break: break-all;
  flex-basis: 100%;
}

.diary-card-ids {
  font-size: 0.85em;
  color: #888;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diary-card-ids .mono {
  color: #555;
}

.id-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: transparent;
  border: none;
  padding: 0;
  color: #5a8aa8;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.id-link:hover {
  color: #2f5d80;
}

/* 詳細モーダル（ID タップで表示） */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.info-modal[hidden] { display: none; }

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.4);
}

.info-modal-inner {
  position: relative;
  background: #fdfdfb;
  border-radius: 10px;
  padding: 24px 28px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.info-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.4em;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.info-modal-close:hover { color: #333; }

.info-modal-title {
  margin: 0 0 14px;
  font-size: 1em;
  letter-spacing: 0.15em;
  color: #444;
}

.info-modal-list {
  margin: 0;
  font-size: 0.92em;
  color: #444;
}

.info-modal-list dt {
  font-weight: 600;
  color: #777;
  margin-top: 12px;
  font-size: 0.86em;
}

.info-modal-list dt:first-of-type { margin-top: 0; }

.info-modal-list dd {
  margin: 3px 0 0;
  word-break: break-all;
}

.info-modal-list .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #333;
}

.info-modal-body-text {
  white-space: pre-line;
  line-height: 1.7;
  background: #f7f7f3;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 4px;
}

.info-modal-loading,
.info-modal-error {
  margin: 0;
  color: #888;
  font-size: 0.92em;
}

.info-modal-error { color: #b85a4a; }

/* 配信テスト */
.delivery-test {
  margin-top: 12px;
}

.delivery-test-buckets {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.delivery-test-buckets label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.delivery-test-result {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
  font-size: 0.92em;
}

.delivery-test-empty {
  color: #999;
  margin: 0;
}

.delivery-test-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f7f7f3;
  border-radius: 6px;
}

.delivery-test-pool {
  margin-top: 14px;
  font-size: 0.88em;
  color: #777;
}

.delivery-test-pool summary {
  cursor: pointer;
  color: #555;
}

.delivery-test-pool ol {
  margin: 8px 0 0 18px;
  padding: 0;
}

.delivery-test-pool li {
  margin: 3px 0;
}

.diary-card-body {
  white-space: pre-line;
  word-wrap: break-word;
  line-height: 1.8;
  color: #202020;
}

.diary-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px dashed #e8e8e3;
  font-size: 0.86em;
  color: #888;
}

.diary-card-actions .mono {
  color: #555;
}

/* カード右上の ⋯ メニュー */
.diary-card-meta {
  position: relative;
}

.diary-card-menu {
  margin-left: auto;
  position: relative;
}

.diary-card-menu-toggle {
  background: transparent;
  border: none;
  font-size: 1.2em;
  color: #999;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.diary-card-menu-toggle:hover {
  color: #555;
}

.diary-card-menu-list {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 4px 0 0;
  padding: 6px 0;
  background: #fdfdfb;
  border: 1px solid #e0e0db;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  list-style: none;
  min-width: 220px;
  z-index: 5;
}

.diary-card-menu-list li {
  padding: 0;
}

.diary-card-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.88em;
  color: #555;
  cursor: pointer;
}

.diary-card-menu-item:hover {
  background: #f3f3f0;
  color: #222;
}

.diary-card.is-excluded {
  opacity: 0.5;
}
.diary-card.is-excluded .diary-card-body {
  text-decoration: line-through;
  text-decoration-color: #888;
}

.exclude-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.88em;
  color: #777;
}

.exclude-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #555;
}

.stats-exclude-btn {
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.05em;
  background: transparent;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.stats-exclude-btn:hover {
  color: #555;
  background: #f3f3f0;
}

.stats-exclude-btn:disabled {
  opacity: 0.4;
  cursor: wait;
}

/* ページ送り */
.diary-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  font-size: 0.92em;
}

.diary-pager-link {
  color: #555;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
}

.diary-pager-link:hover:not(.is-disabled) {
  background: #f3f3f0;
}

.diary-pager-link.is-disabled {
  color: #ccc;
  cursor: default;
}

.diary-pager-meta {
  color: #888;
}

@media (max-width: 600px) {
  .admin-table { font-size: 0.85em; }
  .admin-table th, .admin-table td { padding: 8px 6px; }
}

/* 棒グラフ */
.bar-chart {
  margin-top: 12px;
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
  padding: 16px 18px;
}

.bar-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 0.85em;
  color: #777;
  letter-spacing: 0.15em;
}

.bar-chart-meta {
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.bar-chart-body {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding: 4px 0;
  border-bottom: 1px solid #ececea;
}

.bar-chart-col {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  cursor: default;
}

.bar-chart-bar {
  width: 100%;
  background: #888;
  border-radius: 2px 2px 0 0;
  min-height: 1px;
  transition: background 0.2s ease;
}

.bar-chart-col:hover .bar-chart-bar {
  background: #444;
}

.bar-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75em;
  color: #999;
  letter-spacing: 0.1em;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.bar-chart-axis-hourly {
  position: relative;
  display: block;
  height: 1em;
}

.bar-chart-axis-hourly span {
  position: absolute;
  top: 0;
}

/* ------- ダッシュボード ------- */
.dash-period-toggle {
  display: inline-flex;
  gap: 0;
  margin: 6px 0 16px;
  border: 1px solid #d6d6d0;
  border-radius: 999px;
  overflow: hidden;
  background: #fdfdfb;
}

.dash-period-btn {
  font-family: inherit;
  font-size: 0.88em;
  letter-spacing: 0.18em;
  background: transparent;
  border: none;
  color: #777;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.dash-period-btn + .dash-period-btn {
  border-left: 1px solid #ececea;
}

.dash-period-btn.is-active {
  background: #555;
  color: #fdfdfb;
}

.dash-period-btn:hover:not(.is-active) {
  background: #f3f3f0;
  color: #333;
}

.dash-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.dash-card {
  background: #fdfdfb;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
  padding: 14px 16px;
}

.dash-label {
  font-size: 0.86em;
  color: #888;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.dash-value {
  font-size: 1.6em;
  color: #2a2a2a;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0.05em;
}

.dash-trend-block {
  margin-top: 16px;
}

/* 設定の状況（ユーザーごと一覧） */
.user-settings-detail {
  margin-top: 12px;
  border: 1px solid #e6e6e2;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fdfdfb;
}

.user-settings-detail + .user-settings-detail {
  margin-top: 8px;
}

.user-settings-detail summary {
  cursor: pointer;
  letter-spacing: 0.15em;
  color: #444;
  font-size: 0.92em;
  padding: 4px 0;
}

.user-settings-detail summary:hover {
  color: #222;
}

.user-settings-table {
  margin-top: 10px;
  font-size: 0.86em;
}

.user-settings-table .muted {
  color: #aaa;
  font-style: italic;
}

.dash-trend-title {
  font-size: 0.92em;
  color: #555;
  margin: 0 0 6px;
  letter-spacing: 0.15em;
  font-weight: 500;
}

/* ------- フェードイン（控えめ） ------- */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}
