/* ==========================================================================
   On the Same Wave — styles. Theme tokens and shared components come from
   shared/style.css.

   The dial is the whole game, so it is as wide as the screen allows. The
   bands around the secret spot go from the widest (2 points) to the
   narrowest (4 points), each a warmer colour.
   ========================================================================== */

.wv { display: grid; gap: 1rem; max-width: 30rem; margin-inline: auto; padding-block: .75rem 2rem; }
.wv-title { font-size: clamp(1.6rem, 7vw, 2.2rem); text-align: center; }
.wv-title--bull { color: var(--tomato); }
.wv-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.wv-top > :last-child:not(:first-child) { margin-inline-start: auto; }
.wv-note { font-size: 1.05rem; font-weight: 700; text-align: center; }
.wv-center-btn { justify-self: center; }
.wv-tune { font-weight: 900; }

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

.wv-menu { display: grid; gap: .5rem; }
.wv-menu__art { font-size: 1.8rem; text-align: center; }
.wv-tagline { font-size: 1.1rem; font-weight: 700; text-align: center; }
.wv-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 .7rem; 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 dial ---------- */

.wv-dial { display: grid; gap: .3rem; }
.wv-dial__svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
.wv-dial__svg.is-turnable { cursor: grab; }
.wv-dial__svg.is-turnable:active { cursor: grabbing; }
.wv-dial__svg:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 12px; }
.wv-dial__face { fill: var(--surface); stroke: var(--line); stroke-width: 3; stroke-linejoin: round; }
.wv-dial__tick { stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; opacity: .35; }
.wv-dial__band { stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.wv-dial__band--2 { fill: #8fc1d4; }
.wv-dial__band--3 { fill: var(--sun); }
.wv-dial__band--4 { fill: var(--tomato); }
.wv-dial__needle { stroke: var(--text); stroke-width: 5; stroke-linecap: round; }
.wv-dial__tip { fill: var(--sea); stroke: var(--line); stroke-width: 2.5; }
.wv-dial__knob { fill: var(--text); stroke: var(--line); stroke-width: 2; }
.wv-dial__mark { stroke: var(--text); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.wv-dial__mark.is-you { stroke: var(--sea); stroke-width: 3.5; opacity: 1; }
.wv-dial__face-mark { font-size: 13px; text-anchor: middle; }
.wv-dial__ends { display: flex; justify-content: space-between; gap: 1rem; font-weight: 900; }
.wv-dial__end { max-width: 48%; padding: .25rem .6rem; font-size: .95rem; background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; }
.wv-dial__end--right { text-align: right; }

/* ---------- The clue ---------- */

.wv-clue { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; padding: .8rem 1rem; background: var(--sun); color: var(--ink); }
.wv-clue__face { font-size: 2.4rem; }
.wv-clue__who { display: block; font-weight: 800; opacity: .75; }
.wv-clue__text { display: block; font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.wv-clue-input { font-size: 1.3rem; font-weight: 800; text-align: center; }

.wv-wait { display: grid; justify-items: center; gap: .3rem; padding-top: .5rem; }
.wv-wait__face { font-size: 3.4rem; animation: wv-bob 1.6s ease-in-out infinite; }
@keyframes wv-bob { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .wv-wait__face { animation: none; } }

/* ---------- Scores ---------- */

.wv-board { display: grid; gap: .45rem; }
.wv-board__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .55rem .8rem; background: var(--surface); border: 3px solid var(--line); border-radius: 14px 16px 13px 17px; }
.wv-board__row--giver { background: var(--surface-2); }
.wv-board__row.is-first { background: var(--sun); color: var(--ink); }
.wv-board__row.is-you { border-style: dashed; }
.wv-board__face { font-size: 1.6rem; }
.wv-board__who { display: grid; min-width: 0; font-weight: 800; }
.wv-board__who bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-board__who small { font-weight: 700; color: var(--muted); }
.wv-board__row.is-first .wv-board__who small { color: inherit; }
.wv-board__score { font-size: 1.2rem; white-space: nowrap; }

.wv-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem .8rem; padding: .9rem 1rem; }
.wv-meter__label { font-weight: 800; }
.wv-meter__value { font-size: 1.6rem; }
.wv-meter__bar { grid-column: 1 / -1; height: 14px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; }
.wv-meter__bar span { display: block; height: 100%; background: linear-gradient(90deg, #8fc1d4, var(--sun), var(--tomato)); }
