:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
  color: #1d1d1f;
  --blue: #0071e3;
  --surface: #f5f5f7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  text-align: center;
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: max(6px, env(safe-area-inset-top)) 16px 6px;
  border-bottom: 1px solid #e8e8ed;
}

#difficulty {
  grid-column: 3;
  justify-self: end;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  color: #0066cc;
  background: #fff;
  font: inherit;
  font-size: 15px;
}

h1 {
  grid-column: 2;
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.round {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vh, 28px);
  padding: 32px 22px;
}

main:has(#question:empty):has(#hint:empty) .round::after {
  content: "一站到底";
  font-size: clamp(52px, 11vw, 110px);
  font-weight: 750;
  letter-spacing: -.065em;
}
main:has(#question:empty):has(#hint:empty) h1 { visibility: hidden; }
p { margin: 0; overflow-wrap: anywhere; }
p:empty { display: none; }
#question { max-width: 920px; font-size: clamp(30px, 5vw, 62px); font-weight: 700; line-height: 1.17; letter-spacing: -.035em; text-wrap: balance; }
#hint { color: #525259; font-size: 17px; }
#hint[data-answer="true"] { color: #0066cc; font-size: clamp(30px, 6vw, 56px); font-weight: 700; }
.clock { display: grid; justify-items: center; gap: 8px; width: 100px; color: #525259; font-variant-numeric: tabular-nums; }
.clock::after {
  content: "";
  width: 100%;
  height: 4px;
  border-radius: 8px;
  background: linear-gradient(to right, var(--blue) var(--progress, 100%), #d9d9df 0);
}
footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 10px max(20px, env(safe-area-inset-bottom));
}
button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
}
#play { color: #fff; background: var(--blue); }
.secondary { color: #0066cc; border-color: currentColor; background: #fff; }
.secondary:disabled { color: #747479; border-color: #d9d9df; cursor: default; }
button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
