/* Today (js/today.js, Gage 10-28): the daily loop on Home, its sheet, the welcome back and the finish card's goals.
   Field-journal look: gunmetal panels, inked frames, brass for progress. Nothing here moves under reduced motion. */
.today-panel { display: grid; gap: 5px; margin: 2px 0 8px; padding: 6px 7px 7px; color: var(--fg);
  background: linear-gradient(180deg, #1b1915, #121110); border: 1px solid #3a3229; border-left: 3px solid #d9a441; box-shadow: 0 3px #070807; }
.td-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; }
.td-title { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 4px 0 2px; color: #f2e6cf; background: none; border: 0; }
.td-tt { display: grid; justify-items: start; gap: 3px; line-height: 1; }
.td-tt > b { font: 400 21px var(--display); letter-spacing: .08em; text-transform: uppercase; text-shadow: 1px 2px #070907; }
.td-title .wi { width: 18px; height: 18px; flex: none; }
.td-more { width: 7px; height: 7px; margin-left: 1px; border-right: 2px solid #b59a73; border-bottom: 2px solid #b59a73; transform: rotate(-45deg); }
.td-streak { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 3px 6px 3px 8px; text-align: left; color: var(--fg);
  background: #0e0d0c; border: 1px solid #3a3229; }
.td-streak.ready { border-color: #f2b705aa; background: linear-gradient(100deg, #f2b70526, #0e0d0c 70%); }
.td-streak:active, .td-row:active, .td-chip:active, .td-title:active, .ft-next.go:active { transform: translateY(1px); }
.td-pips { display: flex; gap: 2px; align-items: flex-end; }
.td-pips i { width: 6px; height: 12px; background: #2a2622; box-shadow: inset 0 0 0 1px #4a4035; }
.td-pips i.got { background: #d9a441; box-shadow: inset 0 0 0 1px #000; }
.td-pips i.next { box-shadow: inset 0 0 0 2px #f2b705; }
.td-pips i.big { width: 9px; height: 16px; }
.td-st { display: grid; min-width: 0; line-height: 1.08; }
/* a 320px phone has no room for the streak pips beside the day and the reward, which were cut to "DAY ..." and "100 c..." */
@media (max-width: 360px) { .td-streak { grid-template-columns: minmax(0, 1fr) auto; } .td-streak .td-pips { display: none; } }
.td-st b { font: 400 15px var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-st small { font-size: 12px; color: #d8c9ac; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-claim { padding: 3px 8px 2px; font: 400 15px var(--display); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #1a1305; background: #f2b705; box-shadow: 0 2px #6b4f00; }

.td-list { display: grid; gap: 4px; }
/* a goal: icon, name, progress, reward on one line; the brass line along the bottom is its progress (--p) */
.td-row { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; width: 100%; min-height: 44px; padding: 3px 8px 4px; text-align: left; color: var(--fg);
  background: #161513; border: 1px solid #2e2a25; border-left: 3px solid #4a4035; overflow: hidden; }
.td-row.moded { border-left-color: var(--mc); }
.td-row::after { content: ''; position: absolute; left: 0; bottom: 0; width: var(--p, 0%); height: 3px; background: linear-gradient(90deg, #8c6a1f, #f2b705); pointer-events: none; }
.td-row.done { opacity: .6; } .td-row.done::after { background: #6f9b3a; }
.td-ic { display: grid; place-items: center; }
.td-ic .wi { width: 20px; height: 20px; }
.td-txt { min-width: 0; font-weight: 600; font-size: 13px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; } /* a long name wraps, never cut */
.td-n { font: 400 15px var(--display); letter-spacing: .04em; text-align: right; color: #eadcc3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-rw { display: inline-flex; align-items: center; gap: 2px; min-width: 44px; justify-content: flex-end; font: 400 15px var(--display); color: #f2c14e; white-space: nowrap; }
.td-rw .wi { width: 14px; height: 14px; }
.td-rw b { font-weight: 400; }

.td-foot { display: flex; align-items: center; gap: 5px; }
.td-foot .td-chip { flex: 1 0 auto; justify-content: center; }
.td-chip { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 44px; padding: 2px 8px; color: var(--fg); background: #0e0d0c; border: 1px dashed #4a4035;
  font: 400 14px var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.td-chip b { margin-left: 3px; font-weight: 400; color: #f2c14e; }
.td-chip .wi, .td-chip .pass-mark { width: 16px; height: 16px; flex: none; }
.td-chip .pass-mark svg { width: 100%; height: 100%; }
/* "New day in 12 h" under the title: it sat at the end of the foot, where the Friends chip (11-04) squeezed it to a sliver */
.td-reset { font-size: 11.5px; line-height: 1.1; letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap; }
.td-reset b { font-weight: 600; color: #cfc3ad; }

/* tap to go: PLAY flashes once so the next step is obvious (never under reduced motion; js/today.js checks Kit.calm) */
.play-stack .play.td-cue { animation: td-cue 1.4s ease-out; }
@keyframes td-cue { 0%, 100% { box-shadow: none; } 20%, 60% { box-shadow: 0 0 0 3px #f2b705, 0 0 18px #f2b705aa; } }

/* landscape phones and wider: the three orders side by side */
@media (min-width: 560px) {
  .today-panel .td-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today-panel .td-row { grid-template-columns: 18px minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 1px; padding-top: 4px; }
  .today-panel .td-row .td-ic { grid-row: 1 / 3; }
  .today-panel .td-row .td-txt { grid-column: 2 / 4; grid-row: 1; }
  .today-panel .td-row .td-n { grid-column: 2; grid-row: 2; text-align: left; font-size: 14px; }
  .today-panel .td-row .td-rw { grid-column: 3; grid-row: 2; font-size: 14px; }
  .td-head { grid-template-columns: auto minmax(0, 330px); justify-content: space-between; }
}

/* the full sheet (Today.sheet, the Orders tile) */
.today-sheet { display: grid; gap: 10px; }
.ts-sec { display: grid; gap: 6px; }
.ts-sec h3 { display: flex; align-items: center; gap: 6px; margin: 0; font: 400 17px var(--display); letter-spacing: .07em; text-transform: uppercase; color: #f2e6cf; }
.ts-sec h3 .wi, .ts-sec h3 .pass-mark { width: 18px; height: 18px; flex: none; }
.ts-sec h3 small { margin-left: auto; font: 400 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); text-align: right; }
.ts-sec .note { margin: 0; }
.ts-sec .btn.small { justify-self: start; }
.ts-how { margin: 0; font-size: 12px; }

/* welcome back (UI.dailyPopup) */
.welcome-back .wb-gift { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 4px; }
.welcome-back .wb-gift .art { width: 46px; height: 46px; }
.welcome-back .wb-gift b { font: 400 30px var(--display); color: #f2c14e; }
.welcome-back .wb-gift small { margin-right: 10px; font: 400 14px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wb-news { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.wb-news li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 7px; align-items: start; font-size: 13px; line-height: 1.3; color: #e6dccb; }
.wb-news .wi { width: 16px; height: 16px; margin-top: 1px; }

/* the finish card (Today.finishHTML): what this match moved, the counts and the closest goal */
.fin-today { display: grid; gap: 5px; padding: 5px 8px 6px; background: #11100e; border: 1px solid #3a3229; border-left: 3px solid #d9a441; }
.ft-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font: 400 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ft-row .wi { width: 15px; height: 15px; margin-right: -6px; }
.ft-row b { font-weight: 400; color: #f2c14e; }
.ft-row .ft-title { color: #f2e6cf; }
.ft-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 5px; }
.ft-goal { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 5px; min-width: 0; padding: 3px 6px; font-size: 12px; background: #1a1916; border: 1px solid #2e2a25; }
.ft-goal span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-goal em { font: 400 13px var(--display); font-style: normal; color: #f2c14e; white-space: nowrap; }
.ft-goal .wi { width: 14px; height: 14px; }
.ft-goal.done { border-color: #6f9b3a88; } .ft-goal.done em { color: #9bd34a; }
.ft-bar { position: relative; display: block; width: 26px; height: 6px; overflow: hidden; background: #060706; box-shadow: 0 0 0 1px #000; }
.ft-bar b, .ft-bar u { position: absolute; inset: 0 auto 0 0; }
.ft-bar b { background: #f2b705; } .ft-bar u { z-index: 1; background: #8c6a1f; } /* the bright part is this match's progress */
.ft-next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; min-height: 28px; padding: 3px 8px; font-size: 12.5px; text-align: left; color: var(--fg);
  background: #0e0d0c; border: 1px dashed #4a4035; }
.ft-next span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-next small { font: 400 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #f2c14e; white-space: nowrap; }
.ft-next.go { border-style: solid; border-color: #f2b70566; }
.ft-next .wi { width: 16px; height: 16px; }
/* Play again is the obvious next step: wider than Home */
.finish .fin-actions .actions #r-home { flex: 1 1 0; }
.finish .fin-actions .actions #r-again { flex: 1.7 1 0; }
@media (prefers-reduced-motion: reduce) { .play-stack .play.td-cue { animation: none !important; } .td-streak:active, .td-row:active, .td-chip:active, .ft-next.go:active { transform: none; } }
