@charset "utf-8";
:root {
  /* LINE風カラーパレット */
  --bg-deep: #1a73e8;           /* LINE風 青背景（深） */
  --bg-panel: #1971D4;          /* パネル背景（やや暗い青） */
  --bg-card: #ffffff;           /* おぢの会話パネル：白 */
  --bg-card2: #f0f0f0;          /* おぢの会話パネル（サブ）：薄グレー */
  --gold: #06c755;              /* LINE緑アクセント */
  --gold-light: #00b451;        /* LINE緑・明 */
  --gold-dim: #009640;          /* LINE緑・中 */
  --red: #c0392b;
  --red-light: #e74c3c;
  --blue: #1a5fa8;
  --blue-light: #2980b9;
  --text-primary: #1a1a1a;
  --text-secondary: #444444;
  --text-dim: #777777;
  --border: #d0d8e8;
  --border-gold: #a8d8b0;       /* 緑系ボーダー */
  --accent-green: #06c755;
  --line-green: #06c755;        /* LINE本家グリーン */
  --line-green-dark: #00b451;
  --line-green-bubble: #dcf8c6; /* 返答バブル：薄緑 */
}

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

.pill.on {
  background: rgba(6, 199, 85, 0.2);
  border-color: rgba(6, 199, 85, 0.4);
  color: #06c755;
  transition: all .4s;
}

.system-message a {
  color: #2980b9;
}

.pill {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 7px 26px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(255,255,255,0.7);
  transition: all .2s;
  margin-top: 50px;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
  margin-right: 10px;
}

body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

/* LINE風：青のグラデーション背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(160deg, #1a73e8 0%, #1557b0 40%, #0d47a1 100%);
  pointer-events: none;
  z-index: 0;
}

.center-panel {
  background-color: #e8eef8cc;
}

.results-bg {
  background-color: #e8eef888;
  width: 100%;
}

#root { position: relative; z-index: 1; }

/* =================== SETUP SCREEN =================== */
.setup-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.setup-emblem {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  position: relative;
}

.setup-emblem svg { width: 100%; height: 100%; }

.setup-title {
  font-family: 'Mochiy Pop One', sans;
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #06c755, #dcf8c6, #06c755);
  background-clip: border-box;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.setup-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  text-align: center;
  letter-spacing: 0.2em;
  margin-bottom: 30px;
}

.setup-card {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 40px 50px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 2px 0 rgba(255,255,255,0.1);
}

.setup-section-title {
  font-family: 'Noto Sans JP', sans;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.setup-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #d0e8d8;
}

.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus { border-color: var(--line-green); box-shadow: 0 0 0 3px rgba(6,199,85,0.1); }

.gender-group {
  display: flex;
  gap: 12px;
}

.gender-btn {
  flex: 1;
  padding: 12px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.1em;
}

.gender-btn.active {
  border-color: var(--line-green);
  color: var(--line-green-dark);
  background: rgba(6,199,85,0.08);
}

.start-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #06c755, #00b451);
  border: none;
  border-radius: 50px;
  color: #ffffff;
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(6,199,85,0.35);
}

.start-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}

.start-btn:hover::before { transform: translateX(100%); }
.start-btn:hover { box-shadow: 0 6px 20px rgba(6,199,85,0.5); transform: translateY(-1px); }

.setup-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #fff;
  text-align: center;
  line-height: 1.8;
}

/* =================== MAIN SCREEN =================== */
.main-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Header - LINE風 */
.header {
  background: #191f40;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.header-logo {
  font-family: 'Mochiy Pop One', sans;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.15em;
}

.header-session {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.15em;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.round-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
}

.round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  transition: all 0.3s;
}

.round-dot.done { background: var(--line-green); border-color: var(--line-green); }
.round-dot.current { background: transparent; border-color: #ffffff; box-shadow: 0 0 8px rgba(255,255,255,0.6); animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(255,255,255,0.5); }
  50% { box-shadow: 0 0 12px rgba(255,255,255,0.9); }
}

.round-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-left: 8px;
  letter-spacing: 0.1em;
}

/* Main layout */
.debate-layout {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 0;
  height: calc(100vh - 57px);
}

/* Left panel - scores */
.left-panel {
  background: rgba(255,255,255,0.95);
  border-right: 1px solid rgba(0,0,0,0.08);
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(10px);
}

.panel-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 2px solid #d0e8d8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-title-dot {
  width: 4px;
  height: 4px;
  background: var(--line-green);
  border-radius: 50%;
}

/* Score card */
.score-vs {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}

.score-side {
  flex: 1;
  padding: 14px 10px;
  text-align: center;
}

