/* ============================================================
   design tokens
   ふれあうと「暮れなずむ空」を感じるビビッドヴァイオレット→シアンの
   グラデーションを軸に、ガラスの器の中でチャットが主役になるよう
   面(ガラス)は控えめな透明度、文字が乗るバブルは高コントラストに
   分離して設計している。
   ============================================================ */
:root {
  /* -- brand color (named) -- */
  --twilight: #6c63ff;   /* 主グラデーション始点。夕暮れのすみれ色 */
  --dawn: #3fd0f2;       /* 主グラデーション終点。夜明けのシアン */
  --amber: #ffab4d;      /* 広告・通知バッジ専用のワンポイント暖色 */
  --ink: #14152c;        /* 本文色(ライト時) */
  --ink-dim: #6b6e8f;    /* 補助文字色(ライト時) */
  --mist: #eef1fc;       /* 背景の霧色 */

  /* -- compatibility aliases (ランディング/規約ページ等で引き続き使用) -- */
  --bg: var(--mist);
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --border: #e4e7f7;
  --text: var(--ink);
  --text-dim: var(--ink-dim);
  --accent: var(--twilight);
  --accent-2: #9b8cff;
  --accent-soft: #eef0ff;
  --user-bubble: #e7e9fe;
  --ai-bubble: #ffffff;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 50, 0.05), 0 1px 1px rgba(20, 20, 50, 0.03);
  --shadow-md: 0 14px 34px rgba(76, 86, 205, 0.16);
  --accent-gradient: linear-gradient(135deg, var(--twilight), var(--dawn));

  /* -- glass system -- */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-highlight: rgba(255, 255, 255, 0.9);
  --glass-blur: 22px;
  --glass-shadow: 0 8px 32px rgba(31, 35, 90, 0.12), inset 0 1px 0 var(--glass-highlight);

  /* -- radius scale -- */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* -- motion -- */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-glass: cubic-bezier(0.22, 1, 0.36, 1);

  /* -- 時間帯で変わるアクセント(JSがbody[data-time]経由で更新) -- */
  --time-glow: var(--twilight);
  --time-glow-2: var(--dawn);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #edeefc;
    --ink-dim: #9a9cc0;
    --mist: #0b0c1e;
    --bg: var(--mist);
    --bg-soft: #15162c;
    --panel: #15162c;
    --border: rgba(255, 255, 255, 0.08);
    --user-bubble: #2b2a52;
    --ai-bubble: #191a35;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
    --glass-bg: rgba(30, 28, 58, 0.55);
    --glass-bg-strong: rgba(30, 28, 58, 0.74);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 var(--glass-highlight);
  }
}

/* body[data-time]でJSが時間帯を伝え、クロックまわりの光の色をゆっくり変える */
body[data-time="dawn"] { --time-glow: #ff9776; --time-glow-2: #ffd76a; }
body[data-time="day"] { --time-glow: #6c63ff; --time-glow-2: #3fd0f2; }
body[data-time="dusk"] { --time-glow: #ff6ec7; --time-glow-2: #ffab4d; }
body[data-time="night"] { --time-glow: #4a4fd6; --time-glow-2: #7c63ff; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.font-display {
  font-family: "Space Grotesk", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}

/* チャットページの背景: ガラスの器が浮かぶ、時間帯で色づく淡いグラデーションの霧 */
body.chat-page {
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, color-mix(in srgb, var(--time-glow) 20%, transparent), transparent),
    radial-gradient(ellipse 55% 45% at 90% 85%, color-mix(in srgb, var(--time-glow-2) 18%, transparent), transparent),
    var(--mist);
  transition: background 3s var(--ease-glass);
}

a { color: inherit; }

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand.small { font-size: 1rem; }
.brand-dot { color: var(--accent); }

/* ---------- Landing ---------- */
.landing {
  position: relative;
  overflow-x: hidden;
}

.bg-clock {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 80% 15%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, var(--accent-soft) 0%, transparent 40%);
  opacity: 0.5;
  pointer-events: none;
}

.landing-hero {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 18vh 24px 10vh;
  text-align: center;
}

.landing-hero .brand {
  display: inline-block;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: var(--text-dim);
}

.catchphrase {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.35;
  margin: 0 0 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lead {
  color: var(--text-dim);
  line-height: 1.9;
  font-size: 1rem;
  margin: 0 0 3rem;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.google-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

.sub-note {
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.about-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: left;
}
.about-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}
.about-section p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.9;
}

.feature-section,
.howto-section,
.faq-section,
.operator-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: left;
}
.feature-section h2,
.howto-section h2,
.faq-section h2,
.operator-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.feature-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.6;
}
.feature-list h3 {
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}
.feature-list p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.8;
  margin: 0;
}

