/* /scene/ — one object (word order) and two objects (position). */

/* slot colours: the same hue marks a word and its slot chip */
:root { --s-count: var(--muted); --s-color: var(--red); --s-size: var(--gold); --s-shape: var(--navy2);
        --s-rel: var(--green); --s-verb: var(--ink); }

.stage-row { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; margin-top: 1.6rem; }
.stage { background: var(--cream); border: 1px solid var(--border); border-radius: 14px; flex: 0 0 auto; }
.bg-white .stage { background: var(--cream); }
section:not(.bg-white) .stage { background: var(--white); }
.stage-one { width: min(300px, 100%); aspect-ratio: 1; }
.stage-pos { width: min(400px, 100%); aspect-ratio: 4 / 3; }
.side { flex: 1 1 320px; min-width: 0; }

/* ── words ── */
.phrase { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .15rem; }
.w { display: inline-flex; flex-direction: column; align-items: center;
     border-bottom: 3px solid transparent; padding: 0 .05rem .1rem; }
.wz { line-height: 1.25; }
.wp { display: none; color: var(--red); font-size: var(--fs-small); line-height: 1.2; }
body.show-py .wp { display: block; }
.w-count { border-color: var(--s-count); }
.w-color { border-color: var(--s-color); }
.w-size  { border-color: var(--s-size); }
.w-shape { border-color: var(--s-shape); }
.w-rel   { border-color: var(--s-rel); }
.phrase.big { font-size: clamp(2rem, 6vw, 2.8rem); color: var(--navy); font-weight: 500; }
.phrase-en { color: var(--muted); font-size: var(--fs-small); margin-top: .3rem; }
.note { margin-top: .5rem; font-size: var(--fs-label-zh); color: var(--gold); }
.note .en { font-size: var(--fs-small); color: var(--muted); }

.slots { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 1.4rem; }
.slot { font-size: var(--fs-label-zh); padding: .05rem .6rem; border-radius: 6px; color: white; }
.s-count { background: var(--s-count); }
.s-color { background: var(--s-color); }
.s-size  { background: var(--s-size); }
.s-shape { background: var(--s-shape); }

/* ── pickers ── */
.pick-row { display: flex; align-items: center; gap: .8rem; margin-bottom: .65rem; }
.pick-label { flex: 0 0 auto; min-width: 2.6rem; white-space: nowrap; font-size: var(--fs-label-zh); color: var(--muted); font-weight: 600; }
.tag-a, .tag-b { font-size: 1.2rem; color: var(--navy); }
.picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.pk { cursor: pointer; border: 1px solid var(--border); background: var(--white); border-radius: 8px;
      display: inline-flex; align-items: center; justify-content: center; font-family: inherit; color: var(--navy); }
.pk:hover { border-color: var(--navy); }
.pk.on { border: 2px solid var(--navy); box-shadow: 0 0 0 2px rgba(30,42,74,.12); }
.pk-shape { width: 2.6rem; height: 2.6rem; }
.pk-shape svg { width: 1.6rem; height: 1.6rem; fill: var(--navy); }
.pk-size { width: 2.9rem; height: 2.9rem; }
.pk-size span { width: var(--d); height: var(--d); border-radius: 50%; background: var(--navy); }
.pk-color { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--sw); border: 2px solid var(--sw-line); }
.pk-color.on { border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--navy); }
.pk-word { flex-direction: column; padding: .3rem .75rem; font-size: 1.25rem; }
.pk-word .wp { font-size: var(--fs-label); }
.pk-word.on { background: var(--navy); color: white; }
.pk-word.on .wp { color: #FFB3C0; }
.pick-row.dim { opacity: .45; }

.rand { margin-top: .6rem; cursor: pointer; font-family: inherit; font-size: var(--fs-label-zh);
        background: var(--navy); color: white; border: none; border-radius: 20px; padding: .4rem 1.1rem; }
.rand:hover { background: var(--red); }
.rand .en { font-size: var(--fs-small); opacity: .8; }

/* ── position sentences ── */
.sents { margin-top: 1.8rem; display: grid; gap: 1rem; }
.sent { display: flex; gap: 1rem; align-items: center; background: var(--white); border: 1px solid var(--border);
        border-radius: 12px; padding: 1rem 1.2rem; }
.sent-n { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--green); color: white;
          display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; }
.sent .phrase { font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--ink); }
.sent-en { color: var(--muted); font-size: var(--fs-small); margin-top: .25rem; }
/* short line by default; hover, focus or a tap swaps in the full sentence */
.sent-body { flex: 1 1 auto; min-width: 0; }
.sent-full { display: none; }
.sent.more { cursor: pointer; position: relative; padding-right: 2.4rem; }
.sent.more::after { content: '+'; position: absolute; right: .9rem; top: .7rem; font-size: 1.4rem; color: var(--muted); }
.sent.more:is(:hover, :focus-visible, .open) .sent-short { display: none; }
.sent.more:is(:hover, :focus-visible, .open) .sent-full { display: block; }
.sent.more:is(:hover, :focus-visible, .open)::after { content: '−'; }
.sent.more:is(:hover, :focus-visible, .open) { border-color: var(--navy); }

.scene-foot { text-align: center; padding: 2rem 0 3rem; }
.scene-foot a { color: rgba(255,255,255,.75); text-decoration: none; font-size: var(--fs-label-zh); }

@media (max-width: 560px) {
  .stage-row { gap: 1.2rem; }
  .pick-row { gap: .5rem; }
  .pick-label { min-width: 2.2rem; }
}