.score-side.questioner { border-right: 1px solid #e8e8e8; }

.score-role {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #999999;
  margin-bottom: 4px;
}

.score-name {
  font-size: 0.8rem;
  color: #555555;
  margin-bottom: 10px;
  font-weight: 500;
}

.score-number {
  font-family: 'Shippori Mincho', serif;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  transition: all 0.5s;
}

.score-number.q-score { color: var(--blue-light); }
.score-number.pm-score { color: var(--red-light); }

.score-bar-wrap {
  margin-top: 12px;
  height: 6px;
  background: #eeeeee;
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2980b9, #1a5fa8);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 3px;
}

.score-status {
  margin-top: 10px;
  font-size: 0.7rem;
  text-align: center;
  padding: 5px 8px;
  border-radius: 20px;
  letter-spacing: 0.1em;
}

.score-status.leading-q { background: rgba(41,128,185,0.12); color: var(--blue-light); }
.score-status.leading-pm { background: rgba(231,76,60,0.1); color: var(--red-light); }
.score-status.tied { background: rgba(6,199,85,0.1); color: var(--line-green-dark); }

/* Session info */
.session-info {
  font-size: 0.7rem;
  color: #888888;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.session-info span { color: #444444; font-weight: 600; }

/* Score history */
.score-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #888888;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.score-history-round { min-width: 20px; color: #aaaaaa; }

.score-history-bar {
  flex: 1;
  height: 4px;
  background: #eeeeee;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.score-history-fill {
  height: 100%;
  background: var(--blue-light);
  border-radius: 2px;
  transition: width 0.5s;
}

.score-history-nums {
  display: flex;
  gap: 4px;
  font-size: 0.8rem;
}

.score-history-nums .q { color: var(--blue-light); }
.score-history-nums .pm { color: var(--red-light); }

/* Center panel - LINE風チャット背景 */
.center-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #e8eef8;
}

/* Session banner */
.session-banner {
  background: #1557b0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.session-tag {
  background: rgba(6,199,85,0.2);
  border: 1px solid rgba(6,199,85,0.4);
  color: #dcf8c6;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

/* Transcript - LINEチャット風 */
.transcript {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 20% 80%, rgba(6,199,85,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26,115,232,0.04) 0%, transparent 50%),
    #e8eef8;
}

.transcript::-webkit-scrollbar { width: 4px; }
.transcript::-webkit-scrollbar-track { background: transparent; }
.transcript::-webkit-scrollbar-thumb { background: #c8d4e8; border-radius: 2px; }

/* Speaker entry */
.speaker-entry {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.speaker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.speaker-badge {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.badge-chairman {
  background: rgba(6,199,85,0.15);
  border: 1px solid rgba(6,199,85,0.3);
  color: var(--line-green-dark);
}

.badge-questioner {
  background: rgba(41,128,185,0.15);
  border: 1px solid rgba(41,128,185,0.3);
  color: var(--blue-light);
}

.badge-pm {
  background: rgba(6,199,85,0.2);
  border: 1px solid rgba(6,199,85,0.35);
  color: var(--line-green-dark);
}

.speaker-name-label {
  font-size: 0.78rem;
  color: #555555;
  font-weight: 500;
}

/* ===== LINE風バブル ===== */

/* おぢの会話パネル：白背景（受信バブル） */
.speech-bubble {
  background: #ffffff;
  border: none;
  border-radius: 0 16px 16px 16px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.9;
  color: #1a1a1a;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  max-width: 85%;
}

/* 返答パネル：緑背景（送信バブル） */
.speech-bubble.pm-bubble {
  background: var(--line-green-bubble);   /* #dcf8c6 薄緑 */
  border: none;
  border-radius: 16px 0 16px 16px;
  border-left: none;
  border-right: 3px solid var(--line-green);
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(6,199,85,0.2);
  margin-left: auto;
}

/* 質問者バブル：白（おぢ系） */
.speech-bubble.q-bubble {
  background: #ffffff;
  border: none;
  border-radius: 0 16px 16px 16px;
  border-left: 3px solid #2980b9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* 議長バブル：淡い青グレー */
.speech-bubble.chairman-bubble {
  background: rgba(26,115,232,0.08);
  border: 1px solid rgba(26,115,232,0.15);
  border-radius: 8px;
  font-style: italic;
  color: #3a5a8a;
  font-size: 0.82rem;
  border-left: 3px solid rgba(26,115,232,0.4);
  box-shadow: none;
}

.score-update-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 8px;
  letter-spacing: 0.05em;
}

.score-update-badge.q-wins {
  background: rgba(41,128,185,0.12);
  color: var(--blue-light);
  border: 1px solid rgba(41,128,185,0.25);
}

.score-update-badge.pm-wins {
  background: rgba(6,199,85,0.12);
  color: var(--line-green-dark);
  border: 1px solid rgba(6,199,85,0.3);
}

.score-update-badge.neutral {
  background: rgba(0,0,0,0.05);
  color: #666666;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Typing indicator - LINE風 */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--line-green-bubble);
  border: none;
  border-radius: 16px 0 16px 16px;
  border-right: 3px solid var(--line-green);
  box-shadow: 0 1px 3px rgba(6,199,85,0.2);
  width: fit-content;
  margin-left: auto;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--line-green-dark);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.typing-label {
  font-size: 0.85rem;
  color: #555555;
  letter-spacing: 0.1em;
  margin-left: 4px;
}

/* Input area - LINE風 */
.input-area {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 12px 16px;
  flex-shrink: 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

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

.input-label {
  font-size: 0.7rem;
  color: #888888;
  letter-spacing: 0.15em;
}

.char-count {
  font-size: 0.65rem;
  color: #aaaaaa;
}

.question-textarea {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 10px 16px;
  color: #1a1a1a;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 80px;
}

.question-textarea:focus {
  border-color: var(--line-green);
  box-shadow: 0 0 0 3px rgba(6,199,85,0.1);
  background: #ffffff;
}

.question-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 50px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-direct {
  background: #f0f0f0;
  color: #555555;
}

.btn-direct:hover:not(:disabled) {
  background: #e5e5e5;
}

.btn-convert {
  background: linear-gradient(135deg, #06c755, #00b451);
  color: #ffffff;
}

.btn-convert:hover:not(:disabled) {
  background: linear-gradient(135deg, #08d45c, #06c755);
  box-shadow: 0 4px 12px rgba(6,199,85,0.35);
  transform: translateY(-1px);
}

/* Right panel - PM thoughts */
.right-panel {
  background: rgba(255,255,255,0.95);
  border-left: 1px solid rgba(0,0,0,0.08);
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(10px);
}

.thought-card {
  background: var(--line-green-bubble);
  border: 1px solid rgba(6,199,85,0.25);
  border-left: 3px solid var(--line-green);
  border-radius: 12px;
  padding: 14px;
  animation: fadeInUp 0.4s ease;
}

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

.thought-round {
  font-size: 0.62rem;
  color: var(--line-green-dark);
  letter-spacing: 0.2em;
  opacity: 0.9;
  font-weight: bold;
}

.thought-strategy {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(6,199,85,0.15);
  border: 1px solid rgba(6,199,85,0.3);
  border-radius: 20px;
  color: var(--line-green-dark);
}

.thought-item {
  font-size: 0.77rem;
  line-height: 1.8;
  color: #444444;
  padding: 6px 0;
  border-bottom: 1px solid rgba(6,199,85,0.15);
}

.thought-item:last-child { border-bottom: none; }

.thought-item-seron {
  background: rgba(6,199,85,0.08);
  padding: 6px 8px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(6,199,85,0.15) !important;
  margin-top: 2px;
}

.thought-item-seron .thought-item-label {
  color: var(--line-green-dark) !important;
}

.thought-item-label {
  font-size: 0.80rem;
  color: var(--line-green-dark);
  letter-spacing: 0.15em;
  margin-bottom: 3px;
  opacity: 0.8;
}

.thought-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  font-size: 0.75rem;
  color: #888888;
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid #e0e0e0;
  border-top-color: var(--line-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =================== RESULTS SCREEN =================== */
.results-screen {
  min-height: 100vh;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 40px;
}

.results-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.results-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.2em;
}

.winner-card {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.winner-banner {
  padding: 20px 24px;
  text-align: center;
}

.winner-banner.q-wins { background: linear-gradient(135deg, rgba(41,128,185,0.15), rgba(41,128,185,0.05)); border-bottom: 3px solid var(--blue-light); }
.winner-banner.pm-wins { background: linear-gradient(135deg, rgba(6,199,85,0.15), rgba(6,199,85,0.05)); border-bottom: 3px solid var(--line-green); }
.winner-banner.draw { background: linear-gradient(135deg, rgba(255,200,50,0.15), rgba(255,200,50,0.03)); border-bottom: 3px solid #f0b429; }

.winner-text {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.winner-text.q-color { color: var(--blue-light); }
.winner-text.pm-color { color: var(--line-green-dark); }
.winner-text.draw-color { color: #c0960a; }

.winner-score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}

.final-score { text-align: center; }

.final-score-num {
  font-family: 'Shippori Mincho', serif;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.final-score-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  margin-top: 4px;
  color: #888888;
}

.score-vs-label {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.5rem;
  color: #cccccc;
}

/* Analysis sections */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.analysis-card {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.analysis-card-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--line-green-dark);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #d0f0dc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analysis-text {
  font-size: 0.84rem;
  line-height: 1.9;
  color: #444444;
}

.damage-meter { margin-top: 14px; }

.damage-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #666666;
  margin-bottom: 6px;
}

.damage-bar {
  height: 8px;
  background: #eeeeee;
  border-radius: 4px;
  overflow: hidden;
}

.damage-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.damage-fill.high { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.damage-fill.medium { background: linear-gradient(90deg, #e67e22, #f39c12); }
.damage-fill.low { background: linear-gradient(90deg, #06c755, #2ecc71); }

.approval-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.approval-number {
  font-family: 'Shippori Mincho', serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a1a1a;
}

.approval-change { font-size: 0.9rem; font-weight: 700; }
.approval-change.down { color: var(--red-light); }
.approval-change.up { color: var(--line-green); }

.restart-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 30px auto 0;
  padding: 16px;
  background: linear-gradient(135deg, #06c755, #00b451);
  border: none;
  border-radius: 50px;
  color: #ffffff;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  box-shadow: 0 4px 15px rgba(6,199,85,0.35);
}

.restart-btn:hover {
  box-shadow: 0 6px 20px rgba(6,199,85,0.5);
  transform: translateY(-2px);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.tag-blue { background: rgba(41,128,185,0.1); border: 1px solid rgba(41,128,185,0.25); color: var(--blue-light); }
.tag-red { background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.2); color: var(--red-light); }
.tag-gold { background: rgba(6,199,85,0.1); border: 1px solid rgba(6,199,85,0.25); color: var(--line-green-dark); }

/* Scrollbar */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar { width: 3px; }
.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb { background: #d0d0d0; }

/* API key modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21,87,176,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 32px 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  color: var(--line-green-dark);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.78rem;
  color: #666666;
  line-height: 1.8;
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #1a1a1a;
  font-family: monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 14px;
}

.modal-input:focus {
  border-color: var(--line-green);
  box-shadow: 0 0 0 3px rgba(6,199,85,0.1);
}

.modal-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #06c755, #00b451);
  border: none;
  border-radius: 50px;
  color: #ffffff;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(6,199,85,0.3);
}

.modal-btn:hover {
  box-shadow: 0 6px 18px rgba(6,199,85,0.45);
  transform: translateY(-1px);
}

.error-msg {
  font-size: 0.72rem;
  color: var(--red-light);
  margin-top: 8px;
  min-height: 16px;
}

@media (max-width: 900px) {
  .debate-layout { grid-template-columns: 200px 1fr 240px; }
}

@media (max-width: 700px) {
  .debate-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: auto;
  }
  .left-panel, .right-panel { max-height: 200px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .setup-card { padding: 24px; }
}

/* Advisor panel */
.advisor-card {
  background: #f0f8ff;
  border: 1px solid rgba(41,128,185,0.2);
  border-left: 3px solid var(--blue-light);
  border-radius: 12px;
  padding: 14px;
  animation: fadeInUp 0.4s ease;
}

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

.advisor-round {
  font-size: 0.7rem;
  color: var(--blue-light);
  letter-spacing: 0.2em;
  font-weight: bold;
}

.advisor-item {
  font-size: 0.77rem;
  line-height: 1.8;
  color: #444444;
  padding: 6px 0;
  border-bottom: 1px solid rgba(41,128,185,0.1);
}

.advisor-item:last-child { border-bottom: none; }

.advisor-item-label {
  font-size: 0.80rem;
  letter-spacing: 0.12em;
  margin-bottom: 3px;
  font-weight: 600;
  color: #3a6fa8;
}

.advisor-example {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(41,128,185,0.07);
  border: 1px solid rgba(41,128,185,0.2);
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.85;
  color: #3a5a8a;
  cursor: pointer;
  transition: background 0.2s;
}

.advisor-example:hover {
  background: rgba(41,128,185,0.13);
}

.advisor-example-label {
  font-size: 0.65rem;
  color: var(--blue-light);
  letter-spacing: 0.2em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advisor-example-label::after {
  content: 'クリックで転写';
  font-size: 0.6rem;
  color: #888888;
  border: 1px solid #e0e0e0;
  padding: 1px 5px;
  border-radius: 20px;
}

.footerexp {
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.footerexp a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}