.howto-list {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 2;
}
.howto-list li {
  padding-left: 0.3rem;
}

.faq-list {
  margin: 0;
  display: grid;
  gap: 1.3rem;
}
.faq-item dt {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.faq-item dd {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.8;
}
.faq-item a,
.operator-section a {
  color: var(--accent);
}

.operator-section p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.9;
}

/* ---------- Chat: 浮遊するガラスのフレーム ---------- */
.chat-page {
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: flex;
  height: 100vh;
  padding: 18px;
  gap: 0;
}

@media (max-width: 860px) {
  .app-layout { padding: 0; }
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  box-shadow: var(--glass-shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: left 0.25s var(--ease-glass);
}
/* エッジハイライト: ガラスの上端に光が乗っているような一筋の線 */
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-highlight), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@media (max-width: 860px) {
  .sidebar { border-radius: 0; border: none; }
}

.sidebar.collapsed {
  left: -280px;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-top {
  padding: 16px;
}

.new-conv-btn {
  position: relative;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.25s var(--ease-glass);
}
/* 上半分にガラスの光沢ハイライトを一筋 */
.new-conv-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 55%);
  pointer-events: none;
}
.new-conv-btn:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 16px 36px rgba(108, 99, 255, 0.3);
}
.new-conv-btn:active {
  transform: translateY(0) scale(0.98);
}
.new-conv-btn:focus-visible {
  outline: 2px solid var(--dawn);
  outline-offset: 2px;
}

.sidebar-search {
  position: relative;
  padding: 0 16px 12px;
}
.sidebar-search .search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  opacity: 0.55;
  pointer-events: none;
}
.sidebar-search input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-size: 0.85rem;
  box-shadow: inset 0 1px 3px rgba(20, 20, 60, 0.06);
  transition: border-color 0.2s var(--ease-glass), box-shadow 0.2s var(--ease-glass), background 0.2s var(--ease-glass);
}
@media (prefers-color-scheme: dark) {
  .sidebar-search input { background: rgba(255, 255, 255, 0.06); }
}
.sidebar-search input:focus {
  outline: none;
  border-color: var(--twilight);
  background: var(--glass-bg-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--twilight) 18%, transparent);
}

.hidden { display: none !important; }

.reminders-section {
  padding: 0 16px 14px;
  margin-bottom: 8px;
}

.reminders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.reminders-header .icon-btn {
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  padding: 0;
}
.reminders-header .icon-btn:hover { background: var(--accent-soft); filter: brightness(0.96); }

.reminder-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.reminder-form input {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.8rem;
}
.reminder-form button {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.78rem;
}
.reminder-item .reminder-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.reminder-item .reminder-time {
  color: var(--text-dim);
  font-size: 0.72rem;
  white-space: nowrap;
}
.reminder-item button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
}
.reminder-item button:hover { color: #e5484d; }

.conv-list-label {
  padding: 4px 20px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--twilight) 30%, transparent) transparent;
}
.conv-list::-webkit-scrollbar { width: 6px; }
.conv-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--twilight) 30%, transparent);
  border-radius: var(--r-pill);
}

.conv-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-dim);
  transition: background 0.2s var(--ease-glass), transform 0.25s var(--ease-spring), box-shadow 0.2s var(--ease-glass);
}
.conv-item:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(2px);
}
@media (prefers-color-scheme: dark) {
  .conv-item:hover { background: rgba(255, 255, 255, 0.06); }
}
.conv-item.active {
  background: var(--glass-bg-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
/* アクティブな会話だけに、左端にグラデーションの光る帯 */
.conv-item.active::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--accent-gradient);
  box-shadow: 0 0 8px color-mix(in srgb, var(--twilight) 60%, transparent);
}
.conv-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.conv-item .conv-title {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-item .conv-snippet {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-delete-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0;
}
.conv-item:hover .conv-delete-btn { opacity: 1; }
.conv-delete-btn:hover { color: #e5484d; background: rgba(229, 72, 77, 0.12); }

/* ---------- サイドバーフッター・ユーザー設定モーダル ---------- */

.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--glass-border);
}

