/* Tint — daily color-mixing puzzle */
.tint {
  --sw: min(64vw, 36dvh, 300px);
  width: 100%; max-width: 460px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 10px 16px 14px; gap: 6px; position: relative; overflow: hidden;
}
@supports not (height: 1dvh) { .tint { --sw: min(64vw, 36vh, 300px); } }

/* top row */
.t-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.t-name { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; white-space: nowrap; }
.t-name small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.t-dots { display: flex; gap: 7px; }
.t-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; transition: background .4s, border-color .3s, transform .3s; }
.t-dot.cur { border-color: var(--text); transform: scale(1.15); }
.t-dot.done { border-color: transparent; }
.t-switch { border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.t-switch:hover { color: var(--text); background: var(--bg-3); }

/* swatch */
.t-swwrap { position: relative; width: calc(var(--sw) * 1.12); height: calc(var(--sw) * 1.12); flex: none; display: flex; align-items: center; justify-content: center; }
.t-glow { position: absolute; inset: 8%; border-radius: 50%; filter: blur(38px); opacity: .45; transition: background .6s; pointer-events: none; }
.t-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.t-ring circle { fill: none; stroke-width: 3; }
.t-ring .bg { stroke: var(--bg-3); }
.t-ring .fg { stroke-linecap: round; transition: stroke-dashoffset .5s cubic-bezier(.3,.9,.3,1), stroke .5s; }
.t-swatch {
  position: relative; width: var(--sw); height: var(--sw); border-radius: 50%; overflow: hidden; display: flex;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 18px 50px rgba(0,0,0,.55);
  background: var(--bg-2);
}
.t-half { flex: 1; position: relative; transition: background-color .45s ease; }
.t-target { margin-right: 1.5px; }
.t-mix { margin-left: 1.5px; overflow: hidden; }
.t-swatch::after { /* glossy highlight */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(120% 80% at 30% 12%, rgba(255,255,255,.22), rgba(255,255,255,0) 45%),
              radial-gradient(90% 90% at 50% 120%, rgba(0,0,0,.22), rgba(0,0,0,0) 60%);
}
.t-mix.empty { background-color: var(--bg-2) !important;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 8px, transparent 8px 16px); }
.t-emptytxt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 0 10px; opacity: 0; transition: opacity .3s; }
.t-mix.empty .t-emptytxt { opacity: 1; }
.t-ripple { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  border: 3px solid; pointer-events: none; animation: tripple .7s ease-out forwards; }
@keyframes tripple { from { transform: scale(.3); opacity: .9; } to { transform: scale(6); opacity: 0; } }
.t-labels { display: flex; width: var(--sw); justify-content: space-around; margin-top: -4px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* match */
.t-match { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.t-pct { font-family: var(--mono); font-size: clamp(34px, 6.5dvh, 46px); font-weight: 700; letter-spacing: -0.03em; transition: color .4s; }
.t-pct sup { font-size: .45em; margin-left: 2px; color: var(--muted); }
.t-match small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.t-info { display: flex; gap: 8px; }
.t-pill { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.t-pill small { color: var(--muted); font-family: var(--font); font-weight: 600; margin-right: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.t-pill.over { border-color: rgba(255,181,71,.5); color: var(--warn); }

/* drop strip */
.t-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 12px; max-width: 100%; }
.t-strip i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); animation: tpop .25s cubic-bezier(.2,1.6,.4,1); }
@keyframes tpop { from { transform: scale(0); } }

/* pots */
.t-pots { display: flex; justify-content: center; gap: clamp(8px, 3vw, 16px); width: 100%; }
.t-pot { position: relative; width: clamp(52px, 15vw, 64px); height: clamp(52px, 15vw, 64px); border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 -6px 12px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .12s cubic-bezier(.2,1.5,.4,1); }
.t-pot::before { content: ""; position: absolute; left: 18%; top: 12%; width: 38%; height: 26%; border-radius: 50%;
  background: rgba(255,255,255,.4); filter: blur(2px); transform: rotate(-20deg); }
.t-pot:hover { transform: translateY(-2px); }
.t-pot:active, .t-pot.press { transform: scale(.9); }
.t-pot:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.t-key { position: absolute; bottom: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
  color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.t-hintbadge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--violet); color: #fff; font-family: var(--mono);
  font-size: 11px; font-weight: 700; border-radius: 8px; padding: 2px 6px; white-space: nowrap; animation: tpop .3s cubic-bezier(.2,1.6,.4,1); }
