/* ==========================================================================
   Who's Picasso? — styles. Theme tokens and shared components come from
   shared/style.css.

   The drawing is always a white square as wide as the screen allows, with a
   thick frame, like a canvas on an easel. The twist of the round sits right
   above it, so nobody forgets why their cat looks like that.
   ========================================================================== */

.pc { display: grid; gap: 1rem; max-width: 30rem; margin-inline: auto; padding-block: .75rem 2rem; }
.pc-top { display: flex; align-items: center; gap: .6rem; }
.pc-top .clock { margin-inline-start: auto; }
.pc-title { font-size: clamp(1.6rem, 7vw, 2.2rem); text-align: center; }
.pc-subtitle { font-size: 1.25rem; text-align: center; }
.pc-note { font-size: 1.05rem; font-weight: 700; text-align: center; }
.pc-note:empty { display: none; }
.pc-step { font-weight: 800; text-align: center; color: var(--muted); }

/* ---------- Menu ---------- */

.pc-menu { display: grid; gap: .5rem; }
.pc-menu__art { font-size: 1.7rem; text-align: center; letter-spacing: .08em; }
.pc-tagline { font-size: 1.1rem; font-weight: 700; text-align: center; }
.pc-settings { display: grid; gap: .4rem; }

.choices { display: grid; gap: .5rem; }
.choices--row { grid-auto-flow: column; grid-auto-columns: 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: .4rem .5rem; font-weight: 800; text-align: center; background: var(--surface); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }
.choice input:checked + span { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.howto { max-width: 30rem; margin: 1.5rem auto 0; padding: .25rem 1rem; }
.howto summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.howto ol { display: grid; gap: .5rem; padding: 0 0 1rem; padding-inline-start: 1.4rem; list-style: decimal; }

.host--small .host__teta { width: 76px; }
.host--small .bubble { padding: .65rem .9rem; font-weight: 700; }

/* ---------- The twist wheel ---------- */

.pc-impostor { padding: .7rem .9rem; font-weight: 800; text-align: center; color: #fff; background: #23305e; border-radius: 14px; }
.pc-wheelcard { display: grid; justify-items: center; gap: .3rem; padding: 1.4rem 1rem 1.6rem; text-align: center; }
.pc-wheelcard__label { font-size: .85rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-wheel { font-size: 5.5rem; line-height: 1.1; }
.pc-wheelcard__name { font-size: 2rem; font-weight: 900; }
.pc-wheelcard__text { min-height: 1.5em; font-weight: 700; }
.pc-wheelcard.is-landed { background: var(--sun); color: var(--ink); animation: pc-land .45s cubic-bezier(.2, 1.6, .4, 1); }
.pc-wheelcard.is-landed .pc-wheelcard__label { color: var(--ink); opacity: .7; }
@keyframes pc-land { from { transform: scale(.9) rotate(-2deg); } }
html[lang="ar"] .pc-wheelcard__label { letter-spacing: normal; }

/* ---------- Drawing ---------- */

.pc-word { display: grid; justify-items: center; padding: .4rem 1rem .6rem; text-align: center; background: var(--sun); color: var(--ink); border: 3px solid var(--line); border-radius: 16px 18px 15px 19px; box-shadow: 0 4px 0 var(--line); }
.pc-word small { font-size: .85rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.pc-word b { font-size: clamp(1.8rem, 8vw, 2.4rem); line-height: 1.15; }
.pc-twist { padding: .5rem .8rem; font-weight: 700; text-align: center; background: var(--surface-2); border: 3px dashed var(--line); border-radius: 14px; }

.pc-art { display: block; width: 100%; aspect-ratio: 1; background: #fffdf7; border: 4px solid var(--line); border-radius: 14px 16px 13px 17px; touch-action: none; }
.pc-padbox { display: grid; gap: .6rem; }
.pc-padframe { position: relative; }
.pc-pad { cursor: crosshair; box-shadow: 0 6px 0 var(--line); }
.pc-pad.is-locked { cursor: default; }
.pc-veil { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; opacity: .15; pointer-events: none; }
.pc-veil[hidden] { display: none; }
.pc-ink { height: 16px; overflow: hidden; background: var(--surface-2); border: 3px solid var(--line); border-radius: 999px; }
.pc-ink__fill { display: block; height: 100%; background: var(--sea); transform-origin: left; transition: transform .1s linear; }
.pc-ink.is-low .pc-ink__fill { background: var(--tomato); }
.pc-colours { display: flex; justify-content: center; gap: .6rem; }
.pc-colour { width: 46px; height: 46px; background: var(--c); border: 3px solid var(--line); border-radius: 50%; cursor: pointer; }
.pc-colour.is-on { outline: 4px solid var(--sun); outline-offset: 2px; }

/* ---------- Guessing ---------- */

.pc-show { box-shadow: 0 6px 0 var(--line); }
.pc-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; min-height: 2.6rem; }
.pc-hint span { display: grid; place-items: center; width: 1.7rem; height: 2.3rem; font-size: 1.5rem; font-weight: 900; text-transform: uppercase; border-bottom: 4px solid var(--text); }
.pc-hint span.is-shown { color: var(--tomato); border-color: var(--tomato); }
.pc-hint span.is-gap { width: .8rem; border: 0; }
.pc-hint.is-hidden span { width: auto; color: var(--muted); border: 0; } /* no lines: three marks are not three letters */
.pc-form { display: flex; gap: .5rem; }
.pc-input { flex: 1; min-width: 0; font-size: 1.2rem; font-weight: 800; }
.pc-send { flex: none; }
.pc-tries { display: grid; gap: .35rem; }
.pc-try { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem .8rem; font-weight: 800; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; }
.pc-try.is-wrong bdi { text-decoration: line-through; opacity: .7; }
.pc-try.is-wrong span { color: var(--tomato); }
.pc-try.is-close { background: #fbe7b5; color: var(--ink); border-color: var(--sun); }
:root[data-theme="dark"] .pc-try.is-close { background: #5a3a0a; color: #f7ecd6; }
.pc-solved { display: grid; justify-items: center; gap: .3rem; padding: 1rem; text-align: center; color: var(--ink); background: #e3f1d6; animation: pc-pop .35s ease-out; }
:root[data-theme="dark"] .pc-solved { color: #f7ecd6; background: #2e4a23; }
.pc-solved__icon { font-size: 2.6rem; line-height: 1; }
.pc-solved b { font-size: 1.5rem; }
@keyframes pc-pop { from { transform: scale(.8); opacity: 0; } }
.pc-answer__pts { font-weight: 900; color: var(--olive); }
.pc-solvers { display: grid; gap: .35rem; }
.pc-solvers li { display: flex; align-items: center; gap: .35rem; padding: .4rem .8rem; font-weight: 800; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; }
.pc-solvers small { color: var(--muted); }
.pc-solvers b { margin-inline-start: auto; color: var(--olive); }
.pc-five { text-align: center; font-size: 1.2rem; font-weight: 900; }
.pc-pad.is-flipped { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .pc-solved { animation: none; } }
.pc-answer { display: grid; justify-items: center; gap: .15rem; padding: .9rem 1rem; text-align: center; }
.pc-answer small { font-weight: 800; color: var(--muted); }
.pc-answer b { font-size: 1.9rem; line-height: 1.15; }
.pc-answer.is-right { color: var(--ink); background: #e3f1d6; }
.pc-answer.is-wrong { color: var(--ink); background: #f7ddd6; }
.pc-answer.is-right small, .pc-answer.is-wrong small { color: #6a5847; }
:root[data-theme="dark"] .pc-answer.is-right { color: #f7ecd6; background: #2e4a23; }
:root[data-theme="dark"] .pc-answer.is-wrong { color: #f7ecd6; background: #5a2a22; }
:root[data-theme="dark"] .pc-answer.is-right small, :root[data-theme="dark"] .pc-answer.is-wrong small { color: #d8ccb4; }
.pc-got { font-size: 1.1rem; font-weight: 800; text-align: center; }

/* ---------- Galleries ---------- */

.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.pc-tile { position: relative; display: grid; gap: .3rem; padding: .4rem; font: inherit; color: var(--text); text-align: center; background: var(--surface); border: 3px solid var(--line); border-radius: 16px 18px 15px 19px; }
button.pc-tile { cursor: pointer; }
button.pc-tile:active { transform: scale(.97); }
.pc-tile .pc-art { border-width: 2px; }
.pc-tile.is-picked { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--line); }
.pc-tile.is-own { opacity: .65; }
.pc-tile__who { overflow: hidden; font-size: .9rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pc-tile__badges { position: absolute; top: .6rem; inset-inline-end: .6rem; padding: .1rem .35rem; font-size: 1.2rem; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; }

.pc-unmask { position: relative; }
.pc-unmask__art { box-shadow: 0 6px 0 var(--line); }
.pc-unmask__face { position: absolute; bottom: -.6rem; inset-inline-end: -.4rem; font-size: 3.4rem; }
.pc-flag { font-size: 1.6rem; font-weight: 900; text-align: center; }
.pc-words { display: grid; gap: .3rem; padding: .9rem 1rem; font-weight: 700; text-align: center; }
.pc-words b { font-size: 1.2rem; }

.pc-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pc-cat { display: grid; justify-items: center; gap: .1rem; padding: .5rem .3rem; font: inherit; color: var(--text); background: var(--surface); border: 3px solid var(--line); border-radius: 14px; cursor: pointer; }
.pc-cat span { font-size: 1.6rem; line-height: 1; }
.pc-cat b { font-size: .85rem; line-height: 1.15; }
.pc-cat.is-on { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.pc-cat.is-done:not(.is-on) { opacity: .7; }

.pc-award { display: grid; gap: .7rem; padding: 1rem; }
.pc-award__item { display: grid; gap: .5rem; justify-items: center; text-align: center; }
.pc-award__item .pc-art { max-width: 20rem; }

.pc-board { display: grid; gap: .45rem; }
.pc-board__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .55rem .8rem; font-weight: 800; background: var(--surface); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }
.pc-board__row.is-first { background: var(--sun); color: var(--ink); }
.pc-board__row.is-you { border-style: dashed; }
.pc-board__face { font-size: 1.6rem; }
.pc-board__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pc-wheelcard.is-landed { animation: none; } }

/* ---------- Two players ---------- */

.pc-same { background: var(--sea); }
.pc-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; padding: .9rem 1rem; font-weight: 800; }
.pc-duel span:first-child { text-align: left; }
.pc-duel span:last-child { text-align: right; }
.pc-duel b { font-size: 1.8rem; white-space: nowrap; }

/* TV mode: where the drawing would be, a pointer to the TV. */
.pc-tv { padding: 1.4rem 1rem; font-size: 1.3rem; font-weight: 900; text-align: center; background: var(--surface-2); border: 3px dashed var(--line); border-radius: 18px; }
.pc-center { justify-self: center; margin-inline: auto; }
