.cc-shell {
    --cc-ink: #183b35;
    --cc-paper: #fffef8;
    --cc-rule: #b6c9bf;
    --cc-accent: #186348;
    --cc-wash: #e1f2e9;
    --cc-note: #f4ecdc;
    max-width: 58rem;
    margin: 0 auto;
}
.cc-heading { padding: 1.5rem 0; min-height: 150px; }
.cc-heading nav { font-size: .875rem; }
.cc-heading h1 { margin: .4rem 0; font: bold clamp(2.1rem, 6vw, 3.4rem)/1.05 Georgia, serif; }
.cc-heading p { max-width: 41rem; margin-bottom: 0; }
.cc-stage {
    position: relative;
    overflow: hidden;
    color: var(--cc-ink);
    background: var(--cc-paper);
    border: 1px solid var(--cc-rule);
    border-top: .45rem solid var(--cc-accent);
    border-radius: .8rem;
    padding: clamp(1rem, 3vw, 2rem);
}
.cc-stage [hidden], .cc-stage[hidden] { display: none !important; }
.cc-stage h2, .cc-guide h2 { font: bold clamp(1.5rem, 4vw, 2rem)/1.2 Georgia, serif; }
.cc-stage h3 { font-size: 1.15rem; }
.cc-stage p { margin-bottom: .8rem; }
.cc-stage select { max-width: 24rem; }
.cc-primary, .cc-primary:focus-visible { background: var(--cc-accent); color: var(--cc-paper); font-weight: 650; }
.cc-primary:disabled { background: var(--cc-rule); color: var(--cc-ink); }
.cc-option, .cc-sound { color: inherit; background: var(--cc-paper); border: 1px solid var(--cc-rule); border-radius: .5rem; }
.cc-option { padding: .4rem .7rem; min-height: 44px; }
.cc-option:disabled { opacity: .48; }
.cc-sound { margin-top: 1rem; }
.cc-stage :focus-visible { outline: 3px solid #ad651a; outline-offset: 2px; }
.cc-topline, .cc-actions, .cc-tray { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cc-topline { justify-content: space-between; font-variant-numeric: tabular-nums; }
.cc-stage progress { width: 100%; height: .55rem; accent-color: var(--cc-accent); margin: .6rem 0 1rem; }
.cc-messages { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem 0 1rem; }
.cc-messages > div { padding: .75rem 1rem; background: var(--cc-wash); border-radius: .6rem .6rem .6rem 0; }
.cc-messages > div + div { background: var(--cc-note); border-radius: .6rem .6rem 0 .6rem; }
.cc-messages p { margin: .25rem 0 0; line-height: 1.65; font-size: 1.08rem; }
.cc-messages .cc-pinyin { font-size: .94rem; line-height: 1.5; }
.cc-pinyin-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.cc-pinyin-toggle input { accent-color: var(--cc-accent); }
.cc-listen { min-width: 44px; }
.cc-audio-status:empty { margin: 0; }
.cc-grid { table-layout: fixed; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cc-grid caption { caption-side: top; color: inherit; font-size: .9rem; font-weight: bold; }
.cc-grid th, .cc-grid td { border: 1px solid var(--cc-rule); text-align: center; padding: .35rem; }
.cc-grid th { background: var(--cc-note); }
.cc-grid .cc-option { width: 100%; font-weight: 600; }
.cc-grid small { display: block; }
.cc-both { background: var(--cc-wash); box-shadow: inset 0 0 0 2px var(--cc-accent); }
.cc-answer { display: flex; align-items: center; flex-wrap: wrap; min-height: 3.5rem; padding: .5rem; border-bottom: 2px solid var(--cc-rule); }
#cc-placed { display: inline-flex; flex-wrap: wrap; gap: .2rem; }
#cc-placed .cc-option { background: var(--cc-wash); }
.cc-tray { margin: .8rem 0; }
.cc-feedback:not(:empty) { margin: 1rem 0; padding: .7rem 1rem; border-left: 3px solid var(--cc-accent); background: var(--cc-wash); }
.cc-bookings { padding-left: 1.6rem; }
.cc-bookings li { padding: .25rem 0; }
.cc-bookings span { display: block; }
.cc-guide { margin: 2rem 0; }
#cc-effects { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#cc-effects > * { position: absolute; top: var(--y); left: var(--x); pointer-events: none; }
#cc-effects i { width: .4rem; height: .5rem; background: #399a76; animation: cc-burst .55s ease-out forwards; }
#cc-effects i:nth-child(3n) { background: #e5b44a; border-radius: 50%; }
#cc-effects i:nth-child(3n+1) { background: #d98468; }
#cc-effects b { color: var(--cc-accent); background: var(--cc-paper); padding: 0 .3rem; animation: cc-float .7s ease-out forwards; }
@keyframes cc-burst { to { transform: translate(var(--dx), var(--dy)) rotate(80deg); opacity: 0; } }
@keyframes cc-float { to { transform: translateY(-2.4rem); opacity: 0; } }
[data-bs-theme="dark"] .cc-shell {
    --cc-ink: #e3f0e8; --cc-paper: #1b2927; --cc-rule: #657c73;
    --cc-accent: #a0dec1; --cc-wash: #294537; --cc-note: #413a2f;
}
@media (hover: hover) {
    .cc-option:hover:enabled { background: var(--cc-wash); border-color: var(--cc-accent); }
    .cc-primary:hover { background: var(--cc-ink); color: var(--cc-paper); }
}
@media (max-width: 540px) {
    .cc-messages { grid-template-columns: 1fr; gap: .45rem; }
    .cc-grid th, .cc-grid td { padding: .15rem; font-size: .87rem; }
    .cc-grid .cc-option { padding: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cc-stage *, .cc-stage *::after { animation: none !important; transition: none !important; }
}
