.ct-page { max-width: 100%; }
.ct-page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap); }
.ct-page h1 { margin: 0 0 5px; font: 500 1.8em/1.2 var(--font-display); }
.ct-page .lede { max-width: 760px; margin: 0 0 var(--stack); }
.ct-message { padding: 7px 10px; margin-bottom: var(--stack); border: var(--hair); font: var(--size-ui)/1.4 var(--font-ui); }
.ct-account { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; margin-bottom: var(--stack); }
.ct-account p { flex-basis: 100%; margin: 0; }
.ct-account-title { font: 600 var(--size-ui)/1.3 var(--font-ui); }
.ct-account[data-signed-in="true"] { align-items: center; }
.ct-auth { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.ct-auth label, .ct-toolbar label, .ct-room-tools label { display: grid; gap: 3px; font: var(--size-ui)/1.3 var(--font-ui); }
.ct-auth .field { width: 150px; box-sizing: border-box; }
.ct-layout { display: block; }
.ct-play { min-width: 0; }
.ct-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 9px; font: var(--size-ui) var(--font-ui); }
.ct-toolbar select { max-width: min(270px, 65vw); }
.ct-check { display: flex !important; align-items: center; gap: 5px !important; }
.ct-scorebar { display: flex; gap: 16px; align-items: center; margin: 6px 0; font: var(--size-ui)/1.25 var(--font-ui); }
.ct-scorebar > div { display: grid; min-width: 56px; }
.ct-scorebar strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.ct-clock { color: #a00000; }
.ct-progress { height: 7px; border: var(--field-border); margin-bottom: 8px; overflow: hidden; }
.ct-progress > div { width: 100%; height: 100%; background: #222; transform-origin: left center; }
.ct-board-wrap { max-width: 100%; overflow-x: auto; }
.ct-board { --tile-gap: 2px; display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: var(--tile-gap); width: 100%; touch-action: manipulation; user-select: none; }
.ct-board-surface { --tile-gap: 2px; position: relative; width: 100%; }
.ct-feedback { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); grid-template-rows: repeat(15, minmax(0, 1fr)); gap: var(--tile-gap, 2px); overflow: hidden; pointer-events: none; z-index: 2; }
.ct-feedback-trails { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ct-feedback-trail { fill: none; stroke: var(--trail-color); stroke-width: .2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .95; filter: drop-shadow(0 0 .12px #111); animation: ct-trail-travel 150ms ease-out forwards; }
.ct-feedback-guide { fill: none; stroke: var(--trail-color); stroke-width: .09; stroke-linecap: round; stroke-dasharray: .07 .04; opacity: .65; }
.ct-feedback-preview { opacity: 0; transition: opacity 70ms ease-out; }
.ct-feedback-preview.is-visible { opacity: 1; }
.ct-feedback-ghost { z-index: 1; box-sizing: border-box; margin: 1px; border: 2px solid white; border-radius: 3px; background: var(--tile-color); opacity: .9; box-shadow: 0 0 0 1px rgb(0 0 0 / 45%); transform: scale(.78); }
.ct-feedback-ghost.is-guide { opacity: .42; border-style: dashed; transform: scale(.88); }
.ct-feedback-ghost.is-popping { animation: ct-tile-pop 190ms ease-in forwards; }
.ct-feedback.is-fail { background: rgb(180 35 35 / 8%); animation: ct-fail-flash 180ms ease-out; }
@keyframes ct-trail-travel { to { stroke-dashoffset: 0; } }
@keyframes ct-tile-pop { 55% { opacity: 1; transform: scale(1.16); } to { opacity: 0; transform: scale(.25); } }
@keyframes ct-fail-flash { 50% { background: rgb(180 35 35 / 18%); } }
@media (prefers-reduced-motion: reduce) {
  .ct-feedback-trail { animation-duration: 1ms; }
  .ct-feedback-ghost.is-popping { animation-duration: 1ms; }
  .ct-feedback.is-fail { animation-duration: 1ms; }
}
.ct-tile { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid rgb(0 0 0 / 30%); border-radius: 2px; cursor: pointer; position: relative; }
.ct-tile:focus-visible { outline: 3px solid #000; outline-offset: 1px; z-index: 1; }
.ct-tile:disabled { cursor: default; }
.ct-tile[data-color="0"] { background: #fff; border: 1px solid #aaa; }
.ct-board[data-labels="true"] .ct-tile:not([data-color="0"])::after { content: attr(data-mark); position: absolute; inset: 0; display: grid; place-items: center; color: #111; font: 700 clamp(7px, 1vw, 13px)/1 var(--font-ui); text-shadow: 0 0 2px white, 0 0 2px white; }
.ct-hint { min-height: 1.4em; margin: 6px 0 10px; font: var(--size-ui) var(--font-ui); color: var(--fg-muted); }
.ct-room-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; font: var(--size-ui) var(--font-ui); }
.ct-room-tools button { align-self: end; }
.ct-room-tools form { display: flex; gap: 5px; align-items: end; }
.ct-room-tools form label { grid-column: 1 / -1; }
.ct-room-tools form { flex-wrap: wrap; }
.ct-room-tools form .field { width: 90px; box-sizing: border-box; }
.ct-room { margin-top: 10px; padding: 8px; border: var(--hair); font: var(--size-ui)/1.5 var(--font-ui); }
.ct-room code { font-size: 1.2em; font-weight: bold; letter-spacing: .1em; }
.ct-stats .panel { margin-bottom: 10px; }
.ct-stats .body { overflow-wrap: anywhere; }
.ct-stat-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin: 0; }
.ct-stat-summary div { border-bottom: var(--hair); padding: 3px 0; }
.ct-stat-summary dt { color: var(--fg-muted); }
.ct-stat-summary dd { margin: 0; font-weight: bold; }
.ct-trend { width: 100%; height: 100px; }
.ct-runs { padding-left: 20px; margin-bottom: 0; }
.ct-runs li { margin: 3px 0; }
.ct-dist { display: flex; align-items: end; gap: 3px; height: 42px; margin-top: 8px; }
.ct-dist i { flex: 1; min-width: 4px; background: #777; }
.ct-trend-label { margin: 2px 0 8px; font: var(--size-ui)/1.4 var(--font-ui); color: var(--fg-muted); }
.ct-click-dist { display: grid; gap: 3px; max-height: 190px; overflow-y: auto; font: var(--size-ui)/1.3 var(--font-ui); }
.ct-bin { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 5px; }
.ct-bin > span { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.ct-bin > i { display: flex; width: 100%; height: 9px; background: #eee; }
.ct-bin b, .ct-bin em { display: block; height: 100%; }
.ct-bin b { background: #267548; }
.ct-bin em { background: #bf3e3e; }
.ct-run-label { display: grid; gap: 3px; font: var(--size-ui)/1.3 var(--font-ui); }
.ct-timeline { height: 28px; position: relative; margin-top: 6px; border-bottom: 1px solid currentColor; background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), rgb(100 100 100 / 22%) calc(10% - 1px), rgb(100 100 100 / 22%) 10%); }
.ct-timeline > i { position: absolute; top: 8px; width: 9px; height: 9px; border: 1px solid white; border-radius: 50%; transform: translateX(-50%); }
.ct-timeline > .is-correct { background: #267548; }
.ct-timeline > .is-wrong { background: #bf3e3e; }
.ct-timeline-ends { display: flex; justify-content: space-between; color: var(--fg-muted); font: var(--size-ui)/1.3 var(--font-ui); }
.ct-room-state { margin: 4px 0 8px; }
.ct-stats-link { margin: 4px 0 8px; font: var(--size-ui)/1.4 var(--font-ui); }
.ct-run-result { margin: 5px 0 0; padding: 6px 8px; border: var(--hair); font: 600 var(--size-ui)/1.4 var(--font-ui); }
.ct-player-stats { max-width: 68rem; }
.ct-stats-metrics { margin: 0 0 12px; }
.ct-detail-button { padding: 2px 8px; }
.ct-mobile-zoom { display: none !important; }
.credit, .back { font: var(--size-ui)/1.5 var(--font-ui); }
@media (max-width: 700px) {
  .ct-board { --tile-gap: 1px; }
  .ct-board-surface { --tile-gap: 1px; }
  .ct-mobile-zoom { display: flex !important; }
  .ct-board-wrap[data-large="true"] .ct-board { min-width: 650px; }
  .ct-board-wrap[data-large="true"] .ct-board-surface { width: 650px; }
  .ct-tile { border-radius: 0; }
  .ct-scorebar { gap: 10px; }
  .ct-scorebar #ct-retry { margin-left: auto; }
}
@media (max-width: 420px) {
  .ct-board { --tile-gap: 1px; }
  .ct-auth .field { width: 125px; }
  .ct-toolbar { gap: 8px; }
}
