/* checkin tab */
.tab-checkin { display: grid; gap: 16px; }
.tab-checkin .ck-head h1 { margin-bottom: 4px; }
.tab-checkin .ck-sub { margin: 0; max-width: 46ch; }

.tab-checkin .ck-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 800px) {
  .tab-checkin .ck-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .tab-checkin .ck-side { position: sticky; top: 72px; }
}

.tab-checkin .ck-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.tab-checkin .ck-legend { padding: 0; font-weight: 750; font-size: 1.02rem; line-height: 1.3; margin-bottom: 2px; display: flex; gap: 8px; align-items: baseline; text-wrap: balance; }
.tab-checkin .ck-q {
  flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  color: var(--accent-ink); background: var(--soft); border-radius: 6px; padding: 2px 6px;
}

/* radio tiles: the native input covers the tile, so the whole thing is a hit target */
.tab-checkin .ck-opt { position: relative; display: block; cursor: pointer; min-width: 0; }
.tab-checkin .ck-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tab-checkin .ck-tile {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  height: 100%;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 8px 4px 6px;
  font-size: .82rem; font-weight: 600;
  transition: transform .3s var(--spring), border-color .2s, box-shadow .25s, background .2s;
}
.tab-checkin .ck-opt:hover .ck-tile { transform: translateY(-3px); }
.tab-checkin .ck-opt:active .ck-tile { transform: scale(.94); }
.tab-checkin .ck-opt input:focus-visible + .ck-tile { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.tab-checkin .ck-opt input:checked + .ck-tile {
  border-color: var(--accent-bg);
  background: var(--soft);
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--accent-bg) 55%, transparent);
  transform: translateY(-4px) scale(1.05);
}

/* product cards */
.tab-checkin .ck-products { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 138px), 1fr)); }
.tab-checkin .ck-product .ck-tile { justify-items: start; text-align: left; padding: 10px 12px; gap: 1px; font-size: .9rem; font-weight: 700; line-height: 1.25; transform: none; }
.tab-checkin .ck-product:hover .ck-tile { transform: translateY(-2px); }
.tab-checkin .ck-product input:checked + .ck-tile { transform: none; }
.tab-checkin .ck-pbrand { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.tab-checkin .ck-product input:checked + .ck-tile .ck-pbrand { color: var(--accent-ink); }

/* "More products" expander: searchable pill radios, same group as the tiles above */
.tab-checkin .ck-more { border: 2px dashed var(--line); border-radius: 16px; background: var(--bg); }
.tab-checkin .ck-more[open] { border-style: solid; }
.tab-checkin .ck-more-sum {
  min-height: 44px; padding: 8px 14px; display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-weight: 750; font-size: .92rem; list-style: none; border-radius: 14px;
}
.tab-checkin .ck-more-sum::-webkit-details-marker { display: none; }
.tab-checkin .ck-more-sum::after { content: '▾'; margin-left: auto; color: var(--mute); transition: transform .2s; }
.tab-checkin .ck-more[open] .ck-more-sum::after { transform: rotate(180deg); }
.tab-checkin .ck-more-sum:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.tab-checkin .ck-more-n { font-size: .72rem; font-weight: 800; color: var(--accent-ink); background: var(--soft); border-radius: 999px; padding: 2px 8px; }
.tab-checkin .ck-more-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.tab-checkin .ck-more-search {
  font: inherit; min-height: 44px; width: 100%; padding: 8px 14px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: inherit;
}
.tab-checkin .ck-more-search:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.tab-checkin .ck-pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-checkin .ck-pchip[hidden] { display: none; }
.tab-checkin .ck-pchip .ck-tile {
  min-height: 44px; display: flex; align-items: baseline; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: .86rem; font-weight: 700; line-height: 1.25; text-align: left;
}
.tab-checkin .ck-pchip .ck-pbrand { flex: none; white-space: nowrap; }
.tab-checkin .ck-pchip:hover .ck-tile { transform: translateY(-2px); }
.tab-checkin .ck-pchip input:checked + .ck-tile { transform: none; }
.tab-checkin .ck-pchip input:checked + .ck-tile .ck-pbrand { color: var(--accent-ink); }
.tab-checkin .ck-more-empty { margin: 0; }

/* droplets + faces */
.tab-checkin .ck-drops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tab-checkin .ck-moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tab-checkin .ck-art { display: block; line-height: 0; }
.tab-checkin .ck-art svg { width: 52px; height: 55px; max-width: 100%; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .14)); overflow: visible; }
.tab-checkin .ck-opt input:checked + .ck-tile .ck-art svg { animation: ck-bob 1.3s ease-in-out infinite; }
.tab-checkin .ck-opt input:checked + .ck-tile .ck-opt-label { color: var(--accent-ink); }
@keyframes ck-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(2deg) scale(1.04); }
}

