/* Play against Inspector Dice. The page uses the review page's look (body.rv in style.css);
   this file only adds what the play page has of its own. Loaded last. */

/* ---------- layout: only the table while playing; the result panel joins on the right at the end */
body.pl main { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 10px 16px; }
body.pl main .table { width: 980px; min-width: 980px; }
@media (min-width: 1251px) { body.pl.ended main { grid-template-columns: minmax(0, 1fr) 430px; justify-items: stretch; } }
body.pl .discard-box { min-width: 0; }
body.pl > footer { display: none; }
body.pl.side-closed > main { padding-left: 52px; }
body.pl a.game-item { text-decoration: none; }
body.pl button.side-play { width: 100%; border: 0; cursor: pointer; }

/* ---------- status line on top of the table */
body.pl .status { min-height: 22px; }
body.pl .status .you-go { color: var(--accent-text, #1DC878); font-weight: 800; }
body.pl .status .bot-said { color: #FFB978; font-weight: 700; }
body.pl .status .dots::after { content: ""; display: inline-block; width: 16px; text-align: left; animation: pl-dots 1.2s steps(4) infinite; }
@keyframes pl-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- things you can click on the table */
.pickable { cursor: pointer; }
.card.pickable { box-shadow: 0 0 0 2px #1DC87888, 0 2px 6px #000c; }
.card.pickable:hover, .wonder.pickable:hover, .token.pickable:hover, .strip.pickable:hover { box-shadow: 0 0 0 3px var(--accent-text, #1DC878), 0 6px 16px #000c; transform: translateY(-3px); transition: transform .12s; z-index: 40 !important; }
.card.sel { box-shadow: 0 0 0 4px #fff, 0 8px 20px #000c !important; transform: translateY(-4px); z-index: 45 !important; }
.strip.pickable, .dcard.pickable, .token.pickable, .wonder.for-card { box-shadow: 0 0 0 2px var(--accent-text, #1DC878), 0 0 10px #1DC87888; }
.wonder.for-card { animation: pl-glow 1.1s ease-in-out infinite alternate; }
@keyframes pl-glow { from { box-shadow: 0 0 0 2px #1DC878, 0 0 4px #1DC87866; } to { box-shadow: 0 0 0 3px #1DC878, 0 0 16px #1DC878cc; } }
.bot-took { animation: bot-took 2.6s ease-out 1; position: relative; z-index: 45; }
@keyframes bot-took { 0%, 60% { box-shadow: 0 0 0 4px #FFA459, 0 0 18px #FFA459aa; } 100% { box-shadow: 0 0 0 0 #FFA45900; } }

/* ---------- the menu beside a clicked card */
.card-menu { position: fixed; z-index: 700; width: 232px; display: grid; gap: 8px; padding: 12px 12px 16px; border-radius: 16px; background: #fff; color: #1C1B19;
  box-shadow: 0 6px 0 #BEBAB4, 0 14px 34px #000a; animation: pl-pop .14s ease-out; }
@keyframes pl-pop { from { transform: scale(.94); opacity: 0; } }
.cm-title { font-size: 16px; font-weight: 800; padding: 0 2px 2px; }
.cm-group { margin-top: 2px; padding: 0 2px; color: #6F6B65; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cm-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: #3D3B38; color: #F4F3F1; box-shadow: 0 4px 0 #161513; font: inherit; font-size: 14px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; text-align: left; }
.cm-item:hover { background: #4A4845; border: 0; }
.cm-item:active { transform: translateY(4px); box-shadow: 0 0 0 #161513; }
.cm-item.go { background: #17B26A; color: #0B2417; box-shadow: 0 4px 0 #0E7C49; }
.cm-item.go:hover { background: #1DC878; }
.cm-item.go:active { box-shadow: 0 0 0 #0E7C49; }
.cm-detail { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; opacity: .85; white-space: nowrap; }
.cm-item.off, .cm-item:disabled { background: #ECEAE6; color: #9C9893; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- "who starts" question, over the middle of the table */
body.pl .pyramid-wrap { position: relative; }
.ask { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 60; display: grid; gap: 14px; padding: 18px 20px 22px; border-radius: 18px;
  background: #fff; color: #1C1B19; box-shadow: 0 6px 0 #BEBAB4, 0 14px 34px #000a; text-align: center; white-space: nowrap; }
.ask-title { font-size: 18px; font-weight: 800; }
.ask-row { display: flex; gap: 12px; }
body.pl .ask .act { padding: 0 18px; }

/* ---------- start screen */
body.pl .intro .start-card { display: flex; flex-direction: column; gap: 16px; width: min(520px, 100%); padding: 0 22px 20px; }
body.pl .start-card > .rv-head { padding: 12px 0 10px; }
body.pl .start-card .coach { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
body.pl .coach .avatar { width: 88px; height: 88px; flex: none; }
.form { display: grid; gap: 12px; text-align: left; }
.form label { display: grid; gap: 5px; font-weight: 800; font-size: 13px; color: var(--text); }
.form input[type="text"], .form input:not([type]) { font: inherit; font-weight: 600; padding: 11px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--band); color: var(--text); }
.form input:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 1px; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 6px; }
.lvl { position: relative; display: grid !important; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--btn); box-shadow: 0 6px 0 var(--card-ledge); cursor: pointer; text-align: center; transition: transform .08s, box-shadow .08s; }
.lvl input { position: absolute; opacity: 0; }
.lvl b { font-size: 14px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; } .lvl span { font-weight: 600; font-size: 11.5px; color: var(--text2); }
.lvl:hover { background: var(--hover); }
.lvl:has(input:checked) { background: var(--accent); box-shadow: 0 6px 0 var(--ledge, #0E7C49); color: #0B2417; }
.lvl:has(input:checked) span { color: #0B2417; }
.lvl:has(input:focus-visible) { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text2); }
.form .check input { width: 18px; height: 18px; accent-color: var(--accent); }
body.pl .start-card .fine { color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- result panel */
body.pl .end-panel { background: var(--panel); }
body.pl .end-panel .coach { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 12px; }
body.pl .end-panel .review-btn { margin: 0; }
body.pl .end-panel .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 8px; }
body.pl .progress-text { color: var(--muted); font-size: 12.5px; text-align: center; min-height: 16px; }
.score-table { width: 100%; border-collapse: collapse; }
.score-table th { padding: 6px 8px; font-size: 12px; font-weight: 800; color: var(--text2); text-align: right; }
.score-table td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.score-table th:first-child, .score-table td:first-child { text-align: left; color: var(--text2); }
.score-table tr.total td { font-weight: 800; color: var(--text); font-size: 16px; }
.res-wc svg { width: 100%; height: 90px; background: var(--band); border-radius: 10px; }
@media (max-width: 1250px) { body.pl main .table { min-width: 0; } }

/* start card: fits a short window */
body.pl .start-card > .rv-head { align-self: stretch; justify-content: center; }
body.pl .intro .start-card { gap: 13px; padding-bottom: 16px; }
body.pl .start-card .coach { margin-top: 10px; }
body.pl .start-card .bubble .say { margin-top: 4px; font-size: 15px; }
body.pl .start-card .review-btn { min-height: 58px; }
body.pl .form { gap: 10px; }
body.pl .form input:not([type]) { padding: 9px 12px; }
/* the opponent's and your built cards get a little more height than the minimum */
body.pl .city { --city-h: 132px; }
