/* ── Session Journal ─────────────────────────────────────────── */
.session-card {
  cursor: pointer; display: flex; flex-direction: column; gap: 0.5rem;
}
.session-card-date { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.session-card-meta { font-size: 0.75rem; color: var(--text-dim); display: flex; gap: 1rem; flex-wrap: wrap; }
.session-card-summary { font-size: 0.85rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.transcript { display: flex; flex-direction: column; gap: 0.5rem; max-height: 70vh; overflow-y: auto; padding: 0.5rem; }
.turn { padding: 0.6rem 0.75rem; border-radius: var(--radius); max-width: 80%; font-size: 0.875rem; line-height: 1.5; }
.turn-player { align-self: flex-start; background: var(--bg-input); border: 1px solid var(--border); }
.turn-dm { align-self: flex-end; background: #1e2d4d; border: 1px solid #2a4070; }
.turn-system { align-self: center; background: transparent; color: var(--text-dim); font-size: 0.8rem; font-style: italic; text-align: center; max-width: 90%; }
.turn-speaker { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 0.2rem; }
.turn-ts { font-size: 0.65rem; color: var(--text-dim); margin-top: 0.2rem; }

.roll-card {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--bg-card); border: 1px solid var(--accent-dim);
  padding: 0.3rem 0.6rem; border-radius: var(--radius); margin: 0.3rem 0;
  font-size: 0.85rem;
}
.roll-card-expr { color: var(--text-dim); }
.roll-card-total { font-weight: bold; color: var(--accent); font-size: 1rem; }

.moment-card {
  background: linear-gradient(135deg, #3d2e0a 0%, #2a2005 100%);
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 0.4rem 0.75rem; margin: 0.3rem 0; font-size: 0.85rem;
  color: #f5d76e;
}

.trust-notification {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--info); padding: 0.2rem 0;
}

.scene-divider {
  text-align: center; padding: 0.75rem 0; color: var(--accent);
  font-size: 0.8rem; font-weight: 600; font-style: italic;
  border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
  margin: 0.5rem 0;
}

.highlight-toggle {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-dim); cursor: pointer; user-select: none;
}
.highlight-toggle input { accent-color: var(--accent); }

/* ── NPC Cards ───────────────────────────────────────────────── */
.npc-card { cursor: pointer; position: relative; }
.npc-card-name { font-family: var(--font-char); font-size: 1.1rem; color: var(--accent); margin-bottom: 0.2rem; }
.npc-card-desc { font-size: 0.8rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0.5rem; }
.npc-card-role { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--bg-input); color: var(--text-dim); border: 1px solid var(--border); }
.npc-card-romance { position: absolute; top: 0.6rem; right: 0.6rem; font-size: 0.75rem; background: #5b2c6f; color: #d7bde2; padding: 0.15rem 0.5rem; border-radius: 999px; }

.trust-meter { width: 100%; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin-top: 0.5rem; }
.trust-meter-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.trust-meter-fill.trust-0 { background: #555; width: 0%; }
.trust-meter-fill.trust-1 { background: var(--info); }
.trust-meter-fill.trust-2 { background: var(--info); }
.trust-meter-fill.trust-3 { background: var(--accent); }
.trust-meter-fill.trust-4 { background: var(--accent); }
.trust-meter-fill.trust-5 { background: var(--accent); }
.trust-meter-label { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.2rem; display: flex; justify-content: space-between; }

/* ── Party View ──────────────────────────────────────────────── */
.party-layout { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.party-card {
  min-width: 200px; max-width: 240px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem; cursor: pointer;
  transition: all var(--transition); text-align: center;
}
.party-card:hover { border-color: var(--border-glow); box-shadow: 0 0 12px var(--border-glow); }
.party-portrait {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 0.75rem;
  border: 2px solid var(--accent-dim); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); font-size: 2rem; color: var(--text-dim);
}
.party-portrait img { width: 100%; height: 100%; object-fit: cover; }
/* T2-06: upload affordance for your own character card */
.party-portrait-mine { cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease; }
.party-portrait-mine:hover { transform: scale(1.04); border-color: var(--accent); }
.party-portrait .portrait-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; text-align: center;
  color: var(--text-dim); line-height: 1;
}
.party-card-name { font-family: var(--font-char); font-size: 1rem; color: var(--accent); }
.party-card-subtitle { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.party-hp-mini { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin: 0.25rem 0; }
.party-hp-mini-fill { height: 100%; border-radius: 3px; }
.ac-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px;
  font-size: 0.8rem; font-weight: bold; color: var(--text-bright);
}
.party-conditions { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: center; margin-top: 0.4rem; }
.party-summary-bar { margin-bottom: 1.5rem; }

@media (max-width: 600px) {
  .party-layout { flex-direction: column; }
  .party-card { min-width: 100%; max-width: 100%; }
}

/* ── DM Dashboard ────────────────────────────────────────────── */
.dm-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) { .dm-grid { grid-template-columns: 1fr; } }
.dm-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; }
.dm-panel-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  color: var(--accent); letter-spacing: 0.08em; margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.dm-panel-full { grid-column: 1 / -1; }
.dm-status-active { color: var(--success); font-weight: 600; }
.dm-status-inactive { color: var(--danger); font-weight: 600; }
.dm-timer { font-size: 1.5rem; font-weight: bold; color: var(--accent); font-variant-numeric: tabular-nums; }
.dm-recent-turn { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.dm-recent-turn:last-child { border-bottom: none; }
.dm-recent-speaker { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Content Editor ──────────────────────────────────────────── */
.editor-layout { display: grid; gap: 1rem; grid-template-columns: 260px 1fr; }
@media (max-width: 768px) { .editor-layout { grid-template-columns: 1fr; } }
.editor-sidebar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.75rem; max-height: 80vh; overflow-y: auto;
}
.editor-sidebar-section { margin-bottom: 1rem; }
.editor-sidebar-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  color: var(--accent); letter-spacing: 0.06em; margin-bottom: 0.4rem;
  padding-bottom: 0.3rem; border-bottom: 1px solid var(--border);
}
.editor-sidebar-item {
  padding: 0.35rem 0.5rem; border-radius: 4px; font-size: 0.82rem;
  cursor: pointer; color: var(--text-dim); transition: all var(--transition);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.editor-sidebar-item:hover { background: var(--bg-input); color: var(--text); }
.editor-sidebar-item.active { background: rgba(212, 165, 90, 0.1); color: var(--accent); }
.editor-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }

/* ── Adventure Import ────────────────────────────────────────── */
.import-preview { margin-top: 1.5rem; }
.import-preview-stat { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.import-preview-stat:last-child { border-bottom: none; }
