/* 30-Day Couples Challenge */
.tool .ch-view { display: flex; flex-direction: column; gap: 14px; }
.tool .ch-banner { padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }

/* Tracks: one row, always all visible */
.tool .ch-tracks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tool .ch-tracks button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 2px; border-radius: 14px; font-size: 14px; line-height: 17px; font-weight: 800; white-space: nowrap;
  background: var(--surface); color: rgb(var(--ink) / .72); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .08);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, color .15s ease, transform .16s var(--ease-out);
}
.tool .ch-tracks button small { font-size: 11px; line-height: 13px; font-weight: 750; opacity: .75; font-variant-numeric: tabular-nums; }
.tool .ch-tracks button[aria-pressed="true"] { background: rgb(var(--ink)); color: var(--surface); box-shadow: none; }
.tool .ch-tracks button:active { transform: scale(.96); }
@media (min-width: 600px) { .tool .ch-task { min-height: 0; } .tool .ch-card { padding: 24px; } }

/* Today */
.tool .ch-hero { display: flex; flex-direction: column; gap: 10px; }
.tool .ch-card { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px 16px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.tool .ch-card.is-new { animation: card-in .4s var(--ease-out) both; }
.tool .ch-eyebrow { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 13px; line-height: 18px; font-weight: 900; letter-spacing: .03em; color: var(--link); font-variant-numeric: tabular-nums; }
.tool .ch-min { color: rgb(var(--ink) / .5); font-weight: 750; letter-spacing: 0; white-space: nowrap; }
.tool .ch-task { margin: 0; min-height: 96px; font-size: 24px; line-height: 32px; font-weight: 900; letter-spacing: -.012em; color: rgb(var(--ink)); text-wrap: pretty; }
.tool .ch-sub { margin: 0; font-size: 15px; line-height: 22px; font-weight: 650; color: rgb(var(--ink) / .6); }
.tool .ch-card-rest .ch-task, .tool .ch-card-end .ch-task { min-height: 0; }
.tool .ch-main-acts { display: flex; flex-direction: column; gap: 8px; }
.tool .ch-main-acts .btn { width: 100%; min-height: 56px; flex: none; }
.tool .ch-another { align-self: center; padding: 4px 8px; font-size: 14px; color: rgb(var(--ink) / .7); }
.tool .ch-stakes { display: flex; flex-direction: column; gap: 6px; }
.tool .ch-stakes > span { font-size: 13px; font-weight: 850; color: rgb(var(--ink) / .62); }
.tool .ch-sub-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tool .ch-sub-acts .u24-ib { flex: 1 1 auto; justify-content: center; box-shadow: none; background: var(--surface-2); }
.tool .ch-hint { padding: 0 4px; }
.tool .ch-deal { min-height: 0; padding-bottom: 22px; }
.tool .ch-deal .ch-task { min-height: 64px; }
.tool .ch-link { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 800; color: var(--link); text-decoration: underline; text-underline-offset: 3px; background: none; }
.tool .ch-banner .btn { align-self: flex-start; margin-top: 6px; }
.tool .ch-now-sub { margin: 0; }

/* Stats */
.tool .ch-stats { display: flex; gap: 8px; }
.tool .ch-stats .tool-stat { flex: 1 1 0; }
.tool .ch-stats .tool-stat span { white-space: nowrap; }
.tool .ch-stats .tool-stat { padding: 10px 6px; }
.tool .ch-stats .tool-stat b { font-size: 22px; line-height: 28px; }

/* Calendar */
.tool .ch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tool .ch-day {
  width: 100%; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 14px;
  background: var(--surface); color: rgb(var(--ink)); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, color .2s ease, transform .16s var(--ease-out);
}
.tool .ch-day b { font-size: 16px; line-height: 20px; font-weight: 850; font-variant-numeric: tabular-nums; }
.tool .ch-day small { font-size: 11px; line-height: 13px; font-weight: 750; color: rgb(var(--ink) / .7); white-space: nowrap; letter-spacing: -.01em; }
.tool .ch-by { position: absolute; left: 3px; top: 3px; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; line-height: 15px; font-weight: 900; color: #260840; background: #FFC94D; }
.tool .ch-legend { margin-top: -6px; }
/* Partner's ticks get their own color, so each of you sees who did which day. */
.tool .ch-day.is-done.is-partner { background: #D21F6D; }
.tool .ch-key { font-weight: 750; color: rgb(var(--ink) / .8); }
.tool .ch-key i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; background: #8A2BDB; }
.tool .ch-key i.ch-key-p { background: #D21F6D; margin-left: 4px; }
.tool .ch-day:active { transform: scale(.94); }
.tool .ch-day.is-next { box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
.tool .ch-day.is-done { background: #8A2BDB; color: #fff; }
.tool .ch-day.is-done small { color: rgb(255 255 255 / .92); }
.tool .ch-day[aria-expanded="true"] { outline: 3px solid rgb(var(--ink) / .7); outline-offset: 1px; }
.tool .ch-day { position: relative; }
.tool .ch-check { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; }
.tool .ch-check .tool-icon { width: 12px; height: 12px; stroke-width: 3.5; }
@media (hover: hover) { .tool .ch-day:not(.is-done):hover { background: var(--surface-2); } }
@media (min-width: 1100px) {
  .tool[data-tool="30-day-couples-challenge"] { margin-inline: -120px; }
  .tool .ch-view[aria-labelledby="u24-tab-plan"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
  .tool .ch-banner, .tool .ch-bar { grid-column: 1 / -1; }
  .tool .ch-tracks, .tool .ch-hero, .tool .ch-stats { grid-column: 1; }
  .tool .ch-legend { grid-column: 2; }
  .tool .ch-grid { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: repeat(6, 1fr) !important; }
  .tool .ch-detail { grid-column: 2; }
  .tool .ch-view[aria-labelledby="u24-tab-now"], .tool .ch-view[aria-labelledby="u24-tab-print"] { max-width: 760px; margin-inline: auto; width: 100%; }
}
@media (min-width: 600px) { .tool .ch-grid { grid-template-columns: repeat(10, 1fr); } .tool .ch-day small { font-size: 11px; letter-spacing: -.01em; } .tool .ch-sub-acts .u24-ib { flex: 0 1 auto; padding: 0 18px; } .tool .ch-main-acts { flex-direction: row; } .tool .ch-main-acts .btn { width: auto; flex: 1 1 0; } }

.tool .ch-detail { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); }
.tool .ch-detail-t { margin: 0; font-size: 18px; line-height: 25px; font-weight: 800; color: rgb(var(--ink)); }
.tool .ch-remind { flex: 1 0 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface); }
.tool .ch-remind-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool .ch-remind-row input { flex: 1 1 120px; width: auto; }
.tool .ch-remind-row .btn { flex: 2 1 160px; width: auto; }

/* Bottom bar and poster */
.tool .ch-zoom-btn { display: block; padding: 0; background: none; cursor: zoom-in; width: 100%; }
.ch-zoom { position: fixed; inset: 0; z-index: 90; overflow: auto; background: rgb(18 6 31 / .92); cursor: zoom-out; -webkit-overflow-scrolling: touch; }
.ch-zoom img { display: block; width: max(100vw, 780px); max-width: none; height: auto; }
.tool .ch-opts-toggle { align-self: flex-start; min-height: 36px; font-size: 14px; font-weight: 750; color: var(--link); text-decoration: underline; text-underline-offset: 3px; background: none; text-align: left; }
.tool .ch-day.is-big::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgb(var(--accent)); }
.tool .ch-bar { display: flex; flex-direction: column; gap: 10px; }
.tool .ch-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool .ch-tools .u24-ib { justify-content: center; }
.tool .ch-group { margin: 8px 4px 0; font-size: 13px; line-height: 18px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--ink) / .62); }
.tool .ch-poster-box { display: flex; flex-direction: column; gap: 10px; }
.tool .ch-poster-row { display: flex; flex-direction: column; gap: 12px; }
.tool .ch-poster { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow), 0 0 0 1px rgb(var(--ink) / .08); }
.tool .ch-poster-side { display: flex; flex-direction: column; gap: 10px; }
.tool .ch-poster-go { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool .ch-poster-go .u24-ib { justify-content: center; }
@media (min-width: 600px) { .tool .ch-poster-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; } }

/* Game */
.tool .ch-game-opts { display: flex; flex-direction: column; gap: 8px; }
.tool .ch-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 20px; background: var(--surface); }
.tool .ch-score span { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tool .ch-name { width: 100%; max-width: 110px; min-height: 28px !important; padding: 2px 4px !important; text-align: center; border-radius: 0 !important; background: transparent !important; box-shadow: inset 0 -1px 0 rgb(var(--ink) / .25) !important; font-size: 14px !important; font-weight: 800 !important; color: rgb(var(--ink) / .8) !important; }
.tool .ch-name:focus-visible { box-shadow: inset 0 0 0 2px rgb(var(--accent)) !important; }
.tool .ch-score small { font-size: 13px; line-height: 18px; font-weight: 750; color: rgb(var(--ink) / .62); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .ch-score b { font-size: 32px; line-height: 38px; font-weight: 950; font-variant-numeric: tabular-nums; color: rgb(var(--ink)); }
.tool .ch-score em { font-style: normal; font-size: 13px; font-weight: 850; color: var(--link); }
.tool .ch-game-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool .ch-game-acts .btn { width: 100%; min-height: 56px; padding-left: 8px; padding-right: 8px; }
.tool .ch-game-acts .u24-ib { grid-column: 1 / -1; justify-self: center; }

/* Print */
.u24-sheet .ch-print-img { display: block; width: 100%; max-height: 96vh; object-fit: contain; }

@media (prefers-reduced-motion: reduce) { .tool .ch-card.is-new { animation: none; } .tool .ch-day { transition: none; } }
@media (prefers-color-scheme: dark) {
  .tool .ch-card, .tool .tool-stat, .tool .ch-day:not(.is-done), .tool .ch-detail, .tool .ch-remind, .tool .ch-score { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .14); }
  .tool .ch-day.is-next { box-shadow: inset 0 0 0 2px rgb(var(--accent)); }
    .tool .ch-tracks button { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgb(var(--ink) / .14); }
  .tool .ch-tracks button[aria-pressed="true"] { background: #7A2FD0; color: #fff; box-shadow: none; }
  .tool .ch-day.is-done { background: #7A2FD0; }
  .tool .ch-sub-acts .u24-ib { background: rgb(var(--ink) / .08); }
}
