/* Інтерактивна демонстрація HZSync — імітація інтерфейсу програми */
.hzd-outer { position: relative; margin: 0 auto; }
.hzd-badgewrap { text-align: center; margin: 40px 0 14px; }
.hzd-scale { transform-origin: 0 0; }
.hzd {
  --d-bg: #1c1c1f; --d-bar: #232327; --d-panel: #2a2a2f; --d-line: #38383f; --d-text: #e6e6eb; --d-dim: #9a9aa5;
  --d-acc: #f28c28; --d-ok: #3ccf7a; --d-wave: #4d8ff0; --d-wave-ref: #20c4a0; --d-grey: #6a6a73;
  width: 1100px; height: 660px; background: var(--d-bg); color: var(--d-text); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--d-line); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(242,140,40,.08);
  font: 12px/1.35 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; position: relative; user-select: none;
  display: grid; grid-template-rows: 52px 1fr 26px; text-align: left;
}
.hzd * { box-sizing: border-box; }
/* панель кнопок */
.hzd-tb { display: flex; align-items: stretch; background: var(--d-bar); border-bottom: 1px solid var(--d-line); padding: 0 6px; gap: 2px; }
.hzd-logo { display: flex; align-items: center; padding: 0 12px 0 6px; font-weight: 800; font-size: 15px; }
.hzd-logo b { color: var(--d-acc); }
.hzd-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 12px;
  color: var(--d-dim); cursor: pointer; border-radius: 7px; margin: 5px 0; font-size: 11.5px; white-space: nowrap; }
