:root {
  /* Premium Dark Navy Palette */
  --bg-color: #0b1120;
  --panel-bg: rgba(30, 41, 59, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-glow: rgba(56, 189, 248, 0.2);
  
  /* Gradients */
  --primary-grad: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --success-grad: linear-gradient(135deg, #10b981, #059669);
  --warn-grad: linear-gradient(135deg, #f59e0b, #d97706);
  --danger-grad: linear-gradient(135deg, #ef4444, #b91c1c);

  /* Primary Accent Colors */
  --primary: #3b82f6;
  --primary-dark: #1e3a8a;
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --heading-glow: #e2e8f0;
  
  /* Boki Specific */
  --debit-accent: #34d399; /* 借方 グリーン */
  --credit-accent: #fb7185; /* 貸方 レッド */
  
  /* Spacing & Sizes */
  --border-radius: 24px;
  --border-radius-sm: 16px;
  --nav-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden; /* 背景のオーブのはみ出しを防ぐ */
}

/* --- オーブ（背景の光） --- */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}
.orb-1 {
  width: 400px; height: 400px;
  background: rgba(59, 130, 246, 0.4);
  top: -100px; left: -100px;
}
.orb-2 {
  width: 300px; height: 300px;
  background: rgba(139, 92, 246, 0.3);
  bottom: -50px; right: -50px;
  animation-delay: -5s;
}
.orb-3 {
  width: 250px; height: 250px;
  background: rgba(16, 185, 129, 0.2);
  top: 40%; left: 30%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -50px) scale(1.1); }
  100% { transform: translate(-20px, 30px) scale(0.9); }
}

/* --- App Container & Glassmorphism --- */
.app-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 480px) {
  .app-container {
    height: 850px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255,255,255,0.05);
    overflow: hidden;
  }
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* --- Screens --- */
.screen {
  display: none;
  height: 100%;
  padding-bottom: var(--nav-height);
  overflow-y: auto;
  overflow-x: hidden;
}
.screen.active {
  display: block;
  animation: screenFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: scale(0.98) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Select Screen --- */
.brand-header {
  padding: 40px 20px 20px;
  text-align: center;
}
.brand-title {
  font-size: 1.8rem;
  line-height: 1.4;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(255,255,255,0.2);
  margin-bottom: 15px;
}
.brand-highlight {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  color: var(--text-sub);
  font-size: 0.95rem;
  font-weight: bold;
}

.character-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 20px;
}
.char-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.char-card:hover, .char-card:active {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
}
.char-card.rabbit-theme:hover { border-color: #f472b6; background: rgba(244,114,182,0.1); }
.char-card.raccoon-theme:hover { border-color: #22c55e; background: rgba(34,197,94,0.1); }
.char-card.owl-theme:hover { border-color: #a855f7; background: rgba(168,85,247,0.1); }
.char-card.dolphin-theme:hover { border-color: #0ea5e9; background: rgba(14,165,233,0.1); }

.char-emoji { font-size: 3rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); line-height: 1; }
.char-name { font-weight: 900; font-size: 1.1rem; margin-bottom: 4px; }
.char-desc { font-size: 0.75rem; color: var(--text-sub); line-height: 1.4; }

.exam-entry-banner {
  margin: 30px 20px;
  padding: 20px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, rgba(30,58,138,0.8), rgba(17,24,39,0.8));
  border: 1px solid rgba(59,130,246,0.3);
  display: flex;
  align-items: center;
  gap: 15px;
}
.glow-effect { box-shadow: 0 0 20px rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.exam-entry-icon { font-size: 2.2rem; }
.exam-entry-text { flex: 1; }
.exam-entry-title { font-weight: 900; font-size: 0.95rem; margin-bottom: 4px; color: #bae6fd; }
.exam-entry-sub { font-size: 0.75rem; color: var(--text-sub); }
.exam-entry-btn {
  background: #0284c7;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
}
.exam-entry-btn:active { transform: scale(0.95); }

/* --- Headers --- */
.glass-header {
  padding: 20px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner, .exam-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pet-status {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.05);
  padding: 6px 14px 6px 6px;
  border-radius: 30px;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: background 0.2s;
}
.pet-status:active { background: rgba(255,255,255,0.1); }
.pet-emoji-ring {
  background: rgba(255,255,255,0.1);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-size: 1.5rem;
  border: 2px solid rgba(255,255,255,0.2);
}
.pet-info { display: flex; flex-direction: column; gap: 4px; }
.pet-level-badge {
  font-size: 0.75rem; font-weight: 900;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  width: fit-content;
}
.xp-bar-container { width: 70px; height: 6px; background: rgba(0,0,0,0.3); border-radius: 3px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: var(--primary-grad); width: 0%; transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.score-board { text-align: right; }
.score-label, .score-label-sm { font-size: 0.7rem; font-weight: 900; color: var(--text-sub); letter-spacing: 1px; }
.score-value { display: block; font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* --- Game Area --- */
.game-content-scroll { padding: 0 20px 20px; }

.exam-entry-badge {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-radius: 14px; margin-bottom: 20px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.badge-text { font-weight: 900; font-size: 0.9rem; color: #93c5fd; }
.badge-btn {
  background: var(--primary); color: white; border: none;
  padding: 6px 12px; border-radius: 8px; font-weight: 900; cursor: pointer;
}

.question-container {
  padding: 24px; margin-bottom: 20px;
}
.question-container::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--primary-grad);
}
.category-badge-wrap { margin-bottom: 12px; }
.category-badge {
  display: inline-block; padding: 4px 12px;
  background: rgba(255,255,255,0.1); border-radius: 20px;
  font-size: 0.75rem; font-weight: 900; color: #bae6fd;
}
.question-text { font-size: 1.1rem; line-height: 1.6; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

/* Answer Area */
.answer-area { display: flex; gap: 12px; margin-bottom: 24px; }
.side { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.side-label { font-size: 0.8rem; font-weight: 900; text-align: center; }
.debit-label { color: var(--debit-accent); }
.credit-label { color: var(--credit-accent); }

.account-btn {
  width: 100%; padding: 14px 10px;
  background: rgba(15, 23, 42, 0.5); border: 1px dashed var(--glass-border);
  color: var(--text-sub); border-radius: 12px;
  font-weight: bold; font-size: 0.95rem; cursor: pointer; transition: 0.2s;
}
.account-btn.selected {
  background: rgba(255,255,255,0.1); border-style: solid;
  color: white; border-color: rgba(255,255,255,0.3);
}
.side.debit .account-btn.selected { border-color: var(--debit-accent); }
.side.credit .account-btn.selected { border-color: var(--credit-accent); }

.amount-input {
  width: 100%; padding: 14px;
  background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border);
  color: white; border-radius: 12px;
  font-weight: 900; font-size: 1.1rem; text-align: right;
  outline: none; transition: 0.2s;
}
.amount-input:focus { border-color: rgba(255,255,255,0.5); background: rgba(0,0,0,0.4); }

/* Buttons */
.action-btn {
  width: 100%; padding: 18px;
  border: none; border-radius: 20px;
  color: white; font-size: 1.2rem; font-weight: 900;
  cursor: pointer; box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.action-btn:active { transform: translateY(2px); box-shadow: 0 4px 10px -5px rgba(0,0,0,0.3); }
.primary-gradient-btn { background: var(--primary-grad); }
.success-gradient-btn { background: var(--success-grad); }
.glass-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  color: white; border-radius: 12px; padding: 12px; font-weight: bold; cursor: pointer;
}

/* --- Notes Screen --- */
.notes-header { text-align: center; padding: 30px 20px 20px; }
.notes-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; color: #f8fafc; }
.notes-subtitle { font-size: 0.9rem; color: var(--text-sub); font-weight: bold; }

.note-card { padding: 20px; margin: 0 20px 20px; }
.note-card h3 { font-size: 1.1rem; color: #bae6fd; border-bottom: 2px solid rgba(186,230,253,0.2); padding-bottom: 10px; margin-bottom: 15px; font-weight: 900; }
.note-card p { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 15px; line-height: 1.6; }

.element-box { background: rgba(0,0,0,0.2); border-radius: 12px; padding: 15px; }
.t-account-style { display: flex; gap: 15px; }
.t-left, .t-right { flex: 1; }
.t-left { border-right: 1px dashed rgba(255,255,255,0.1); padding-right: 15px; }
.t-heading { font-size: 0.8rem; font-weight: 900; color: #94a3b8; margin-bottom: 10px; }
.t-account-style ul { list-style: none; padding: 0; font-size: 0.85rem; line-height: 1.8; color: #f1f5f9; }

.modern-list .list-item { margin-bottom: 15px; font-size: 0.9rem; line-height: 1.6; }
.modern-list .list-item:last-child { margin-bottom: 0; }
.highlight-asset { color: #60a5fa; font-weight: bold; }
.highlight-liability { color: #f43f5e; font-weight: bold; }

.spell-box .spell-line { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.spell-box .spell-line:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.spell-line strong { display: block; font-size: 1.05rem; color: #fde047; margin-bottom: 4px; }
.spell-line span { font-size: 0.85rem; color: #cbd5e1; }

.fs-grid { display: flex; gap: 12px; margin-bottom: 15px; }
.fs-card { flex: 1; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 12px; text-align: center; }
.fs-title { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.pl-card .fs-title { color: #f43f5e; }
.bs-card .fs-title { color: #3b82f6; }
.fs-sub { font-size: 0.7rem; color: #94a3b8; display: block; margin-bottom: 10px; }
.fs-table { display: flex; background: rgba(0,0,0,0.2); border-radius: 6px; overflow: hidden; font-size: 0.8rem; font-weight: bold; height: 60px; }
.fs-col { flex: 1; display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,0.05); }
.fs-col:last-child { border-right: none; }
.fs-profit { background: rgba(244,63,94,0.2); color: #fda4af; font-size: 0.8rem; font-weight: bold; padding: 4px; border-radius: 6px; margin-top: 5px; }
.fs-asset { padding: 10px; }
.fs-liab-cap { flex-direction: column; }
.fs-cell { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
.fs-cell:last-child { border-bottom: none; }
.fs-note { font-size: 0.8rem; color: #94a3b8; text-align: center; font-weight: bold; line-height: 1.5; padding: 10px; background: rgba(255,255,255,0.05); border-radius: 8px; }

/* --- Bottom Nav --- */
.glass-nav {
  position: absolute; bottom: 0; left: 0; width: 100%;
  display: flex; gap: 8px;
  padding: 12px 20px 24px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  z-index: 50;
}
@media (min-width: 480px) { .glass-nav { padding-bottom: 12px; border-bottom-left-radius: 40px; border-bottom-right-radius: 40px; } }

.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 0; border: none; background: transparent;
  color: var(--text-sub); font-weight: bold; border-radius: 16px; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-icon { font-size: 1.2rem; filter: grayscale(1); transition: 0.2s; }
.nav-text { font-size: 0.75rem; }
.nav-btn.active { background: rgba(255,255,255,0.1); color: white; }
.nav-btn.active .nav-icon { filter: grayscale(0); transform: translateY(-2px); }
.nav-btn.exam-nav.active { background: rgba(37,99,235,0.2); color: #93c5fd; }

/* --- Modal Base --- */
.modal { position: absolute; top:0; left:0; width:100%; height:100%; display: flex; justify-content: center; align-items: center; z-index: 100; padding: 20px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.glass-modal { background: var(--panel-bg); border: 1px solid var(--glass-border); border-radius: 30px; padding: 30px; position: relative; z-index: 101; max-height: 85vh; overflow-y: auto; width: 100%; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.mini-modal { max-width: 320px; padding: 24px; text-align: center; }

.modal-title { font-size: 1.3rem; font-weight: 900; color: white; margin-bottom: 20px; text-align: center; }
.close-btn { width: 100%; padding: 14px; margin-top: 15px; border-radius: 16px; }

/* Accounts Grid in Modal */
.accounts-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.acc-sel-btn {
  padding: 10px 14px; background: rgba(255,255,255,0.05); color: #cbd5e1;
  border: 1px solid var(--glass-border); border-radius: 12px;
  font-weight: bold; font-size: 0.9rem; cursor: pointer; transition: 0.2s;
}
.acc-sel-btn[data-type="BS"] { border-left: 4px solid #3b82f6; }
.acc-sel-btn[data-type="PL"] { border-left: 4px solid #f59e0b; }
.acc-sel-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.1); }

/* Feedback Modal */
.feedback-modal { text-align: center; }
.feedback-title { font-size: 2rem; font-weight: 900; margin-bottom: 10px; }
.correct .feedback-title { color: #4ade80; }
.wrong .feedback-title { color: #f87171; }

.explanation-box { background: rgba(0,0,0,0.2); padding: 16px; border-radius: 16px; text-align: left; font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; color: #e2e8f0; }
.correct .explanation-box { border-top: 3px solid #4ade80; }
.wrong .explanation-box { border-top: 3px solid #f87171; }

.evolution-alert { margin-bottom: 20px; padding: 20px; background: rgba(250, 204, 21, 0.1); border: 1px solid rgba(250,204,21,0.3); }
.evo-text { font-weight: 900; color: #fde047; display: block; margin-bottom: 10px; }
.evo-emoji-lg { font-size: 2.5rem; letter-spacing: 5px; }

/* Profile Modal */
.profile-stats-card { display: flex; justify-content: space-around; align-items: center; padding: 20px; border-radius: 20px; margin-bottom: 24px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); }
.profile-avatar-area { text-align: center; }
.profile-emoji-lg { font-size: 3rem; margin-bottom: 5px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
.score-val-lg { font-size: 2.2rem; font-weight: 900; color: #38bdf8; }
.weakness-title { font-size: 1.1rem; border-bottom: 2px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 15px; color: #f8fafc; font-weight: 900; }
.weakness-list { display: flex; flex-direction: column; gap: 8px; }

/* Exam Start Screen */
.exam-start-container { margin: 20px; padding: 30px 20px; text-align: center; }
.exam-start-badge-top { display: inline-block; padding: 6px 16px; background: rgba(59,130,246,0.2); border: 1px solid rgba(59,130,246,0.5); color: #93c5fd; border-radius: 20px; font-weight: 900; font-size: 0.8rem; margin-bottom: 16px; letter-spacing: 1px; }
.exam-start-title { font-size: 1.6rem; font-weight: 900; line-height: 1.4; margin-bottom: 24px; }
.exam-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.exam-info-card { background: rgba(0,0,0,0.2); padding: 15px 10px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.exam-info-icon { font-size: 1.8rem; margin-bottom: 5px; }
.exam-info-label { font-size: 0.75rem; color: #94a3b8; font-weight: bold; margin-bottom: 2px; }
.exam-info-value { font-size: 1.2rem; font-weight: 900; color: #f8fafc; }
.exam-notice { text-align: left; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); padding: 15px; border-radius: 16px; margin-bottom: 24px; }
.exam-notice h4 { color: #fcd34d; margin-bottom: 10px; font-size: 0.95rem; }
.exam-notice ul { padding-left: 20px; color: #cbd5e1; font-size: 0.85rem; line-height: 1.6; }

/* Exam Game Screen */
.exam-q-label { font-weight: 900; font-size: 0.9rem; color: #94a3b8; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 12px; }
.exam-timer-wrap { display: flex; align-items: center; gap: 6px; }
.exam-timer-label { font-size: 0.7rem; font-weight: bold; color: #94a3b8; }
.exam-timer { font-size: 1.4rem; font-weight: 900; letter-spacing: 1px; }
.exam-timer.danger { color: #f87171; animation: flash 1s infinite alternate; }
@keyframes flash { from { opacity: 1; } to { opacity: 0.3; } }

.exam-nav-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 20px; }
.exam-nav-num { width: 34px; height: 34px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 10px; color: #94a3b8; font-weight: bold; cursor: pointer; transition: 0.2s; }
.exam-nav-num.current { background: var(--primary); color: white; border-color: var(--primary); transform: scale(1.1); }
.exam-nav-num.answered { background: rgba(16,185,129,0.2); border-color: #10b981; color: #a7f3d0; }
.exam-nav-num.flagged { background: rgba(245,158,11,0.2); border-color: #f59e0b; color: #fde047; }

.exam-controls { display: flex; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.exam-flag-btn { flex: 1; white-space: nowrap; }
.exam-flag-btn.flagged { background: rgba(245,158,11,0.2); border-color: #f59e0b; color: #fde047; }
.exam-nav-btns { display: flex; gap: 8px; flex: 2; }
.solid-btn { background: var(--text-main); color: var(--bg-color); border: none; border-radius: 12px; padding: 12px; font-weight: 900; cursor: pointer; width: 100%; }

/* Exam Result App */
.exam-result-title { text-align: center; font-size: 1.5rem; font-weight: 900; margin: 20px 0; padding: 0 20px; }
.result-score-area { text-align: center; padding: 24px; margin: 0 20px 16px; }
.result-score-big { font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.result-score-unit { font-size: 1.2rem; }
.result-score-sub { font-size: 0.85rem; color: #94a3b8;}

.result-judge { margin: 0 20px 20px; padding: 16px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 1.1rem; }
.result-judge.pass { background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.5); color: #a7f3d0; }
.result-judge.fail { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.5); color: #fecaca; }

.result-divider { text-align: center; margin: 24px 0 16px; position: relative; }
.result-divider::before { content: ''; position: absolute; top:50%; left:20px; right:20px; height: 1px; background: rgba(255,255,255,0.1); z-index: 1; }
.result-divider span { background: var(--bg-color); padding: 0 15px; position: relative; z-index: 2; font-size: 0.85rem; color: #94a3b8; font-weight: bold; }

.result-list { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.result-item { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 16px; padding: 16px; border-left: 4px solid #94a3b8; }
.result-item.correct { border-left-color: #10b981; }
.result-item.wrong { border-left-color: #ef4444; }
.result-item-header { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.result-item-num { font-weight: 900; font-size: 1rem; }
.result-item-cat { background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 8px; font-size: 0.75rem; color: #cbd5e1; }
.result-item-q { font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }
.result-answer-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.result-your-answer, .result-correct-answer { flex: 1; min-width: 140px; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 12px; }
.answer-label { font-size: 0.7rem; color: #94a3b8; font-weight: 900; margin-bottom: 5px; }
.answer-entry { font-size: 0.85rem; font-weight: bold; line-height: 1.6; }
.answer-entry.ok { color: #34d399; }
.answer-entry.ng { color: #fb7185; }
.result-explanation { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 12px; font-size: 0.85rem; line-height: 1.6; color: #cbd5e1; }

.result-retry { margin: 0 20px 20px; width: calc(100% - 40px); }

/* Custom exam confirm modal buttons */
.modal-actions-row { display: flex; gap: 10px; margin-top: 20px; }
.alert-title { margin-bottom: 10px; }
.modal-message { font-size: 0.9rem; color: #cbd5e1; line-height: 1.5; white-space: pre-line; }
.modal-ok-btn { padding: 14px; font-size: 1rem; margin-top: 15px; }

/* 2・3問用テーブルUI対応 */
.boki-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.85rem; background: rgba(0,0,0,0.2); border-radius: 8px; overflow: hidden; }
.boki-table th, .boki-table td { padding: 8px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.boki-table th { background: rgba(255,255,255,0.1); font-weight: 900; color: #e2e8f0; }
.t-account { margin: 15px auto; max-width: 300px; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 12px; border: 1px solid var(--glass-border); }
.t-account-title { text-align: center; font-weight: 900; margin-bottom: 8px; font-size: 1rem; color: #bae6fd; }
.t-account-body { display: flex; border-top: 2px solid white; }
.t-account-side { flex: 1; padding: 8px; font-size: 0.85rem; line-height: 1.8; }
.t-account-left { border-right: 2px solid white; }
.t-account-row { display: flex; justify-content: space-between; gap: 4px; }

.hidden { display: none !important; }
