/* Chaos Canvas – UI
 * VERSION: CHAOS_CANVAS_2026_07_13_R4
 */
:root {
    --cc-bg: #090919;
    --cc-panel: rgba(20, 20, 49, .88);
    --cc-panel-2: rgba(31, 31, 70, .82);
    --cc-line: rgba(255,255,255,.12);
    --cc-text: #f8f7ff;
    --cc-muted: #a7a6c4;
    --cc-purple: #8b5cf6;
    --cc-pink: #ff4fb8;
    --cc-blue: #31c6ff;
    --cc-yellow: #ffd447;
    --cc-green: #32e68b;
    --cc-red: #ff516d;
    --cc-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.cc-app, .cc-app * { box-sizing: border-box; }
.cc-app [hidden] { display: none !important; }
.cc-app {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    padding: 0 22px 60px;
    color: var(--cc-text);
    background:
        radial-gradient(circle at 12% 2%, rgba(139,92,246,.24), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(49,198,255,.18), transparent 28%),
        linear-gradient(145deg, #080817 0%, #111027 48%, #080817 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}
.cc-app button, .cc-app input, .cc-app select, .cc-app textarea { font: inherit; }
.cc-app button { color: inherit; }
.cc-backdrop { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.cc-backdrop::before {
    content: ""; position: absolute; inset: 0; opacity: .24;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.cc-backdrop i { position: absolute; display: block; border-radius: 999px; filter: blur(2px); opacity: .35; animation: ccFloat 14s ease-in-out infinite; }
.cc-backdrop i:nth-child(1) { width: 260px; height: 260px; background: #713cff; top: 15%; left: -130px; }
.cc-backdrop i:nth-child(2) { width: 210px; height: 210px; background: #ff3ca6; top: 48%; right: -110px; animation-delay: -4s; }
.cc-backdrop i:nth-child(3) { width: 110px; height: 110px; background: #18cfff; top: 76%; left: 16%; animation-delay: -8s; }
.cc-backdrop i:nth-child(4) { width: 60px; height: 60px; background: #ffd447; top: 11%; right: 25%; animation-delay: -3s; }
.cc-backdrop i:nth-child(5) { width: 80px; height: 80px; background: #32e68b; bottom: 4%; right: 30%; animation-delay: -10s; }
@keyframes ccFloat { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(18px,-28px,0) scale(1.08); } }

.cc-topbar { max-width: 1460px; margin: 0 auto; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cc-brand { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.cc-brand-mark { width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; border-radius: 15px; background: linear-gradient(135deg, var(--cc-purple), var(--cc-pink)); box-shadow: 0 12px 28px rgba(139,92,246,.34), inset 0 1px 0 rgba(255,255,255,.35); transform: rotate(-5deg); }
.cc-brand > span:last-child { display: flex; line-height: .92; font-size: 18px; letter-spacing: .045em; flex-direction: column; }
.cc-brand strong { font-weight: 1000; }
.cc-brand b { color: var(--cc-yellow); font-weight: 1000; }
.cc-top-actions { display: flex; gap: 9px; }
.cc-icon-btn { width: 43px; height: 43px; border: 1px solid var(--cc-line); border-radius: 14px; background: rgba(255,255,255,.06); cursor: pointer; font-size: 18px; transition: .2s ease; }
.cc-icon-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); }

.cc-hero { max-width: 1460px; margin: 28px auto 44px; min-height: 390px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 60px; }
.cc-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--cc-blue); text-transform: uppercase; letter-spacing: .18em; font-weight: 900; font-size: 12px; }
.cc-eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 99px; background: currentColor; }
.cc-hero h1 { margin: 18px 0 18px; max-width: 820px; font-size: clamp(46px, 6vw, 88px); line-height: .98; letter-spacing: -.055em; font-weight: 1000; }
.cc-hero h1 em { font-style: normal; color: transparent; background: linear-gradient(90deg, var(--cc-yellow), #ff9947 43%, var(--cc-pink)); background-clip: text; -webkit-background-clip: text; }
.cc-hero-copy > p { max-width: 760px; margin: 0; color: #c2c1d8; font-size: 18px; line-height: 1.7; }
.cc-hero-facts { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.cc-hero-facts span { padding: 10px 14px; border: 1px solid var(--cc-line); background: rgba(255,255,255,.05); border-radius: 14px; color: var(--cc-muted); font-size: 13px; font-weight: 750; }
.cc-hero-facts b { color: #fff; font-size: 17px; margin-right: 4px; }
.cc-hero-art { min-height: 350px; position: relative; perspective: 1000px; }
.cc-paper { position: absolute; width: 260px; min-height: 170px; padding: 28px; display: grid; place-items: center; text-align: center; border-radius: 24px; background: #fdfcff; color: #17172b; font-weight: 950; box-shadow: 0 34px 65px rgba(0,0,0,.38); border: 6px solid rgba(255,255,255,.8); }
.cc-paper::before { content: ""; position: absolute; inset: 12px; border: 2px dashed rgba(23,23,43,.13); border-radius: 14px; }
.cc-paper span { position: relative; z-index: 1; }
.cc-paper-a { top: 12px; left: 5%; transform: rotate(-10deg); background: #fff9d7; }
.cc-paper-b { top: 105px; left: 37%; transform: rotate(7deg); font-size: 66px; display: flex; gap: 16px; }
.cc-paper-c { top: 220px; left: 13%; transform: rotate(-3deg); background: #e4fbff; }
.cc-pencil { position: absolute; right: 2%; top: 35%; font-size: 104px; transform: rotate(-25deg); filter: drop-shadow(0 24px 22px rgba(0,0,0,.36)); animation: ccPencil 3.2s ease-in-out infinite; }
@keyframes ccPencil { 50% { transform: rotate(-18deg) translateY(-12px); } }

.cc-view { max-width: 1460px; margin: 0 auto; }
.cc-card, .cc-task-card, .cc-sidebar-card {
    border: 1px solid var(--cc-line);
    background: linear-gradient(145deg, rgba(28,27,65,.9), rgba(14,14,37,.92));
    box-shadow: var(--cc-shadow), inset 0 1px 0 rgba(255,255,255,.07);
    backdrop-filter: blur(22px);
}
.cc-card { border-radius: 28px; padding: 30px; }
.cc-entry-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr); gap: 24px; align-items: stretch; }
.cc-create-card { border-top: 4px solid var(--cc-purple); }
.cc-join-card { border-top: 4px solid var(--cc-blue); }
.cc-card-head { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.cc-card-icon { width: 54px; height: 54px; display: grid; place-items: center; font-size: 26px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid var(--cc-line); }
.cc-card-head small, .cc-panel-title small, .cc-room-banner small { color: var(--cc-blue); font-size: 11px; letter-spacing: .16em; font-weight: 950; }
.cc-card-head h2, .cc-panel-title h2, .cc-panel-title h3 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; }
.cc-form-grid { display: grid; grid-template-columns: minmax(0,1fr) 120px; gap: 14px; }
.cc-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cc-field > span { color: #d7d6e8; font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.cc-field input, .cc-field select, .cc-text-task textarea {
    width: 100%; min-height: 48px; padding: 0 14px; color: #fff; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; outline: none; background: rgba(4,4,17,.54); transition: border-color .2s, box-shadow .2s, background .2s;
}
.cc-field input:focus, .cc-field select:focus, .cc-text-task textarea:focus { border-color: var(--cc-blue); box-shadow: 0 0 0 4px rgba(49,198,255,.11); background: rgba(4,4,17,.72); }
.cc-field select { appearance: auto; }
.cc-field select option { color: #111; background: #fff; }
.cc-mode-picker { margin-top: 2px; max-height: 262px; overflow: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding: 3px 4px 3px 0; scrollbar-width: thin; }
.cc-mode-option { min-height: 76px; padding: 11px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; border: 1px solid var(--cc-line); border-radius: 16px; background: rgba(255,255,255,.045); transition: .18s ease; }
.cc-mode-option:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.cc-mode-option.is-selected { border-color: var(--cc-yellow); background: linear-gradient(135deg, rgba(255,212,71,.17), rgba(255,79,184,.10)); box-shadow: 0 0 0 3px rgba(255,212,71,.08); }
.cc-mode-option i { flex: 0 0 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); font-style: normal; font-size: 21px; }
.cc-mode-option span { min-width: 0; display: flex; flex-direction: column; }
.cc-mode-option b { font-size: 12px; line-height: 1.15; }
.cc-mode-option small { margin-top: 3px; color: var(--cc-muted); font-size: 9px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-quick-settings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.cc-btn { min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--cc-line); border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; cursor: pointer; font-weight: 900; text-decoration: none; transition: .18s ease; }
.cc-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.cc-btn:disabled { opacity: .45; cursor: not-allowed; }
.cc-btn.is-busy { color: transparent !important; position: relative; }
.cc-btn.is-busy::after { content: ""; position: absolute; width: 19px; height: 19px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: ccSpin .7s linear infinite; }
@keyframes ccSpin { to { transform: rotate(360deg); } }
.cc-btn-primary { border-color: rgba(255,255,255,.18); background: linear-gradient(135deg, #7847ff, #b84aff 52%, #ff4fae); box-shadow: 0 14px 28px rgba(139,92,246,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.cc-btn-secondary { background: linear-gradient(135deg, #187ee9, #25c3ff); box-shadow: 0 14px 28px rgba(49,198,255,.23), inset 0 1px 0 rgba(255,255,255,.28); }
.cc-btn-danger { border-color: rgba(255,81,109,.3); background: rgba(255,81,109,.11); color: #ff9aab; }
.cc-btn-ghost { background: rgba(255,255,255,.05); }
.cc-btn-xl { width: 100%; min-height: 56px; margin-top: 21px; font-size: 15px; justify-content: space-between; padding-inline: 21px; }
.cc-btn-xl b { font-size: 23px; }
.cc-join-visual { min-height: 116px; margin: 8px 0 22px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 20px; background: radial-gradient(circle at center, rgba(49,198,255,.16), transparent 70%); }
.cc-join-visual span { width: 45px; height: 55px; display: grid; place-items: center; color: #17172c; background: #fff; border-radius: 9px; font-size: 23px; font-weight: 1000; box-shadow: 0 10px 18px rgba(0,0,0,.22); transform: rotate(var(--r, -3deg)); }
.cc-join-visual span:nth-child(even) { --r: 4deg; background: #fff7c9; }
.cc-code-input { text-align: center; letter-spacing: .18em; font-size: 26px !important; font-weight: 1000; text-transform: uppercase; }
.cc-hint { margin: 14px 0 0; text-align: center; color: var(--cc-muted); font-size: 11px; }

.cc-room-banner { margin: 18px 0 22px; padding: 26px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--cc-line); border-radius: 26px; background: linear-gradient(120deg, rgba(139,92,246,.2), rgba(49,198,255,.08), rgba(255,79,184,.12)); box-shadow: var(--cc-shadow); }
.cc-room-banner h1 { margin: 2px 0 4px; font-size: clamp(29px,4vw,48px); }
.cc-room-banner p { margin: 0; color: var(--cc-muted); }
.cc-code-button { padding: 3px 12px; border: 1px dashed rgba(255,212,71,.55); border-radius: 12px; color: var(--cc-yellow); background: rgba(255,212,71,.08); font-weight: 1000; letter-spacing: .14em; cursor: pointer; }
.cc-room-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cc-lobby-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 22px; align-items: start; }
.cc-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 22px; }
.cc-panel-title h2 span { color: var(--cc-muted); font-size: 14px; margin-left: 6px; }
.cc-live-pill, .cc-host-only { padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; font-size: 10px; letter-spacing: .08em; font-weight: 1000; background: rgba(50,230,139,.1); color: var(--cc-green); border: 1px solid rgba(50,230,139,.22); }
.cc-live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; animation: ccPulse 1.3s infinite; }
@keyframes ccPulse { 50% { opacity: .35; } }
.cc-player-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.cc-player-card { min-height: 78px; padding: 12px; position: relative; display: flex; align-items: center; gap: 11px; border: 1px solid var(--cc-line); border-radius: 17px; background: rgba(255,255,255,.045); transition: .2s; }
.cc-player-card.is-ready { border-color: rgba(50,230,139,.45); background: rgba(50,230,139,.08); }
.cc-player-card.is-offline { opacity: .52; filter: grayscale(.6); }
.cc-avatar { flex: 0 0 44px; width: 44px; height: 44px; position: relative; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); font-size: 24px; }
.cc-avatar i { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--cc-green); border: 2px solid #1c1b40; }
.cc-player-card.is-offline .cc-avatar i { background: #77768d; }
.cc-player-info { min-width: 0; display: flex; flex-direction: column; }
.cc-player-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cc-player-info strong small { margin-left: 4px; color: var(--cc-blue); font-size: 8px; }
.cc-player-info span { margin-top: 3px; color: var(--cc-muted); font-size: 10px; }
.cc-ready-check { margin-left: auto; width: 22px; height: 22px; display: none; place-items: center; color: #07160f; background: var(--cc-green); border-radius: 50%; font-size: 12px; }
.cc-player-card.is-ready .cc-ready-check { display: grid; }
.cc-kick { position: absolute; top: 5px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 8px; background: transparent; color: #ff8497; cursor: pointer; font-size: 18px; opacity: .55; }
.cc-kick:hover { opacity: 1; background: rgba(255,81,109,.12); }
.cc-ready-row { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-ready-row > span { color: var(--cc-muted); font-size: 12px; }
.cc-btn-ready { border-color: rgba(50,230,139,.32); color: var(--cc-green); background: rgba(50,230,139,.08); }
.cc-btn-ready.is-active { color: #07160f; background: var(--cc-green); }
.cc-settings-panel { position: sticky; top: 14px; }
.cc-host-only { color: var(--cc-yellow); background: rgba(255,212,71,.09); border-color: rgba(255,212,71,.22); }
.cc-selected-mode { min-height: 76px; margin-bottom: 18px; padding: 14px; display: flex; align-items: center; gap: 13px; border-radius: 18px; background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(255,79,184,.1)); border: 1px solid rgba(139,92,246,.28); }
.cc-selected-mode i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: rgba(255,255,255,.1); font-size: 25px; font-style: normal; }
.cc-selected-mode div { display: flex; flex-direction: column; min-width: 0; }
.cc-selected-mode strong { font-size: 16px; }
.cc-selected-mode small { color: var(--cc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-settings-panel .cc-form-grid { grid-template-columns: 1fr 1fr; margin-top: 14px; }
.cc-settings-panel > .cc-btn-primary { width: 100%; margin-top: 17px; }
.cc-btn-start { width: 100%; min-height: 68px; margin-top: 12px; flex-direction: column; gap: 1px; border: 0; background: linear-gradient(135deg, #ff9c25, #ffcf3a); color: #241400; box-shadow: 0 15px 28px rgba(255,174,40,.22); }
.cc-btn-start span { font-size: 16px; font-weight: 1000; letter-spacing: .04em; }
.cc-btn-start small { font-size: 10px; opacity: .68; }
.cc-event-strip { min-height: 48px; margin-top: 14px; padding: 8px 13px; display: flex; align-items: center; gap: 10px; overflow-x: auto; border: 1px solid var(--cc-line); border-radius: 15px; background: rgba(5,5,18,.4); }
.cc-event-strip:empty { display: none; }
.cc-event-strip span { flex: 0 0 auto; color: var(--cc-muted); font-size: 11px; }
.cc-event-strip b { color: #fff; }

.cc-game { max-width: 1700px; }
.cc-game-header { min-height: 82px; margin: 8px 0 16px; padding: 13px 18px; display: grid; grid-template-columns: minmax(180px,.7fr) minmax(280px,1.2fr) 100px; align-items: center; gap: 18px; border: 1px solid var(--cc-line); border-radius: 22px; background: rgba(14,14,37,.9); box-shadow: var(--cc-shadow); }
.cc-game-room { display: flex; align-items: center; gap: 12px; }
.cc-game-room > span { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, rgba(139,92,246,.35), rgba(255,79,184,.22)); font-size: 25px; }
.cc-game-room div { display: flex; flex-direction: column; }
.cc-game-room small { color: var(--cc-blue); font-size: 9px; letter-spacing: .14em; font-weight: 950; }
.cc-game-room strong { font-size: 15px; }
.cc-round-progress > div { margin-bottom: 7px; display: flex; justify-content: space-between; color: var(--cc-muted); font-size: 11px; font-weight: 800; }
.cc-round-progress > i { height: 8px; display: block; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.cc-round-progress > i b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--cc-blue), var(--cc-purple), var(--cc-pink)); transition: width .35s ease; }
.cc-timer { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid var(--cc-line); }
.cc-timer span { font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 1000; }
.cc-timer small { color: var(--cc-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.cc-timer.is-low { color: #fff; border-color: rgba(255,81,109,.55); background: rgba(255,81,109,.17); animation: ccTimerPulse .7s infinite alternate; }
.cc-timer.is-unlimited span { color: var(--cc-green); font-size: 31px; }
@keyframes ccTimerPulse { to { transform: scale(1.035); box-shadow: 0 0 30px rgba(255,81,109,.18); } }
.cc-game-stage { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 16px; align-items: start; }
.cc-task-card { min-height: calc(100vh - 145px); padding: 22px; border-radius: 24px; }
.cc-task-heading { margin-bottom: 18px; display: flex; align-items: center; gap: 13px; }
.cc-task-heading > span { width: 49px; height: 49px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.08); font-size: 25px; }
.cc-task-heading h1 { margin: 0; font-size: clamp(23px,3vw,36px); line-height: 1.1; }
.cc-task-heading p { margin: 5px 0 0; color: var(--cc-muted); }
.cc-source { max-width: 880px; margin: 0 auto 17px; padding: 14px; border-radius: 18px; background: rgba(5,5,19,.58); border: 1px solid var(--cc-line); }
.cc-source-head { margin-bottom: 10px; display: flex; justify-content: space-between; gap: 15px; color: var(--cc-blue); font-size: 10px; font-weight: 950; letter-spacing: .11em; }
.cc-source-head small { color: var(--cc-muted); font-weight: 700; letter-spacing: 0; }
.cc-source img { display: block; max-width: 100%; max-height: 280px; margin: 0 auto; border-radius: 13px; background: #fff; object-fit: contain; }
.cc-source blockquote { margin: 0; padding: 19px; border: 0; border-radius: 14px; background: #fff; color: #17172b; text-align: center; font-size: clamp(19px,2.5vw,30px); font-weight: 900; }
.cc-missing { min-height: 90px; display: grid; place-items: center; border: 2px dashed rgba(255,255,255,.13); border-radius: 13px; color: var(--cc-muted); }
.cc-text-task { max-width: 900px; margin: 30px auto 0; }
.cc-text-task textarea { min-height: 230px; padding: 24px; resize: vertical; border-radius: 22px; font-size: clamp(18px,2.2vw,28px); line-height: 1.5; }
.cc-text-footer { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.cc-text-footer > span { color: var(--cc-muted); font-size: 12px; }
.cc-text-footer i { font-style: normal; }
.cc-text-footer .cc-btn { width: auto; min-width: 220px; margin: 0; }
.cc-wait { min-height: 480px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.cc-wait h2 { margin: 21px 0 5px; font-size: 38px; }
.cc-wait p { margin: 0; color: var(--cc-muted); }
.cc-wait-orbit { width: 112px; height: 112px; position: relative; display: grid; place-items: center; }
.cc-wait-orbit::before { content: ""; position: absolute; inset: 0; border: 3px dashed rgba(49,198,255,.45); border-radius: 50%; animation: ccSpin 6s linear infinite; }
.cc-wait-orbit i { position: absolute; inset: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--cc-purple), var(--cc-pink)); box-shadow: 0 16px 35px rgba(139,92,246,.35); }
.cc-wait-orbit span { position: relative; z-index: 1; font-size: 37px; }
.cc-mini-players { max-width: 500px; margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.cc-mini-players span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--cc-line); filter: grayscale(1); opacity: .48; }
.cc-mini-players span.is-done { filter: none; opacity: 1; border-color: rgba(50,230,139,.45); background: rgba(50,230,139,.1); }
.cc-drawing-layout { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; }
.cc-draw-tools { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.cc-tool-group { display: flex; flex-direction: column; gap: 7px; }
.cc-tool { width: 48px; height: 45px; display: grid; place-items: center; border: 1px solid var(--cc-line); border-radius: 13px; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; font-weight: 1000; transition: .15s; }
.cc-tool:hover:not(:disabled), .cc-tool.is-active { border-color: var(--cc-blue); background: rgba(49,198,255,.16); transform: translateX(2px); }
.cc-tool:disabled { opacity: .3; }
.cc-tool-danger { color: #ff8b9d; }
.cc-canvas-column { min-width: 0; }
.cc-canvas-wrap { position: relative; width: 100%; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.28); touch-action: none; }
.cc-canvas-wrap.has-grid::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(80,80,100,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(80,80,100,.13) 1px, transparent 1px); background-size: 25px 25px; }
.cc-canvas-wrap canvas { width: 100%; height: auto; aspect-ratio: 8/5; display: block; position: relative; z-index: 2; cursor: crosshair; touch-action: none; }
.cc-canvas-wrap canvas[data-tool="eraser"] { cursor: cell; }
.cc-onion-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .18; pointer-events: none; filter: saturate(.55); }
.cc-onion-label { position: absolute; z-index: 4; left: 12px; top: 12px; padding: 5px 8px; border-radius: 8px; background: rgba(17,17,32,.72); color: #fff; font-size: 8px; letter-spacing: .09em; font-weight: 900; pointer-events: none; }
.cc-draw-bottom { margin-top: 11px; display: grid; grid-template-columns: minmax(0,1fr) 180px auto; align-items: center; gap: 13px; }
.cc-colors { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cc-colors button, .cc-colors input { width: 28px; height: 28px; padding: 0; border: 3px solid rgba(255,255,255,.15); border-radius: 50%; background: var(--c); cursor: pointer; }
.cc-colors button.is-active { border-color: #fff; transform: scale(1.12); box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
.cc-colors input { overflow: hidden; }
.cc-brush-size { display: grid; grid-template-columns: auto 1fr 24px; align-items: center; gap: 8px; color: var(--cc-muted); font-size: 10px; font-weight: 850; }
.cc-brush-size input { width: 100%; accent-color: var(--cc-purple); }
.cc-brush-size b { color: #fff; }
.cc-game-sidebar { display: flex; flex-direction: column; gap: 12px; }
.cc-sidebar-card { padding: 16px; border-radius: 20px; }
.cc-sidebar-card .cc-panel-title { margin-bottom: 12px; }
.cc-sidebar-card .cc-panel-title h3 { font-size: 17px; }
.cc-game-players { display: flex; flex-direction: column; gap: 7px; max-height: 360px; overflow: auto; }
.cc-game-player { padding: 8px; display: grid; grid-template-columns: 34px minmax(0,1fr) 24px; align-items: center; gap: 8px; border-radius: 12px; background: rgba(255,255,255,.045); }
.cc-game-player > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.07); }
.cc-game-player div { min-width: 0; display: flex; flex-direction: column; }
.cc-game-player strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.cc-game-player small { color: var(--cc-muted); font-size: 9px; }
.cc-game-player > i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--cc-muted); background: rgba(255,255,255,.06); font-style: normal; font-size: 10px; }
.cc-game-player > i.is-done { color: #07160f; background: var(--cc-green); }
.cc-game-player.is-offline { opacity: .48; }
.cc-reactions { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.cc-reactions button { min-height: 42px; border: 1px solid var(--cc-line); border-radius: 12px; background: rgba(255,255,255,.055); cursor: pointer; font-size: 20px; transition: .16s; }
.cc-reactions button:hover { transform: scale(1.12) rotate(-4deg); background: rgba(255,255,255,.12); }
.cc-reaction-layer { position: fixed; z-index: 30; inset: 0; pointer-events: none; overflow: hidden; }
.cc-floating-reaction { position: absolute; bottom: 5%; display: flex; flex-direction: column; align-items: center; animation: ccReaction 2.5s ease-out forwards; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); }
.cc-floating-reaction b { font-size: clamp(36px,5vw,68px); }
.cc-floating-reaction small { padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.62); color: #fff; font-size: 10px; }
@keyframes ccReaction { 0% { transform: translateY(80px) scale(.5) rotate(-10deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-70vh) scale(1.25) rotate(10deg); opacity: 0; } }

.cc-album { padding-top: 22px; }
.cc-album-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.cc-album-header h1 { margin: 7px 0 4px; font-size: clamp(36px,5vw,68px); line-height: 1; }
.cc-album-header p { margin: 0; color: var(--cc-muted); }
.cc-scoreboard { margin-bottom: 18px; display: flex; gap: 10px; overflow-x: auto; }
.cc-score { min-width: 185px; padding: 12px 14px; display: grid; grid-template-columns: 34px 38px minmax(0,1fr); align-items: center; gap: 8px; border: 1px solid var(--cc-line); border-radius: 16px; background: rgba(255,255,255,.055); }
.cc-score > span { font-size: 22px; font-weight: 1000; }
.cc-score > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); font-style: normal; font-size: 22px; }
.cc-score strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cc-score b { grid-column: 3; color: var(--cc-yellow); font-size: 11px; }
.cc-place-1 { border-color: rgba(255,212,71,.45); background: rgba(255,212,71,.1); }
.cc-album-stage { min-height: 560px; padding: 24px; display: grid; grid-template-columns: minmax(240px,.36fr) minmax(0,.64fr); align-items: center; gap: 24px; border: 1px solid var(--cc-line); border-radius: 28px; background: linear-gradient(145deg, rgba(31,30,68,.9), rgba(12,12,31,.94)); box-shadow: var(--cc-shadow); }
.cc-stage-title { align-self: stretch; padding: 25px; display: flex; flex-direction: column; justify-content: center; border-radius: 21px; background: linear-gradient(145deg, rgba(139,92,246,.2), rgba(255,79,184,.09)); }
.cc-stage-title > span { color: var(--cc-blue); font-size: 10px; letter-spacing: .15em; font-weight: 950; }
.cc-stage-title h2 { margin: 12px 0 22px; font-size: clamp(24px,3vw,42px); line-height: 1.1; }
.cc-stage-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-stage-dots i { width: 19px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); }
.cc-stage-dots i.is-past { background: rgba(49,198,255,.38); }
.cc-stage-dots i.is-active { width: 38px; background: var(--cc-yellow); box-shadow: 0 0 18px rgba(255,212,71,.3); }
.cc-album-entry { min-width: 0; padding: 13px; border-radius: 17px; background: rgba(255,255,255,.05); border: 1px solid var(--cc-line); }
.cc-album-entry header { margin-bottom: 9px; display: flex; justify-content: space-between; gap: 10px; color: var(--cc-blue); font-size: 9px; font-weight: 950; letter-spacing: .09em; }
.cc-album-entry header small { color: var(--cc-muted); font-weight: 650; letter-spacing: 0; }
.cc-album-entry img { width: 100%; max-height: 350px; display: block; object-fit: contain; border-radius: 12px; background: #fff; }
.cc-album-entry blockquote { margin: 0; min-height: 95px; padding: 15px; display: grid; place-items: center; border: 0; border-radius: 12px; color: #1b1a2c; background: #fff; text-align: center; font-size: 18px; font-weight: 900; }
.cc-album-entry.is-large { padding: 18px; background: rgba(255,255,255,.075); }
.cc-album-entry.is-large img { max-height: 490px; }
.cc-album-entry.is-large blockquote { min-height: 300px; font-size: clamp(24px,3.3vw,48px); padding: 30px; }
.cc-album-controls { margin: 15px 0; display: grid; grid-template-columns: 150px 1fr 150px; align-items: center; gap: 12px; }
.cc-album-controls > span { text-align: center; color: var(--cc-muted); font-size: 12px; font-weight: 800; }
.cc-album-tabs { margin: 22px 0 14px; display: flex; gap: 7px; }
.cc-album-tabs button { padding: 10px 15px; border: 1px solid var(--cc-line); border-radius: 12px; color: var(--cc-muted); background: rgba(255,255,255,.05); cursor: pointer; font-weight: 850; }
.cc-album-tabs button.is-active { color: #fff; border-color: var(--cc-purple); background: rgba(139,92,246,.18); }
.cc-album-gallery { display: flex; flex-direction: column; gap: 20px; }
.cc-gallery-album { padding: 22px; border: 1px solid var(--cc-line); border-radius: 24px; background: rgba(17,17,43,.84); box-shadow: var(--cc-shadow); }
.cc-gallery-album h2 { margin: 0 0 16px; display: flex; align-items: center; gap: 11px; }
.cc-gallery-album h2 span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--cc-purple), var(--cc-pink)); font-size: 14px; }
.cc-gallery-album > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.cc-loading, .cc-empty { min-height: 250px; grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: var(--cc-muted); }
.cc-loading i { width: 44px; height: 44px; border: 4px solid rgba(255,255,255,.13); border-top-color: var(--cc-blue); border-radius: 50%; animation: ccSpin .8s linear infinite; }

.cc-toast { position: fixed; z-index: 100; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: min(92vw,620px); padding: 13px 18px; border: 1px solid rgba(50,230,139,.35); border-radius: 14px; color: #eafff4; background: rgba(10,28,20,.94); box-shadow: 0 20px 45px rgba(0,0,0,.38); font-weight: 800; text-align: center; animation: ccToast .25s ease-out; }
.cc-toast.is-bad { color: #fff0f2; border-color: rgba(255,81,109,.4); background: rgba(48,13,22,.96); }
@keyframes ccToast { from { opacity: 0; transform: translate(-50%,20px); } }
.cc-confetti { position: fixed; z-index: 200; top: -40px; color: hsl(var(--hue) 90% 62%); font-style: normal; font-size: 18px; pointer-events: none; animation: ccFall var(--fall) linear var(--delay) forwards; }
@keyframes ccFall { to { transform: translateY(110vh) rotate(var(--spin)); } }

@media (max-width: 1180px) {
    .cc-mode-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cc-player-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cc-game-stage { grid-template-columns: minmax(0,1fr); }
    .cc-game-sidebar { display: grid; grid-template-columns: 1fr 1fr auto; }
    .cc-game-players { max-height: 180px; }
    .cc-task-card { min-height: auto; }
    .cc-gallery-album > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
    .cc-app { padding-inline: 14px; }
    .cc-hero { grid-template-columns: 1fr; margin-top: 15px; min-height: 0; }
    .cc-hero-art { display: none; }
    .cc-entry-grid, .cc-lobby-layout { grid-template-columns: 1fr; }
    .cc-settings-panel { position: static; }
    .cc-game-header { grid-template-columns: 1fr 90px; }
    .cc-round-progress { grid-column: 1/-1; grid-row: 2; }
    .cc-draw-bottom { grid-template-columns: 1fr; }
    .cc-draw-bottom .cc-btn { width: 100%; }
    .cc-album-stage { grid-template-columns: 1fr; min-height: 0; }
    .cc-stage-title { min-height: 180px; }
}

@media (max-width: 640px) {
    .cc-app { padding: 0 9px 35px; }
    .cc-topbar { min-height: 66px; }
    .cc-brand-mark { width: 39px; height: 39px; border-radius: 13px; }
    .cc-brand > span:last-child { font-size: 15px; }
    .cc-icon-btn { width: 39px; height: 39px; }
    .cc-hero { margin: 20px 4px 28px; }
    .cc-hero h1 { font-size: 43px; }
    .cc-hero-copy > p { font-size: 15px; }
    .cc-card { padding: 20px 15px; border-radius: 22px; }
    .cc-form-grid, .cc-quick-settings, .cc-settings-panel .cc-form-grid { grid-template-columns: 1fr; }
    .cc-form-grid { gap: 11px; }
    .cc-mode-picker { grid-template-columns: 1fr 1fr; max-height: 310px; }
    .cc-mode-option { min-height: 70px; padding: 9px; }
    .cc-mode-option small { display: none; }
    .cc-join-visual span { width: 37px; height: 48px; font-size: 19px; }
    .cc-room-banner { padding: 18px 15px; align-items: flex-start; flex-direction: column; border-radius: 20px; }
    .cc-room-actions { width: 100%; justify-content: stretch; }
    .cc-room-actions .cc-btn { flex: 1; }
    .cc-player-panel, .cc-settings-panel { padding: 18px 13px; }
    .cc-player-grid { grid-template-columns: 1fr; }
    .cc-ready-row { align-items: stretch; flex-direction: column; }
    .cc-ready-row .cc-btn { width: 100%; }
    .cc-game-header { margin-top: 4px; padding: 10px; gap: 9px; border-radius: 17px; }
    .cc-game-room > span { width: 40px; height: 40px; }
    .cc-game-room strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cc-timer { min-height: 50px; }
    .cc-task-card { padding: 14px 10px; border-radius: 19px; }
    .cc-task-heading { align-items: flex-start; }
    .cc-task-heading > span { width: 42px; height: 42px; border-radius: 13px; }
    .cc-task-heading p { font-size: 12px; }
    .cc-source { padding: 9px; }
    .cc-source-head { flex-direction: column; gap: 2px; }
    .cc-source img { max-height: 210px; }
    .cc-source blockquote { font-size: 19px; padding: 14px; }
    .cc-text-task { margin-top: 16px; }
    .cc-text-task textarea { min-height: 210px; padding: 17px; font-size: 18px; }
    .cc-text-footer { align-items: stretch; flex-direction: column; }
    .cc-text-footer .cc-btn { width: 100%; min-width: 0; }
    .cc-drawing-layout { grid-template-columns: 1fr; }
    .cc-draw-tools { flex-direction: row; overflow-x: auto; }
    .cc-tool-group { flex-direction: row; }
    .cc-tool { flex: 0 0 43px; width: 43px; height: 40px; }
    .cc-canvas-wrap { border-radius: 12px; }
    .cc-colors button, .cc-colors input { width: 25px; height: 25px; }
    .cc-game-sidebar { grid-template-columns: 1fr; }
    .cc-game-sidebar .cc-sidebar-card:first-child { display: none; }
    .cc-reactions { grid-template-columns: repeat(8,1fr); }
    .cc-reactions button { min-height: 38px; font-size: 18px; }
    .cc-album-header { align-items: flex-start; flex-direction: column; }
    .cc-album-header .cc-room-actions { width: 100%; }
    .cc-album-stage { padding: 10px; gap: 10px; border-radius: 19px; }
    .cc-stage-title { min-height: 130px; padding: 17px; }
    .cc-stage-title h2 { margin-bottom: 14px; }
    .cc-album-entry.is-large { padding: 9px; }
    .cc-album-entry.is-large blockquote { min-height: 220px; font-size: 25px; }
    .cc-album-controls { grid-template-columns: 1fr 1fr; }
    .cc-album-controls > span { grid-column: 1/-1; grid-row: 1; }
    .cc-gallery-album { padding: 14px 9px; }
    .cc-gallery-album > div { grid-template-columns: 1fr; }
}

@media (max-width: 410px) {
    .cc-mode-picker { grid-template-columns: 1fr; }
    .cc-reactions { grid-template-columns: repeat(4,1fr); }
    .cc-hero h1 { font-size: 37px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-app *, .cc-app *::before, .cc-app *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.cc-animation-play { margin-top: 20px; width: 100%; }
