*{box-sizing:border-box}body{margin:0;background:#f5f7fa;color:#172033;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}.wrap{max-width:900px;margin:0 auto;padding:28px 18px 60px}.card{background:#fff;border:1px solid #dfe5ec;border-radius:12px;padding:28px;margin-bottom:20px;box-shadow:0 2px 10px rgba(15,23,42,.05)}h1{color:#1f3a5f}h2{color:#1f3a5f}.field{margin-bottom:15px}.field label{display:block;font-weight:600;margin-bottom:6px}.field input,.field textarea,.field select{width:100%;padding:11px;border:1px solid #dfe5ec;border-radius:7px}.btn{border:0;border-radius:7px;padding:11px 17px;font-weight:700;cursor:pointer}.primary{background:#1f3a5f;color:#fff}.secondary{background:#fff;color:#1f3a5f;border:1px solid #dfe5ec}.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca;padding:12px;border-radius:8px}.muted{color:#64748b}.item{display:grid;grid-template-columns:1fr 90px;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid #e2e8f0}.item input{width:90px;padding:9px}.code{font-size:28px;letter-spacing:4px;font-weight:800;color:#1f3a5f}.event{background:#f8fafc;padding:18px;border-radius:10px;margin:15px 0}.result{display:grid;grid-template-columns:1fr 1fr;gap:12px}.resultbox{background:#f8fafc;padding:18px;border-radius:8px;text-align:center}.resultbox b{display:block;font-size:28px}@media(max-width:650px){.result{grid-template-columns:1fr}}

/* Stage 7: student team/ranking tables */

.ranking-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.ranking-table{
  width:100%;
  border-collapse:collapse;
  min-width:620px;
  background:#fff;
}

.ranking-table th,
.ranking-table td{
  border:1px solid #dfe5ec;
  padding:10px 12px;
  text-align:left;
  vertical-align:middle;
}

.ranking-table th{
  background:#f8fafc;
  color:#1f3a5f;
  font-weight:700;
}

.ranking-table td:first-child,
.ranking-table th:first-child{
  width:90px;
  text-align:center;
}

.ranking-table td:nth-child(3),
.ranking-table td:nth-child(4),
.ranking-table th:nth-child(3),
.ranking-table th:nth-child(4){
  text-align:center;
  width:130px;
}

.team-rank-input{
  width:78px;
  padding:8px;
  border:1px solid #dfe5ec;
  border-radius:7px;
  text-align:center;
}

.team-members{
  margin:10px 0 0;
  padding-left:24px;
}

.team-members li{
  padding:5px 0;
}

.team-members .spokesperson{
  font-weight:800;
  color:#b91c1c;
}

@media(max-width:650px){
  .card{
    padding:18px;
  }

  .ranking-table{
    min-width:580px;
  }
}



/* ============================================================
   Stage 8 — Results
   ============================================================ */

.results-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.results-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  background:#fff;
}

.results-table th,
.results-table td{
  border:1px solid #dfe5ec;
  padding:10px 9px;
  text-align:center;
  vertical-align:middle;
}

.results-table th{
  background:#f8fafc;
  color:#1f3a5f;
  font-weight:700;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2){
  text-align:left;
  min-width:220px;
}

.results-table th:nth-child(1),
.results-table td:nth-child(1){
  width:70px;
}

.results-table th:nth-child(n+3),
.results-table td:nth-child(n+3){
  width:125px;
}

.results-table .expert-ranking{
  font-weight:800;
}

.results-table .results-total td{
  background:#f8fafc;
}

.synergy-box{
  display:flex;
  align-items:center;
  gap:20px;
  background:#f8fafc;
  border-radius:10px;
  padding:18px;
  margin-top:12px;
}

.synergy-value{
  min-width:75px;
  text-align:center;
  font-size:30px;
  font-weight:800;
  color:#1f3a5f;
}

@media(max-width:650px){

  .results-card{
    padding:18px;
  }

  .synergy-box{
    align-items:flex-start;
  }
}


/* ============================================================
   Stage 9F — Compact Results Table
   ============================================================ */

.results-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.results-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}

.results-table th,
.results-table td{
  padding:7px 6px;
  font-size:13px;
  line-height:1.25;
  text-align:center;
  vertical-align:middle;
  overflow-wrap:anywhere;
}

.results-table th:nth-child(1),
.results-table td:nth-child(1){
  width:7%;
  text-align:center;
}

.results-table th:nth-child(2),
.results-table td:nth-child(2){
  width:30%;
  text-align:left;
}

.results-table th:nth-child(n+3),
.results-table td:nth-child(n+3){
  width:12.6%;
  text-align:center;
}

.results-item-name{
  margin-bottom:5px;
}

.reasoning-toggle{
  border:1px solid #cfd8e3;
  background:#fff;
  color:#1f3a5f;
  border-radius:5px;
  padding:3px 7px;
  font-size:11px;
  line-height:1.2;
  cursor:pointer;
}

.reasoning-toggle:hover,
.reasoning-toggle:focus{
  background:#f3f6fa;
}

.expert-reasoning{
  margin-top:7px;
  padding:8px 9px;
  background:#f8fafc;
  border-left:3px solid #1f3a5f;
  border-radius:4px;
  font-size:12px;
  line-height:1.4;
  text-align:left;
}

.expert-reasoning strong{
  display:block;
  margin-bottom:3px;
}

.score-band{
  font-weight:700;
  margin-top:3px;
}

.scoring-guide{
  margin-top:18px;
  padding:14px 16px;
  background:#f8fafc;
  border-radius:8px;
}

.scoring-guide h3{
  margin:0 0 8px;
  font-size:18px;
}

.scoring-guide p{
  margin:0 0 8px;
}

.scoring-guide ul{
  margin:8px 0 0 18px;
  padding:0;
}

@media(max-width:650px){

  .results-card{
    padding:12px;
  }

  .results-table th,
  .results-table td{
    padding:5px 3px;
    font-size:10px;
  }

  .results-table th:nth-child(1),
  .results-table td:nth-child(1){
    width:6%;
  }

  .results-table th:nth-child(2),
  .results-table td:nth-child(2){
    width:31%;
  }

  .results-table th:nth-child(n+3),
  .results-table td:nth-child(n+3){
    width:12.6%;
  }

  .reasoning-toggle{
    padding:2px 4px;
    font-size:9px;
  }

  .expert-reasoning{
    font-size:10px;
    padding:6px;
  }

}


/* ============================================================
   Stage 9G — Results Interpretation & Scoring UI
   ============================================================ */

.performance-table-wrap,
.decision-summary-table-wrap{
  width:100%;
  overflow-x:visible;
}

.performance-table,
.score-conversion-table,
.decision-summary-table{
  width:100%;
  border-collapse:collapse;
}

.performance-table th,
.performance-table td,
.score-conversion-table th,
.score-conversion-table td,
.decision-summary-table th,
.decision-summary-table td{
  padding:9px 10px;
  border:1px solid #d9e1ea;
  vertical-align:middle;
}

.performance-table th,
.score-conversion-table th{
  text-align:center;
}

.performance-table td:first-child,
.score-conversion-table td:first-child{
  text-align:center;
  white-space:nowrap;
}

.performance-table td:nth-child(2),
.score-conversion-table td:nth-child(2){
  text-align:center;
  white-space:nowrap;
}

.performance-row-highlight{
  font-weight:600;
  box-shadow:inset 5px 0 0 currentColor;
}

.band-excellent{
  background:#e8f5e9 !important;
  color:#17652a;
}

.band-good{
  background:#eef7e9 !important;
  color:#356b22;
}

.band-average{
  background:#fff8d9 !important;
  color:#775b00;
}

.band-fair{
  background:#fff0dc !important;
  color:#8a4b00;
}

.band-poor{
  background:#fdeaea !important;
  color:#9d2525;
}

.band-very-poor{
  background:#f8dddd !important;
  color:#8d1f1f;
}

.performance-legend{
  display:flex;
  justify-content:center;
  gap:28px;
  margin-top:12px;
  font-size:14px;
}

.section-intro{
  margin-bottom:16px;
}

.decision-summary-table th:first-child{
  text-align:left;
  width:34%;
}

.decision-summary-table thead th{
  text-align:center;
}

.decision-summary-table td{
  text-align:center;
}

.score-number{
  display:block;
  font-size:24px;
  margin-bottom:6px;
}

.formula-toggle{
  display:inline-block;
  border:1px solid #cfd8e3;
  background:#fff;
  color:#1f3a5f;
  border-radius:5px;
  padding:4px 8px;
  font-size:11px;
  cursor:pointer;
}

