/* The phone page, in goud.games's own colours. A round's theme (phone/themes/<id>.css) changes the
   variables below under body[data-theme=<id>] and may dress any of these classes further. */
:root, body[data-theme="house"] {
  --bg: #0b1116;
  --bg2: #17222c;
  --card: rgba(219, 232, 240, .05);
  --line: rgba(219, 232, 240, .14);
  --ink: #dbe8f0;
  --dim: rgba(219, 232, 240, .6);
  --accent: #c9922f;
  --accent-soft: rgba(201, 146, 47, .2);
  --accent-ink: #0b1116;
  --hi: #f5ddd5;
  --right: #3fb87f;
  --wrong: #e0675a;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); color: var(--ink); line-height: 1.55;
  background: radial-gradient(ellipse at 50% -10%, var(--bg2) 0%, var(--bg) 65%) fixed var(--bg);
  transition: background-color .4s;
}
[hidden] { display: none !important; }
bdi { unicode-bidi: isolate; }
button, input, select { font: inherit; color: inherit; }

.p-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 640px; margin: 0 auto; }
.p-logo { height: 26px; }
.p-me { margin-inline-start: auto; background: none; border: 0; color: var(--dim); font-size: 15px; cursor: pointer; padding: 4px 0; }
.p-me[hidden] + .p-flame[hidden] + .p-score[hidden] + .p-line { margin-inline-start: auto; }
.p-flame { font-size: 14px; font-weight: 700; color: #ffb23f; }
.p-score { font-weight: 900; font-size: 16px; color: var(--hi); }
.p-line { width: 10px; height: 10px; border-radius: 50%; background: var(--right); flex: 0 0 auto; }
.p-line.off { background: var(--wrong); }

main { max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 20px; margin-top: 10px; }

/* the door */
.p-door { display: flex; flex-direction: column; align-items: stretch; text-align: center; gap: 4px; }
.p-door-logo { height: 90px; align-self: center; margin-bottom: 6px; }
.p-door h1 { font-size: 28px; font-weight: 900; color: var(--hi); margin: 4px 0; }
.p-door-line { color: var(--dim); margin: 0 0 16px; font-size: 15px; }
.p-door label { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 6px; text-align: start; }
.p-door > label { text-align: center; }
.p-door input, .p-door select {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: rgba(255, 255, 255, .06); font-size: 18px;
}
.p-door input { text-align: center; font-size: 20px; margin-top: 6px; }
.p-door select option { color: #000; }
.p-door input:focus, .p-door select:focus { outline: none; border-color: var(--accent); }
.p-hint { font-size: 13px; color: var(--dim); margin: 6px 0 12px; }
.p-hint.bad { color: var(--wrong); }
.p-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.p-go { padding: 14px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 20px; font-weight: 900; cursor: pointer; }
.p-go:active { transform: scale(.98); }

/* waiting, a round's card */
.p-wait, .p-lead { text-align: center; }
.p-title { font-size: 30px; font-weight: 900; color: var(--hi); }
.p-big { font-size: 24px; font-weight: 900; color: var(--hi); text-align: center; }
.p-note { color: var(--dim); text-align: center; margin: 12px 0 0; min-height: 1.5em; }
.p-note.good { color: var(--right); font-weight: 900; font-size: 20px; }
.p-note.bad { color: var(--wrong); font-weight: 700; }
.p-count { font-size: 34px; font-weight: 900; color: var(--accent); }
.p-count.small { font-size: 22px; margin-top: 10px; }
.p-rounds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.p-round { padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.p-round b { color: var(--accent); margin-inline-end: 6px; }
.p-kicker { color: var(--accent); font-weight: 900; }
.p-category { font-size: 40px; font-weight: 900; color: var(--hi); line-height: 1.2; margin: 6px 0; }
.p-double {
  margin-top: 16px; width: 100%; padding: 16px; border-radius: 16px; border: 2px solid var(--accent);
  background: var(--accent-soft); font-size: 22px; font-weight: 900; cursor: pointer;
}
.p-double.done { background: var(--accent); color: var(--accent-ink); }
.p-rule { font-size: 13px; color: var(--dim); margin: 8px 0 0; }

/* a question */
.p-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.p-cat { padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.p-dbl { padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 900; }
.p-clock { margin-inline-start: auto; font-size: 24px; font-weight: 900; color: var(--ink); min-width: 2ch; text-align: end; }
.p-time { height: 6px; border-radius: 3px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.p-time span { display: block; height: 100%; background: var(--accent); transform-origin: var(--start, right); }
html[dir=ltr] .p-time span { transform-origin: left; }
.p-time.urgent span { background: #ff8a5c; }
.p-picture { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius); margin-top: 12px; }
.p-question { font-size: 23px; font-weight: 900; text-align: center; margin: 14px 0 16px; line-height: 1.45; }
.p-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.p-opt {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 10px 14px; border-radius: var(--radius); border: 2px solid var(--line); background: rgba(255, 255, 255, .05);
  font-size: 19px; font-weight: 700; text-align: start; cursor: pointer;
}
.p-opt:disabled { cursor: default; }
.p-mark {
  position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 15px;
}
.p-text { position: relative; }
.p-share { position: relative; margin-inline-start: auto; font-size: 14px; color: var(--dim); }
.p-fill { position: absolute; inset: 0; background: rgba(255, 255, 255, .08); transform-origin: right; transform: scaleX(0); transition: transform .6s ease; }
html[dir=ltr] .p-fill { transform-origin: left; }
.p-opt.closed { opacity: .55; }
.p-opt.mine { border-color: var(--accent); background: var(--accent-soft); }
.p-opt.right { border-color: var(--right); background: rgba(63, 184, 127, .28); }
.p-opt.right .p-mark { background: var(--right); color: #fff; }
.p-opt.wrong { border-color: var(--wrong); background: rgba(224, 103, 90, .22); }
.p-opt.faded { opacity: .4; }
.p-opt:not(:disabled):active { transform: scale(.98); }

/* the table */
.p-after { margin-top: 12px; }
.p-you { text-align: center; font-size: 17px; margin: 6px 0 10px; }
.p-you.big { font-size: 20px; font-weight: 900; color: var(--hi); }
.p-board h2 { font-size: 16px; color: var(--accent); margin: 18px 0 6px; text-align: center; }
.p-table { list-style: none; padding: 0; margin: 0; }
.p-table li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; }
.p-table li:nth-child(odd) { background: rgba(255, 255, 255, .04); }
.p-table li.self { outline: 2px solid var(--accent); }
.p-place { color: var(--accent); font-weight: 900; min-width: 1.6em; }
.p-who { flex: 1; display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; white-space: nowrap; }
.p-who small { font-size: 12px; color: var(--dim); }
.p-hot { font-size: 13px; color: #ffb23f; font-weight: 700; }
.p-pts { font-weight: 700; }
.p-nations { display: flex; flex-direction: column; gap: 6px; }
.p-nation { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.p-masters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.p-master { display: flex; flex-direction: column; padding: 6px 14px; border-radius: 14px; border: 1px solid var(--accent-soft); }
.p-master small { color: var(--accent); font-weight: 700; font-size: 12px; }

/* the Goud door: optional, under the name */
.p-signin { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; text-align: center; }
.p-signin.done { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.p-signin-title { font-weight: 900; color: var(--hi); font-size: 17px; }
.p-signin-note { color: var(--dim); font-size: 14px; margin: 0; }
.p-signin-form { display: flex; flex-direction: column; gap: 8px; text-align: start; }
.p-signin-form label { font-weight: 700; font-size: 14px; }
.p-signin input {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: rgba(255, 255, 255, .06); font-size: 18px; text-align: center;
}
.p-signin input:focus { outline: none; border-color: var(--accent); }
.p-signed { margin: 0; color: var(--dim); }
.p-signed b { color: var(--hi); }
.p-vouches { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.p-google { display: flex; justify-content: center; min-height: 44px; }
.p-ghost {
  padding: 12px 14px; border-radius: 14px; border: 2px solid var(--accent); background: var(--accent-soft);
  font-size: 16px; font-weight: 900; cursor: pointer;
}
.p-ghost:disabled, .p-go:disabled { opacity: .5; cursor: default; }
.p-apple { padding: 12px 14px; border-radius: 999px; border: 0; background: #fff; color: #000; font-size: 16px; font-weight: 700; cursor: pointer; }
.p-link { background: none; border: 0; color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }
.p-go.small { font-size: 17px; padding: 12px; }

/* farr after a round */
.p-farr { margin: 10px 0 4px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent); text-align: center; }
.p-farr-gain { font-size: 22px; font-weight: 900; color: var(--hi); }
.p-farr-rank { font-size: 17px; font-weight: 700; margin-top: 2px; }
.p-farr-total { font-size: 13px; color: var(--dim); margin-top: 2px; }
.p-farr.guest { background: none; border-style: dashed; display: flex; flex-direction: column; gap: 8px; }
.p-farr.guest p { margin: 0; color: var(--dim); font-size: 14px; }