/* jelly */
.tab-checkin .ck-jellybox {
  height: 104px; display: grid; place-items: end center; overflow: hidden;
  background: linear-gradient(180deg, transparent, var(--soft));
  border-radius: 14px;
}
.tab-checkin .ck-jelly {
  width: 120px; height: 70px; margin-bottom: 10px;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0 7%, rgba(255, 255, 255, .45) 13%, transparent 30%),
    radial-gradient(circle at 50% 62%, #ffd1e6, #ff7eb6 68%, #b45bd8);
  box-shadow: inset -8px -10px 18px rgba(0, 0, 0, .18), inset 6px 8px 14px rgba(255, 255, 255, .5), 0 12px 18px -8px rgba(0, 0, 0, .3);
  transform-origin: 50% 100%;
  max-width: 100%;
}
.tab-checkin .ck-range { width: 100%; accent-color: var(--accent-bg); margin: 2px 0 0; height: 28px; }
.tab-checkin .ck-scale { display: flex; justify-content: space-between; gap: 4px; }
.tab-checkin .ck-vline { margin: 0; text-align: center; font-weight: 750; }
.tab-checkin .ck-vlabel { display: inline-block; background: var(--soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 14px; }

/* submit */
.tab-checkin .ck-submitrow { display: grid; gap: 6px; justify-items: stretch; }
.tab-checkin .ck-submit { width: 100%; padding: 14px 18px; font-size: 1.02rem; }
.tab-checkin .ck-hint, .tab-checkin .ck-tags { margin: 0; text-align: center; }
.tab-checkin .ck-hint[hidden] { display: none; }

/* results */
.tab-checkin .ck-results { outline: none; scroll-margin-top: 70px; }
.tab-checkin .ck-res-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tab-checkin .ck-res-top h2 { margin: 0; }
.tab-checkin .ck-res-sub { margin: -8px 0 0; }
.tab-checkin .ck-block { gap: 8px; }
.tab-checkin .ck-block h3 { margin: 0; font-size: .95rem; color: var(--ink); }

.tab-checkin .ck-n { display: grid; gap: 2px; justify-items: start; background: var(--lav); color: var(--lav-ink); border-radius: 14px; padding: 12px 14px; position: relative; }
.tab-checkin .ck-n .muted { color: inherit; opacity: .85; }
.tab-checkin .ck-n-num { display: flex; align-items: baseline; gap: 8px; font-size: 1.9rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tab-checkin .ck-n-old { opacity: .55; font-size: 1.2rem; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tab-checkin .ck-arrow { font-size: 1.2rem; }
.tab-checkin .ck-plus {
  position: absolute; top: 10px; right: 10px;
  font-size: .75rem; font-weight: 800; background: var(--lav-ink); color: var(--lav);
  border-radius: 999px; padding: 3px 10px;
}
.tab-checkin .ck-plus.pop { animation: ck-pop .7s var(--spring) both; }
@keyframes ck-pop { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

.tab-checkin .ck-bars { display: grid; gap: 7px; }
.tab-checkin .ck-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .85rem; }
.tab-checkin .ck-bar-l { font-weight: 650; }
.tab-checkin .ck-track { height: 12px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.tab-checkin .ck-fill { display: block; height: 100%; min-width: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--sky), #9b7bff); transition: width .9s cubic-bezier(.22, 1, .36, 1); }
.tab-checkin .ck-bar.you .ck-fill { background: linear-gradient(90deg, var(--accent), var(--accent-bg)); }
.tab-checkin .ck-bar-v { font-variant-numeric: tabular-nums; text-align: right; min-width: 3ch; display: inline-flex; gap: 6px; justify-content: flex-end; align-items: center; }
.tab-checkin .ck-you { font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--accent-bg); color: #fff; border-radius: 6px; padding: 1px 5px; }

.tab-checkin .ck-meter { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #e6defc, #ffd1e6, #ff9cc8); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
.tab-checkin .ck-mark { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: left .6s var(--spring); }
.tab-checkin .ck-mark.cohort, .tab-checkin .ck-dot.cohort { background: var(--lav-ink); }
.tab-checkin .ck-mark.you, .tab-checkin .ck-dot.you { background: var(--accent-bg); }
.tab-checkin .ck-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.tab-checkin .ck-vtext { margin: 0; }
.tab-checkin .ck-moodline { margin: 0; }

.tab-checkin .ck-note { display: grid; gap: 10px; justify-items: start; background: var(--mint); color: var(--mint-ink); border-radius: 14px; padding: 12px 14px; }
.tab-checkin .ck-note p { margin: 0; font-weight: 600; }
.tab-checkin .ck-note.differs { background: var(--amber-1); color: var(--amber-ink); }

/* history */
.tab-checkin .ck-history h2 { margin: 0; }
.tab-checkin .ck-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tab-checkin .ck-list li { display: grid; gap: 1px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.tab-checkin .ck-li-main { font-weight: 700; }

@media (max-width: 380px) {
  .tab-checkin .ck-art svg { width: 44px; height: 47px; }
  .tab-checkin .ck-tile { font-size: .76rem; }
  .tab-checkin .ck-n-num { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tab-checkin .ck-opt input:checked + .ck-tile .ck-art svg,
  .tab-checkin .ck-plus.pop { animation: none; }
  .tab-checkin .ck-tile, .tab-checkin .ck-fill, .tab-checkin .ck-mark { transition: none; }
  .tab-checkin .ck-opt:hover .ck-tile { transform: none; }
}