.formula-toggle:hover,
.formula-toggle:focus{
  background:#f3f6fa;
}

.formula-panel{
  margin-top:12px;
  padding:13px 15px;
  background:#f8fafc;
  border-left:4px solid #1f3a5f;
  border-radius:6px;
  line-height:1.5;
}

.formula-panel p{
  margin:5px 0;
}

.score-conversion-section{
  margin-top:24px;
}

.score-conversion-section h3{
  margin-bottom:6px;
}

.score-row-highlight{
  font-weight:600;
  box-shadow:inset 5px 0 0 currentColor;
}

.interpretation-highlight{
  padding:18px;
  border-radius:8px;
  background:#f8dddd;
  border-left:5px solid #8d1f1f;
}

.interpretation-title{
  font-size:24px;
  font-weight:800;
  color:#8d1f1f;
  margin-bottom:5px;
}

.interpretation-highlight p{
  margin:0;
}

.team-effect-summary{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin:15px 0;
}

.team-effect-summary > div{
  padding:14px;
  background:#f8fafc;
  border-radius:8px;
  text-align:center;
}

.team-effect-summary span{
  display:block;
  font-size:13px;
  margin-bottom:5px;
}

.team-effect-summary strong{
  display:block;
  font-size:24px;
}

.team-effect-message{
  font-size:16px;
  line-height:1.55;
}

@media(max-width:650px){

  .performance-table th,
  .performance-table td,
  .score-conversion-table th,
  .score-conversion-table td,
  .decision-summary-table th,
  .decision-summary-table td{
    padding:7px 5px;
    font-size:11px;
  }

  .performance-table,
  .score-conversion-table,
  .decision-summary-table{
    table-layout:fixed;
  }

  .performance-table th:nth-child(1),
  .performance-table td:nth-child(1){
    width:22%;
  }

  .performance-table th:nth-child(2),
  .performance-table td:nth-child(2){
    width:24%;
  }

  .performance-table th:nth-child(3),
  .performance-table td:nth-child(3){
    width:54%;
  }

  .decision-summary-table th:first-child{
    width:30%;
  }

  .score-number{
    font-size:18px;
  }

  .formula-toggle{
    font-size:9px;
    padding:3px 5px;
  }

  .performance-legend{
    flex-direction:column;
    align-items:center;
    gap:5px;
  }

  .team-effect-summary{
    grid-template-columns:1fr;
  }

}

/* Stage 9H — Center Total Error values */
.results-table tr.total-row td {
    text-align: center !important;
}


/* ============================================================
   Results table — contained mobile horizontal scrolling
   ============================================================ */

@media (max-width: 650px) {

  .results-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .results-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .results-table {
    width: max-content;
    min-width: 760px;
    max-width: none;
    table-layout: auto;
  }
}

/* Phase timer */
.phase-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #fff7ed;
  border: 2px solid #f59e0b;
  border-radius: 10px;
}

.phase-timer-label {
  font-size: 15px;
  font-weight: 700;
  color: #9a3412;
}

.phase-timer strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: #9a3412;
}

@media (max-width: 650px) {
  .phase-timer {
    padding: 11px 13px;
    gap: 10px;
  }

  .phase-timer-label {
    font-size: 14px;
  }

  .phase-timer strong {
    font-size: 24px;
  }
}

/* Ranking input validation */
.ranking-input-error {
  border: 2px solid #dc2626 !important;
  outline: 2px solid rgba(220, 38, 38, 0.18);
  background: #fef2f2 !important;
}

/* Total Error values — explicitly centered */
.results-table tr.results-total td:nth-child(6),
.results-table tr.results-total td:nth-child(7) {
  text-align: center !important;
  vertical-align: middle !important;
}

.results-table tr.results-total td:nth-child(6) strong,
.results-table tr.results-total td:nth-child(7) strong {
  display: block;
  width: 100%;
  text-align: center !important;
}

/* ============================================================
   STAGE 3B — RESPONSIVE RESULTS PRESENTATION
   ============================================================ */

.results-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.results-table-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/*
 * Desktop/tablet:
 * retain the complete results table, but allow controlled
 * horizontal scrolling rather than expanding the page itself.
 */
.results-table {
    width: 100%;
    min-width: 980px;
}

/*
 * Mobile:
 * turn the results rows into compact cards.
 * This avoids forcing a 980px table into a phone viewport.
 */
