/* Daily Wind Run — an additive letterpress layer for Paper Sled.
   Keep the valley visible; score, chain and clock share one quiet HUD row. */
:root {
  --daily-ink: #795119;
  --daily-wax: #b77928;
  --daily-wax-light: #dca44b;
  --daily-wax-deep: #8f5c20;
  --daily-line: #d8c29a;
}

.daily-run {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 65px;
  margin-top: 16px;
  padding: 10px 15px 10px 12px;
  border: 1px solid var(--daily-line);
  border-radius: 10px;
  background: linear-gradient(115deg, var(--paper), #fbefd5);
  box-shadow: 0 2px 0 #e3d6b8, inset 0 0 0 3px #fffaf066;
  text-align: left;
  transition: border-color .16s, background .16s, transform .16s;
}

.daily-run:hover {
  border-color: #b58b4a;
  background: linear-gradient(115deg, var(--paper), #f8e8c5);
  transform: translateY(-1px);
}

.daily-run:active {
  transform: translateY(1px);
}

.daily-seal {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 47% 53% 49% 51% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 34% 28%, var(--daily-wax-light), var(--daily-wax) 61%, var(--daily-wax-deep));
  box-shadow: inset 0 0 0 3px #8e5b2333, inset 0 -2px 3px #70440d40, 0 2px 2px #81592524;
  color: #fff1ca;
  font: 25px/1 var(--serif);
  text-shadow: 0 1px 0 #79511966;
}

.daily-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.daily-copy b {
  color: var(--ink);
  font: 700 16px/1.1 var(--serif);
}

.daily-copy small {
  color: #7c6b4e;
  font-size: 10.5px;
  line-height: 1.35;
}

.daily-arrow {
  flex: none;
  color: var(--daily-ink);
  font: 24px/1 var(--serif);
}

.score-strip {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 29px;
  margin: 8px 0 0 56px;
  padding-top: 7px;
  border-top: 1px solid #d8c9a873;
  color: var(--ink);
}

.score-points,
.chain-pill,
.daily-clock {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  min-height: 22px;
  white-space: nowrap;
}

.score-points > span,
.chain-pill > span,
.daily-clock > span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
}

.score-points > span {
  color: #69705b;
}

.score-points > b,
.daily-clock > b {
  font: 700 16px/1 Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
}

.score-points > b {
  min-width: 3ch;
}

.chain-pill {
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #c7d2bc;
  border-radius: 5px;
  background: #edf1e2;
  color: var(--green-deep);
  transition: background .2s, border-color .2s, color .2s;
}

.chain-pill > b {
  font: 700 15px/1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.chain-pill > span {
  font-size: 7px;
  letter-spacing: .65px;
}

.chain-pill.is-hot {
  border-color: #d8b974;
  background: #f7e6ba;
  color: #795119;
  animation: chain-warm .32s ease-out;
}

.score-strip.is-record .score-points > b {
  color: var(--daily-ink);
  text-shadow: 0 1px 0 #fffdf6;
}

.score-strip.is-record .score-points > span {
  color: var(--daily-ink);
}

.daily-clock {
  gap: 6px;
  margin-left: auto;
  color: var(--daily-ink);
}

.daily-clock > b {
  min-width: 3.8ch;
}

.daily-clock.is-urgent {
  color: var(--seal-deep);
}

.daily-clock.is-urgent > b {
  padding: 3px 5px;
  margin: -3px -5px;
  border-radius: 4px;
  background: #f6dfd2;
}

.score-target {
  flex: 1;
  min-width: 0;
  margin: 0 0 0 auto;
  overflow: hidden;
  color: #6a705b;
  font: italic 11px/1.3 var(--serif);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-clock:not([hidden]) ~ .score-target {
  flex: 0 1 auto;
  margin-left: 0;
}

.daily-result-note {
  margin: 18px 0 4px;
  padding: 13px 14px;
  border: 1px dashed #d5bd8c;
  border-radius: 7px;
  background: linear-gradient(120deg, #fcf4df, #f8ecd2);
  color: #795c2c;
  font: italic 14px/1.5 var(--serif);
  text-align: center;
}

/* The transient coach clears the expanded HUD; the playfield stays unboxed. */
.hud:has(.score-strip:not([hidden])) ~ .coach {
  top: calc(max(12px, var(--safe-t)) + 136px);
}

@keyframes chain-warm {
  40% { transform: translateY(-2px); }
}

@media (max-width: 700px) {
  .daily-run {
    order: 6;
    min-height: 62px;
    margin-top: 12px;
    padding-block: 9px;
  }

  .daily-copy b { font-size: 15px; }
  .daily-copy small { font-size: 10.5px; }
  .score-strip { margin-left: 52px; gap: 11px; }
  .score-points > b, .daily-clock > b { font-size: 15px; }
  .score-target { display: none; }

  .hud:has(.score-strip:not([hidden])) ~ .coach {
    top: calc(max(10px, var(--safe-t)) + 125px);
  }
}

@media (max-width: 390px) {
  .score-strip { margin-left: 3px; gap: 9px; }
  .score-points { gap: 5px; }
  .daily-clock > span { font-size: 7px; letter-spacing: .6px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .daily-run { min-height: 57px; margin-top: 12px; }
  .daily-seal { width: 34px; height: 34px; font-size: 22px; }
  .hud { row-gap: 3px; }
  .score-strip {
    grid-column: 2 / -1;
    grid-row: 2;
    min-height: 26px;
    margin: 0;
    padding-top: 4px;
    gap: 15px;
  }
  .score-target { display: block; }
  .hud:has(.score-strip:not([hidden])) ~ .coach {
    top: calc(max(8px, var(--safe-t)) + 97px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .daily-run, .chain-pill { transition: none; }
  .chain-pill.is-hot { animation: none; }
  .daily-run:hover, .daily-run:active { transform: none; }
}
