@charset "utf-8";
:root {
    --bg-deep: #2d0808;
    --bg-panel: #3a0c0c;
    --bg-card: #451010;
    --bg-card2: #521414;
    --gold: #ffd84a;
    --gold-light: #ffec80;
    --gold-dim: #ffd84a;
    --red: #ff1a00;
    --red-light: #ff4422;
    --blue: #2a6abf;
    --blue-light: #4da3e8;
    --text-primary: #fff5e8;
    --text-secondary: #ffe8a0;
    --text-dim: #f0d8c8;
    --border: #6a2020;
    --border-gold: #7a5200;
    --accent-green: #2ecc71;
  }
  
.pill.on {
  background: rgba(255, 216, 74, 0.25);
  border-color: rgba(255, 216, 74, 0.4);
  color: #ffd84a;
  transition: all .4s;
  margin-right:10px;
}

.system-message a {
  color: white;
}

.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: #c0a090;
  transition: all .2s;
  margin-top:50px;
  background: rgba(100, 30, 30, 0.6);
  text-decoration:none !important;
}

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

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

  /* Background texture — 幕のような縦縞 */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
      radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,80,0,0.18) 0%, transparent 60%),
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 58px,
        rgba(255,50,0,0.06) 58px,
        rgba(255,50,0,0.06) 60px
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 58px,
        rgba(255,216,74,0.04) 58px,
        rgba(255,216,74,0.04) 60px
      );
    pointer-events: none;
    z-index: 0;
  }
  
  body {
	  background-size: cover;
	  background-position: center center;
	  background-repeat: no-repeat;
	  background-attachment: fixed;
	  min-height: 100vh;
	}
	
	.center-panel{
		background-color:#2d080800;
	}
	
	.results-bg{
		background-color:#2d080828;
		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: 'Shippori Mincho', serif;
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), #d4960e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
  }

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

  .setup-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: 2px solid var(--gold-dim);
    border-radius: 4px;
    padding: 40px 50px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,216,74,0.15);
  }

  .setup-section-title {
    font-family: 'Noto Serif JP', serif;
    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: var(--border-gold);
  }

  .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: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 3px;
    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(--gold-dim); }

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

  .gender-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 3px;
    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(--gold);
    color: var(--gold);
    background: rgba(255,216,74,0.12);
  }

  .start-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #b07800, var(--gold-dim), #b07800);
    border: 1px solid var(--gold-dim);
    border-radius: 3px;
    color: #3a1800;
    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;
  }

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

  .start-btn:hover::before { transform: translateX(100%); }
  .start-btn:hover { box-shadow: 0 0 28px rgba(255,216,74,0.4); }

  .setup-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.8;
  }

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

  /* Header */
  .header {
    background: var(--bg-panel);
    border-bottom: 2px solid var(--red-light);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 20px rgba(255,50,0,0.3);
  }

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

  .header-logo {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-shadow: 0 0 12px rgba(255,216,74,0.4);
  }

  .header-session {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    padding-left: 14px;
    border-left: 1px solid var(--border);
  }

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

  .round-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-deep);
    transition: all 0.3s;
  }

  .round-dot.done { background: var(--gold); border-color: var(--gold); }
  .round-dot.current { background: transparent; border-color: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.5s infinite; }

  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 5px var(--gold); }
    50% { box-shadow: 0 0 16px var(--gold); }
  }

  .round-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 8px;
    letter-spacing: 0.1em;
  }

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

  /* Left panel - scores */
  .left-panel {
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .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: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    gap: 6px;
  }

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

  /* Score card */
  .score-section { }

  .score-vs {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
  }

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

  .score-side.questioner { border-right: 1px solid var(--border); }

  .score-role {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 4px;
  }

  .score-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    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: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
  }

  .score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-light), var(--blue));
    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: 2px;
    letter-spacing: 0.1em;
  }

  .score-status.leading-q { background: rgba(41,128,185,0.2); color: var(--blue-light); }
  .score-status.leading-pm { background: rgba(255,50,0,0.2); color: var(--red-light); }
  .score-status.tied { background: rgba(255,216,74,0.15); color: var(--gold); }

  /* Session info */
  .session-info {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.9;
    letter-spacing: 0.05em;
  }

  .session-info span { color: var(--text-secondary); }

  /* 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: var(--text-dim);
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .score-history-round {
    min-width: 20px;
    color: var(--text-dim);
  }

  .score-history-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-deep);
    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 */
  .center-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  /* Session banner */
  .session-banner {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    flex-shrink: 0;
  }

  .session-tag {
    background: rgba(255,216,74,0.12);
    border: 1px solid var(--border-gold);
    color: var(--gold-dim);
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }

  /* Transcript */
  .transcript {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
  }

  .transcript::-webkit-scrollbar { width: 4px; }
  .transcript::-webkit-scrollbar-track { background: transparent; }
  .transcript::-webkit-scrollbar-thumb { background: var(--border); 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: 2px;
    font-weight: 700;
  }

  .badge-chairman {
    background: rgba(255,216,74,0.15);
    border: 1px solid var(--border-gold);
    color: var(--gold);
  }

  .badge-questioner {
    background: rgba(41,128,185,0.2);
    border: 1px solid rgba(77,163,232,0.4);
    color: var(--blue-light);
  }

  .badge-pm {
    background: rgba(255,50,0,0.18);
    border: 1px solid rgba(255,68,34,0.45);
    color: var(--red-light);
  }

  .speaker-name-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .speech-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 14px 16px;
    font-size: 0.88rem;
    line-height: 1.9;
    color: var(--text-primary);
    position: relative;
  }

  .speech-bubble.pm-bubble {
    background: var(--bg-card2);
    border-color: rgba(255,50,0,0.3);
    border-left: 3px solid rgba(255,68,34,0.7);
  }

  .speech-bubble.q-bubble {
    border-left: 3px solid rgba(77,163,232,0.5);
  }

  .speech-bubble.chairman-bubble {
    border-left: 3px solid rgba(255,216,74,0.5);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.82rem;
  }

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

  .score-update-badge.q-wins {
    background: rgba(41,128,185,0.2);
    color: var(--blue-light);
    border: 1px solid rgba(77,163,232,0.3);
  }

  .score-update-badge.pm-wins {
    background: rgba(255,50,0,0.18);
    color: var(--red-light);
    border: 1px solid rgba(255,68,34,0.35);
  }

  .score-update-badge.neutral {
    background: rgba(255,216,74,0.1);
    color: var(--gold-dim);
    border: 1px solid var(--border-gold);
  }

  /* Typing indicator */
  .typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    background: var(--bg-card2);
    border: 1px solid rgba(255,50,0,0.3);
    border-left: 3px solid rgba(255,68,34,0.7);
    border-radius: 3px;
  }

  .typing-dot {
    width: 6px;
    height: 6px;
    background: var(--red-light);
    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.5; }
    30% { transform: translateY(-6px); opacity: 1; }
  }

  .typing-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    margin-left: 4px;
  }

  /* Input area */
  .input-area {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 16px 20px;
    flex-shrink: 0;
  }

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

  .input-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
  }

  .char-count {
    font-size: 0.65rem;
    color: var(--text-dim);
  }

  .question-textarea {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.88rem;
    line-height: 1.7;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    min-height: 80px;
  }

  .question-textarea:focus { border-color: var(--border-gold); }

  .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: 3px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    font-weight: 500;
    position: relative;
    overflow: hidden;
  }

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

  .btn-direct {
    background: var(--bg-deep);
    border-color: var(--blue);
    color: var(--blue-light);
  }

  .btn-direct:hover:not(:disabled) {
    background: rgba(77,163,232,0.12);
    border-color: var(--blue-light);
  }

  .btn-convert {
    background: linear-gradient(135deg, #1a3a5c, #1e3f63);
    border-color: var(--blue);
    color: var(--blue-light);
  }

  .btn-convert:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e4066, #234668);
    box-shadow: 0 0 14px rgba(77,163,232,0.25);
  }

  /* Right panel - PM thoughts */
  .right-panel {
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .thought-card {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red-light);
    border-radius: 3px;
    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(--red-light);
    letter-spacing: 0.2em;
    opacity: 1;
    font-weight: bold;
  }

  .thought-strategy {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(255,50,0,0.15);
    border: 1px solid rgba(255,68,34,0.3);
    border-radius: 2px;
    color: var(--red-light);
  }

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

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

  .thought-item-seron {
    background: rgba(255,216,74,0.08);
    padding: 6px 8px;
    border-radius: 2px;
    border-bottom: 1px solid rgba(255,216,74,0.2) !important;
    margin-top: 2px;
  }
  .thought-item-seron .thought-item-label {
    color: var(--gold-dim) !important;
  }

  .thought-item-label {
    font-size: 0.80rem;
    color: var(--red-light);
    letter-spacing: 0.15em;
    margin-bottom: 3px;
    opacity: 0.85;
  }

  .thought-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    font-size: 0.75rem;
    color: var(--text-dim);
  }

  .spin {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--red-light);
    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: var(--gold);
    letter-spacing: 0.2em;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(255,216,74,0.4);
  }

  .results-subtitle {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
  }

  .winner-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
  }

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

  .winner-banner.q-wins { background: linear-gradient(135deg, rgba(41,128,185,0.25), rgba(41,128,185,0.06)); border-bottom: 2px solid var(--blue-light); }
  .winner-banner.pm-wins { background: linear-gradient(135deg, rgba(255,50,0,0.3), rgba(255,50,0,0.06)); border-bottom: 2px solid var(--red-light); }
  .winner-banner.draw { background: linear-gradient(135deg, rgba(255,216,74,0.2), rgba(255,216,74,0.04)); border-bottom: 2px solid var(--gold); }

  .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(--red-light); }
  .winner-text.draw-color { color: var(--gold); }

  .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;
  }

  .score-vs-label {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.5rem;
    color: var(--text-dim);
  }

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

  .analysis-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
  }

  .analysis-card-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: var(--gold-dim);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .analysis-text {
    font-size: 0.84rem;
    line-height: 1.9;
    color: var(--text-secondary);
  }

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

  .damage-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }

  .damage-bar {
    height: 8px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
  }

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

  .damage-fill.high { background: linear-gradient(90deg, #cc0000, var(--red-light)); }
  .damage-fill.medium { background: linear-gradient(90deg, #e67e22, #f39c12); }
  .damage-fill.low { background: linear-gradient(90deg, var(--accent-green), #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;
  }

  .approval-change {
    font-size: 0.9rem;
    font-weight: 700;
  }

  .approval-change.down { color: var(--red-light); }
  .approval-change.up { color: var(--accent-green); }

  .restart-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 30px auto 0;
    padding: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-gold);
    border-radius: 3px;
    color: var(--gold);
    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;
  }

  .restart-btn:hover {
    background: rgba(255,216,74,0.12);
    box-shadow: 0 0 24px rgba(255,216,74,0.2);
  }

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

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

  .tag-blue { background: rgba(41,128,185,0.18); border: 1px solid rgba(77,163,232,0.35); color: var(--blue-light); }
  .tag-red { background: rgba(255,50,0,0.15); border: 1px solid rgba(255,68,34,0.35); color: var(--red-light); }
  .tag-gold { background: rgba(255,216,74,0.12); border: 1px solid var(--border-gold); color: var(--gold); }

  /* Scrollbar */
  .left-panel::-webkit-scrollbar,
  .right-panel::-webkit-scrollbar { width: 3px; }
  .left-panel::-webkit-scrollbar-thumb,
  .right-panel::-webkit-scrollbar-thumb { background: var(--border); }

  /* API key modal */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }

  .modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: 2px solid var(--gold-dim);
    border-radius: 4px;
    padding: 32px 36px;
    width: 100%;
    max-width: 460px;
  }

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

  .modal-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
  }

  .modal-input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 14px;
  }

  .modal-input:focus { border-color: var(--gold-dim); }

  .modal-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #b07800, var(--gold-dim));
    border: 1px solid var(--gold-dim);
    border-radius: 3px;
    color: #3a1800;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.2s;
  }

  .modal-btn:hover { box-shadow: 0 0 22px rgba(255,216,74,0.3); }

  .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; }
  }
  
  .footerexp{
      margin-top:20px;
      font-size:13px;
      color:#b09080;
      text-align:center;
  }
  .footerexp a{
      color:#b09080;
      text-decoration: none;
  }