@media (max-width: 700px) {

    .results-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .results-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .results-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .results-table thead {
        display: none;
    }

    .results-table tbody,
    .results-table tr,
    .results-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .results-table tbody tr {
        margin: 0 0 12px 0;
        padding: 10px 12px;
        border: 1px solid #d9dfe7;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,.06);
    }

    .results-table td {
        min-height: 30px;
        padding: 6px 0;
        border: 0;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .results-table td::before {
        display: inline-block;
        width: 46%;
        margin-right: 4%;
        vertical-align: top;
        font-weight: 700;
        color: #475569;
    }

    .results-table td:nth-child(1)::before {
        content: "Serial No.";
    }

    .results-table td:nth-child(2)::before {
        content: "Item";
    }

    .results-table td:nth-child(3)::before {
        content: "My Ranking";
    }

    .results-table td:nth-child(4)::before {
        content: "Team Ranking";
    }

    .results-table td:nth-child(5)::before {
        content: "Expert Ranking";
    }

    .results-table td:nth-child(6)::before {
        content: "Expert vs My — Difference";
    }

    .results-table td:nth-child(7)::before {
        content: "Expert vs Team — Difference";
    }

    .results-table td:nth-child(2) {
        font-weight: 600;
    }

    .results-table .results-total td {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .results-table .results-total td::before {
        width: auto;
        margin-right: 12px;
    }
}

/*
 * Very narrow phones.
 */
@media (max-width: 380px) {

    .results-table tbody tr {
        padding: 9px 10px;
    }

    .results-table td {
        font-size: 13px;
        line-height: 1.35;
    }

    .results-table td::before {
        width: 43%;
        margin-right: 3%;
        font-size: 12px;
    }
}

/* Classroom UI 20261008 */
.scenario-text { color: #000; font-size: 20px; line-height: 1.55 }
.phase-timer { position: fixed; top: 10px; right: 10px; z-index: 1000; margin: 0; padding: 8px 12px; gap: 10px; background: #fff; border: 2px solid #ff0000; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.2) }
.phase-timer-label { font-size: 12px; font-weight: 800; color: #ff0000; text-transform: uppercase; letter-spacing: .4px }
.phase-timer strong { font-size: 26px; font-weight: 800; color: #ff0000 }
main.wrap:has(.phase-timer) { padding-top: 72px }
.submit-confirm { margin: 0 0 16px; padding: 14px 16px; background: #e8f5e9; border: 2px solid #2e7d32; border-radius: 10px; color: #17652a; font-size: 18px; font-weight: 700 }
.error[role="alert"] { margin-bottom: 14px }
.loading-card { text-align: center }
.loading-spinner { width: 36px; height: 36px; margin: 6px auto 14px; border: 4px solid #dfe5ec; border-top-color: #1f3a5f; border-radius: 50%; animation: games-spin .8s linear infinite }
@keyframes games-spin { to { transform: rotate(360deg) } }
@media (max-width: 650px) {
  .scenario-text { font-size: 19px }
  .phase-timer { top: 8px; right: 8px; padding: 6px 10px }
  .phase-timer-label { font-size: 11px }
  .phase-timer strong { font-size: 22px }
}
@media (prefers-reduced-motion: reduce) { .loading-spinner { animation-duration: 2.4s } }

/* Classroom UI 20261008b */
.submitted-box { display: inline-block; margin: 18px 0 6px; padding: 12px 18px; background: #15803d; border-radius: 7px; color: #fff; font-size: 18px; font-weight: 700 }

/* Classroom UI 20261008c */
.submitted-box { display: inline-block; margin: 18px 0 6px; padding: 12px 18px; background: #15803d; border-radius: 7px; color: #fff; font-size: 18px; font-weight: 700 }
.after-submit-note { margin: 10px 0 0; color: #000; font-size: 17px; font-weight: 600 }

/* Classroom UI 20261008e: results stay a table on phones */
@media (max-width: 700px) {
  .results-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .results-table {
    display: table;
    width: 100%;
    min-width: 640px;
    max-width: none;
    table-layout: auto;
    border-collapse: collapse;
    border-spacing: 0;
  }

  .results-table thead { display: table-header-group; }
  .results-table tbody { display: table-row-group; width: auto; }

  .results-table tr,
  .results-table tbody tr {
    display: table-row;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .results-table th:nth-child(n),
  .results-table td:nth-child(n) {
    display: table-cell;
    width: auto;
    min-height: 0;
    padding: 10px 10px;
    border: 1px solid #dfe5ec;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .results-table th:nth-child(2),
  .results-table td:nth-child(2) {
    min-width: 150px;
    text-align: left;
  }

  .results-table td:nth-child(n)::before {
    content: none;
    display: none;
  }

  .results-table .results-total td:nth-child(n) { display: table-cell; }

  .results-table .reasoning-toggle { padding: 3px 7px; font-size: 12px; }
  .results-table .expert-reasoning { font-size: 13px; }
}

/* Classroom UI 20261008f: results record and printing */
.record-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 16px; background: #fff; border: 1px solid #dfe5ec; border-radius: 10px }
.record-label { margin: 0 0 14px; padding: 10px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #172033; font-size: 15px }
.record-page + .record-page { margin-top: 48px; padding-top: 24px; border-top: 3px dashed #cfd8e3 }
@media print {
  .no-print, .phase-timer { display: none !important }
  body { background: #fff }
  .wrap { max-width: none; padding: 0 }
  .card { box-shadow: none }
  .record-page { break-after: page; page-break-after: always }
  .record-page:last-child { break-after: auto; page-break-after: auto }
  .record-page + .record-page { margin-top: 0; padding-top: 0; border-top: 0 }
  .results-table-wrap { overflow: visible !important }
  .results-table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: fixed !important }
  .results-table th, .results-table td { padding: 5px 4px !important; font-size: 11px !important; overflow-wrap: anywhere }
  .results-table th:nth-child(1), .results-table td:nth-child(1) { width: 7% !important }
  .results-table th:nth-child(2), .results-table td:nth-child(2) { width: 30% !important }
  .results-table th:nth-child(n+3), .results-table td:nth-child(n+3) { width: 12.6% !important }
  .results-table tr, .performance-table tr, .score-conversion-table tr, .decision-summary-table tr { break-inside: avoid; page-break-inside: avoid }
  h2, h3 { break-after: avoid; page-break-after: avoid }
}


/* Cave Rescue KJ-20261009 */
body.kj-game .scenario-text { display: none }
.kj-situation p { margin: 0 0 12px; color: #000; font-size: 18px; line-height: 1.55 }
.kj-instructions { margin: 0 0 16px; color: #000; font-size: 17px; line-height: 1.5 }
.kj-fold { margin: 0 0 12px; border: 1px solid #dfe5ec; border-radius: 8px; background: #f8fafc }
.kj-fold summary { padding: 10px 14px; cursor: pointer; color: #1f3a5f; font-weight: 700 }
.kj-fold > div, .kj-fold > p { padding: 0 14px }
.kj-fold .kj-situation p { font-size: 16px }
.kj-volunteer { margin: 0 0 16px; padding: 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.kj-volunteer.kj-done { border-color: #15803d }
.kj-volunteer.kj-missing { border-color: #dc2626; background: #fef2f2 }
.kj-volunteer h3 { margin: 0 0 8px; color: #172033; font-size: 20px }
.kj-number { display: block; color: #5b6b7f; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase }
.kj-details { margin: 0 0 12px; color: #000; font-size: 16px; line-height: 1.5 }
.kj-own { margin: 0 0 12px; color: #1f3a5f; font-size: 15px }
.kj-rank-label { display: block; margin: 0 0 12px; font-weight: 400 }
.kj-rank-label span { display: block; margin: 0 0 6px; color: #172033; font-size: 15px; font-weight: 700 }
.kj-rank { width: 100%; max-width: 320px; min-height: 46px; padding: 8px 10px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-size: 17px }
.kj-reasons { margin: 0; padding: 0; border: 0; min-width: 0 }
.kj-reasons legend { margin: 0 0 8px; padding: 0; color: #172033; font-size: 15px; font-weight: 700 }
.kj-reason { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 10px 12px; background: #f8fafc; border: 1px solid #cfd8e3; border-radius: 8px; color: #000; font-size: 16px; font-weight: 400; line-height: 1.45; cursor: pointer }
.kj-reason input { flex: 0 0 auto; width: 20px; min-width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; box-shadow: none }
.kj-reason span { flex: 1 1 auto; min-width: 0 }
.kj-reason:has(input:checked) { background: #e8f5e9; border-color: #15803d }
.kj-hint { margin: 0; color: #5b6b7f; font-size: 15px }
.kj-progress { margin: 4px 0 12px; color: #172033; font-size: 16px; font-weight: 700 }
.kj-error { margin: 0 0 14px; padding: 12px 14px; background: #fef2f2; border: 2px solid #dc2626; border-radius: 8px; color: #991b1b; font-size: 16px; font-weight: 700 }
.kj-error[hidden] { display: none }
.kj-list-title { margin: 18px 0 8px; font-size: 17px }
.kj-reason-list { margin: 0 0 8px; padding-left: 26px }
.kj-reason-list li { margin: 0 0 8px; color: #000; font-size: 16px; line-height: 1.45 }
.kj-results h3 { margin: 22px 0 10px }
.kj-summary { padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; line-height: 1.5 }
.kj-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
.kj-table { width: 100%; border-collapse: collapse; background: #fff }
.kj-table th, .kj-table td { padding: 9px 8px; border: 1px solid #cfd8e3; color: #000; font-size: 15px; line-height: 1.4; text-align: center; vertical-align: top }
.kj-table th { background: #1f3a5f; color: #fff; font-weight: 700 }
.kj-table td.kj-name { font-weight: 700; text-align: left; white-space: nowrap }
.kj-order-table { min-width: 560px }
.kj-reason-table { min-width: 720px }
.kj-reason-table td { text-align: left }
.kj-reason-table th:nth-child(2), .kj-reason-table th:nth-child(3) { width: 34% }
.kj-basis-table { min-width: 460px }
.kj-tag { display: block; margin: 0 0 4px; color: #1f3a5f; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px }
.kj-note { margin: 8px 0 0; font-size: 14px }
.kj-discussion li { margin: 0 0 12px; color: #000; font-size: 17px; line-height: 1.5 }
@media (max-width: 700px) {
  .kj-situation p { font-size: 17px }
  .kj-volunteer { padding: 12px }
  .kj-table th, .kj-table td { padding: 7px 6px; font-size: 14px }
}
@media print {
  .kj-fold { display: none }
  .kj-table-wrap { overflow: visible !important }
  .kj-table { min-width: 0 !important; table-layout: auto }
  .kj-table th, .kj-table td { padding: 5px 4px; font-size: 11px }
  .kj-table th { background: #fff !important; color: #000 !important }
  .kj-table td.kj-name { white-space: normal }
  .kj-table tr { break-inside: avoid; page-break-inside: avoid }
  .kj-summary, .kj-discussion li { font-size: 12px }
}

/* Cave Rescue: volunteer pictures KJ-20261009b */
.kj-head { display: flex; align-items: center; gap: 14px; margin: 0 0 10px }
.kj-volunteer .kj-head h3 { margin: 0 }
.kj-photo { display: block; flex: 0 0 auto; box-sizing: border-box; max-width: none; border-radius: 50%; background: #eef2f7 }
.kj-photo-large { width: 84px; height: 84px; border: 2px solid #dfe5ec }
.kj-photo-small { width: 36px; height: 36px }
.kj-who { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle }
.kj-fold .kj-details .kj-photo-small { display: inline-block; margin: 0 8px 0 0; vertical-align: middle }
@media print {
  .kj-photo-small { width: 22px; height: 22px }
  .kj-photo { -webkit-print-color-adjust: exact; print-color-adjust: exact }
}

/* Cave Rescue: volunteer photographs KJ-20261009c */
.kj-photo { object-fit: cover }
.kj-photo-large { width: 96px; height: 96px }
.kj-photo-small { width: 40px; height: 40px }
@media print {
  .kj-photo-small { width: 24px; height: 24px }
}

/* Cave Rescue: the task for each round KJ-20261009d */
.kj-task { margin: 16px 0; padding: 14px 16px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 10px }
.kj-task p, .kj-situation .kj-task p { margin: 0 0 8px; color: #000; font-size: 18px; font-weight: 700; line-height: 1.5 }
.kj-task p:last-child, .kj-situation .kj-task p:last-child { margin-bottom: 0 }
.kj-situation .kj-task { margin-bottom: 0 }
@media (max-width: 700px) { .kj-task p, .kj-situation .kj-task p { font-size: 17px } }
/* Keeps the four-column ranking table within a phone screen when pictures are shown. */
@media (max-width: 480px) {
  .kj-rank-table th, .kj-rank-table td { padding: 6px 4px }
  .kj-rank-table .kj-who { gap: 6px }
  .kj-rank-table .kj-photo-small { width: 28px; height: 28px }
}


/* Stranded on a Mountain SM-20261010b */
body.sm-game .scenario-text { display: none }
.sm-situation p { margin: 0 0 12px; color: #000; font-size: 18px; line-height: 1.55 }
.sm-fold { margin: 0 0 12px; border: 1px solid #dfe5ec; border-radius: 8px; background: #f8fafc }
.sm-fold summary { padding: 10px 14px; cursor: pointer; color: #1f3a5f; font-weight: 700 }
.sm-fold > div { padding: 0 14px }
.sm-fold .sm-situation p { font-size: 16px }
.sm-task { margin: 0 0 16px; padding: 14px 16px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 10px }
.sm-task p { margin: 0; color: #000; font-size: 18px; font-weight: 700; line-height: 1.5 }
.sm-item { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.sm-item.sm-on { border-color: #1f3a5f; background: #f8fafc }
.sm-item.sm-done { border-color: #15803d }
.sm-item.sm-missing { border-color: #dc2626; background: #fef2f2 }
.sm-pick { display: flex; gap: 12px; align-items: flex-start; margin: 0; color: #000; font-size: 17px; font-weight: 400; line-height: 1.4; cursor: pointer }
.sm-pick input { flex: 0 0 auto; width: 24px; min-width: 24px; height: 24px; min-height: 0; margin: 1px 0 0; padding: 0; box-shadow: none }
.sm-pick input:disabled + .sm-name { color: #8a96a6 }
.sm-name { flex: 1 1 auto; min-width: 0 }
.sm-number { color: #5b6b7f; font-weight: 700 }
.sm-on .sm-name { font-weight: 700 }
.sm-own { margin: 6px 0 0 36px; color: #1f3a5f; font-size: 14px; font-weight: 700 }
.sm-reasons { margin: 12px 0 0; padding: 0; border: 0; min-width: 0 }
.sm-reasons legend { margin: 0 0 8px; padding: 0; color: #172033; font-size: 15px; font-weight: 700 }
.sm-reason { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 10px 12px; background: #fff; border: 1px solid #cfd8e3; border-radius: 8px; color: #000; font-size: 16px; font-weight: 400; line-height: 1.45; cursor: pointer }
.sm-reason input { flex: 0 0 auto; width: 20px; min-width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; box-shadow: none }
.sm-reason span { flex: 1 1 auto; min-width: 0 }
.sm-reason:has(input:checked) { background: #e8f5e9; border-color: #15803d }
.sm-count { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 14px 0 12px; padding: 12px 14px; background: #1f3a5f; border-radius: 10px; color: #fff; font-size: 17px; font-weight: 700; box-shadow: 0 -2px 10px rgba(0,0,0,.15) }
.sm-count.sm-count-full { background: #15803d }
.sm-count-note { font-size: 14px; font-weight: 400 }
.sm-error { margin: 0 0 14px; padding: 12px 14px; background: #fef2f2; border: 2px solid #dc2626; border-radius: 8px; color: #991b1b; font-size: 16px; font-weight: 700 }
.sm-error[hidden] { display: none }
.sm-tick { color: #15803d; font-size: 20px; font-weight: 800 }
.sm-choice-table td.sm-item-name, .sm-table td.sm-item-name { text-align: left }
.sm-choice-table tr.sm-row-mine td { background: #f0f9f1 }
.sm-list-title { margin: 18px 0 8px; font-size: 17px }
.sm-reason-list { margin: 0 0 8px; padding-left: 22px }
.sm-reason-list li { margin: 0 0 8px; color: #000; font-size: 16px; line-height: 1.45 }
.sm-results h3 { margin: 22px 0 10px }
.sm-scores { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px }
.sm-score { flex: 1 1 120px; padding: 12px 14px; background: #f8fafc; border: 2px solid #1f3a5f; border-radius: 10px; text-align: center }
.sm-score span { display: block; color: #1f3a5f; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.sm-score strong { display: block; margin-top: 4px; color: #000; font-size: 26px; font-weight: 800 }
.sm-summary { margin: 0 0 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; line-height: 1.5 }
.sm-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
.sm-table { width: 100%; border-collapse: collapse; background: #fff }
.sm-table th, .sm-table td { padding: 9px 8px; border: 1px solid #cfd8e3; color: #000; font-size: 15px; line-height: 1.4; text-align: center; vertical-align: top }
.sm-table th { background: #1f3a5f; color: #fff; font-weight: 700 }
.sm-table tr.sm-row-expert td { background: #e8f5e9 }
.sm-all-table { min-width: 620px }
.sm-all-table td.sm-item-name { min-width: 220px }
.sm-reason-table { min-width: 780px }
.sm-reason-table td { text-align: left }
.sm-need-table { min-width: 460px }
.sm-why { margin: 6px 0 0 }
.sm-why summary { color: #1f3a5f; font-size: 13px; font-weight: 700; cursor: pointer }
.sm-why p { margin: 6px 0 0; color: #000; font-size: 14px; line-height: 1.45 }
.sm-tag { display: block; margin: 0 0 4px; color: #1f3a5f; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.sm-note { margin: 8px 0 0; font-size: 14px }
.sm-discussion li { margin: 0 0 12px; color: #000; font-size: 17px; line-height: 1.5 }
@media (max-width: 700px) {
  .sm-situation p { font-size: 17px }
  .sm-table th, .sm-table td { padding: 7px 6px; font-size: 14px }
}
@media print {
  .sm-fold, .sm-count { display: none }
  .sm-why summary { display: none }
  .sm-why p { display: block; font-size: 10px }
  .sm-table-wrap { overflow: visible !important }
  .sm-table { min-width: 0 !important }
  .sm-all-table td.sm-item-name { min-width: 0 }
  .sm-table th, .sm-table td { padding: 4px; font-size: 10.5px }
  .sm-table th { background: #fff !important; color: #000 !important }
  .sm-table tr.sm-row-expert td { background: #e8f5e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact }
  .sm-table tr { break-inside: avoid; page-break-inside: avoid }
  .sm-score strong { font-size: 18px }
  .sm-summary, .sm-discussion li { font-size: 12px }
}
.sm-own-text { display: block; box-sizing: border-box; width: 100%; max-width: 100%; margin: 0 0 8px; padding: 10px 12px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-family: inherit; font-size: 16px; line-height: 1.45; resize: vertical }
.sm-own-text[hidden] { display: none }
.sm-own-mark { margin-left: 6px; color: #5b6b7f; font-size: 13px; font-style: italic }


/* Budget Wars (U) BW-20261010 */
body.bw-game .scenario-text { display: none }
.bw-situation p { margin: 0 0 12px; color: #000; font-size: 18px; line-height: 1.55 }
.bw-role-title { margin: 0 0 8px; color: #1f3a5f; font-size: 22px; font-weight: 800 }
.bw-role p, .bw-fold-body p { color: #000; font-size: 17px; line-height: 1.5 }
.bw-facts { margin: 0 0 12px; padding-left: 22px }
.bw-facts li { margin: 0 0 6px; color: #000; font-size: 17px; line-height: 1.45 }
.bw-secret { margin: 0 0 12px; padding: 12px 14px; background: #fef2f2; border: 2px solid #b91c1c; border-radius: 10px }
.bw-secret span { display: block; margin: 0 0 4px; color: #b91c1c; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.bw-secret p { margin: 0; color: #000; font-size: 17px; line-height: 1.5 }
.bw-role-note { margin: 0; color: #5b6b7f !important; font-size: 15px !important }
.bw-task { margin: 0 0 16px; padding: 14px 16px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 10px }
.bw-task p { margin: 0; color: #000; font-size: 18px; font-weight: 700; line-height: 1.5 }
.bw-news { border: 3px solid #b91c1c }
.bw-news.bw-news-3 { border-color: #15803d }
.bw-news.bw-news-5 { border-color: #1f3a5f }
.bw-kicker { display: inline-block; margin: 0 0 8px; padding: 4px 10px; background: #b91c1c; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.bw-news-3 .bw-kicker { background: #15803d }
.bw-news-5 .bw-kicker { background: #1f3a5f }
.bw-news h2 { margin: 0 0 8px }
.bw-news p { margin: 0; color: #000; font-size: 18px; line-height: 1.5 }
.bw-fold { margin: 0 0 12px; border: 1px solid #dfe5ec; border-radius: 8px; background: #f8fafc }
.bw-fold summary { padding: 10px 14px; cursor: pointer; color: #1f3a5f; font-weight: 700 }
.bw-fold-body { padding: 0 14px 10px }
.bw-fold .bw-situation p { font-size: 16px }
.bw-members li { margin: 0 0 6px }
.bw-member-role { display: inline-block; margin-left: 6px; padding: 1px 8px; background: #eef2f7; border-radius: 10px; color: #1f3a5f; font-size: 13px; font-weight: 700 }
.bw-wait-note { margin: 12px 0 0; padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; font-weight: 700 }
.bw-row { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.bw-row.bw-own { border-color: #1f3a5f }
.bw-row.bw-locked { background: #f3f5f8 }
.bw-row-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between }
.bw-fn { flex: 1 1 auto; min-width: 0; color: #000; font-size: 17px; font-weight: 700; line-height: 1.3 }
.bw-amt { flex: 0 0 auto; color: #1f3a5f; font-size: 19px; font-weight: 800; white-space: nowrap }
.bw-pri { display: inline-block; margin-left: 4px; padding: 1px 7px; background: #e8f5e9; border-radius: 10px; color: #15803d; font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; vertical-align: middle; white-space: nowrap }
.bw-desc { margin: 4px 0 0; color: #000; font-size: 15px; line-height: 1.4 }
.bw-sub { margin: 4px 0 0; color: #5b6b7f; font-size: 14px; line-height: 1.4 }
.bw-fixed { margin: 6px 0 0; color: #5b6b7f; font-size: 14px; font-style: italic }
.bw-ctl { display: flex; gap: 10px; align-items: center; margin: 10px 0 0 }
.bw-step { flex: 0 0 auto; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; background: #1f3a5f; border: 0; border-radius: 8px; color: #fff; font-size: 26px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation }
.bw-ctl input[type="range"] { flex: 1 1 auto; min-width: 0; width: 100%; height: 44px; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: #1f3a5f }
.bw-note-label { display: block; margin: 16px 0 6px; color: #172033; font-size: 16px; font-weight: 700 }
.bw-note { display: block; box-sizing: border-box; width: 100%; max-width: 100%; margin: 0 0 12px; padding: 10px 12px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-family: inherit; font-size: 16px; line-height: 1.45; resize: vertical }
.bw-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 4px; margin: 14px 0 12px; padding: 12px 14px; background: #1f3a5f; border-radius: 10px; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.35; box-shadow: 0 -2px 10px rgba(0,0,0,.15) }
.bw-bar.bw-bar-ok { background: #15803d }
.bw-bar .bw-wait { color: #ffe08a }
.bw-bar.bw-bar-ok .bw-ok, .bw-bar .bw-ok { color: #fff }
.bw-error { margin: 0 0 14px; padding: 12px 14px; background: #fef2f2; border: 2px solid #dc2626; border-radius: 8px; color: #991b1b; font-size: 16px; font-weight: 700 }
.bw-error[hidden] { display: none }
.bw-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
.bw-table { width: 100%; border-collapse: collapse; background: #fff }
.bw-table th, .bw-table td { padding: 8px; border: 1px solid #cfd8e3; color: #000; font-size: 15px; line-height: 1.35; text-align: center; vertical-align: top }
.bw-table th { background: #1f3a5f; color: #fff; font-weight: 700 }
.bw-table td.bw-name { font-weight: 700; text-align: left }
.bw-table td.bw-left { text-align: left }
.bw-table tr.bw-total-row td { background: #f3f5f8; font-weight: 800 }
.bw-table tr.bw-row-low td { background: #fef2f2 }
.bw-table tr.bw-row-mine td { background: #e8f5e9; font-weight: 700 }
.bw-explain { display: block; margin-top: 3px; color: #5b6b7f; font-size: 13px; font-weight: 400; line-height: 1.35 }
.bw-flag { display: block; color: #b91c1c; font-size: 12px; font-weight: 800 }
.bw-na { color: #5b6b7f; font-size: 13px }
.bw-small { margin: 8px 0 0; font-size: 14px }
.bw-quote { margin: 12px 0; padding: 12px 14px; background: #f8fafc; border-left: 5px solid #1f3a5f; border-radius: 6px }
.bw-quote span { display: block; margin: 0 0 4px; color: #1f3a5f; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.bw-quote p { margin: 0; color: #000; font-size: 17px; line-height: 1.5 }
.bw-view { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; padding: 12px 14px; background: #f8fafc; border: 1px solid #cfd8e3; border-radius: 8px; color: #000; font-size: 17px; font-weight: 400; cursor: pointer }
.bw-view input { flex: 0 0 auto; width: 22px; min-width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; box-shadow: none }
.bw-view:has(input:checked) { background: #e8f5e9; border-color: #15803d }
.bw-view-done { color: #000; font-size: 18px }
.bw-results h3 { margin: 22px 0 10px }
.bw-scores { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px }
.bw-score { flex: 1 1 110px; padding: 12px 10px; background: #f8fafc; border: 2px solid #1f3a5f; border-radius: 10px; text-align: center }
.bw-score span { display: block; color: #1f3a5f; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.bw-score strong { display: block; margin-top: 4px; color: #000; font-size: 24px; font-weight: 800 }
.bw-summary { margin: 0 0 10px; padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; line-height: 1.5 }
.bw-criteria { min-width: 480px }
.bw-journey { min-width: 760px }
.bw-known { min-width: 640px }
.bw-discussion li { margin: 0 0 12px; color: #000; font-size: 17px; line-height: 1.5 }
@media (max-width: 700px) {
  .bw-situation p { font-size: 17px }
  .bw-table th, .bw-table td { padding: 7px 6px; font-size: 14px }
}
@media print {
  .bw-fold, .bw-bar { display: none }
  .bw-table-wrap { overflow: visible !important }
  .bw-table { min-width: 0 !important }
  .bw-table th, .bw-table td { padding: 4px; font-size: 10.5px }
  .bw-table th { background: #fff !important; color: #000 !important }
  .bw-table tr { break-inside: avoid; page-break-inside: avoid }
  .bw-explain { font-size: 9px }
  .bw-score strong { font-size: 18px }
  .bw-summary, .bw-quote p, .bw-discussion li { font-size: 12px }
}

/* Crisis Room (Product Defect) CR-20261011 */
body.cr-game .scenario-text { margin-bottom: 0; color: #172033; font-size: 17px; line-height: 1.5 }
.cr-kicker { display: inline-block; margin: 0 0 8px; padding: 4px 10px; background: #b91c1c; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cr-kicker-seat { background: #1f3a5f }
.cr-dossier { border-top: 6px solid #b91c1c }
.cr-dossier h2, .cr-inject h2, .cr-role h2 { margin: 0 0 10px }
.cr-brief p { margin: 0 0 12px; color: #000; font-size: 18px; line-height: 1.55 }
.cr-brief h3 { margin: 20px 0 10px; padding-top: 14px; border-top: 1px solid #dfe5ec; color: #1f3a5f; font-size: 18px }
.cr-fold .cr-brief p { font-size: 16px }
.cr-fold .cr-secret { margin-top: 4px }
.cr-fold .cr-members { margin: 0 0 4px }
.cr-timeline { margin: 0; padding: 0; list-style: none }
.cr-timeline li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px }
.cr-when { flex: 0 0 86px; padding: 3px 0; background: #1f3a5f; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.4; text-align: center; white-space: nowrap }
.cr-what { flex: 1 1 auto; min-width: 0; color: #000; font-size: 17px; line-height: 1.5 }
.cr-numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none }
.cr-numbers li { padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 10px }
.cr-numbers strong { display: block; color: #1f3a5f; font-size: 26px; font-weight: 800; line-height: 1.15 }
.cr-numbers span { display: block; margin-top: 4px; color: #000; font-size: 15px; line-height: 1.4 }
.cr-voices { margin: 0; padding: 0; list-style: none }
.cr-voices li { margin: 0 0 8px; padding: 10px 14px; background: #f8fafc; border-left: 4px solid #1f3a5f; border-radius: 0 8px 8px 0 }
.cr-voices strong { display: block; color: #1f3a5f; font-size: 14px; font-weight: 800 }
.cr-voices span { display: block; color: #000; font-size: 17px; line-height: 1.45 }
.cr-plain { margin: 0 0 12px; padding-left: 22px }
.cr-plain li { margin: 0 0 6px; color: #000; font-size: 17px; line-height: 1.45 }
.cr-small { margin: 10px 0 0; color: #5b6b7f; font-size: 14px; line-height: 1.45 }
.cr-task { margin: 0 0 16px; padding: 14px 16px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 10px }
.cr-task p { margin: 0; color: #000; font-size: 18px; font-weight: 700; line-height: 1.5 }
.cr-fold { margin: 12px 0 0; border: 1px solid #dfe5ec; border-radius: 8px; background: #f8fafc }
.cr-fold summary { padding: 10px 14px; cursor: pointer; color: #1f3a5f; font-weight: 700 }
.cr-fold-body { padding: 0 14px 10px }
.cr-left { position: sticky; top: 0; z-index: 5; margin: 0 0 12px; padding: 10px 12px; background: #1f3a5f; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.15) }
.cr-left-label { display: block; margin: 0 0 6px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cr-left-nums { display: flex; flex-wrap: wrap; gap: 5px }
.cr-left-nums span { display: inline-block; min-width: 30px; padding: 4px 0; background: #fff; border-radius: 6px; color: #1f3a5f; font-size: 15px; font-weight: 800; text-align: center }
.cr-left-nums span.cr-used { background: rgba(255,255,255,.18); color: rgba(255,255,255,.55); text-decoration: line-through }
.cr-action { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.cr-action-text { flex: 1 1 auto; min-width: 0 }
.cr-action-no { display: block; color: #5b6b7f; font-size: 12px; font-weight: 700; letter-spacing: .5px }
.cr-action-text strong { display: block; color: #000; font-size: 17px; font-weight: 700; line-height: 1.3 }
.cr-action-text p { margin: 4px 0 0; color: #000; font-size: 15px; line-height: 1.4 }
.cr-mine { display: inline-block; margin-top: 6px; padding: 1px 8px; background: #eef2f7; border-radius: 10px; color: #1f3a5f; font-size: 13px; font-weight: 700 }
.cr-action input.cr-rank-input { flex: 0 0 auto; box-sizing: border-box; width: 64px; min-width: 64px; height: 52px; padding: 6px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-size: 22px; font-weight: 800; text-align: center }
.cr-action input.cr-rank-input.ranking-input-error { background: #fef2f2; border-color: #dc2626 }
.cr-error { margin: 0 0 14px; padding: 12px 14px; background: #fef2f2; border: 2px solid #dc2626; border-radius: 8px; color: #991b1b; font-size: 16px; font-weight: 700 }
.cr-error[hidden] { display: none }
.cr-order { margin: 0 0 8px; padding: 0; list-style: none }
.cr-order li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #e5eaf0 }
.cr-order-rank { flex: 0 0 34px; color: #1f3a5f; font-size: 18px; font-weight: 800; text-align: right }
.cr-order-name { flex: 1 1 auto; min-width: 0; color: #000; font-size: 16px; line-height: 1.35 }
.cr-order-name .cr-mine { margin: 0 0 0 6px }
.cr-strip { display: flex; gap: 0; margin: 0 0 16px; background: #0f1f33; border-radius: 12px; overflow: hidden }
.cr-strip div { flex: 1 1 0; min-width: 0; padding: 10px 12px; border-right: 1px solid rgba(255,255,255,.14) }
.cr-strip div:last-child { border-right: 0 }
.cr-strip span { display: block; color: #9fb3c8; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase }
.cr-strip strong { display: block; color: #fff; font-size: 18px; font-weight: 800; line-height: 1.25 }
.cr-members li { margin: 0 0 6px }
.cr-member-seat { display: inline-block; margin-left: 6px; padding: 1px 8px; background: #eef2f7; border-radius: 10px; color: #1f3a5f; font-size: 13px; font-weight: 700 }
.cr-role { border-left: 6px solid #1f3a5f }
.cr-mandate { margin: 0 0 12px; color: #000; font-size: 17px; line-height: 1.5 }
.cr-secret { margin: 0 0 12px; padding: 12px 14px; background: #fef2f2; border: 2px solid #b91c1c; border-radius: 10px }
.cr-secret span { display: block; margin: 0 0 4px; color: #b91c1c; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cr-secret p { margin: 0; color: #000; font-size: 17px; line-height: 1.5 }
.cr-inject { border: 3px solid #b91c1c }
.cr-closing { border-color: #1f3a5f }
.cr-closing .cr-kicker { background: #1f3a5f }
.cr-from { margin: 0 0 6px; color: #5b6b7f; font-size: 15px; font-weight: 700 }
.cr-inject p { margin: 0 0 12px; color: #000; font-size: 18px; line-height: 1.55 }
.cr-inject p.cr-from { color: #5b6b7f; font-size: 15px }
.cr-deadline { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin: 4px 0 0; padding: 10px 14px; background: #0f1f33; border-radius: 10px }
.cr-deadline span { color: #9fb3c8; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cr-deadline strong { color: #fff; font-size: 22px; font-weight: 800 }
.cr-deadline.cr-urgent { background: #b45309 }
.cr-deadline.cr-urgent span { color: #fff }
.cr-deadline.cr-over { background: #b91c1c }
.cr-deadline.cr-over span { display: none }
.cr-deadline.cr-over strong { font-size: 18px }
.cr-since { padding: 0; background: transparent; box-shadow: none }
.cr-after { margin: 12px 0 0; padding: 12px 14px; background: #f1f5f9; border-left: 4px solid #1f3a5f; border-radius: 0 8px 8px 0 }
.cr-since .cr-after { margin: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08) }
.cr-after span { display: block; margin: 0 0 6px; color: #1f3a5f; font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cr-after p { margin: 0 0 8px; color: #000; font-size: 16px; line-height: 1.5 }
.cr-after p:last-child { margin: 0 }
.cr-decision { margin: 0 0 16px; padding: 0; border: 0; min-width: 0 }
.cr-decision legend { margin: 0 0 10px; padding: 0; color: #172033; font-size: 18px; font-weight: 800; line-height: 1.35 }
.cr-option { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 12px; background: #f8fafc; border: 2px solid #cfd8e3; border-radius: 10px; color: #000; font-size: 16px; font-weight: 400; line-height: 1.45; cursor: pointer }
.cr-option-read { cursor: default }
.cr-option input { flex: 0 0 auto; width: 22px; min-width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; box-shadow: none; accent-color: #1f3a5f }
.cr-letter { flex: 0 0 auto; min-width: 24px; padding: 1px 0; background: #1f3a5f; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 800; text-align: center }
.cr-option-text { flex: 1 1 auto; min-width: 0 }
.cr-option:has(input:checked) { background: #e8f0fb; border-color: #1f3a5f }
.cr-label { display: block; margin: 16px 0 6px; color: #172033; font-size: 17px; font-weight: 800; line-height: 1.35 }
.cr-optional { color: #5b6b7f; font-size: 14px; font-weight: 400 }
.cr-select { display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 8px 10px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-size: 16px }
.cr-note { display: block; box-sizing: border-box; width: 100%; max-width: 100%; margin: 0 0 12px; padding: 10px 12px; background: #fff; border: 2px solid #1f3a5f; border-radius: 8px; color: #000; font-family: inherit; font-size: 16px; line-height: 1.45; resize: vertical }
.cr-bar { position: sticky; bottom: 0; z-index: 5; margin: 4px 0 12px; padding: 12px 14px; background: #1f3a5f; border-radius: 10px; color: #ffe08a; font-size: 16px; font-weight: 700; line-height: 1.35; box-shadow: 0 -2px 10px rgba(0,0,0,.15) }
.cr-bar.cr-bar-ok { background: #15803d; color: #fff }
.cr-owner-read { margin: 0 0 12px; color: #000; font-size: 16px; line-height: 1.45 }
.cr-owner-read strong { display: block }
.cr-you { margin: 0 0 12px; color: #1f3a5f; font-size: 15px; font-weight: 700; line-height: 1.4 }
.cr-wait-note { margin: 0 0 14px; padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; font-weight: 700 }
.cr-log { margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid #dfe5ec }
.cr-log:last-child { margin: 0; padding: 0; border: 0 }
.cr-log h4, .cr-ev h4 { margin: 10px 0 6px; color: #1f3a5f; font-size: 17px }
.cr-log-q { margin: 12px 0 6px; color: #172033; font-size: 16px; font-weight: 700; line-height: 1.4 }
.cr-log-note { margin: 8px 0; color: #000; font-size: 16px; font-style: italic; line-height: 1.45 }
.cr-view-q { margin: 0 0 8px; color: #000; font-size: 18px; font-weight: 700; line-height: 1.45 }
.cr-view-mine { margin: 0; color: #000; font-size: 18px; font-weight: 700 }
.cr-results h3 { margin: 28px 0 10px; padding-top: 16px; border-top: 2px solid #dfe5ec; color: #1f3a5f; font-size: 20px }
.cr-total { margin: 0 0 16px; padding: 18px; background: #0f1f33; border-radius: 12px; text-align: center }
.cr-total span { display: block; color: #9fb3c8; font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase }
.cr-total strong { display: block; color: #fff; font-size: 54px; font-weight: 800; line-height: 1.1 }
.cr-total small { display: block; color: #9fb3c8; font-size: 15px }
.cr-meter { margin: 0 0 12px }
.cr-meter-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin: 0 0 5px; color: #000; font-size: 16px; font-weight: 700 }
.cr-meter-top strong { color: #1f3a5f; font-size: 18px; white-space: nowrap }
.cr-meter-top small { color: #5b6b7f; font-size: 13px; font-weight: 400 }
.cr-meter-track { height: 12px; background: #e5eaf0; border-radius: 6px; overflow: hidden }
.cr-meter-track div { height: 100%; background: #1f3a5f; border-radius: 6px }
.cr-warn { margin: 12px 0; padding: 12px 14px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 8px; color: #000; font-size: 16px; font-weight: 700; line-height: 1.45 }
.cr-summary { margin: 12px 0 0; padding: 12px 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px; color: #000; font-size: 17px; line-height: 1.5 }
.cr-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch }
.cr-table { width: 100%; border-collapse: collapse; background: #fff }
.cr-table th, .cr-table td { padding: 8px 6px; border: 1px solid #cfd8e3; color: #000; font-size: 15px; line-height: 1.35; text-align: center; vertical-align: middle }
.cr-table th { background: #1f3a5f; color: #fff; font-weight: 700 }
.cr-table td.cr-name { font-weight: 700; text-align: left }
.cr-table tr.cr-row-mine td { background: #e8f0fb }
.cr-key { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 1px solid #cfd8e3; border-radius: 10px }
.cr-key-top { display: flex; gap: 10px; align-items: center }
.cr-key-rank { flex: 0 0 auto; min-width: 34px; padding: 4px 0; background: #1f3a5f; border-radius: 8px; color: #fff; font-size: 17px; font-weight: 800; text-align: center }
.cr-key-top strong { flex: 1 1 auto; min-width: 0; color: #000; font-size: 17px; line-height: 1.3 }
.cr-key p { margin: 8px 0; color: #000; font-size: 15px; line-height: 1.45 }
.cr-key-ranks { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #5b6b7f; font-size: 14px }
.cr-key-ranks strong { color: #1f3a5f; font-size: 15px }
.cr-ev { margin: 0 0 18px; padding: 14px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 12px }
.cr-ev-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; cursor: pointer; list-style: none }
.cr-ev-top::-webkit-details-marker { display: none }
.cr-ev-title { flex: 1 1 auto; min-width: 0; color: #1f3a5f; font-size: 17px; font-weight: 800; line-height: 1.3 }
.cr-ev-title::before { content: '▸ ' }
.cr-ev[open] .cr-ev-title::before { content: '▾ ' }
.cr-ev[open] .cr-ev-top { margin-bottom: 10px }
.cr-ev-points { flex: 0 0 auto; padding: 3px 10px; background: #1f3a5f; border-radius: 8px; color: #fff; font-size: 16px; font-weight: 800; white-space: nowrap }
.cr-ev-subject { margin: 6px 0 0; color: #000; font-size: 16px; font-style: italic }
.cr-opt { margin: 0 0 8px; padding: 10px 12px; background: #fff; border: 1px solid #cfd8e3; border-left-width: 6px; border-radius: 8px }
.cr-opt-chosen { box-shadow: 0 0 0 2px #1f3a5f }
.cr-opt-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 6px }
.cr-tag { display: inline-block; padding: 2px 9px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.cr-picked { display: inline-block; padding: 2px 9px; background: #1f3a5f; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 800 }
.cr-count { margin-left: auto; color: #5b6b7f; font-size: 13px; white-space: nowrap }
.cr-opt-text { margin: 0 0 4px; color: #000; font-size: 15px; line-height: 1.45 }
.cr-opt-why { margin: 0; color: #334155; font-size: 15px; font-style: italic; line-height: 1.45 }
.cr-v-strong { border-left-color: #15803d } .cr-v-strong .cr-tag { background: #15803d }
.cr-v-reasonable { border-left-color: #1d4ed8 } .cr-v-reasonable .cr-tag { background: #1d4ed8 }
.cr-v-weak { border-left-color: #b45309 } .cr-v-weak .cr-tag { background: #b45309 }
.cr-v-harmful { border-left-color: #b91c1c } .cr-v-harmful .cr-tag { background: #b91c1c }
.cr-dim { margin: 0 0 8px; padding: 10px 12px; background: #fff; border: 1px solid #cfd8e3; border-left: 6px solid #b45309; border-radius: 8px }
.cr-dim-strong { border-left-color: #15803d }
.cr-dim-adequate { border-left-color: #1d4ed8 }
.cr-dim-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; color: #000; font-size: 16px }
.cr-dim-top span { color: #1f3a5f; font-weight: 800; white-space: nowrap }
.cr-dim p { margin: 4px 0 0; color: #000; font-size: 15px; line-height: 1.45 }
.cr-views { margin: 0; padding: 0; list-style: none }
.cr-views li { margin: 0 0 6px; color: #000; font-size: 16px }
.cr-views strong { display: inline-block; min-width: 28px; color: #1f3a5f; font-size: 20px }
.cr-fold .cr-seat:first-child { margin-top: 4px }
.cr-seat { margin: 0 0 10px; padding: 10px 12px; background: #fff; border: 1px solid #cfd8e3; border-radius: 8px }
.cr-seat strong { color: #1f3a5f; font-size: 16px }
.cr-holder { display: inline-block; margin-left: 6px; color: #5b6b7f; font-size: 14px }
.cr-seat p { margin: 6px 0 0; color: #000; font-size: 15px; line-height: 1.45 }
.cr-synthesis { margin: 16px 0 0; padding: 14px 16px; background: #0f1f33; border-radius: 12px; color: #fff; font-size: 17px; line-height: 1.55 }
@media (max-width: 480px) {
  .cr-timeline li { flex-direction: column; gap: 4px }
  .cr-when { flex: 0 0 auto; padding: 2px 10px }
  .cr-strip strong { font-size: 15px }
  .cr-total strong { font-size: 46px }
}

/* ---- CM-20261015: Change Management games (five decisions, played alone) ---- */
.cm-role { margin: 0 0 14px; padding: 10px 14px; background: #eef2f7; border-radius: 8px; color: #000; font-size: 16px; font-weight: 700; line-height: 1.45 }
.cm-role span { display: block; color: #1f3a5f; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase }
.cm-bar-card { position: sticky; top: 0; z-index: 6 }
.cm-progress { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none }
.cm-progress li { flex: 1 1 0; padding: 6px 0; background: #e5eaf0; border-radius: 6px; color: #5b6b7f; font-size: 14px; font-weight: 800; text-align: center }
.cm-progress li.cm-done { background: #1f3a5f; color: #fff }
.cm-progress li.cm-now { background: #EC8A03; color: #fff }
.cm-step .cr-kicker { background: #EC8A03 }
.cm-say { margin: 4px 0 16px; padding: 14px 16px; background: #f8fafc; border-left: 5px solid #EC8A03; border-radius: 0 10px 10px 0 }
.cm-say strong { display: block; margin: 0 0 6px; color: #1f3a5f; font-size: 14px; font-weight: 800 }
.cm-say p { margin: 0; color: #000; font-size: 18px; font-style: italic; line-height: 1.55 }
.cm-prompt { margin: 6px 0 4px; color: #172033; font-size: 18px; font-weight: 800; line-height: 1.35 }
.cm-stakes { margin: 8px 0 16px; padding: 0; list-style: none }
.cm-stake { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.cm-stake-top { display: flex; gap: 12px; align-items: center }
.cm-place { flex: 0 0 auto; width: 36px; height: 36px; background: #1f3a5f; border-radius: 50%; color: #fff; font-size: 18px; font-weight: 800; line-height: 36px; text-align: center }
.cm-stake-name { flex: 1 1 auto; min-width: 0 }
.cm-stake-name strong { display: block; color: #000; font-size: 18px; line-height: 1.25 }
.cm-stake-name span { display: block; color: #5b6b7f; font-size: 14px; line-height: 1.35 }
.cm-move { display: flex; flex: 0 0 auto; gap: 6px }
.cm-move .btn { min-width: 46px; min-height: 44px; margin: 0; padding: 4px 10px; font-size: 20px; line-height: 1 }
.cm-move .btn:disabled { opacity: .35 }
.cm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin: 10px 0 0 }
.cm-facts div { margin: 0 }
.cm-facts dt { color: #1f3a5f; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase }
.cm-facts dd { margin: 2px 0 0; color: #000; font-size: 15px; line-height: 1.4 }
.cm-quote { margin: 10px 0 0; color: #334155; font-size: 15px; font-style: italic; line-height: 1.45 }
.cm-feedback details > summary { cursor: pointer }
.cm-feedback-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; color: #1f3a5f; font-size: 18px; font-weight: 800; line-height: 1.35 }
.cm-points { flex: 0 0 auto; padding: 3px 10px; background: #1f3a5f; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 800; white-space: nowrap }
.cm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 12px 0 0 }
.cm-two h4, .cm-feedback h4 { margin: 12px 0 6px; color: #1f3a5f; font-size: 16px }
.cr-order-name small { color: #5b6b7f; font-size: 13px }
.cm-why { margin: 0 0 10px; padding: 10px 12px; background: #f8fafc; border: 1px solid #dfe5ec; border-radius: 8px }
.cm-why strong { display: block; color: #1f3a5f; font-size: 15px }
.cm-why p { margin: 4px 0 0; color: #000; font-size: 16px; line-height: 1.5 }
.cm-principle { margin: 14px 0; padding: 12px 14px; background: #fff8e1; border: 2px solid #f2b705; border-radius: 8px; color: #000; font-size: 16px; font-weight: 700; line-height: 1.5 }
.cm-opt { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 2px solid #dfe5ec; border-radius: 10px }
.cm-opt-chosen { border-color: #1f3a5f; background: #f3f7fc }
.cm-opt-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.cm-verdict { padding: 2px 10px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase }
.cm-v-strong { background: #15803d }
.cm-v-reasonable { background: #1d4ed8 }
.cm-v-weak { background: #b45309 }
.cm-v-harmful { background: #b91c1c }
.cm-yours { padding: 2px 10px; background: #EC8A03; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 800 }
.cm-opt-text { margin: 8px 0 4px; color: #000; font-size: 16px; font-weight: 700; line-height: 1.45 }
.cm-opt-why { margin: 0; color: #000; font-size: 15px; line-height: 1.5 }
.cm-profile { border-top: 6px solid #EC8A03 }
.cm-profile-title { margin: 0 0 8px; color: #EC8A03; font-size: 34px; line-height: 1.15 }
.cm-profile-summary { margin: 0 0 16px; color: #000; font-size: 18px; font-weight: 700; line-height: 1.5 }
.cm-profile h3, .cm-class h3 { margin: 22px 0 10px; color: #1f3a5f; font-size: 18px }
.cm-unfolded { margin: 0; color: #000; font-size: 17px; line-height: 1.6 }
.cm-bar-row { margin: 0 0 10px }
.cm-bar-label { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; margin: 0 0 4px; color: #000; font-size: 15px; line-height: 1.4 }
.cm-bar-label strong { color: #1f3a5f; white-space: nowrap }
.cm-bar-row .cm-yours { display: inline-block; margin-top: 4px }
.cm-disclaimer { margin: 0 4px 20px }
@media (max-width: 520px) {
  .cm-stake-top { flex-wrap: wrap }
  .cm-feedback-top { font-size: 16px }
  .cm-profile-title { font-size: 28px }
}
.cm-step .cr-option, .cm-step .btn, .cm-stake { scroll-margin-top: 120px }

/* SAMANVAYA-JOIN-FINAL */
body:has(#joinForm) { background:#f5f6fc; }
body:has(#joinForm) .wrap {
  max-width:900px; padding:30px 22px 48px;
}
.samanvaya-welcome {
  display:flex; flex-direction:column; align-items:center;
  gap:10px; text-align:center; padding:8px 0 18px;
}
.samanvaya-welcome__intro {
  margin:0; color:#4b587f; font-size:24px;
}
.samanvaya-welcome__logo {
  display:block; width:min(430px,84vw);
  max-height:150px; height:auto; object-fit:contain;
}
.samanvaya-welcome__tagline {
  margin:0; color:#4b587f; font-size:21px; font-weight:500;
}
body:has(#joinForm) #app .card {
  max-width:860px; margin:24px auto 0; padding:18px 0;
  background:transparent; border:0; box-shadow:none;
}
body:has(#joinForm) #app .card h1 { display:none; }
@media(max-width:600px) {
  .samanvaya-welcome__intro { font-size:20px; }
  .samanvaya-welcome__logo { width:min(340px,88vw); }
  .samanvaya-welcome__tagline { font-size:16px; }
}
/* END SAMANVAYA-JOIN-FINAL */

/* SAMANVAYA TIGHT JOIN SCREEN */
body:has(#joinForm) {
  background: #f5f6fc !important;
}

body:has(#joinForm) .wrap {
  width: min(100% - 32px, 700px) !important;
  max-width: 700px !important;
  margin: 0 auto !important;
  padding: 24px 0 40px !important;
}

body:has(#joinForm) #app {
  width: 100%;
  margin: 0 auto;
}

body:has(#joinForm) .samanvaya-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 10px;
  margin: 0 auto;
  text-align: center;
}

body:has(#joinForm) .samanvaya-welcome__intro {
  margin: 0;
  color: #4b587f;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 400;
}

body:has(#joinForm) .samanvaya-welcome__logo {
  display: block;
  width: min(380px, 82vw);
  height: auto;
  max-height: 125px;
  object-fit: contain;
}

body:has(#joinForm) .samanvaya-welcome__tagline {
  margin: 0;
  color: #4b587f;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
}

body:has(#joinForm) #app .card {
  width: 100%;
  max-width: 700px;
  margin: 14px auto 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:has(#joinForm) #app .card h1 {
  display: none !important;
}

body:has(#joinForm) #joinForm .field {
  margin-bottom: 14px;
}

body:has(#joinForm) #joinForm label {
  margin-bottom: 6px;
}

body:has(#joinForm) #joinForm input,
body:has(#joinForm) #joinForm select {
  box-sizing: border-box;
  width: 100%;
  min-height: 54px;
  border: 2px solid #dce1f0;
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
}

body:has(#joinForm) #joinForm button {
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: #17174f;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

body:has(#joinForm) #joinForm button:hover {
  background: #222263;
}

@media (max-width: 600px) {
  body:has(#joinForm) .wrap {
    width: calc(100% - 36px) !important;
    padding-top: 20px !important;
  }

  body:has(#joinForm) .samanvaya-welcome__intro {
    font-size: 19px;
  }

  body:has(#joinForm) .samanvaya-welcome__logo {
    width: min(310px, 84vw);
    max-height: 100px;
  }

  body:has(#joinForm) .samanvaya-welcome__tagline {
    font-size: 16px;
  }
}
/* END SAMANVAYA TIGHT JOIN SCREEN */

/* Samanvaya: compact welcome section immediately above Session Code */
body:has(#joinForm) .samanvaya-welcome {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  text-align: center !important;
}

body:has(#joinForm) .samanvaya-welcome__intro {
  margin: 0 !important;
  line-height: 1.2 !important;
}

body:has(#joinForm) .samanvaya-welcome__logo {
  display: block !important;
  width: min(360px, 78vw) !important;
  max-height: 115px !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
}

body:has(#joinForm) .samanvaya-welcome__tagline {
  margin: 0 !important;
  line-height: 1.25 !important;
}

/* Remove excess space before the first form field. */
body:has(#joinForm) #app .card {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:has(#joinForm) #joinForm {
  margin-top: 0 !important;
}

body:has(#joinForm) #joinForm .field:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* Align Samanvaya branding with Session Code; no other changes */
body:has(#joinForm) .samanvaya-welcome {
  align-items: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body:has(#joinForm) .samanvaya-welcome__intro,
body:has(#joinForm) .samanvaya-welcome__tagline {
  text-align: left !important;
  align-self: flex-start !important;
}

body:has(#joinForm) .samanvaya-welcome__logo {
  align-self: flex-start !important;
  object-position: left center !important;
  margin-left: 0 !important;
}
/* End alignment-only change */