.hzd-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hzd-btn:hover, .hzd-btn.open { background: var(--d-panel); color: var(--d-text); }
.hzd-btn.acc { color: var(--d-acc); }
.hzd-btn.acc .hzd-ico { background: var(--d-acc); color: #1b1208; border-radius: 5px; padding: 1px; display: inline-flex; }
.hzd-btn.acc .hzd-ico svg { width: 15px; height: 15px; }
.hzd-sep { width: 1px; background: var(--d-line); margin: 12px 4px; }
.hzd-sp { flex: 1; }
/* меню */
.hzd-menu { position: absolute; top: 100%; left: 0; min-width: 260px; background: #26262b; border: 1px solid var(--d-line); border-radius: 8px;
  padding: 5px 0; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 30; display: none; cursor: default; text-align: left; }
.hzd-btn.right .hzd-menu { left: auto; right: 0; }
.hzd-btn.open .hzd-menu { display: block; }
.hzd-mi { padding: 5px 14px 5px 26px; color: var(--d-text); font-size: 12.5px; display: flex; justify-content: space-between; gap: 18px; cursor: pointer; position: relative; }
.hzd-mi:hover { background: var(--d-acc); color: #1b1208; }
.hzd-mi.chk::before { content: "✓"; position: absolute; left: 10px; }
.hzd-mi .k { opacity: .6; }
.hzd-mh { padding: 6px 14px 2px 12px; color: var(--d-acc); font-weight: 700; font-size: 12px; }
.hzd-ms { height: 1px; background: var(--d-line); margin: 5px 0; }
.hzd-thanks { margin: 6px 8px 3px; background: var(--d-acc); color: #1b1208; text-align: center; border-radius: 6px; padding: 6px; font-weight: 700; cursor: pointer; }
/* тіло */
.hzd-body { display: grid; grid-template-columns: 1fr; min-height: 0; }
.hzd-side { border-right: 1px solid var(--d-line); display: flex; flex-direction: column; min-height: 0; }
.hzd-side-h { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px 7px 10px; color: var(--d-dim); }
.hzd-plus { width: 30px; height: 24px; border: 1px solid var(--d-line); border-radius: 6px; display: grid; place-items: center; color: var(--d-text); cursor: pointer; background: var(--d-panel); }
.hzd-tree { overflow: auto; padding: 2px 0; }
.hzd-dev { padding: 5px 10px; cursor: pointer; }
.hzd-dev:hover { background: rgba(255,255,255,.04); }
.hzd-dev small { display: block; color: var(--d-dim); }
.hzd-dev .cl { display: none; padding: 3px 0 0 12px; color: var(--d-dim); }
.hzd-dev.open .cl { display: block; }
.hzd-dev .cl div { padding: 1px 0; }
.hzd-dev .cl .ok { color: var(--d-ok); }
.hzd-main { display: grid; grid-template-rows: 196px 34px 1fr; min-width: 0; min-height: 0; }
/* переглядач */
.hzd-viewer { display: flex; gap: 6px; padding: 6px 8px 0; }
.hzd-tile { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hzd-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 3px; overflow: hidden; position: relative; display: grid; place-items: center; color: var(--d-dim); font-size: 11px; }
.hzd-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 6s linear; }
.hzd.playing .hzd-frame img { transform: scale(1.1); }
.hzd-cap { color: var(--d-dim); font-size: 10.5px; padding: 3px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* рядок керування */
.hzd-ctl { display: flex; align-items: center; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--d-line); }
.hzd-seg { display: flex; border: 1px solid var(--d-line); border-radius: 6px; overflow: hidden; }
.hzd-seg span { padding: 3px 10px; cursor: pointer; color: var(--d-dim); }
.hzd-seg span.on { background: var(--d-panel); color: var(--d-acc); font-weight: 700; }
.hzd-info { color: var(--d-text); font-weight: 600; white-space: nowrap; }
.hzd-pb { border: 1px solid var(--d-line); border-radius: 6px; padding: 3px 10px; cursor: pointer; background: var(--d-panel); }
.hzd-play { border-color: var(--d-acc); font-weight: 700; min-width: 92px; text-align: center; }
.hzd-time { color: var(--d-acc); font-variant-numeric: tabular-nums; min-width: 78px; }
/* таймлайн */
.hzd-tl { position: relative; overflow: hidden; }
.hzd-ruler { position: absolute; left: 150px; right: 0; top: 0; height: 22px; border-bottom: 1px solid var(--d-line); cursor: pointer; }
.hzd-ruler span { position: absolute; top: 4px; font-size: 10px; color: var(--d-dim); transform: translateX(3px); }
.hzd-ruler span::before { content: ""; position: absolute; left: -3px; top: 10px; width: 1px; height: 8px; background: var(--d-grey); }
.hzd-rows { position: absolute; top: 22px; left: 0; right: 0; bottom: 0; }
.hzd-row { position: relative; height: 66px; border-bottom: 1px solid #26262a; }
.hzd-head { position: absolute; left: 0; top: 0; bottom: 0; width: 150px; background: var(--d-panel); padding: 7px 8px 0 10px; border-left: 3px solid var(--d-grey); z-index: 2; }
.hzd-row.ok .hzd-head { border-left-color: var(--d-ok); }
.hzd-head b { display: block; font-size: 12px; }
.hzd-head small { color: var(--d-dim); display: block; font-size: 10px; }
.hzd-ms2 { position: absolute; right: 6px; top: 6px; display: flex; gap: 3px; }
.hzd-ms2 span { width: 18px; height: 16px; border: 1px solid var(--d-grey); border-radius: 4px; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: var(--d-dim); cursor: pointer; }
.hzd-ms2 span.m.on { background: #d9534f; border-color: #d9534f; color: #111; }
.hzd-ms2 span.s.on { background: #e0b020; border-color: #e0b020; color: #111; }
.hzd-lane { position: absolute; left: 150px; right: 0; top: 0; bottom: 0; }
.hzd-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 4px; border: 1px solid var(--d-grey); background: rgba(120,120,130,.18); overflow: hidden; cursor: pointer;
  transition: left 1s cubic-bezier(.3,.7,.2,1), border-color .3s, background-color .3s, box-shadow .3s; }
.hzd-clip span { position: absolute; left: 5px; top: 2px; font-size: 9.5px; font-weight: 700; color: #ddd; white-space: nowrap; text-shadow: 0 1px 2px #000; z-index: 1; }
.hzd-clip canvas { position: absolute; left: 0; top: 14px; width: 100%; height: calc(100% - 15px); }
.hzd-clip.ok { border-color: var(--d-ok); background: rgba(60,207,122,.12); }
.hzd-clip.sel { box-shadow: 0 0 0 2px var(--d-acc); }
.hzd-clip.search { animation: hzd-pulse .5s ease-in-out infinite alternate; border-color: var(--d-acc); }
@keyframes hzd-pulse { from { box-shadow: 0 0 0 0 rgba(242,140,40,.0); } to { box-shadow: 0 0 0 4px rgba(242,140,40,.55); } }
.hzd-row.muted .hzd-clip { opacity: .35; }
.hzd-ph { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--d-acc); margin-left: 150px; z-index: 5; pointer-events: none; }
.hzd-ph::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 9px solid var(--d-acc); }
/* таблиця */
.hzd-table { position: absolute; inset: 0; overflow: auto; background: var(--d-bg); display: none; z-index: 6; }
.hzd.tableview .hzd-table { display: block; }
.hzd-table table { width: 100%; border-collapse: collapse; }
.hzd-table th, .hzd-table td { text-align: left; padding: 5px 10px; border-bottom: 1px solid #2c2c31; white-space: nowrap; }
.hzd-table th { color: var(--d-dim); font-weight: 600; position: sticky; top: 0; background: var(--d-bar); }
.hzd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--d-grey); }
.hzd-dot.ok { background: var(--d-ok); }
/* рядок стану */
.hzd-status { display: flex; align-items: center; gap: 14px; padding: 0 10px; background: var(--d-bar); border-top: 1px solid var(--d-line); color: var(--d-dim); font-size: 11px; }
.hzd-status .g { color: var(--d-ok); }
.hzd-status .r { margin-left: auto; }
/* підказки й тости */
.hzd-hint { position: absolute; z-index: 40; background: var(--d-acc); color: #1b1208; font-weight: 700; padding: 7px 12px; border-radius: 8px; font-size: 12.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: hzd-bob 1.2s ease-in-out infinite alternate; pointer-events: none; white-space: nowrap; }
.hzd-hint::before { content: ""; position: absolute; top: -7px; left: 22px; border: 7px solid transparent; border-top: 0; border-bottom: 7px solid var(--d-acc); }
@keyframes hzd-bob { from { transform: translateY(0); } to { transform: translateY(4px); } }
.hzd-toast { position: absolute; left: 50%; bottom: 40px; transform: translate(-50%, 20px); background: #2f2f35; border: 1px solid var(--d-acc); color: var(--d-text);
  padding: 10px 16px; border-radius: 10px; font-size: 13px; max-width: 620px; text-align: center; opacity: 0; transition: .25s; z-index: 50; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.hzd-toast.show { opacity: 1; transform: translate(-50%, 0); }
.hzd-modal { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: none; place-items: center; z-index: 60; }
.hzd-modal.show { display: grid; }
.hzd-card { width: 460px; background: #26262b; border: 1px solid var(--d-line); border-radius: 12px; padding: 22px; text-align: left; }
.hzd-card h4 { margin: 0 0 10px; font-size: 15px; }
.hzd-card ol { margin: 0 0 14px; padding-left: 18px; color: var(--d-dim); }
.hzd-card li { padding: 3px 0; }
.hzd-card li.done { color: var(--d-text); }
.hzd-card li.done::marker { color: var(--d-ok); }
.hzd-card .bin { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 5px; background: var(--d-panel); border: 1px solid var(--d-line); }
.hzd-card .close { display: inline-block; margin-top: 8px; padding: 6px 14px; background: var(--d-acc); color: #1b1208; border-radius: 7px; font-weight: 700; cursor: pointer; }
.hzd-badge { display: inline-block; background: var(--acc, #f28c28); color: #17110a; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; z-index: 3; letter-spacing: .03em; }
.hzd-under { text-align: center; color: #a0a0ab; font-size: 14px; margin-top: 12px; }
.hzd-hint.rt::before { left: auto; right: 22px; }
.hzd:has(.hzd-btn.open) .hzd-hint, .hzd:has(.hzd-modal.show) .hzd-hint { display: none !important; }
.hzd-head small.l3 { margin-top: 2px; }
.hzd-rows { background: linear-gradient(to right, var(--d-panel) 150px, transparent 150px); }
.hzd-newtr { width: 134px; margin: 8px 0 0 8px; border: 1px dashed var(--d-dim); border-radius: 6px; color: var(--d-dim);
  text-align: center; font-size: 11px; padding: 6px 0; cursor: pointer; position: relative; z-index: 2; }
.hzd-newtr:hover { color: var(--d-acc); border-color: var(--d-acc); }
.hzd-zl { color: var(--d-text, #e6e6e6); margin-left: 6px; }
.hzd-zs { width: 90px; height: 4px; background: var(--d-line); border-radius: 2px; position: relative; }
.hzd-zs i { position: absolute; left: 55%; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #e6e6e6; }
.hzd-z { padding: 3px 8px; font-weight: 700; }
