/* Joker 品牌全案视觉覆盖（深藏青/行动蓝/撑腰红/浅灰蓝/金色） */
:root {
  --navy: #1A2B4A;
  --blue: #2F6FED;
  --red: #B83A4B;
  --fog: #F3F6FB;
  --gold: #F2C94C;
}
body { background: var(--fog) !important; color: var(--navy) !important; }
.gate-logo, .screen-title { color: var(--navy) !important; }
.gate-btn, .calc-submit, .chat-send-btn, .restart-btn, .og-btn-primary {
  background: var(--blue) !important; color: #fff !important;
}
.gate-btn:active, .calc-submit:active { background: #1A4FCC !important; }
#gate { background: var(--fog); }
.gate-card, .aid-card, .calc-out-card, .og-card {
  border-color: rgba(26,43,74,.12) !important;
}
.aid-card-cite { color: var(--blue) !important; background: #E8F0FE !important; }
.calc-total-amount { color: var(--navy) !important; }
.tab-item.active { color: var(--blue) !important; }
.badge-unverified {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: #FDECEE;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}
.legal-banner {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFF8E1;
  border: 1px solid #F2C94C;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.55;
}
#tab-bar { border-top: 1px solid rgba(26,43,74,.1); background: #fff; }
.og-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px 10px; background: #fff;
  border-bottom: 1px solid rgba(26,43,74,.08);
  position: sticky; top: 0; z-index: 12;
}
.og-brand { display: flex; align-items: center; gap: 10px; }
.og-brand svg { width: 36px; height: 36px; flex: none; }
.og-brand-name { font-size: 16px; font-weight: 650; color: var(--navy); }
.og-brand-sub { font-size: 12px; color: rgba(26,43,74,.65); }
.og-switch { display: flex; gap: 6px; flex-wrap: wrap; }
.og-chip {
  border: 1px solid rgba(26,43,74,.15); background: #fff; color: var(--navy);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.og-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.og-chip.warn { background: #FFF8E1; border-color: var(--gold); }
.five-grid { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px; }
@media (min-width: 720px) { .five-grid { grid-template-columns: repeat(5, 1fr); } }
.five-card {
  background: #fff; border: 1px solid rgba(26,43,74,.1); border-radius: 16px;
  padding: 14px; cursor: pointer; text-align: left;
}
.five-card:hover { border-color: var(--blue); }
.five-num { font-size: 12px; color: var(--blue); font-weight: 700; }
.five-title { font-size: 18px; font-weight: 650; margin: 4px 0; color: var(--navy); }
.five-desc { font-size: 13px; color: rgba(26,43,74,.75); line-height: 1.5; }
.og-select-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.og-select-row select, .og-select-row button, .og-btn, .og-btn-primary {
  height: 40px; border-radius: 10px; border: 1px solid rgba(26,43,74,.15);
  padding: 0 12px; font: inherit; background: #fff; color: var(--navy);
}
.og-btn-primary { border: none; }
.og-status { padding: 0 16px; font-size: 12px; color: rgba(26,43,74,.65); }
.bubble-coach { background: #EEF3FF; border-radius: 14px; padding: 10px 12px; margin: 8px 16px 8px 8px; }
.bubble-hr { background: #fff; border: 1px solid rgba(26,43,74,.1); }
.bubble-user { background: var(--navy); color: #fff; }
.debrief-box { margin: 12px 16px 24px; background: #fff; border-radius: 16px; padding: 14px; border: 1px solid rgba(26,43,74,.1); }
.debrief-box h3 { margin: 0 0 8px; font-size: 16px; }
.debrief-box li { margin: 6px 0; font-size: 14px; }
.debrief-box textarea { width: 100%; min-height: 70px; border-radius: 10px; border: 1px solid rgba(26,43,74,.15); padding: 8px; font: inherit; margin: 6px 0 12px; }

/* 底栏在 #app 内参与 flex，各屏只在栏上滚动，避免末卡/复盘被挡住 */
html, body { height: 100%; overflow: hidden; }
body { padding-bottom: 0 !important; }
#app.visible {
  display: flex !important;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}
.screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#screen-home, #screen-aid, #screen-calc {
  padding-bottom: 16px;
}
#screen-official,
#screen-role {
  display: none;
  flex-direction: column;
  padding-bottom: 0;
  overflow: hidden;
}
#screen-official.active,
#screen-role.active {
  display: flex !important;
}
#screen-official #og-chat,
#screen-role .chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#screen-official .chat-input-bar,
#screen-role .chat-input-bar {
  display: none;
  flex-shrink: 0;
  position: static;
  background: #fff;
  z-index: 20;
}
#screen-official.is-debrief .chat-input-bar {
  display: none !important;
}
#og-debrief { padding: 0 0 20px; flex: 0 1 auto; max-height: 42%; overflow-y: auto; }

/* 非对练/话术页不得出现对话输入条；话术条只属于 #screen-role */
body:not(.tab-role):not(.tab-official) .chat-input-bar,
#app > .chat-input-bar,
#screen-aid .chat-input-bar,
#screen-calc .chat-input-bar,
#screen-home .chat-input-bar {
  display: none !important;
}
body.tab-role #screen-role .chat-input-bar { display: flex !important; }
body.tab-official #screen-official:not(.is-debrief) .chat-input-bar { display: flex !important; }
body.tab-official #screen-role .chat-input-bar { display: none !important; }

#tab-bar {
  flex-shrink: 0;
  height: auto !important;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}

.og-pack-note,
.market-law-note:not([hidden]) {
  margin: 8px 16px 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #F3F6FB;
  border: 1px solid rgba(26,43,74,.12);
  color: var(--navy);
  font-size: 12px;
  line-height: 1.5;
}

.og-select-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