.settings-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-glass), background 0.2s var(--ease-glass), transform 0.25s var(--ease-spring);
}
@media (prefers-color-scheme: dark) {
  .settings-btn { background: rgba(255, 255, 255, 0.05); }
}
.settings-btn:hover {
  border-color: var(--twilight);
  background: var(--glass-bg-strong);
  transform: translateX(2px);
}
.settings-btn:active { transform: scale(0.98); }
.settings-btn-chevron {
  color: var(--text-dim);
  font-size: 1rem;
  transition: transform 0.25s var(--ease-spring);
}
.settings-btn:hover .settings-btn-chevron { transform: translateX(3px); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: overlay-in 0.2s var(--ease-glass);
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 90%;
  max-width: 420px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: 0 24px 70px rgba(20, 20, 60, 0.28), inset 0 1px 0 var(--glass-highlight);
  animation: modal-in 0.32s var(--ease-spring);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.settings-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.account-info { min-width: 0; }
.account-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-email {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.settings-form label {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.settings-form input,
.settings-form select,
.settings-form textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.checkbox-label input { width: auto; }

.template-icon-preview {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.template-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.template-item { cursor: default; }
.template-item .conv-delete-btn { opacity: 1; }
.template-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}
.settings-form button {
  align-self: flex-start;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.settings-saved {
  color: var(--accent);
  font-size: 0.8rem;
  margin: 0;
}

.settings-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.settings-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
}
.settings-links a:hover { color: var(--accent); }

.main-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
@media (max-width: 860px) {
  .main-panel { border-radius: 0; border: none; }
}

.chat-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
/* 時間帯の光がヘッダーの奥からじんわり滲むアンビエントグロー */
.chat-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, color-mix(in srgb, var(--time-glow) 14%, transparent), transparent 70%);
  pointer-events: none;
  transition: background 3s var(--ease-glass);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

/* ---------- 広告: ネイティブ風スポンサーカード ---------- */
.ad-card {
  position: relative;
  margin: 0 20px 14px;
  padding: 10px 14px 12px;
  border-radius: var(--r-md);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.ad-card-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: color-mix(in srgb, var(--amber) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-bottom: 8px;
}
.ad-card-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 72px;
  overflow: hidden;
  border-radius: var(--r-sm);
}
.ad-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
}
.ad-frame-mobile { display: block; }

@media (min-width: 861px) {
  .ad-frame-mobile { display: none; }
  .ad-frame-pc { display: block; }
}
.ad-card-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}
.ad-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--border);
}
.ad-dot.active { background: var(--amber); width: 14px; transition: width 0.25s var(--ease-glass); }

.icon-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.2s var(--ease-glass), color 0.2s var(--ease-glass);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.5); }
@media (prefers-color-scheme: dark) {
  .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
}
.icon-btn.active { color: var(--twilight); }

.sidebar-toggle { display: none; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.3);
  }
  .sidebar-toggle { display: inline-block; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .chat-header { padding: 14px 16px; }
  .clock { font-size: 1.5rem; }
  .ad-card { margin: 0 12px 10px; padding: 8px 12px 10px; }
  .ad-card-viewport { height: 60px; }
  .messages { padding: 0 2px; }
  .composer { padding: 12px 16px 16px; }
}

/* タブレット幅: サイドバーは残しつつ、浮遊フレームの余白を少し絞る */
@media (min-width: 861px) and (max-width: 1100px) {
  .app-layout { padding: 10px; }
  .sidebar { width: 240px; }
}

.header-time { text-align: center; z-index: 1; }
.clock {
  font-family: "Space Grotesk", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}
/* サイン要素: 時刻の下に、時間帯で色が移ろう光の下線 */
.clock::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 2px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--time-glow), var(--time-glow-2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--time-glow) 60%, transparent);
  transition: background 3s var(--ease-glass);
}
.elapsed-banner {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--twilight);
  min-height: 1.1em;
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
  z-index: 1;
}