.t-potname { display: flex; justify-content: center; gap: clamp(8px, 3vw, 16px); width: 100%; margin-top: -2px; }
.t-potname span { width: clamp(52px, 15vw, 64px); text-align: center; font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

/* actions */
.t-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; width: 100%; }
.t-actions .kp-btn { padding: 12px 8px; font-size: 14px; }
.t-actions .kp-btn:disabled { opacity: .4; cursor: default; transform: none; }
.t-lock.confirm { background: var(--warn); border-color: var(--warn); color: #1a1205; }
.t-hint { font-size: 13px !important; padding: 9px 12px !important; }
.t-hint:disabled { opacity: .45; }
.t-help { font-size: 12px; color: var(--muted); text-align: center; min-height: 16px; }
kbd { font-family: var(--mono); font-size: 11px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }

/* round-end sheet */
.t-sheet { position: absolute; left: 12px; right: 12px; bottom: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 18px 16px; text-align: center; box-shadow: 0 -10px 60px rgba(0,0,0,.6); z-index: 4;
  transform: translateY(calc(100% + 30px)); visibility: hidden; transition: transform .38s cubic-bezier(.2,1.1,.3,1), visibility 0s .38s; }
.t-sheet.show { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2,1.1,.3,1), visibility 0s; }
.t-stars { font-size: 34px; letter-spacing: 6px; line-height: 1; margin: 2px 0 6px; }
.t-stars .on { color: #FFD24A; text-shadow: 0 0 18px rgba(255,210,74,.5); display: inline-block; animation: tstar .45s cubic-bezier(.2,1.6,.4,1) both; }
.t-stars .off { color: var(--line); }
@keyframes tstar { from { transform: scale(0) rotate(-40deg); } }
.t-sheet h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.02em; }
.t-sheet p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.t-recipe { display: flex; justify-content: center; align-items: center; gap: 5px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 12px; color: var(--muted); }
.t-recipe i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.t-sheet .kp-btn { width: 100%; }

/* results */
.t-results { width: 100%; max-width: 420px; height: 100%; overflow-y: auto; padding: 16px 16px 24px; text-align: center; }
.t-results .kp-kicker { margin-top: 4px; }
.t-results h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.t-score { font-family: var(--mono); font-size: 52px; font-weight: 700; line-height: 1.1; margin: 6px 0 0; }
.t-score span { color: #FFD24A; font-size: .7em; }
.t-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0 8px; }
.t-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.t-mini { width: 100%; aspect-ratio: 1; max-width: 64px; border-radius: 50%; overflow: hidden; display: flex; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); }
.t-mini i { flex: 1; }
.t-mini i + i { margin-left: 1.5px; }
.t-cell .s { font-size: 12px; letter-spacing: 1px; color: #FFD24A; }
.t-cell .s b { color: var(--line); font-weight: 400; }
.t-cell .m { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.t-results .kp-stats { margin: 16px 0 6px; }
.t-results .kp-actions { margin-top: 16px; }
.t-count { font-family: var(--mono); color: var(--text); }
.t-legend { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* flying drop + splash */
.t-drop { position: fixed; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; z-index: 30; pointer-events: none;
  box-shadow: inset -3px -4px 6px rgba(0,0,0,.25), inset 3px 3px 5px rgba(255,255,255,.45), 0 4px 10px rgba(0,0,0,.4); }
.t-spark { position: fixed; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; z-index: 30; pointer-events: none; }

.t-shake { animation: tshake .35s; }
@keyframes tshake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

@media (max-height: 640px) {
  .t-potname { display: none; }
  .t-help { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .t-sheet { transition: none; }
  .t-ripple, .t-stars .on, .t-strip i, .t-shake { animation: none; }
}
