/* The waiting page (user 11-15, mockup approved): the film coming together is the show, an honest band with measured
   time, the Storyteller, free to leave. Uses the v3 tokens (v3.css). */
#project.waiting #status, #project.waiting #cast, #project.waiting #strip { display: none !important; }
.w3 { display: grid; gap: 16px; margin: 6px 0 24px; }
.w3band { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; }
.w3top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.w3now { font: 800 17px var(--body); color: var(--g-ink); }
.w3now small { font-weight: 700; color: var(--g-soft); font-size: 14px; }
.w3left { margin-left: auto; font: 800 17px var(--title); color: var(--green); text-align: right; font-variant-numeric: tabular-nums; }
.w3left small { display: block; font: 700 12px var(--body); color: var(--g-soft); }
.w3segs { display: flex; gap: 6px; }
.w3seg { flex: 1 1 0; min-width: 0; display: grid; gap: 5px; }
.w3bar { height: 10px; border-radius: 99px; background: var(--track); overflow: hidden; position: relative; }
.w3bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green); border-radius: 99px; transition: width .6s ease; overflow: hidden; }
.w3seg.now .w3bar i { min-width: 10px; }
.w3seg.now .w3bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: w3sheen 1.4s linear infinite; }
@keyframes w3sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
/* the step being made always moves across its whole track (11-15 user: only a still dot showed while the story was written) */
.w3seg.now .w3bar::before { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--green) 45%, transparent), transparent);
  animation: w3walk 1.8s ease-in-out infinite; }
@keyframes w3walk { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .w3seg.now .w3bar::before { animation: none; opacity: .5; width: 100%; } }
.w3seg span { font: 800 12.5px var(--body); color: var(--g-soft); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w3seg.done span, .w3seg.now span { color: var(--g-ink); }
.w3seg.done span::before { content: "✓"; color: var(--green); }
.w3seg.now span::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: w3pulse 1s ease-in-out infinite alternate; }
@keyframes w3pulse { to { opacity: .3; } }
.w3main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .w3main { grid-template-columns: minmax(0, 1fr); } }
.w3col { display: grid; gap: 16px; min-width: 0; }
.w3card { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 18px; padding: 16px; min-width: 0; }
.w3card h2 { font: 800 16px var(--body); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; color: var(--g-ink); }
.w3card h2 .n { position: static; background: none; border-radius: 0; min-width: 0; padding: 0;   /* (not the frame badge: */
  margin-left: auto; font-size: 12.5px; color: var(--g-soft); font-weight: 700; }      /*  11-15 "8 of 8" sat on the heading) */
