/* Step-by-step layout of the Live Avatar & character swap tabs (livewizard.js). Grid/flex with min-width:0 everywhere so no column collapses. */
.swap { display: flex; flex-direction: column; gap: 14px; max-width: 920px; min-width: 0; }
.swap > div { min-width: 0; }
.lw-step { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; margin-bottom: 14px; }
.lw-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.lw-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 13px var(--font); }
.lw-n.ok { background: var(--ok, #3ecf8e); color: #06210f; } .lw-n .ic { width: 16px; height: 16px; }
.lw-ht { min-width: 0; flex: 1 1 auto; } .lw-ht h3 { font-size: 15.5px; margin: 0; } .lw-ht p { margin: 3px 0 0; max-width: 70ch; overflow-wrap: anywhere; }
.lw-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* characters */
.lw-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; padding: 2px; }
.lw-char { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; min-width: 0; }
.lw-char:hover { border-color: var(--faint); } .lw-char.on { border-color: var(--accent); background: var(--accent-bg); }
.lw-cn { font-size: 12.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-av { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--panel-3); color: var(--muted); flex: none; }
.lw-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lw-ini { font: 700 22px var(--font); } .lw-av.has .lw-ini { visibility: hidden; }
.lw-tag { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: var(--panel-3); color: var(--muted); }
.lw-tag.ok { background: var(--accent-bg); color: var(--accent-2); }

/* options: checkbox, name + info, description underneath (never squeezed into a side column) */
.lw-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; cursor: pointer; }
.lw-opt input { margin-top: 3px; } .lw-ot { display: flex; align-items: center; gap: 8px; min-width: 0; } .lw-od { grid-column: 2; overflow-wrap: anywhere; }
.lw-info { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font: italic 700 11px serif; display: inline-grid; place-items: center; cursor: help; }
.lw-info:focus-visible, .lw-info:hover { color: var(--text); border-color: var(--accent); outline: none; }

/* quality choice */
.lw-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lw-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; background: var(--panel-2); border: 2px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; min-width: 0; }
.lw-pick.on { border-color: var(--accent); background: var(--accent-bg); } .lw-pick:hover { border-color: var(--faint); }
.lw-pick .muted { overflow-wrap: anywhere; } .lw-cr { font-size: 12px; color: var(--accent-2); font-weight: 600; }

/* review */
.lw-review { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lw-sum { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; overflow-wrap: anywhere; }
.lw-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.lw-go .btn.primary { width: 100%; justify-content: center; padding: 13px 18px; font-size: 15px; }

/* progress and result */
.lw-prog { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; } .lw-bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; } .lw-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s ease; }
.lw-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lw-fig { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; } .lw-fig video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.lw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lw-hint { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 0 0 14px; list-style: none; counter-reset: s; font-size: 13px; color: var(--muted); }
.lw-hint li { counter-increment: s; } .lw-hint li::before { content: counter(s) '. '; font-weight: 700; color: var(--accent-2); }

@media (max-width: 640px) {
  .lw-choice { grid-template-columns: 1fr; }
  .lw-step { padding: 14px; } .lw-chars { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* (3 Nov 2026) "More options": the choices most people never change, folded away; the fold stays as the person left it */
.lw-adv { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: transparent; }
.lw-adv > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 8px; color: var(--muted, inherit); }
.lw-adv > summary::-webkit-details-marker { display: none; }
.lw-adv > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px; }
.lw-adv[open] > summary::before { transform: rotate(45deg); }
.lw-adv[open] > summary { color: var(--text, inherit); border-bottom: 1px solid var(--line); }
.lw-adv-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 14px; }
