/* Guest phone. */
.player { min-height: 100dvh; font-size: 17px; }

/* Background photo (pre-blurred file) under a dark veil, thicker while a question is on screen. */
.player::before, .player::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.player::before { background: var(--bg) url(../img/bg-phone.jpg) center / cover no-repeat; }
.player::after { background: var(--bg); opacity: .8; transition: opacity .6s ease; }
.player:has(.ph-q)::after { opacity: .88; }

.ph {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.ph-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  color: var(--muted); font-size: 13px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.ph-couple { color: var(--sage); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.ph-head .ph-couple { font-size: 11px; }
.ph-me { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ph-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding-bottom: 8vh;
}
.ph-center h1 { font-size: 27px; font-weight: 600; line-height: 1.3; margin: 8px 0; }
.ph-center p { margin: 0; color: var(--muted); line-height: 1.6; }

/* join */
.ph-join { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 6vh; }
.ph-join .ph-couple { margin: 0; font-size: 12px; }
.ph-join h1 { font-size: clamp(24px, 8vw, 31px); font-weight: 600; line-height: 1.28; margin: 10px 0 34px; overflow-wrap: anywhere; }
.ph-warn { background: var(--surface-2); border-left: 3px solid var(--c-rose); padding: 10px 14px; border-radius: 8px; margin: 0 0 18px; }
.ph-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 18px; }
.ph-form input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 8px;
  font: inherit; font-size: 18px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(21, 24, 22, .88); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.ph-form input::placeholder { color: #5f6760; }
.ph-form input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); outline: none; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.ph-btn {
  width: 100%; font-weight: 600; font-size: 18px; padding: 16px; margin-top: 8px;
  border-radius: 14px; border: 0; background: var(--sage); color: var(--on-sage); cursor: pointer;
}
.ph-btn:disabled { opacity: .55; }
.ph-err { color: var(--bad); min-height: 1.4em; margin: 10px 0 0; }
.ph-link { margin-top: 28px; background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 8px; cursor: pointer; }

.ph-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); animation: pulse 1.6s ease-in-out infinite; margin-bottom: 10px; }

/* question */
.ph-q { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.ph-meta { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 14px; }
#left { color: var(--text); font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; }
.ph-bar { height: 3px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: 100%; background: var(--sage); transition: width .2s linear; }
.ph-qtext { font-size: 20px; line-height: 1.45; margin: 8px 0 6px; font-weight: 600; }
.ph-late { color: var(--bad); margin: 0; font-weight: 600; }
.ph-choices { flex: 1; display: grid; grid-auto-rows: minmax(64px, 1fr); gap: 10px; min-height: 50vh; }
.ph-choice {
  display: flex; align-items: center; gap: 14px; text-align: left;
  font-weight: 600; font-size: 18px; line-height: 1.3; padding: 14px 18px;
  border-radius: 14px; border: 0; cursor: pointer; touch-action: manipulation;
  transition: transform .08s;
}
.ph-choice .shape { width: 24px; height: 24px; fill: currentColor; flex: none; opacity: .9; }
.ph-choice:active { transform: scale(.97); }
.ph-choice:disabled { opacity: .3; }

/* answered / result */
.ph-sent .shape.big { width: 88px; height: 88px; margin-bottom: 10px; }
.ph-chosen { font-size: 19px; color: var(--text) !important; font-weight: 600; }
.ph-result.right h1 { color: var(--good); }
.ph-result.wrong h1, .ph-result.none h1 { color: var(--bad); }
.ph-plus { font-size: 50px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--sage) !important; }
.ph-correct { color: var(--text) !important; font-size: 17px; }
.ph-correct .shape { width: 18px; height: 18px; vertical-align: -3px; }
.ph-total { font-size: 17px; color: var(--text) !important; margin-top: 20px !important; }
.ph-rank b { font-size: 1.45em; font-weight: 600; color: var(--sage); }
.ph-final.top h1 { color: var(--sage); font-size: 34px; }
.ph-thanks { margin-top: 30px !important; }

/* final: top 3 on phone */
.ph-podium { width: 100%; margin-top: 28px; }
.ph-podium-h { color: var(--sage) !important; font-size: 14px; font-weight: 600; margin: 0 0 10px !important; }
.ph-podium ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-podium li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(21, 24, 22, .86); border: 1px solid var(--line); text-align: left;
}
.ph-podium li.me { border-color: var(--sage); box-shadow: inset 0 0 0 1px var(--sage); }
.pp-rank {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 600; font-size: 15px; color: var(--bg); background: var(--silver); font-variant-numeric: tabular-nums;
}
.pp1 .pp-rank { background: var(--sage); }
.pp3 .pp-rank { background: var(--taupe); }
.pp-name { flex: 1; min-width: 0; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.pp1 .pp-name { color: var(--sage); }
.pp-name small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.pp-score { flex: none; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