.w3card h2 .n:empty { display: none; }
.w3lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.w3lines li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; font-size: 15px; line-height: 1.4; color: var(--g-ink); animation: w3rise .45s ease both; }
.w3lines li.still { animation: none; }
.w3lines li b { width: 24px; height: 24px; border-radius: 8px; background: var(--green2); color: var(--green); display: grid; place-items: center; font-size: 12px; }
.w3lines li.w3empty { display: block; color: var(--g-soft); font-size: 14px; font-style: italic; }
@keyframes w3rise { from { opacity: 0; transform: translateY(8px); } }
.w3cast { display: flex; gap: 12px; flex-wrap: wrap; }
.w3who { margin: 0; width: 112px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.w3who .pic { width: 112px; aspect-ratio: 3 / 4; border-radius: 14px; background: var(--paper); border: 2px dashed var(--g-line); display: grid; place-items: center; position: relative; overflow: hidden; }
.w3who .pic img { width: 100%; height: 100%; object-fit: cover; }
.w3who.drawn .pic { border: 2px solid var(--green); animation: w3pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.w3sil { width: 56%; aspect-ratio: 3 / 4; border-radius: 45% 45% 30% 30%; border: 2.5px dashed var(--g-soft); opacity: .55; }
.w3who figcaption { display: grid; gap: 1px; }
.w3who b { font-size: 13.5px; color: var(--g-ink); }
.w3who small { font-size: 11.5px; color: var(--g-soft); }
.w3brush { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(14, 124, 102, .22) 50%, transparent 70%); animation: w3sweep 1.3s ease-in-out infinite; display: none; }
.painting .w3brush { display: block; }
@keyframes w3sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.w3strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.w3fr { margin: 0; display: grid; gap: 5px; min-width: 0; }
.w3fr .pic { aspect-ratio: 9 / 16; max-width: 100%; border-radius: 12px; background: var(--paper); border: 2px dashed var(--g-line); position: relative; overflow: hidden; display: grid; place-items: center; color: var(--g-soft); font: 800 20px var(--title); }
.w3fr .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.w3fr.done .pic { border: 2px solid #16302A; box-shadow: 3px 3px 0 var(--shadow); animation: w3pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.w3fr.painting .pic { border-color: var(--green); }
@keyframes w3pop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }
.w3fr figcaption { font-size: 12px; line-height: 1.3; color: var(--g-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w3fr.done figcaption { color: var(--g-ink); }
.w3tell .v3tag { transform: translate(10px, 14px) rotate(-1.5deg); }
.w3tbox { background: var(--paper); border: 3px solid #16302A; box-shadow: 6px 6px 0 var(--shadow); padding: 22px 16px 14px; font: 1.15rem/1.35 var(--hand); color: var(--g-ink); min-height: 92px; }
.w3kind { display: block; font: 800 11px var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.w3leave { display: grid; gap: 10px; }
.w3leave h2 { margin: 0; }
.w3leave p { margin: 0; font-size: 14.5px; color: var(--g-ink); }
.w3tog { display: flex; align-items: center; gap: 10px; font: 700 14.5px var(--body); cursor: pointer; color: var(--g-ink); }
.w3tog input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--track); border: 1px solid var(--g-line); position: relative; cursor: pointer; flex: none; margin: 0; }
.w3tog input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.w3tog input:checked { background: var(--green); border-color: var(--green); }
.w3tog input:checked::after { transform: translateX(18px); }
.w3tog input:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
/* My films: how far a film being made is, at a glance */
.wring { position: absolute; right: 8px; bottom: 8px; width: 50px; height: 50px; background: var(--g-card); border-radius: 50%; box-shadow: 0 2px 8px rgba(22, 48, 42, .25); }
.wring svg { width: 100%; height: 100%; }
.wring circle { fill: none; stroke-width: 6; }
.wring .tr { stroke: var(--track); }
.wring .fg { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .6s; }
.wring text { font: 800 12px var(--body); fill: var(--g-ink); }
.card .poster { position: relative; }
/* the cast pick: the picked card in the app's green, never orange (user rule) */
.pk-card.on { border-color: var(--green) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 35%, transparent) !important; }
@media (prefers-reduced-motion: reduce) { .w3 *, .wring * { animation: none !important; transition: none !important; } }
:root[data-theme="dark"] { --paper: #22392f; }
.go:hover { transform: none; filter: brightness(1.08); }   /* (11-15: a lift on hover flickers under a resting pointer) */

/* a character's picture: redraw with a note, then Before | New (user 11-15) */
#infobody .shredo { display: grid; gap: 8px; margin-top: 12px; }
#infobody .shredo.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#infobody .shpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#infobody .shpair figure { margin: 0; min-width: 0; }
#infobody .shpair img { display: block; width: 100%; border-radius: 10px; background: #fff; }
#infobody .shpair figcaption { font-weight: 800; font-size: 13px; margin-top: 4px; text-align: center; }
#infobody .shwait { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 700; }
#infobody .shwait .spin { flex: none; }              /* (11-15 user: the spinner was squashed into an oval) */
@media (max-width: 560px) { #infobody .shpair { grid-template-columns: 1fr; } }
body.viewonly #infobody .shredo { display: none !important; }

/* phone: every step's name readable (11-15: "Characte" was cut) - a finished step narrows to its ✓, the rest share */
@media (max-width: 560px) {
  .w3seg { flex: 1 1 0 !important; }
  .w3seg.done { flex: .8 1 0 !important; }
  .w3seg span { font-size: 11.5px; gap: 3px; }
}

/* the frame popup (11-15 user: "looks like an old page"): the fix is the main action, no black side bars */
#viewer .vpic { background: var(--g-bg, #eef3f0); }
#viewer .fix3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 10px 0 4px; min-width: 0; }
#viewer .fix3 input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--g-line, #d6e2dc); background: var(--g-card, #fff); color: inherit; min-width: 0; }
#viewer .fix3 input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
#viewer .fix3 .primary { width: 100%; }
/* Enhance | Redo side by side on a phone: the long "Redo with new line · ≈$0.01" wraps inside its button, never past the popup */
#viewer .fix3 + .row { flex-wrap: nowrap; }
#viewer .fix3 + .row > button { min-width: 0; white-space: normal; }
#viewer .fix3 + .row > #redo { flex: 1 1 0; }
/* the note a picture was made from (11-16 user: "I do not see my comment") */
#viewer .vnote { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--green2, #e3f1ec); color: var(--g-ink, #16302a); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
