/* Colour Cards — table, card faces, hand fan and the colour picker. Shared look: ../shared/tnz.css */
.levels { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; justify-content: center; }
.levels .tnz-btn { min-height: 38px; font-size: 13px; padding: 0 12px; }
.levels .tnz-btn.on { border-color: var(--primary); color: var(--primary); }
.cc-opps { display: flex; gap: 8px; justify-content: center; width: min(100%, 440px); margin-bottom: 8px; flex-wrap: wrap; }
.cc-opp { flex: 1 1 0; min-width: 90px; max-width: 150px; background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 6px 8px; text-align: center; position: relative; transition: border-color .2s, box-shadow .2s; }
.cc-opp.turn { border-color: var(--gold); box-shadow: 0 0 12px #ffc53355; }
.cc-opp .nm { display: block; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-opp .backs { display: flex; justify-content: center; height: 30px; margin-top: 3px; }
.cc-opp .backs i { width: 18px; height: 28px; margin-left: -9px; border-radius: 4px; border: 1px solid #fff4; background: linear-gradient(135deg, #e64980, #ff6b2c); box-shadow: 0 1px 2px #0006; }
.cc-opp .backs i:first-child { margin-left: 0; }
.cc-opp .n { font-size: 12px; color: var(--muted); }
.cc-opp .last { position: absolute; top: -10px; right: -6px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 6px; animation: cc-pop .5s ease both; }
.cc-table { display: flex; align-items: center; justify-content: center; gap: 22px; width: min(100%, 420px); padding: 14px 10px; border-radius: 18px;
  background: radial-gradient(ellipse at center, #1f6b4a, #0e3d2a); box-shadow: inset 0 0 30px #0008; position: relative; }
.cc-deck { position: relative; width: 70px; height: 104px; border: 0; background: none; padding: 0; cursor: pointer; }
.cc-deck .cc-back { position: absolute; inset: 0; border-radius: 10px; border: 3px solid #fff; background: repeating-linear-gradient(45deg, #e64980 0 8px, #ff6b2c 8px 16px); box-shadow: 3px 3px 0 #fff3, 6px 6px 0 #fff2, 0 6px 14px #0008; }
.cc-deck b { position: absolute; bottom: -20px; left: 0; right: 0; font-size: 12px; color: #fff; }
.cc-deck.live .cc-back { animation: cc-glow 1.2s ease-in-out infinite; }
@keyframes cc-glow { 50% { box-shadow: 3px 3px 0 #fff3, 6px 6px 0 #fff2, 0 0 22px 6px #ffc533aa; } }
.cc-pile { position: relative; width: 80px; height: 118px; }
.cc-ring { position: absolute; inset: -10px; border-radius: 16px; border: 4px solid transparent; transition: border-color .3s; }
.cc-dir { position: absolute; right: 10px; top: 8px; font-size: 22px; color: #ffffffaa; transition: transform .4s; }
.cc-dir.rev { transform: scaleX(-1); }
.cc-turn { font-weight: 700; min-height: 24px; margin: 10px 0 4px; text-align: center; }
.cc-actions { min-height: 42px; display: flex; gap: 8px; justify-content: center; }
.cc-actions .tnz-btn { min-height: 40px; padding: 0 16px; }

.cc-card { width: 64px; height: 96px; border-radius: 10px; border: 3px solid #fff; position: relative; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 30px; color: #fff; text-shadow: 0 2px 0 #0005; box-shadow: 0 4px 10px #0007; user-select: none; flex: none; }
.cc-card::before { content: ''; position: absolute; inset: 10px 6px; border-radius: 50%; background: #ffffff33; transform: rotate(-30deg); }
.cc-card span { position: relative; }
.cc-card small { position: absolute; top: 3px; left: 6px; font-size: 13px; }
.c-R { background: linear-gradient(160deg, #ff5a5a, #c81e3a); }
.c-Y { background: linear-gradient(160deg, #ffd84d, #e9a400); }
.c-G { background: linear-gradient(160deg, #3ddc84, #128a4c); }
.c-B { background: linear-gradient(160deg, #4dabff, #1c5fd1); }
.c-W { background: conic-gradient(#ff5a5a 0 25%, #ffd84d 0 50%, #3ddc84 0 75%, #4dabff 0); }
.cc-pile .cc-card { position: absolute; inset: 0; width: 80px; height: 118px; font-size: 38px; }
.cc-pile .cc-card.fly { animation: cc-fly .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cc-fly { from { transform: translateY(120px) rotate(-25deg) scale(.6); opacity: .2; } to { transform: rotate(var(--rot, 4deg)); opacity: 1; } }
@keyframes cc-pop { from { transform: scale(0); } to { transform: scale(1); } }

.cc-hand { display: flex; justify-content: center; width: min(100%, 460px); min-height: 112px; padding: 10px 6px 0; overflow-x: auto; }
.cc-hand .cc-card { margin-left: -26px; transition: transform .18s; cursor: pointer; }
.cc-hand .cc-card:first-child { margin-left: 0; }
.cc-hand .cc-card.ok { transform: translateY(-12px); box-shadow: 0 0 0 2px var(--gold), 0 8px 14px #0008; }
.cc-hand .cc-card.dim { filter: brightness(.6) saturate(.7); }
.cc-hand .cc-card.hint { animation: cc-hint 1s ease-in-out 3; box-shadow: 0 0 0 3px var(--gold), 0 0 18px 4px #ffc533cc; }
.cc-hand .cc-card.new { animation: cc-in .35s ease both; }
@keyframes cc-in { from { transform: translateY(-80px) scale(.5); opacity: 0; } }
@keyframes cc-hint { 50% { transform: translateY(-20px) scale(1.06); } }
.cc-tools { display: flex; gap: 10px; justify-content: center; margin-top: 10px; min-height: 40px; }
.cc-picker { position: fixed; inset: 0; z-index: 30; background: #000a; display: flex; align-items: center; justify-content: center; }
.cc-picker[hidden] { display: none; }
.cc-picker-box { background: var(--bg2); border-radius: 18px; padding: 18px; text-align: center; animation: cc-pop .25s ease both; }
.cc-picker-row { display: flex; gap: 12px; margin-top: 12px; }
.cc-swatch { width: 58px; height: 58px; border-radius: 50%; border: 3px solid #fff; cursor: pointer; }
