/* PATH 714 — phone controller */
body { overflow: hidden; background: radial-gradient(ellipse at 50% -10%, #16265c 0%, var(--navy) 60%); }
#phone-stage { position: fixed; inset: 0; max-width: 560px; margin: 0 auto; }
.pview { position: absolute; inset: 0; overflow-y: auto; padding: 22px 18px 30px; display: none; flex-direction: column; }
.pview.active { display: flex; }
.hidden { display: none !important; }
.piece-mini { position: relative; flex: none; width: 46px; height: 46px; }
.piece-mini img.ped { position: absolute; left: 8%; bottom: 0; width: 84%; }
.piece-mini img.tok { position: absolute; left: 14%; bottom: 26%; width: 72%; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.piece-mini.big { width: 92px; height: 92px; }

/* join */
#view-join { align-items: center; justify-content: center; }
.join-logo { width: min(250px, 62vw); filter: drop-shadow(0 12px 30px rgba(0,0,0,.6)); }
.join-tag { font-style: italic; font-size: 20px; margin: 4px 0 22px; color: var(--ivory); }
.join-card { width: 100%; max-width: 400px; padding: 24px 22px; display: flex; flex-direction: column; gap: 8px; }
.join-card label { font-family: Cinzel, serif; font-size: 12.5px; letter-spacing: .22em; color: var(--gold-bright); margin-top: 10px; }
.join-card input {
  background: rgba(4, 8, 22, .65); border: 1px solid rgba(212,175,55,.45); border-radius: 10px;
  color: var(--ivory); font-family: "Cormorant Garamond", serif; font-size: 23px; font-weight: 600;
  padding: 13px 16px; outline: none; width: 100%;
}
.join-card input:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 1px var(--gold); }
#in-code { text-transform: uppercase; letter-spacing: .42em; font-family: Cinzel, serif; font-size: 26px; text-align: center; }
#btn-join { padding: 16px; font-size: 17px; margin-top: 16px; }
.error { color: #ff9d8f; font-size: 17px; min-height: 20px; text-align: center; font-style: italic; }

/* pick */
.pick-title { text-align: center; font-size: 27px; font-weight: 900; letter-spacing: .05em; }
.pick-sub { text-align: center; font-style: italic; font-size: 19px; color: var(--ivory-dim); margin: 12px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid button { background: rgba(18,32,77,.5); border: 1px solid rgba(212,175,55,.3); border-radius: 12px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all .15s ease; }
.grid button img { width: 76%; aspect-ratio: 1; object-fit: contain; }
.grid button span { font-size: 12.5px; color: var(--ivory); font-family: Cinzel, serif; letter-spacing: .02em; text-align: center; line-height: 1.15; }
.grid button.sel { border-color: var(--gold-bright); background: rgba(212,175,55,.22); box-shadow: 0 0 0 1px var(--gold), 0 6px 18px rgba(0,0,0,.45); }
.grid button.taken { opacity: .28; pointer-events: none; filter: grayscale(.7); }
.grid-ped button img { width: 82%; }
#pick-preview { margin-top: 18px; padding: 14px; display: flex; align-items: center; gap: 16px; }
#pick-status { font-size: 20px; font-style: italic; line-height: 1.35; }

/* play */
#me-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(212,175,55,.4); border-radius: 14px; background: linear-gradient(165deg, rgba(16,28,66,.9), rgba(8,16,38,.92)); }
#me-name { font-size: 23px; font-weight: 700; line-height: 1.05; }
#me-sub { font-size: 15.5px; color: var(--ivory-dim); font-style: italic; }
#me-points { margin-left: auto; font-family: Cinzel, serif; font-weight: 900; font-size: 24px; color: var(--gold-bright); }
#me-seals { display: flex; gap: 6px; margin-top: 10px; }
#me-seals .gem { flex: 1; text-align: center; }
#me-seals .gem-dot { height: 26px; border-radius: 8px; border: 1px solid; display: flex; align-items: center; justify-content: center; font-family: Cinzel, serif; font-size: 11.5px; font-weight: 700; background: rgba(0,0,0,.35); }
#me-seals .gem.sealed .gem-dot { background: linear-gradient(180deg, #f3d27a, #b8912a); color: #241a02 !important; box-shadow: 0 0 12px rgba(243,210,122,.7); }
#me-seals .pips { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
#me-seals .pip { width: 6px; height: 6px; border-radius: 50%; background: rgba(246,239,221,.18); }
#me-seals .pip.on { background: var(--gold-bright); }
#play-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 18px 2px; }
.big-msg { font-size: 27px; font-weight: 600; line-height: 1.3; }
.big-msg b { color: var(--gold-bright); }
.sub-msg { font-size: 19px; font-style: italic; color: var(--ivory-dim); line-height: 1.4; }
#btn-roll { width: 210px; height: 210px; border-radius: 50%; font-size: 30px; letter-spacing: .1em; animation: glowPulse 2.4s ease-in-out infinite; margin: 10px 0; }
.dice-show { font-family: Cinzel, serif; font-size: 84px; font-weight: 900; }
.cat-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.cat-btn { display: flex; align-items: center; gap: 13px; padding: 15px 17px; border-radius: 12px; background: rgba(18,32,77,.55); border: 1px solid; color: var(--ivory); font-size: 21px; font-weight: 600; text-align: left; }
.cat-btn .cdot { width: 17px; height: 17px; border-radius: 50%; flex: none; box-shadow: 0 0 10px rgba(0,0,0,.4) inset; }
.q-prompt { font-size: 25px; font-weight: 600; line-height: 1.32; }
.q-cat { font-family: Cinzel, serif; letter-spacing: .2em; font-size: 13.5px; text-transform: uppercase; }
.opt-list { display: flex; flex-direction: column; gap: 11px; width: 100%; }
.opt-btn { display: flex; align-items: center; gap: 13px; text-align: left; background: linear-gradient(170deg, rgba(246,239,221,.97), rgba(226,213,175,.97)); color: #221a08; border: none; border-radius: 12px; padding: 16px; font-size: 21px; font-weight: 600; line-height: 1.25; font-family: "Cormorant Garamond", serif; }
.opt-btn .letter { flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, #f3d27a, #b8912a); border: 1px solid #8a6a14; display: flex; align-items: center; justify-content: center; font-family: Cinzel, serif; font-weight: 900; font-size: 18px; color: #2c1f04; }
.opt-btn.picked { box-shadow: 0 0 0 3px var(--gold-bright); }
.opt-btn.correct { background: linear-gradient(170deg, #ffe9a3, #d4af37); box-shadow: 0 0 0 2px #fbe9a8, 0 0 26px rgba(243,210,122,.8); }
.opt-btn.wrong { background: linear-gradient(170deg, #b0574f, #7e2f28); color: #ffe9e2; }
.opt-btn.dim { opacity: .45; }
.timer-track { width: 100%; height: 7px; border-radius: 4px; background: rgba(246,239,221,.14); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #b8912a, #f3d27a); }
.result-banner { font-family: Cinzel, serif; font-weight: 900; font-size: 31px; letter-spacing: .05em; }
.result-banner.good { color: var(--gold-bright); text-shadow: 0 0 24px rgba(243,210,122,.5); }
.result-banner.bad { color: #ff9d8f; }
.explain { font-size: 20px; font-style: italic; line-height: 1.45; }
.explain .ref { display: block; font-family: Cinzel, serif; font-style: normal; letter-spacing: .22em; font-size: 14px; color: var(--gold-bright); text-transform: uppercase; margin-bottom: 6px; }
.standings { width: 100%; }
.standings .vs-row { display: flex; justify-content: space-between; font-size: 20px; padding: 6px 2px; border-bottom: 1px solid rgba(212,175,55,.16); }
.standings .vs-row b { color: var(--gold-bright); font-family: Cinzel, serif; font-size: 17px; }
