* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #fdf3e3; color: #27323d;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Noto Color Emoji";
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }

#hud { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 560px); z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  padding: calc(env(safe-area-inset-top) + 6px) 10px 10px; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-left { font-size: 14px; font-weight: 700; line-height: 1.2; }
#pips { display: flex; gap: 5px; margin-top: 4px; }
#pips span { width: 14px; height: 18px; border: 2px solid #8aa9b8; border-top: 0; border-radius: 0 0 4px 4px; }
#pips span.done { background: linear-gradient(transparent 40%, #4aa3e0 40%); }
#pips span.now { border-color: #e8673c; }
.hud-mid { text-align: center; }
#count { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#count small { font-size: 15px; opacity: .55; }
#parLabel { font-size: 12px; opacity: .65; margin-top: -2px; }
.hud-right { display: flex; justify-content: flex-end; gap: 4px; }
.hud-right button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.7);
  font-size: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hud-right button:disabled { opacity: .35; cursor: default; }
#patience { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(39,50,61,.1); overflow: hidden; }
#patience i { display: block; height: 100%; width: 100%; background: #4aa3e0; transform-origin: left; transition: background .3s; }
#patience.low i { background: #e8673c; }
#practiceTag { position: fixed; top: calc(env(safe-area-inset-top) + 92px); left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: #8aa9b8;
  padding: 3px 9px; border-radius: 9px; }

#bubble { position: fixed; z-index: 2; transform: translate(-50%, -100%); max-width: 220px; padding: 8px 12px;
  background: #fff; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15); pointer-events: none; transition: opacity .25s; }
#bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
#hint { position: fixed; bottom: calc(env(safe-area-inset-bottom) + 8px); left: 0; right: 0; text-align: center; z-index: 2;
  font-size: 13px; opacity: .6; pointer-events: none; padding: 0 12px; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 700; z-index: 5; background: #fdf3e3; }

.card { position: fixed; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 380px);
  background: #fffaf2; border-radius: 22px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px 20px 16px; text-align: center; box-shadow: 0 10px 40px rgba(60,40,20,.25); }
.card h1 { margin: 0 0 2px; font-size: 34px; letter-spacing: -.02em; }
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card p { margin: 6px 0; line-height: 1.35; }
.card .big { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.card .big small { font-size: 20px; opacity: .55; }
.card .sub { font-size: 14px; opacity: .7; }
.card .quip { font-style: italic; font-size: 16px; margin: 10px 0; }
.card .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.card .btn { min-height: 46px; padding: 0 18px; border-radius: 14px; border: 0; background: #ece3d6; font-weight: 700; font-size: 16px; }
.card .btn.go { background: #e8673c; color: #fff; }
.card .share { font-family: ui-monospace, Menlo, monospace, "Noto Color Emoji"; font-size: 13px; white-space: pre-wrap; background: #f3ebde;
  border-radius: 10px; padding: 8px; text-align: left; margin-top: 10px; }
.card .glasses { display: flex; justify-content: center; gap: 14px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.card .glasses div { font-size: 13px; }
.card .glasses b { display: block; font-size: 20px; }
.card .more { display: block; margin-top: 12px; font-size: 13px; color: #8a5a3b; }
.card .credit { font-size: 11px; opacity: .5; margin-top: 8px; }
.card .keys { font-size: 13px; opacity: .7; margin-top: 8px; }
body.touch .desk, body:not(.touch) .tch { display: none; }
@media (pointer: fine) { .hud-right button:hover { background: #fff; } .card .btn:hover { filter: brightness(1.05); } }

/* the vote and the fake door (day card) */
.card .ask { border-top: 1px solid rgba(39,50,61,.1); margin-top: 10px; padding-top: 4px; }
.card .ask .q { font-size: 13px; opacity: .8; margin: 6px 0; }
.card .ask .q a { color: #8a5a3b; }
.card .ask .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.card .ask .chips button { min-height: 44px; padding: 0 12px; border-radius: 22px; border: 1px solid rgba(39,50,61,.18); background: #fff; font-size: 13px; font-weight: 600; }
.card #door button { min-height: 44px; width: 100%; margin: 6px 0 2px; padding: 6px 12px; border-radius: 14px; border: 1px dashed rgba(232,103,60,.6); background: rgba(232,103,60,.07); color: #b04a24; font-size: 13px; font-weight: 600; }
.card .more.follow { margin-top: 4px; }
