/* THE CARD HOOK's look (Master 10-15): tokens for light and dark, the shared card shell, and the sheet. Cards use these so they match each other; a card file adds only its own small rules. */
:root { --jc-bg: #f5f9fb; --jc-ink: #25485d; --jc-muted: #57758a; --jc-line: #d4dfe6; --jc-accent: #3e749e; --jc-field: #ffffff; --jc-radius: 14px; }
:root[data-theme="dark"] { --jc-bg: #13202a; --jc-ink: #dbe7ee; --jc-muted: #9db3c1; --jc-line: #2c4250; --jc-accent: #7fb0d6; --jc-field: #192a35; }
.jc-card { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 12px 14px; max-width: 560px; border: 1px solid var(--jc-line); border-radius: var(--jc-radius); background: var(--jc-bg); color: var(--jc-ink); }
.jc-title { font: 700 .93rem/1.3 "DM Sans","DM Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--jc-ink); }
.jc-note { font: 500 .78rem/1.3 "DM Sans","DM Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--jc-muted); }
button.jc-button { text-align: left; cursor: pointer; padding: 8px 11px; border: 1px solid var(--jc-line); border-radius: 10px; background: var(--jc-field); color: var(--jc-accent); font: 500 .88rem/1.35 "DM Sans","DM Sans Fallback", sans-serif; }
button.jc-button:focus-visible, .jc-sheet-close:focus-visible { outline: 2px solid var(--jc-accent); outline-offset: 2px; }
.jc-sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 20, 28, .45); }
.jc-sheet { width: min(640px, 100%); max-height: 86vh; overflow: auto; background: var(--jc-bg); color: var(--jc-ink); border: 1px solid var(--jc-line); border-radius: 18px 18px 0 0; padding: 14px 16px 22px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
.jc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.jc-sheet-title { font: 700 1.05rem/1.3 "DM Sans","DM Sans Fallback", sans-serif; }
.jc-sheet-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--jc-line); background: var(--jc-field); color: var(--jc-ink); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.jc-sheet-loading { padding: 10px 0; color: var(--jc-muted); font-size: .9rem; }
@media (min-width: 701px) { .jc-sheet-backdrop { align-items: center; } .jc-sheet { border-radius: 18px; max-height: 80vh; } }

/* a QUIET card turn (ctx.send quiet:true): hide the user bubble and everything in the answer except the cards */
.message-user.is-quiet{display:none}
.message-assistant.is-quiet>*:not([data-card]){display:none}
.message-assistant.is-quiet{background:transparent;border-color:transparent;box-shadow:none;padding-top:0;padding-bottom:0}
/* QUIZ ME (public/cards/quiz.js): the card, the quiz panel, the choices, the feedback; tokens only, so light / dark follow the page; 44px tap targets on a phone */
.quiz-panel { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.quiz-body { display: flex; flex-direction: column; gap: 10px; }
.quiz-q { font-size: 1.05rem; line-height: 1.35; }
.quiz-answers { display: flex; flex-direction: column; gap: 8px; }
.quiz-choice { text-align: left; min-height: 44px; justify-content: flex-start; white-space: normal; }
.quiz-choice.quiz-right, .quiz-btn.quiz-right { border-color: #2e8b57; box-shadow: inset 0 0 0 1px #2e8b57; }
.quiz-choice.quiz-wrong, .quiz-btn.quiz-wrong { border-color: #c0392b; box-shadow: inset 0 0 0 1px #c0392b; }
.quiz-feedback { border: 1px solid var(--jc-line); border-radius: var(--jc-radius); padding: 10px 12px; background: var(--jc-field); color: var(--jc-ink); }
.quiz-feedback.quiz-right { border-color: #2e8b57; }
.quiz-feedback.quiz-wrong { border-color: #c0392b; }
.quiz-why { color: var(--jc-muted); margin-top: 4px; }
.quiz-input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--jc-line); border-radius: var(--jc-radius); background: var(--jc-field); color: var(--jc-ink); font: inherit; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-score { font-size: 1.4rem; }
.quiz-flash { min-height: 120px; padding: 16px; text-align: left; white-space: pre-wrap; cursor: pointer; border: 1px solid var(--jc-line); border-radius: var(--jc-radius); color: var(--jc-ink); font: inherit; }
@media (max-width: 520px) { .quiz-btn { min-height: 44px; } .quiz-actions .quiz-btn { flex: 1 1 100%; } }

/* the Quiz Me card wears the Explode card (style.css shares the container rules); only the icon tile is its own */
.quiz-card-thumb{display:flex;align-items:center;justify-content:center;color:#2f6f96;background:linear-gradient(135deg,#e3edf3,#f1f7fa)}
.quiz-card-thumb svg{width:34px;height:34px}
:root[data-theme="dark"] .quiz-card-thumb{color:#8fc0dc;background:linear-gradient(135deg,#202a32,#1a2229)}