.icon-btn-round {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease-glass), border-color 0.2s var(--ease-glass), transform 0.25s var(--ease-spring);
}
@media (prefers-color-scheme: dark) {
  .icon-btn-round { background: rgba(255, 255, 255, 0.07); }
}
.icon-btn-round:hover {
  background: var(--glass-bg-strong);
  border-color: var(--twilight);
  transform: translateY(-1px) scale(1.05);
}
.icon-btn-round:active { transform: scale(0.94); }
.icon-btn-round:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  transform: none;
}
/* 有効状態(通知許可済みなど)を示す小さな光点 */
.icon-btn-round.active::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 6px #34d399, 0 0 0 2px var(--glass-bg-strong);
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}

.chat-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
}

.messages {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 読みやすさを最優先: ガラスの器(サイドバー/ヘッダー/入力欄)は透明感を持たせるが、
   長時間読む本文が乗るバブルはあえて不透明寄りにしてコントラストを確保している。 */
.msg {
  max-width: 100%;
  padding: 13px 18px;
  border-radius: var(--r-md);
  line-height: 1.75;
  font-size: 0.96rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user {
  background: linear-gradient(165deg, color-mix(in srgb, var(--twilight) 14%, var(--user-bubble)), var(--user-bubble));
  border: 1px solid color-mix(in srgb, var(--twilight) 16%, transparent);
  border-bottom-right-radius: 6px;
}

.msg.ai {
  background: var(--ai-bubble);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 6px;
}

.msg.system {
  align-self: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  background: none;
  padding: 4px;
}

.msg.pending { opacity: 0.6; }

.msg-wrap { animation: msg-in 0.4s var(--ease-glass); }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 78%;
}
.msg-wrap.user .msg-row { margin-left: auto; }
.msg-wrap.ai .msg-row { margin-right: auto; }

.msg-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
}
.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-image {
  max-width: 280px;
  max-height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.msg-sources {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.msg-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.75rem;
  text-decoration: none;
  opacity: 0.85;
}
.msg-source-link:hover { opacity: 1; }

.msg-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.msg-wrap.user .msg-col { align-items: flex-end; }
.msg-wrap.ai .msg-col { align-items: flex-start; }

.msg-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0 4px;
}

.embed {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.embed iframe {
  width: 100%;
  border: none;
  display: block;
}
.embed-youtube { aspect-ratio: 16 / 9; }
.embed-youtube iframe { height: 100%; }
.embed-map iframe { height: 320px; }
.msg-wrap.user { align-items: flex-end; }
.msg-wrap.ai { align-items: flex-start; }

.msg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.15s ease;
  padding: 0 4px;
}
.msg-wrap.ai .msg-actions { margin-left: 42px; }
.msg-wrap:hover .msg-actions { opacity: 1; }

.msg-actions button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
}
.msg-actions button:hover { color: var(--accent); }
.msg-actions button:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.variant-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.variant-nav button {
  padding: 0 4px;
  font-size: 0.85rem;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 24px 0;
}
.image-preview img {
  max-height: 64px;
  max-width: 100px;
  border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  object-fit: cover;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--glass-border);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.composer textarea {
  flex: 1;
  resize: none;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
  padding: 13px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.6;
  max-height: 140px;
  box-shadow: inset 0 1px 3px rgba(20, 20, 60, 0.06);
  transition: border-color 0.2s var(--ease-glass), background 0.2s var(--ease-glass), box-shadow 0.2s var(--ease-glass);
}
@media (prefers-color-scheme: dark) {
  .composer textarea { background: rgba(255, 255, 255, 0.06); }
}
.composer textarea:focus {
  outline: none;
  border-color: var(--twilight);
  background: var(--glass-bg-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--twilight) 16%, transparent);
}
.composer textarea::placeholder { color: var(--text-dim); }

#sendBtn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 22px;
  height: 46px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.25s var(--ease-glass);
}
#sendBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 55%);
  pointer-events: none;
}
#sendBtn:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 34px rgba(108, 99, 255, 0.3); }
#sendBtn:active:not(:disabled) { transform: scale(0.96); }

.send-icon {
  font-size: 0.9rem;
  transform: rotate(0deg);
}

#sendBtn:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  line-height: 1.9;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.legal-page .back-link:hover { color: var(--accent); }

