/* Starhop Chinese Checkers: a star of holes on a deep board, glass marbles, coloured trails. Two themes on .cc[data-theme]. */
.cc {
  --cc-text: #dfe9ff; --cc-muted: #8aa3c4; --cc-strong: #fff; --cc-panel: #0b1328; --cc-line: #1c2b4a; --cc-btn: #0b1328; --cc-btn-text: #dfe9ff;
  --cc-accent: #55d6ff; --cc-hot: #ffd166;
  --cc-star-1: #1b2a55; --cc-star-2: #0d1634; --cc-star-edge: rgba(85, 214, 255, .45); --cc-hex: rgba(255, 255, 255, .025);
  --cc-hole: #050a1a; --cc-hole-rim: rgba(255, 255, 255, .14); --cc-home-a: .17;
  --cc-bs: 560px;
  max-width: 1020px; margin: 0 auto; padding: 10px 8px 16px; user-select: none; -webkit-user-select: none; color: var(--cc-text); border-radius: 12px; position: relative;
  font-variant-numeric: tabular-nums;
}
.cc[data-theme="light"] {
  --cc-text: #2b2a26; --cc-muted: #6b6457; --cc-strong: #17150f; --cc-panel: #fffdf8; --cc-line: #e0d6c3; --cc-btn: #fffdf8; --cc-btn-text: #2b2a26;
  --cc-accent: #0a86ad; --cc-hot: #a35f00;
  --cc-star-1: #f3e2c2; --cc-star-2: #e2c79a; --cc-star-edge: rgba(120, 80, 30, .45); --cc-hex: rgba(255, 255, 255, .25);
  --cc-hole: #8a6a3f; --cc-hole-rim: rgba(255, 255, 255, .5); --cc-home-a: .3;
  background: linear-gradient(180deg, #f6f1e7, #ece3d2); box-shadow: inset 0 0 0 1px #e0d6c3;
}
.cc [hidden] { display: none !important; }
.cc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.cc-opts { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--cc-muted); flex: 1 1 340px; min-width: 0; }
.cc-opts label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cc-sel { display: inline-flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.cc-opts select { background: var(--cc-btn); color: var(--cc-btn-text); border: 1px solid var(--cc-line); border-radius: 8px; padding: 0 8px; min-height: 36px; font-size: 13.5px; }
.cc-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-btn { background: var(--cc-btn); color: var(--cc-btn-text); border: 1px solid var(--cc-line); border-radius: 9px; padding: 0 13px; min-height: 38px; font-weight: 700; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; -webkit-tap-highlight-color: transparent; font-family: inherit; }
@media (hover: hover) { .cc-btn:hover:not(:disabled) { border-color: var(--cc-accent); } }
.cc-btn:disabled { opacity: .42; cursor: default; }
.cc-btn:active:not(:disabled) { transform: translateY(1px); }
.cc-btn-primary { background: #ffd166; color: #1a1200; border-color: #ffd166; }
@media (hover: hover) { .cc-btn-primary:hover:not(:disabled) { background: #ffe08a; border-color: #ffe08a; } }
.cc-icon { width: 38px; padding: 0; }
.cc-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#cc-sound[aria-pressed="false"] .on, #cc-sound[aria-pressed="true"] .off { display: none; }
.cc[data-theme="dark"] #cc-theme .moon, .cc[data-theme="light"] #cc-theme .sun { display: none; }
.cc-btn:focus-visible, .cc select:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

.cc-main { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cc.cc-wide .cc-main { flex-direction: row; align-items: flex-start; justify-content: center; gap: 16px; }
.cc-play { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-status { text-align: center; font-weight: 700; font-size: 15px; height: 1.5em; line-height: 1.5em; color: var(--cc-strong); display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: nowrap; max-width: var(--cc-bs); white-space: nowrap; overflow: hidden; }
.cc-status.hot { color: var(--cc-hot); }
.cc-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; flex: none; }
.cc-dots { display: inline-flex; gap: 3px; }
.cc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--cc-accent); animation: cc-blink 1s infinite ease-in-out; }
.cc-dots i:nth-child(2) { animation-delay: .15s; } .cc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cc-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.cc-boardwrap { position: relative; width: var(--cc-bs); height: var(--cc-bs); }
.cc-board { display: block; width: 100%; height: 100%; touch-action: manipulation; outline: none; overflow: visible; border-radius: 50%; }
.cc-board:focus-visible { outline: none; }
.cc-star { fill: var(--cc-star-2); stroke: var(--cc-star-edge); stroke-width: .06; stroke-linejoin: round; filter: drop-shadow(0 0 .25px rgba(85, 214, 255, .5)); }
.cc-star:first-child { fill: var(--cc-star-1); }
.cc[data-theme="light"] .cc-star { filter: none; }
.cc-hex { fill: var(--cc-hex); }
.cc-home { opacity: var(--cc-home-a); stroke: none; }
.cc-h { fill: var(--cc-hole); stroke: var(--cc-hole-rim); stroke-width: .035; }
.cc-h.can { stroke: rgba(150, 236, 255, .55); }
.cc-h.dest { stroke: #fff; stroke-width: .05; }
/* marbles */
.cc-m { transition: none; }
.cc-ms { fill: rgba(0, 0, 0, .45); }
.cc-mh { fill: rgba(255, 255, 255, .75); }
.cc-m.mine { cursor: pointer; }
.cc-m.mine .cc-mb { stroke: rgba(255, 255, 255, .6); stroke-width: .04; }
.cc-m.sel .cc-mb { stroke: #fff; stroke-width: .07; }
.cc-pieces, .cc-overlay-l, .cc-marks, .cc-trails { pointer-events: none; }
.cc-holes { cursor: default; }
/* selection, destinations, the route, trails, hints */
.cc-selring { fill: none; stroke-width: .07; animation: cc-ring 1.2s ease-in-out infinite; }
@keyframes cc-ring { 50% { stroke-opacity: .45; } }
.cc-dest { opacity: .85; stroke: #fff; stroke-width: .04; animation: cc-pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.cc-dest.jump { opacity: 1; }
@keyframes cc-pulse { 50% { transform: scale(.75); opacity: .6; } }
.cc-path { fill: none; stroke-width: .14; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .3 .22; animation: cc-march .6s linear infinite; filter: drop-shadow(0 0 .12px #fff); }
@keyframes cc-march { to { stroke-dashoffset: -.52; } }
.cc-via { fill: #fff; opacity: .9; }
.cc-gain { font: 800 .42px system-ui, -apple-system, "Segoe UI", sans-serif; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .75); stroke-width: .1px; }
.cc-trail { fill: none; stroke-width: .13; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .24 .16; }
.cc-trail-from { fill: none; stroke-width: .06; }
.cc-hint { fill: none; stroke: #ffd166; stroke-width: .09; filter: drop-shadow(0 0 .15px #ffd166); animation: cc-ring 1s ease-in-out infinite; }
.cc-hintpath { fill: none; stroke: #ffd166; stroke-width: .08; stroke-dasharray: .2 .15; opacity: .9; }
.cc-cursor { fill: none; stroke: #ffd166; stroke-width: .07; stroke-dasharray: .18 .1; }
.cc-clock { position: absolute; top: 2%; right: 2%; padding: 4px 10px; border-radius: 99px; background: rgba(8, 16, 36, .85); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 1px rgba(85, 214, 255, .5); }
.cc-clock.low { color: #ff8fa0; box-shadow: 0 0 0 1px #ff6b81, 0 0 16px rgba(255, 107, 129, .5); }

/* the turn order */
.cc-side { width: 100%; max-width: var(--cc-bs); background: var(--cc-panel); border: 1px solid var(--cc-line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.cc.cc-wide .cc-side { width: 262px; flex: none; }
.cc-mh { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cc-muted); margin: 0 0 8px; }
.cc-round { letter-spacing: .04em; text-transform: none; color: var(--cc-accent); }
.cc-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; counter-reset: cc; }
.cc:not(.cc-wide) .cc-order { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cc-order li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; border: 1px solid transparent; min-width: 0; font-size: 14px; }
.cc-order li.cur { border-color: var(--cc-accent); background: rgba(85, 214, 255, .1); box-shadow: 0 0 14px rgba(85, 214, 255, .2); }
.cc-order li.won { border-color: #ffd166; background: rgba(255, 209, 102, .12); }
.cc-chip { width: 16px; height: 16px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, var(--pc) 40%, color-mix(in srgb, var(--pc) 55%, #000)); box-shadow: 0 0 8px color-mix(in srgb, var(--pc) 60%, transparent); }
.cc-pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--cc-strong); }
.cc-pn em { font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--cc-muted); }
.cc-ph { font-size: 12px; color: var(--cc-muted); white-space: nowrap; } .cc-ph b { color: var(--cc-strong); font-size: 14px; }
.cc-record { margin-top: 8px; font-size: 12.5px; color: var(--cc-muted); line-height: 1.5; }
.cc-record b { color: var(--cc-text); }

/* dialogs and toast */
.cc-overlay { position: fixed; inset: 0; background: rgba(2, 5, 14, .72); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cc-overlay:not([hidden]) .cc-dialog { animation: cc-pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes cc-pop { from { transform: scale(.92); opacity: 0; } }
.cc-dialog { background: #0b1328; color: #dfe9ff; border: 1px solid #244b6b; border-radius: 16px; padding: 22px; width: min(100%, 420px); max-height: calc(100% - 16px); overflow: auto; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.cc[data-theme="light"] .cc-dialog { background: #fffdf8; color: #2b2a26; border-color: #e0d6c3; }
.cc-dialog h3 { margin: 0 0 10px; color: inherit; font-size: 24px; }
.cc-dialog p { margin: 0 0 12px; color: inherit; opacity: .85; }
.cc-rules-text { text-align: left; font-size: 14.5px; line-height: 1.5; }
.cc-stand { list-style: none; margin: 0 0 14px; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.cc-stand li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.cc-stand li:first-child { background: rgba(255, 209, 102, .14); }
.cc-stand i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cc-stand span { flex: 1; font-weight: 700; } .cc-stand b { font-size: 13px; opacity: .8; }
.cc-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.cc-wait { font-size: 13px; opacity: .8; }
.cc-toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2100; max-width: min(440px, calc(100% - 24px)); padding: 10px 16px; border-radius: 12px;
  background: #13224a; border: 1px solid #2c4478; color: #fff; font-weight: 600; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); pointer-events: none; text-align: center; }

.cc[data-theme="light"] .rg-modes-in { background: #e8dfcf; border-color: #d4c8b2; }
.cc[data-theme="light"] .rg-mode { color: #5d564a; }
.cc[data-theme="light"] .rg-mode[aria-pressed="true"] { background: #fffdf8; color: #17150f; box-shadow: inset 0 0 0 1.5px #0a86ad, 0 2px 10px rgba(10, 134, 173, .18); }
.cc[data-theme="light"] .rg-mode[aria-pressed="true"] svg { color: #0a86ad; }
.cc[data-theme="light"] .bt-strip { background: #fffdf8; border-color: #e0d6c3; color: #2b2a26; }
.cc[data-theme="light"] .ol-btn { background: #fffdf8; color: #2b2a26; border-color: #d4c8b2; }
.cc[data-theme="light"] .cc-gain { fill: #fff; }
.cc .bt-strip { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) { .cc-dots i, .cc-selring, .cc-dest, .cc-path, .cc-hint { animation: none; } }

@media (max-width: 700px) {
  .cc { padding: 6px 4px 12px; }
  .cc-top { margin-bottom: 8px; gap: 8px; }
  .cc-opts { flex-basis: 100%; justify-content: center; }
  .cc-sel { width: 100%; flex-wrap: nowrap; gap: 6px; }
  .cc-sel label { flex: 1 1 0; min-width: 0; }
  .cc-sel select { width: 100%; min-width: 0; padding: 0 4px; font-size: 13px; }
  .cc-lt { display: none; }
  .cc-tools { width: 100%; justify-content: center; flex-wrap: nowrap; gap: 5px; }
  .cc-tools .cc-btn { min-height: 36px; }
  .cc-tools .cc-btn:not(.cc-icon) { flex: 1 1 auto; padding: 0 6px; font-size: 13px; min-width: 0; }
  .cc-icon { width: 36px; flex: none; }
  .cc-order li { font-size: 13px; padding: 4px 6px; }
}
/* full screen */
.cc.cc-fit { max-width: none; height: 100%; margin: 0; padding: 6px 8px 8px; display: flex; flex-direction: column; overflow: hidden; border-radius: 0; }
.cc-fit .cc-top { flex: none; justify-content: center; }
.cc-fit .cc-main { flex: 1 1 auto; min-height: 0; }
.cc-fit.cc-wide .cc-top { flex-wrap: nowrap; }
.cc-fit .cc-side { overflow: auto; max-height: 100%; }

/* full screen on a wide or sideways screen: the board fills the height on the left, everything else in a column beside it */
.cc.cc-land { display: grid; grid-template-columns: var(--cc-bs) minmax(0, 340px); grid-template-rows: auto auto minmax(0, 1fr); column-gap: 16px; row-gap: 8px; justify-content: center; align-content: start; }
.cc-land .cc-main { display: contents; }
.cc-land .cc-play { grid-column: 1; grid-row: 1 / -1; align-self: center; }
.cc-land .cc-top { grid-column: 2; grid-row: 1; margin: 0; flex-direction: column; align-items: stretch; gap: 6px; }
.cc-land .cc-opts { flex: none; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.cc-land .rg-modes { max-width: none; }
.cc-land .cc-sel { flex-wrap: nowrap; gap: 6px; } .cc-land .cc-sel label { flex: 1 1 0; min-width: 0; } .cc-land .cc-sel select { width: 100%; }
.cc-land .cc-lt { display: none; }
.cc-land .cc-tools { flex-wrap: nowrap; gap: 4px; } .cc-land .cc-tools .cc-btn:not(.cc-icon) { flex: 1 1 auto; padding: 0 6px; min-width: 0; }
.cc-land .cc-btn { min-height: 34px; font-size: 12.5px; } .cc-land .cc-icon { width: 34px; }
.cc-land .cc-side { grid-column: 2; grid-row: 2; width: auto; overflow: auto; padding: 8px 10px; max-height: none; }
.cc-land .cc-order { display: flex; }
.cc-land .cc-order li { padding: 4px 8px; font-size: 13px; }
.cc-land .rg-mode { min-height: 38px; font-size: 13px; }
