/* Ігрові екрани «Ничок». Усі селектори локальні; сітка й дії — зі спільного UI. */
.cc-tv, .cc-phone { --cc-bad:#F29E95; --cc-muted:#B3B8E6; --cc-gold:#FFC531; --cc-line:#363B76; }
.cc-tv *, .cc-phone * { box-sizing:border-box; }
.cc-art { display:block; flex-shrink:0; overflow:visible; }
.cc-tv { position:absolute; inset:0; padding:36px 48px 32px; display:flex; flex-direction:column; }
.cc-tv h1, .cc-phone h1 { font-family:Unbounded,sans-serif; font-weight:800; letter-spacing:-.04em; margin:0; }
.cc-tv-head { display:flex; align-items:center; justify-content:space-between; min-height:76px; gap:30px; }
.cc-brand { display:flex; align-items:center; gap:17px; font:700 36px Unbounded,sans-serif; letter-spacing:-.04em; white-space:nowrap; }
.cc-brand>span:last-child { font-size:28px; color:var(--cc-muted); }
.cc-tv-head-score { min-height:84px; height:84px; flex:none; justify-content:center; margin-top:-8px; }
.cc-heading { text-align:center; padding-top:42px; }
.cc-heading h1 { font-size:54px; line-height:1.15; }
.cc-heading p { margin:16px 0 0; font-size:26px; line-height:1.35; color:var(--cc-muted); }
.cc-deal-roster { display:flex; flex:1; min-height:0; }
.cc-people { display:flex; align-items:center; justify-content:space-evenly; gap:20px; flex:1; min-height:0; }
.cc-person { position:relative; width:166px; min-width:0; display:flex; flex-direction:column; align-items:center; gap:24px; }
/* Питання для розмови — головний елемент; рішення приймає позначений учасник.
   Сталий порядок номерів зберігає цикл свідків і всі публічні відкриття. */
.cc-turn-focus { position:absolute; top:168px; left:56px; right:56px; text-align:center; }
.cc-turn-focus h1 { font-size:54px; line-height:1.15; }
.cc-turn-focus p { font-size:26px; line-height:1.35; color:var(--cc-muted); margin:14px 0 0; }
.cc-turn-roster { position:absolute; left:56px; right:56px; top:410px; }
.cc-turn-roster .cc-people { align-items:flex-start; }
.cc-turn-roster .cc-person { gap:24px; }
.cc-turn-roster .cc-caches { height:52px; }
.cc-turn-roster .cc-caches>.cc-art, .cc-turn-roster .cc-found, .cc-turn-roster .cc-found>.cc-art { width:52px; height:52px; }
/* По одній короткій репліці в окремій смузі між питанням та аватарками. */
.cc-chatter { position:absolute; z-index:3; left:50%; bottom:calc(100% + 18px); width:max-content; max-width:200px; padding:12px 16px; border-radius:22px; background:#F4F4FF; color:#0C1030; box-shadow:0 8px 22px #0004; font:700 22px/1.2 Onest,sans-serif; text-align:center; text-wrap:balance; transform-origin:50% 100%; opacity:0; visibility:hidden; pointer-events:none; }
.cc-chatter:after { content:''; position:absolute; left:50%; bottom:-10px; transform:translateX(-50%); border-left:10px solid transparent; border-right:10px solid transparent; border-top:12px solid #F4F4FF; }
.cc-chatter.is-talking { visibility:visible; animation:cc-talk 2.8s ease both; }
@keyframes cc-talk {
  0% { opacity:0; transform:translate(-50%,8px) rotate(var(--chat-tilt,0deg)) scale(.86); }
  9% { opacity:1; transform:translate(-50%,-2px) rotate(var(--chat-tilt,0deg)) scale(1.03); }
  16%,84% { opacity:1; transform:translate(-50%,0) rotate(var(--chat-tilt,0deg)) scale(1); }
  100% { opacity:0; transform:translate(-50%,-6px) rotate(var(--chat-tilt,0deg)) scale(.97); }
}
@media (prefers-reduced-motion:reduce) { .cc-chatter { display:none; } }
.cc-caches { display:flex; justify-content:center; align-items:center; gap:6px; height:46px; }
/* Перевірені слоти мають світлий контур і кольорову підкладку; неперевірені — природний силует дупла. */
.cc-found { display:flex; flex:none; align-items:center; justify-content:center; width:46px; height:46px; border-radius:12px; box-shadow:inset 0 0 0 2px var(--cc-find-edge); background:var(--cc-find-bg); }
.cc-found-nut { --cc-find-edge:#DCAA38; --cc-find-bg:#49391E; }
.cc-found-trap { --cc-find-edge:#D99591; --cc-find-bg:#4D303D; }
.cc-tv-bottom { position:absolute; right:48px; bottom:32px; display:flex; align-items:center; justify-content:flex-end; min-height:48px; color:var(--cc-muted); font-size:24px; }
.cc-next { display:flex; align-items:center; gap:12px; }
.cc-participant { display:inline-flex; align-items:center; justify-content:center; flex:none; }
.cc-person-label { position:absolute; left:50%; bottom:-17px; transform:translateX(-50%); height:34px; padding:0 16px; border-radius:17px; background:#F4F4FF; color:#0C1030; font-size:20px; font-weight:800; display:flex; align-items:center; gap:6px; white-space:nowrap; }
/* Пояснення — один короткий приклад із трьома ілюстрованими кроками. */
.cc-rules-details { display:flex; flex-direction:column; align-items:center; gap:8px; }
.cc-win-rules { display:flex; justify-content:center; align-items:center; gap:32px; padding-top:3px; }
.cc-win-rules>span { display:flex; align-items:center; gap:10px; font-size:22px; white-space:nowrap; }
.cc-role-note { font-size:20px; margin:0; text-align:center; color:var(--cc-muted,#B3B8E6); }
/* Відкриття й перемога мають по одному великому ігровому об'єкту. Без фонового декору на столі. */
.cc-reveal { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }
.cc-owner { display:flex; align-items:center; justify-content:center; gap:32px; min-height:146px; padding-bottom:18px; color:var(--cc-muted); }
.cc-owner>.cc-participant { min-width:160px; }
.cc-result-arrow { font-size:40px; }
.cc-reveal-art { display:flex; align-items:center; justify-content:center; height:224px; width:300px; background:radial-gradient(ellipse,#4A407C33,transparent 68%); }
.cc-reveal h1 { font-size:60px; line-height:1.15; }
.cc-gain { margin:0; min-height:44px; font-size:30px; color:var(--cc-muted); }
.cc-score-gain { display:flex; align-items:center; justify-content:center; gap:12px; }
.cc-final-role { display:block; font:600 22px/1.3 Onest,sans-serif; white-space:nowrap; }
.cc-final-role-small { font-size:20px; }
.cc-good { color:var(--cc-gold); }
.cc-bad { color:var(--cc-bad); }
/* Контейнер телефону може бути fluid. На короткому екрані список прокручується, головна дія не рухається. */
.cc-phone { container-type:size; }
.cc-phone-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:none; }
.cc-phone-body::-webkit-scrollbar { display:none; }
.cc-phone h1 { font-size:38px; line-height:1.15; text-wrap:balance; }
.cc-secret { align-items:center; justify-content:flex-start; text-align:center; padding:20px 0; }
.cc-secret>* { flex-shrink:0; }
.cc-secret>h1 { margin-top:auto; }
.cc-secret>.cc-secret-note { margin-bottom:auto; }
.cc-secret h1 { font-size:42px; }
.cc-role-details { display:flex; flex-direction:column; gap:4px; margin-top:12px; font-size:22px; line-height:1.3; }
.cc-role-details p { margin:0; }
.cc-role-details b { font-weight:600; }
.cc-role-details p+p { color:var(--cc-muted); }
.cc-personal-final { align-items:center; justify-content:center; gap:32px; padding:20px 0; text-align:center; }
.cc-personal-final h1 { font-size:44px; }
.cc-stocks { width:100%; max-width:320px; display:flex; flex-direction:column; gap:18px; margin:24px 0 20px; }
.cc-stock { flex:none; }
.cc-stock+.cc-stock { border-top:1px solid var(--cc-line); padding-top:18px; }
.cc-stock h2 { display:flex; align-items:center; justify-content:center; gap:9px; margin:0 0 10px; font-size:23px; line-height:1.2; font-weight:600; }
.cc-empty { font-size:22px; color:var(--cc-muted); margin:14px 0 0; }
.cc-stock-items { display:flex; align-items:center; justify-content:center; gap:16px; min-height:64px; }
.cc-stock-items>span { display:flex; flex:none; }
.cc-secret-note { max-width:300px; font-size:20px; line-height:1.3; color:var(--cc-muted); margin:0; }
.cc-choice { padding:26px 0 22px; }
.cc-choice h1 { flex:none; font-size:36px; margin-bottom:24px; }
.cc-choice>.mw-phone { flex:1; min-height:112px; }
.cc-choice .mw-face { justify-content:center; }
.cc-phone button:disabled { opacity:.35; cursor:default; }
.cc-phone button:focus-visible { outline:3px solid var(--cc-gold); outline-offset:3px; }
@container (max-height:650px) {
  .cc-choice { padding:8px 0; }
  .cc-secret { padding:8px 0; }
  .cc-phone h1 { font-size:32px; }
  .cc-choice h1 { font-size:28px; margin-bottom:12px; }
  .cc-role-details { font-size:20px; margin-top:8px; }
  .cc-personal-final h1 { font-size:40px; }
  .cc-stocks { margin:12px 0; gap:10px; }
  .cc-stock+.cc-stock { padding-top:10px; }
  .cc-stock h2 { font-size:22px; margin-bottom:7px; }
  .cc-stock-items { min-height:56px; gap:14px; }
  .cc-stock-items .cc-art { width:56px; height:56px; }
  .cc-secret-note { font-size:18px; }
}

/* Два ряди зберігають читабельність до 12 учасників; рядки йдуть за номерами. */
.cc-people-many { display:grid; grid-template-columns:repeat(var(--cc-cols),minmax(0,1fr)); justify-items:center; flex:1; gap:88px 12px; }
.cc-people-many .cc-person { width:100%; gap:22px; }
.cc-people-many .cc-caches { height:36px; }
.cc-people-many .cc-caches>.cc-art, .cc-people-many .cc-found, .cc-people-many .cc-found>.cc-art { width:36px; height:36px; }
.cc-people-many .cc-chatter { max-width:220px; padding:10px 14px; font-size:20px; }
.cc-turn-focus-many { top:140px; }
.cc-turn-focus-many h1 { font-size:42px; }
.cc-turn-focus-many p { margin-top:10px; font-size:24px; }
.cc-turn-many { top:326px; }
.cc-deal-many { align-items:center; }
.cc-deal-many .cc-people-many { row-gap:38px; }

/* Коротке очікування, поява знахідки й передача ходу. Час від початку підставляє серверний годинник. */
.cc-handoff { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:42px; padding-bottom:38px; }
.cc-handoff h1 { font-size:58px; line-height:1.15; text-align:center; }
@keyframes cc-rattle {
  0%,12%,24%,42%,56%,76%,100% { transform:none; }
  17% { transform:translate(-2px,-1px) rotate(-1deg); }
  20% { transform:translate(2px,-1px) rotate(1deg); }
  47% { transform:translate(-3px,-2px) rotate(-2deg); }
  51% { transform:translate(3px,-2px) rotate(2deg); }
  81%,91% { transform:translate(-4px,-3px) rotate(-3deg) scale(1.03); }
  86%,96% { transform:translate(4px,-3px) rotate(3deg) scale(1.03); }
}
@keyframes cc-find {
  0% { opacity:0; transform:translateY(24px) scale(.58); }
  65% { opacity:1; transform:translateY(-7px) scale(1.08); }
  100% { opacity:1; transform:none; }
}
@keyframes cc-trap-hit {
  0% { opacity:0; transform:scale(.65); }
  35% { opacity:1; transform:scale(1.09) rotate(-4deg); }
  55% { transform:scale(1.04) rotate(3deg); }
  75% { transform:rotate(-1deg); }
  100% { opacity:1; transform:none; }
}
@media (prefers-reduced-motion:reduce) {
  .cc-reveal-art>span, .cc-reveal h1, .cc-reveal .cc-gain, .cc-handoff>* { animation:none !important; }
}
