:root {
  --accent: #1e293b; --accent2: #334155; --bg: #f1f5f9; --card: #fff;
  --text: #0f172a; --muted: #64748b; --border: #e2e8f0; --ok: #16a34a; --danger: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif; background: var(--bg); color: var(--text); }
.view { display: none; } .view.is-active { display: block; }
.app-header { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; padding: calc(env(safe-area-inset-top) + 16px) 16px 16px; }
.app-header h1 { margin: 0; font-size: 1.35rem; }
.app-header .sub { margin: 4px 0 0; font-size: .82rem; opacity: .85; }
.draft-link { display: inline-block; margin-top: 10px; font-size: .82rem; font-weight: 700; color: #fff; text-decoration: none; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 6px 12px; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.card { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.card h3 { margin: 14px 0 6px; font-size: .95rem; }
select { width: 100%; padding: 12px; font-size: 1rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.muted { color: var(--muted); font-size: .85rem; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 2px solid transparent; border-radius: 12px; background: var(--bg); cursor: pointer; }
.profile-card img { width: 56px; height: 56px; border-radius: 50%; }
.profile-card.is-selected { border-color: var(--accent); background: #e2e8f0; }
.profile-name { font-size: .78rem; font-weight: 700; text-align: center; }
.profile-tag { font-size: .68rem; color: var(--muted); }
.btn { display: block; width: 100%; padding: 14px; font-size: 1rem; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:disabled { opacity: .5; }
.message { margin: 12px 0 0; font-size: .9rem; } .message.error { color: var(--danger); }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.history-list li:last-child { border-bottom: none; }
.history-meta { color: var(--muted); font-size: .76rem; }
.empty { color: var(--muted); font-size: .9rem; }

/* Zoom風セッション画面 */
#session { background: #0f172a; height: 100vh; }
.call-stage { position: relative; height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; }
.call-main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.avatar-img { width: min(60vw, 260px); height: min(60vw, 260px); border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.06); }
.avatar-name { color: #fff; font-size: 1.1rem; font-weight: 700; }
.self-video { position: absolute; right: 16px; bottom: 16px; width: 100px; height: 130px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); background: #1e293b; }
.call-timer { position: absolute; top: 16px; left: 16px; color: #fff; font-variant-numeric: tabular-nums; font-size: .95rem; background: rgba(255,255,255,.1); padding: 4px 10px; border-radius: 999px; }
.caption-box { position: absolute; bottom: 100px; left: 16px; right: 16px; color: #e2e8f0; font-size: .92rem; text-align: center; min-height: 1.4em; }
.call-controls { height: 80px; display: flex; align-items: center; justify-content: center; gap: 12px; background: #0f172a; border-top: 1px solid #1e293b; }
.ctrl-btn { padding: 10px 18px; border-radius: 999px; border: none; background: #334155; color: #fff; font-weight: 700; cursor: pointer; }
.ctrl-end { background: var(--danger); }

.score-row { display: flex; gap: 12px; margin-bottom: 10px; }
.score-box { flex: 1; background: var(--bg); border-radius: 12px; padding: 14px; text-align: center; }
.score-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
.score-label { font-size: .8rem; color: var(--muted); font-weight: 700; }