.legal-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.legal-page .updated {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  font-size: 1.1rem;
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.legal-page p, .legal-page li {
  color: var(--text);
  font-size: 0.95rem;
}

.legal-page ul, .legal-page ol {
  padding-left: 1.4rem;
}

.legal-page a { color: var(--accent); }

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.legal-page th, .legal-page td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal-page th {
  background: var(--bg-soft);
  width: 30%;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 60px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.site-footer nav {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }


/* ============================================================
   小説投稿サイト用スタイル (nv- prefix)
   ============================================================ */
body.nv-page {
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, color-mix(in srgb, var(--twilight) 14%, transparent), transparent),
    radial-gradient(ellipse 55% 45% at 90% 100%, color-mix(in srgb, var(--dawn) 12%, transparent), transparent),
    var(--mist);
  min-height: 100vh;
}

.nv-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
}
.nv-header .brand { font-size: 1.15rem; }
.nv-header nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nv-header nav a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: var(--r-pill);
  transition: background 0.2s, color 0.2s;
}
.nv-header nav a:hover, .nv-header nav a.active { background: var(--glass-bg); color: var(--accent); }
.nv-header .nv-user { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.nv-header .nv-user img { width: 26px; height: 26px; border-radius: 50%; }

.nv-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  position: relative;
  z-index: 1;
}

.nv-search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.nv-search input {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text);
  font-size: 0.95rem;
}
.nv-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.nv-tabs button {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.85rem;
}
.nv-tabs button.active { background: var(--accent-gradient); color: #fff; border-color: transparent; }

.nv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.nv-card {
  display: block;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}
.nv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.nv-card h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.4; }
.nv-card .nv-genre {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-bottom: 8px;
}
.nv-card p.nv-synopsis {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nv-card .nv-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.nv-empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }

/* ---- 詳細ページ ---- */
.nv-detail-head {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  margin-bottom: 24px;
}
.nv-detail-head h1 { margin: 0 0 8px; font-size: 1.5rem; }
.nv-detail-head .nv-author { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 12px; }
.nv-detail-head .nv-synopsis { white-space: pre-wrap; line-height: 1.7; margin-bottom: 16px; }
.nv-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.nv-tags span {
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--r-pill);
}
.nv-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.nv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent-gradient);
  color: #fff;
  transition: opacity 0.2s;
}
.nv-btn:hover { opacity: 0.88; }
.nv-btn.secondary { background: var(--glass-bg); color: var(--text); border: 1px solid var(--border); }
.nv-btn.danger { background: #e6484f; }
.nv-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.nv-episode-list { list-style: none; margin: 0; padding: 0; }
.nv-episode-list li {
  border-bottom: 1px solid var(--border);
}
.nv-episode-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6px;
  text-decoration: none;
  color: var(--text);
}
.nv-episode-list a:hover { color: var(--accent); }
.nv-episode-list .nv-ep-meta { font-size: 0.78rem; color: var(--text-dim); }

