/* Interactive demo */
.demo-section { background: linear-gradient(var(--ink), var(--ink-2)); }
.demo { --bd: rgba(255,255,255,.09); position: relative; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: #171a14; box-shadow: 0 40px 120px rgba(0,0,0,.45); overflow: hidden; }
.demo-chrome { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; background: #1e2119; border-bottom: 1px solid var(--bd); }
.demo-title { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #e5e9da; }
.demo-title span { color: #7e8674; font-weight: 500; letter-spacing: 0; }
.demo-reset { margin-left: auto; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #d4d9c8; padding: 6px 12px; border-radius: 100px; font-size: 12px; font-weight: 650; cursor: pointer; }
.demo-reset:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.demo-reset:disabled { opacity: .35; cursor: default; }

/* rail */
.demo-rail { --progress: 0; position: relative; list-style: none; margin: 0; padding: 0 14px; display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--bd); background: #191c16; }
.demo-rail::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--progress) * 100%); background: var(--lime); transition: width .5s ease; }
.demo-rail button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 10px; border: 0; background: transparent; color: #8a9180; font-size: 13.5px; font-weight: 650; cursor: pointer; text-align: left; }
.demo-rail button b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid currentColor; font-family: var(--mono); font-size: 10.5px; font-weight: 700; flex: none; }
.demo-rail button:disabled { cursor: not-allowed; }
.demo-rail li.reachable button { color: #c3c9b6; }
.demo-rail li.reachable button:hover { color: var(--white); }
.demo-rail li.current button { color: var(--lime); }
.demo-rail li.current button b { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.demo-rail li.reachable:not(.current) button b { border-color: rgba(216,255,99,.5); color: var(--lime); }

/* layout */
.demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 600px; }
.demo-main { padding: 26px 28px 24px; min-width: 0; outline: none; }
.demo-detail { border-left: 1px solid var(--bd); background: #141711; min-width: 0; }
.demo-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 11px 16px; border-top: 1px solid var(--bd); background: #131510; color: #8a9180; font-size: 12px; }
.demo-foot .led { width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; box-shadow: none; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.18); color: #b7bdaa; }

.st-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.st-num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); background: var(--lime); padding: 4px 8px; border-radius: 6px; margin-top: 4px; }
.st-head h3 { font-size: 26px; letter-spacing: -.03em; outline: none; }
.st-head p { color: #9aa190; font-size: 14px; margin-top: 4px; }
.st-next { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--bd); }
.linkish { border: 0; background: none; padding: 0; color: var(--lime); font-size: 12.5px; font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(216,255,99,.4); }
.linkish:hover { text-decoration-color: var(--lime); }
.linkish.mid { margin-left: auto; margin-right: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* intro */
.intro-copy h3 { font-size: 26px; outline: none; }
.intro-copy p { color: #9aa190; font-size: 14.5px; margin-top: 6px; max-width: 560px; }
.intro-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.intro-card { border: 1px solid var(--bd); border-radius: 14px; padding: 22px; background: #1c1f18; display: flex; flex-direction: column; gap: 12px; }
.intro-card.sample { border-color: rgba(216,255,99,.3); background: linear-gradient(160deg, rgba(216,255,99,.06), transparent 50%), #1c1f18; }
.ic-kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8f9784; }
.intro-card h4 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.intro-card p { color: #a3aa97; font-size: 13.5px; line-height: 1.6; }
.intro-card .btn { align-self: flex-start; margin-top: auto; }
.folder-peek { list-style: none; margin: 0; padding: 10px 12px; border-radius: 10px; background: #141711; font-family: var(--mono); font-size: 12px; color: #c9cebc; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.folder-peek li::before { content: "♪ "; color: #8a9180; }
.folder-peek .more { color: #7a8170; } .folder-peek .more::before { content: ""; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed rgba(255,255,255,.2); border-radius: 12px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.over { border-color: var(--lime); background: rgba(216,255,99,.04); }
.dropzone:focus-within { outline: 2px solid var(--lime); outline-offset: 2px; }
.dz-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(216,255,99,.12); color: var(--lime); font-weight: 700; }
.dz-title { font-weight: 700; font-size: 14.5px; }
.dz-sub { color: #8f9784; font-size: 12.5px; }
.own-note { font-size: 12.5px !important; color: #8f9784 !important; }
.own-note b { color: #d6dbca; }
.uf { display: grid; gap: 12px; }
.uf-wave { width: 100%; height: 64px; border-radius: 8px; background: #141711; }
.uf-dl { display: grid; gap: 0; font-size: 13px; }
.uf-dl div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.uf-dl dt { color: #8a9180; } .uf-dl dd { font-family: var(--mono); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.uf-err { color: #ffa58f !important; font-size: 12.5px !important; }
.uf-loading { display: flex; align-items: center; gap: 10px; color: #b5bba9; font-size: 13px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(216,255,99,.25); border-top-color: var(--lime); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* scan */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 60px 20px; border: 1px dashed var(--bd); border-radius: 14px; }
.empty-state p { color: #9aa190; font-size: 14px; }
.empty-state b { color: var(--white); font-size: 16px; }
.folder-ico { width: 64px; height: 48px; border-radius: 6px; background: #2a2e24; position: relative; }
.folder-ico::before { content: ""; position: absolute; left: 0; top: -7px; width: 26px; height: 10px; border-radius: 4px 4px 0 0; background: #2a2e24; }
.folder-ico i { position: absolute; left: 10px; right: 10px; top: 20px; height: 2px; background: var(--lime); box-shadow: 0 7px 0 rgba(216,255,99,.5), 0 14px 0 rgba(216,255,99,.25); }
.scanbar { position: relative; height: 34px; border-radius: 8px; background: #1e2119; overflow: hidden; margin-bottom: 14px; }
.scanbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(216,255,99,.12), rgba(216,255,99,.3)); border-right: 2px solid var(--lime); transition: width .2s ease; }
.scanbar span { position: relative; display: block; line-height: 34px; padding: 0 12px; font-family: var(--mono); font-size: 12px; color: #d8ddc9; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { padding: 12px 14px; border-radius: 10px; background: #1e2119; border: 1px solid var(--bd); }
.stat span { display: block; font-size: 11.5px; color: #8a9180; }
.stat b { display: block; font-size: 24px; letter-spacing: -.04em; margin-top: 4px; }
.stat small { color: #7c8472; font-size: 11px; }
.stat.warn b { color: #ffa58f; }
.flist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bd); }
.frow { border-bottom: 1px solid rgba(255,255,255,.055); animation: rowin .35s ease both; }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }
.frow-btn { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 120px 128px; gap: 14px; align-items: center; padding: 10px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 8px; }
.frow-btn:hover { background: rgba(255,255,255,.03); }
.frow.sel .frow-btn { background: rgba(216,255,99,.07); box-shadow: inset 2px 0 0 var(--lime); }
.fname { min-width: 0; }
.fname b { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fname small { display: block; font-size: 11.5px; color: #868d7c; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fwave { width: 120px; height: 26px; }
.fwave.sm { width: 70px; height: 20px; }
.chip em { font-style: normal; font-family: var(--mono); font-size: 10px; opacity: .75; }
.flagt { display: inline-block; justify-self: start; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 100px; background: rgba(255,255,255,.07); color: #b3b9a7; }
.flagt.warn { background: rgba(255,132,102,.13); color: #ffa58f; }

/* clean */
.clean-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card-f { border: 1px solid var(--bd); border-radius: 12px; padding: 16px; background: #1c1f18; }
.card-f.bad { border-color: rgba(255,132,102,.25); }
.card-f header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-f p { font-size: 13px; color: #b3b9a7; line-height: 1.55; }
.card-f code { color: #e7ebdc; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.opt { display: flex; align-items: center; gap: 8px; padding: 7px 11px 7px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; cursor: pointer; font-size: 12.5px; transition: border-color .2s, background .2s; }
.opt input { accent-color: var(--lime); margin: 0; }
.opt b { font-weight: 650; } .opt small { display: block; font-size: 10.5px; color: #8a9180; }
.opt.on { border-color: rgba(216,255,99,.55); background: rgba(216,255,99,.06); }
.opt:focus-within { outline: 2px solid var(--lime); outline-offset: 1px; }
.renames { margin-top: 14px; border: 1px solid var(--bd); border-radius: 12px; padding: 16px; }
.renames header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.renames h4 { margin: 0; font-size: 15px; }
.renames header span { color: #858c7b; font-size: 12px; margin-right: auto; }
.renames ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.renames li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.07); font-size: 13px; }
.renames label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.renames input { accent-color: var(--lime); }
.renames .to { color: #8a9180; }
.renames label code { white-space: nowrap; }

/* check */
.check-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: #1e2119; border: 1px solid var(--bd); }
.seg button { border: 0; background: transparent; color: #9aa190; padding: 7px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.seg button em { font-style: normal; font-family: var(--mono); font-size: 10.5px; opacity: .7; margin-left: 2px; }
.seg button[aria-selected="true"] { background: #2c3126; color: var(--white); }
.rev-meter { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #9aa190; }
.rev-meter i { width: 110px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.rev-meter b { display: block; height: 100%; background: var(--lime); transition: width .3s; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--bd); background: #1c1f18; transition: opacity .25s, border-color .25s; }
.chk.warn { border-left: 3px solid var(--coral); }
.chk.info { border-left: 3px solid #7fc4f5; }
.chk.done { opacity: .55; }
.chk-main { display: flex; gap: 12px; min-width: 0; }
.chk-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 12px; background: rgba(255,132,102,.15); color: #ffa58f; }
.chk.info .chk-ico { background: rgba(127,196,245,.14); color: #9ed2f7; }
.chk-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk-title b { font-size: 14.5px; }
.chk .linkish { font-family: var(--mono); font-size: 12px; margin: 3px 0 4px; }
.chk p { font-size: 13px; color: #b3b9a7; }
.chk .rec { color: #8f9784; margin-top: 4px; }
.chk .rec span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8a9180; margin-right: 4px; }
.rev-btn { flex: none; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #d4d9c8; border-radius: 100px; padding: 6px 12px; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.rev-btn[aria-pressed="true"] { border-color: rgba(216,255,99,.5); color: var(--lime); }

/* arrange */
.arr-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 12.5px; color: #8f9784; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grp { border: 1px solid var(--bd); border-radius: 12px; background: #1b1e17; padding: 10px; border-top: 2px solid var(--fam); }
.grp header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-size: 13px; }
.grp header span { margin-left: auto; font-family: var(--mono); font-size: 11px; color: #868d7c; }
.grp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-height: 40px; }
.grp-empty { display: grid; place-items: center; height: 40px; border: 1px dashed rgba(255,255,255,.12); border-radius: 8px; font-size: 11.5px; color: #8a9180; }
.trk { display: grid; grid-template-columns: 22px 22px minmax(0, 1fr) 70px auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; background: #23271f; border: 1px solid rgba(255,255,255,.06); cursor: pointer; }
.trk:hover { border-color: rgba(255,255,255,.14); }
.trk.sel { border-color: rgba(216,255,99,.5); background: #262b20; }
.trk:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.handle { cursor: grab; color: #8a9180; font-size: 13px; letter-spacing: -2px; text-align: center; touch-action: none; user-select: none; padding: 6px 0; }
.handle:hover { color: var(--lime); }
.trk-n { font-family: var(--mono); font-size: 11px; color: #858c7b; }
.trk-name { min-width: 0; }
.trk-name b { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-name small { display: block; font-family: var(--mono); font-size: 10.5px; color: #8a9180; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk select { background: #1a1d16; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 4px 4px; font-size: 11.5px; color: #c9cebc; max-width: 86px; cursor: pointer; }
.trk.dragging { position: fixed; z-index: 200; pointer-events: none; box-shadow: 0 18px 40px rgba(0,0,0,.5); border-color: var(--lime); transform: rotate(-1.2deg); }
.trk-ph { height: 40px; border-radius: 8px; border: 1.5px dashed rgba(216,255,99,.55); background: rgba(216,255,99,.05); }

/* build */
.daws { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.daw-opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px 36px; border: 1px solid var(--bd); border-radius: 10px; background: #1c1f18; cursor: pointer; transition: border-color .2s; }
.daw-opt input { position: absolute; left: 12px; top: 14px; accent-color: var(--lime); margin: 0; }
.daw-opt b { font-size: 13.5px; }
.daw-opt small { display: block; font-size: 11.5px; color: #8a9180; line-height: 1.4; margin-top: 2px; }
.daw-opt em { font-style: normal; align-self: flex-start; margin-top: 6px; }
.daw-opt.on { border-color: rgba(216,255,99,.55); background: rgba(216,255,99,.05); }
.daw-opt:focus-within { outline: 2px solid var(--lime); outline-offset: 1px; }
.demo .ht.session { background: rgba(216,255,99,.12); color: var(--lime); }
.demo .ht.import { background: rgba(127,196,245,.14); color: #9ed2f7; }
.demo .ht.stems { background: rgba(255,255,255,.08); color: #c3c9b6; }
.build-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin: 16px 0; font-size: 13px; color: #c9cebc; }
.build-opts input { accent-color: var(--lime); margin-right: 6px; }
.build-opts .fixed { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: #858c7b; }
.build-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.build-sum div { padding: 12px; border-radius: 10px; background: #1e2119; border: 1px solid var(--bd); }
.build-sum b { display: block; font-size: 22px; letter-spacing: -.03em; }
.build-sum span { font-size: 11.5px; color: #8a9180; }
.buildprog { margin-top: 20px; }
.result { display: grid; gap: 14px; }
.res-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: rgba(216,255,99,.08); border: 1px solid rgba(216,255,99,.3); }
.res-ok { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-weight: 800; flex: none; }
.res-head b { display: block; font-size: 16px; outline: none; }
.res-head small { color: #a3aa97; font-size: 12.5px; }
.tree { font-family: var(--mono); font-size: 12.5px; padding: 16px; border-radius: 12px; background: #131510; border: 1px solid var(--bd); }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.1); }
.tree li { padding: 3px 0 3px 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tree li.tr-dir { display: block; }
.tree .tr-root { color: var(--lime); margin-bottom: 6px; }
.tree .tr-sess { color: var(--lime); font-weight: 700; }
.tree .tr-rep { color: #c9cebc; }
.tree em { font-style: normal; font-size: 10.5px; color: #9ed2f7; background: rgba(127,196,245,.1); padding: 1px 6px; border-radius: 4px; }
.tree .sw { width: 8px; height: 8px; }
.report { padding: 16px; border-radius: 12px; border: 1px solid var(--bd); background: #1c1f18; }
.report h4 { margin: 0 0 10px; font-size: 14px; }
.report ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; color: #c3c9b6; }
.sim-note { margin-top: 12px; font-size: 12px; color: #858c7b; border-top: 1px dashed rgba(255,255,255,.1); padding-top: 10px; }

/* detail panel */
.dt-pad, .dt-empty { padding: 22px 20px; position: relative; }
.dt-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #868d7c; }
.dt-empty p { color: #8f9784; font-size: 13.5px; margin-top: 10px; }
.how { margin: 12px 0 0; padding-left: 18px; color: #c9cebc; font-size: 13.5px; display: grid; gap: 6px; }
.dt-title { margin: 6px 0 4px; font-size: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dt-title.mono { font-family: var(--mono); font-size: 16px; }
.dt-status { color: #ffa58f; font-size: 12.5px; }
.dt-p { color: #a3aa97; font-size: 13px; }
.dt-wave { width: 100%; height: 56px; margin: 12px 0 14px; border-radius: 8px; background: #1a1d16; }
.demo-detail h5 { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: #a4ab98; display: flex; align-items: center; gap: 8px; }
.dt-dl { display: grid; margin: 0; font-size: 12.5px; }
.dt-dl div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.07); }
.dt-dl dt { color: #858c7b; } .dt-dl dd { font-family: var(--mono); font-size: 12px; }
.dt-dl div.w dd { color: #ffa58f; }
.dt-fam { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dt-fam small { color: #8a9180; font-size: 11.5px; }
.dt-why { margin: 0; padding-left: 16px; font-size: 12.5px; color: #c3c9b6; display: grid; gap: 5px; }
.demo-detail .ic-sources { margin-top: 12px; }
.demo-detail .src { font-size: 10.5px; padding: 4px 8px; }
.dt-note { color: #8a9180; font-size: 11.5px; margin-top: 14px; }
.dt-close { display: none; position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: #1e2119; color: var(--white); font-size: 18px; cursor: pointer; }

/* responsive */
@media (max-width: 1080px) {
  .demo-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .daws { grid-template-columns: repeat(2, 1fr); }
  .renames ul { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .demo-body { grid-template-columns: 1fr; min-height: 0; }
  .demo-detail { border-left: 0; border-top: 1px solid var(--bd); }
  .demo[data-stage="scan"] .demo-detail, .demo[data-stage="clean"] .demo-detail, .demo[data-stage="check"] .demo-detail, .demo[data-stage="arrange"] .demo-detail { position: fixed; inset: auto 0 0 0; z-index: 120; max-height: 78vh; overflow-y: auto; border-radius: 18px 18px 0 0; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 -20px 60px rgba(0,0,0,.6); transform: translateY(105%); transition: transform .3s ease; visibility: hidden; }
  .demo.detail-open[data-stage="scan"] .demo-detail, .demo.detail-open[data-stage="clean"] .demo-detail, .demo.detail-open[data-stage="check"] .demo-detail, .demo.detail-open[data-stage="arrange"] .demo-detail { transform: none; visibility: visible; }
  .dt-close { display: block; }
}
@media (max-width: 760px) {
  .demo { border-radius: 14px; margin: 0 -4px; }
  .demo-rail { padding: 0 4px; }
  .demo-rail button { flex-direction: column; gap: 4px; padding: 10px 2px; font-size: 11px; text-align: center; }
  .demo-rail button b { width: 24px; height: 24px; }
  .demo-main { padding: 18px 14px; }
  .st-head h3, .intro-copy h3 { font-size: 22px; }
  .intro-cards, .clean-grid, .groups, .daws { grid-template-columns: 1fr; }
  .stats, .build-sum { grid-template-columns: 1fr 1fr; }
  .frow-btn { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 4px; }
  .frow-btn .fwave { display: none; }
  .trk { grid-template-columns: 26px 20px minmax(0, 1fr) auto; }
  .trk .fwave { display: none; }
  .handle { font-size: 16px; padding: 8px 0; }
  .chk { flex-direction: column; }
  .rev-btn { align-self: flex-end; }
  .build-opts .fixed { margin-left: 0; }
  .kbd-hint { display: none; }
  .st-next .btn { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { .frow { animation: none; } }

/* ---------- v2: folder intake ---------- */
.intake { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 22px; }
.dropzone.big { cursor: default; justify-content: center; gap: 10px; padding: 40px 24px; min-height: 320px; border-radius: 16px; border-width: 2px; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.012) 0 10px, transparent 10px 20px); }
.dz-art { margin-bottom: 6px; }
.dz-folder { display: block; width: 78px; height: 58px; border-radius: 8px; background: #2a2e24; position: relative; transition: transform .25s ease; }
.dz-folder::before { content: ""; position: absolute; left: 0; top: -9px; width: 32px; height: 12px; border-radius: 5px 5px 0 0; background: #2a2e24; }
.dz-folder i { position: absolute; left: 14px; right: 14px; top: 22px; height: 2px; background: var(--lime); box-shadow: 0 8px 0 rgba(216,255,99,.55), 0 16px 0 rgba(216,255,99,.25); }
.dropzone.over .dz-folder, .demo.dragging-sample .dz-folder { transform: translateY(-6px) scale(1.06); }
.demo.dragging-sample .dropzone.big { border-color: var(--lime); background-color: rgba(216,255,99,.04); }
.dz-title { font-size: 20px; letter-spacing: -.02em; }
.dz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.dz-actions .btn { cursor: pointer; }
.dz-note { font-size: 12px; color: #868d7c; margin-top: 4px; }
.sample-side { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--bd); border-radius: 16px; background: #1c1f18; }
.sample-folder { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 1px solid rgba(216,255,99,.35); border-radius: 12px; background: linear-gradient(160deg, rgba(216,255,99,.08), transparent 60%), #20241b; text-align: left; cursor: grab; transition: transform .2s ease, border-color .2s; }
.sample-folder:hover { transform: translateY(-2px); border-color: var(--lime); }
.sample-folder:active { cursor: grabbing; }
.sf-icon { flex: none; width: 46px; height: 34px; border-radius: 5px; background: var(--lime); position: relative; }
.sf-icon::before { content: ""; position: absolute; left: 0; top: -6px; width: 18px; height: 8px; border-radius: 3px 3px 0 0; background: var(--lime); }
.sf-icon i { position: absolute; left: 9px; right: 9px; top: 13px; height: 2px; background: var(--ink); box-shadow: 0 6px 0 rgba(18,20,16,.5); }
.sf-text b { display: block; font-size: 14.5px; color: var(--white); }
.sf-text small { display: block; font-size: 12px; color: #8f9784; margin-top: 2px; }
.sample-hint { font-size: 12.5px; color: #a3aa97; }
.drag-cue { color: var(--lime); font-weight: 700; margin-right: 4px; display: inline-block; transform: rotate(90deg); }
.chip.clue { border-style: dashed; background: transparent; }
.flagt.ok { background: rgba(216,255,99,.08); color: #c9e88a; }
.fpath { color: #8a9180; }
.own-banner { font-size: 12.5px; color: #9aa190; margin: 0 0 12px; line-height: 1.7; }
.clue-key { display: inline-block; font-size: 10px; font-family: var(--mono); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px dashed rgba(255,255,255,.3); color: #c3c9b6; }
.mono-sm { font-family: var(--mono); font-size: 11px !important; overflow-wrap: anywhere; color: #868d7c !important; }
.st-next.solo { border-top: 0; justify-content: center; }
@media (max-width: 900px) {
  .demo[data-stage="own"] .demo-detail { position: fixed; inset: auto 0 0 0; z-index: 120; max-height: 78vh; overflow-y: auto; border-radius: 18px 18px 0 0; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 -20px 60px rgba(0,0,0,.6); transform: translateY(105%); transition: transform .3s ease; visibility: hidden; }
  .demo.detail-open[data-stage="own"] .demo-detail { transform: none; visibility: visible; }
}
@media (max-width: 760px) {
  .intake { grid-template-columns: 1fr; }
  .dropzone.big { min-height: 0; padding: 28px 16px; }
  .dz-title { font-size: 17px; }
}

/* v4: contrast */
.demo-rail button { color: #8a9180; }
.folder-peek .more, .demo-foot, kbd { color: #9aa18f; }
.demo-foot { color: #959c8a; }
.dt-dl dt, .uf-dl dt, .stat span { color: #9aa18f; }
.demo .src.off { color: #8c9381; }
.demo-title span { color: #979e8c; }

/* ---------- v4: polish fixes ---------- */
.demo[data-stage="intro"] .demo-body { min-height: 0; }
@media (max-width: 760px) {
  .demo-title span { display: none; }
}

/* ---------- v5: Build stage delivery options ---------- */
.mode-seg { display: inline-flex; margin-bottom: 14px; }
.mode-seg label { position: relative; padding: 8px 14px; border-radius: 7px; font-size: 13px; font-weight: 650; color: #9aa190; cursor: pointer; }
.mode-seg label.on { background: #2c3126; color: var(--white); }
.mode-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mode-seg label:focus-within { outline: 2px solid var(--lime); outline-offset: 1px; }
.opt-field { display: inline-flex; align-items: center; gap: 8px; }
.opt-field select { background: #1a1d16; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 6px 8px; color: var(--white); font-size: 12.5px; cursor: pointer; }
.tidy-note { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--bd); background: #1c1f18; margin-bottom: 12px; }
.tidy-note p { color: #b3b9a7; font-size: 13.5px; line-height: 1.6; margin: 0; }
.howto { padding: 14px 16px; border-radius: 12px; background: rgba(127,196,245,.07); border: 1px solid rgba(127,196,245,.22); }
.howto p { margin: 6px 0 0; font-size: 13.5px; color: #d6dbca; }
.share-box { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(216,255,99,.3); background: rgba(216,255,99,.04); display: grid; gap: 12px; }
.share-box .scanbar { margin: 0; }
.share-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-row b { display: block; font-size: 14px; }
.share-row small { color: #a3aa97; font-size: 12px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-msg { margin: 0; font-size: 12.5px; color: #c9e88a; }
@media (max-width: 760px) { .mode-seg { display: flex; } .mode-seg label { flex: 1; text-align: center; } }