/* ---- 読書ページ ---- */
.nv-reader {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 22px 100px;
}
.nv-reader .nv-ep-title { font-size: 1.3rem; margin: 0 0 4px; }
.nv-reader .nv-novel-title { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.nv-reader .nv-ep-title a, .nv-reader .nv-novel-title a { text-decoration: none; color: inherit; }
.nv-body {
  font-size: 1.05rem;
  line-height: 2.1;
  white-space: pre-wrap;
  word-break: break-word;
}
.nv-reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---- フォーム ---- */
.nv-form { display: flex; flex-direction: column; gap: 14px; }
.nv-form label { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
.nv-form input[type=text], .nv-form textarea, .nv-form select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.nv-form textarea { resize: vertical; }
.nv-form textarea.nv-body-editor { min-height: 360px; line-height: 1.8; }
.nv-panel {
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  margin-bottom: 20px;
}
.nv-panel h2 { margin-top: 0; font-size: 1.1rem; }
.nv-inline-list { list-style: none; margin: 0; padding: 0; }
.nv-inline-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.nv-inline-list li .nv-ep-title-text { flex: 1; }
.nv-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nv-row > * { flex: 1; min-width: 140px; }

/* ---- 行コメント ---- */
.nv-body { position: relative; }
.nv-line {
  position: relative;
  padding: 1px 44px 1px 0;
  border-radius: 6px;
  transition: background 0.15s;
}
.nv-line:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.nv-line-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.nv-line:hover .nv-line-btn, .nv-line-btn.has-comments { opacity: 1; }
.nv-line-btn:hover { background: var(--accent-soft); color: var(--accent); }
.nv-line-btn.has-comments { color: var(--accent); font-weight: 600; }

.nv-line-thread {
  display: none;
  margin: 6px 0 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
}
.nv-line-thread.open { display: block; }
.nv-line-thread .nv-line-comment-item { padding: 6px 0; border-bottom: 1px solid var(--border); }
.nv-line-thread .nv-line-comment-item:last-of-type { border-bottom: none; }
.nv-line-thread .nv-lc-meta { color: var(--text-dim); font-size: 0.75rem; margin-bottom: 2px; }
.nv-line-thread .nv-lc-body { white-space: pre-wrap; }
.nv-line-thread form { display: flex; gap: 8px; margin-top: 10px; }
.nv-line-thread textarea {
  flex: 1;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}
.nv-line-thread .nv-lc-empty { color: var(--text-dim); margin-bottom: 8px; }

/* ============================================================
   運営者の独り言 "カルメン近藤の部屋" (cn- prefix)
   レトロな緊急放送機材・端末感のあるテーマ
   ============================================================ */
body.cn-page {
  background: #0b0d0a;
  color: #d8f5d0;
  min-height: 100vh;
  font-family: "Courier New", "Consolas", "Hiragino Sans", monospace;
}
.cn-header {
  padding: 20px 24px;
  border-bottom: 2px solid #2f5c2a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.cn-header a.brand { color: #7dffb0; text-decoration: none; font-weight: 700; }
.cn-header nav a { color: #9adf9a; text-decoration: none; font-size: 0.85rem; margin-left: 16px; }
.cn-header nav a:hover { color: #fff; }

.cn-main { max-width: 860px; margin: 0 auto; padding: 30px 20px 90px; }

.cn-intro {
  border: 1px solid #2f5c2a;
  background: #0f130d;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 26px;
}
.cn-intro h1 { color: #7dffb0; margin: 0 0 10px; font-size: 1.4rem; letter-spacing: 0.02em; }
.cn-intro p { line-height: 1.9; color: #b9e3b2; margin: 0 0 8px; }
.cn-intro .cn-sign { color: #6fae6f; font-size: 0.82rem; }

.cn-panel {
  border: 1px solid #2f5c2a;
  background: #0f130d;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
}
.cn-panel h2 {
  color: #7dffb0;
  margin: 0 0 6px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cn-panel .cn-desc { color: #8fc98f; font-size: 0.82rem; margin: 0 0 16px; line-height: 1.6; }

.cn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cn-field { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 4px; }
.cn-field label { font-size: 0.75rem; color: #8fc98f; }
.cn-field input, .cn-field select, .cn-field textarea {
  background: #060905;
  border: 1px solid #2f5c2a;
  color: #d8f5d0;
  padding: 8px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.88rem;
}
.cn-field textarea { resize: vertical; min-height: 60px; }

.cn-btn {
  background: #1a3a15;
  border: 1px solid #4a9a3a;
  color: #b9f5b0;
  padding: 9px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.cn-btn:hover { background: #245c1c; }
.cn-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cn-btn.stop { border-color: #b03a3a; color: #ffb0b0; background: #3a1515; }
.cn-btn.stop:hover { background: #5c1c1c; }

.cn-output {
  background: #060905;
  border: 1px dashed #2f5c2a;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #b9f5b0;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 20px;
  margin-top: 6px;
}

.cn-eas-status { font-size: 0.78rem; color: #6fae6f; margin-top: 6px; }

/* ---- カルメン近藤の部屋: ブログ ---- */
.cn-blog-post {
  border-bottom: 1px solid #2f5c2a;
  padding: 16px 0;
}
.cn-blog-post:last-child { border-bottom: none; }
.cn-blog-post h3 { color: #d8f5d0; margin: 0 0 4px; font-size: 1rem; }
.cn-blog-post .cn-blog-meta { color: #6fae6f; font-size: 0.72rem; margin-bottom: 8px; }
.cn-blog-post .cn-blog-body { white-space: pre-wrap; line-height: 1.8; color: #b9e3b2; font-size: 0.9rem; }
.cn-blog-post .cn-blog-actions { margin-top: 8px; display: flex; gap: 8px; }
.cn-blog-post .cn-blog-actions button {
  background: transparent;
  border: 1px solid #2f5c2a;
  color: #8fc98f;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.cn-blog-post .cn-blog-actions button:hover { color: #d8f5d0; border-color: #4a9a3a; }
