/* CadreScripts Studio: the dialogs, the toast and the Export window's controls (entry g: split out of studio.css, so
   each file stays within its size limit). Loaded with the page (index.html); colours are studio.css's variables. */
dialog { border: 0; border-radius: 18px; padding: 0; max-width: min(520px, calc(100vw - 24px)); width: 100%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dlg { position: relative; padding: 26px; display: grid; gap: 14px; }
.dlg h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.dlg .lead { margin: 0; font-size: 14px; }
.x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 24px; color: var(--muted); }
.actions { display: flex; gap: 10px; justify-content: flex-end; }
.actions.two { display: grid; grid-template-columns: 1fr 1fr; }
.actions.big button { min-height: 56px; font-size: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cl-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cl-rows li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
.cl-rows li:first-child { border-top: 0; }
.cl-rows .t { flex: 1; min-width: 0; }
.cl-rows .t b { display: block; font-size: 14px; }
.cl-rows .t span, .cl-rows .n span { font-size: 12px; color: var(--muted); }
.cl-rows .n { text-align: right; font-variant-numeric: tabular-nums; }
.cl-rows .n b { display: block; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; border: 0; background: var(--line2); padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-pressed="true"] { background: var(--amber); }
.switch[aria-pressed="true"]::after { left: 21px; }
.saves { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--amber-soft); color: var(--amber-ink); }
.saves b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; color: var(--ink); }
.saves .eyebrow { color: var(--amber-ink); margin: 0; }
.after { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.review .rv-track { height: 4px; border-radius: 2px; background: var(--s3); overflow: hidden; }
#rvFill { height: 100%; width: 0; background: var(--amber); transition: width .2s; }
.rv-card { padding: 18px; border-radius: 16px; background: var(--s2); display: grid; gap: 14px; }
.rv-text { margin: 0; font: 21px/1.55 var(--doc); }
.rv-text mark { background: var(--amber); color: #fff; border-radius: 5px; padding: 1px 5px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-ink); }
.facts { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--s2); font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; }
.keylist { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.keylist dd { margin: 0; color: var(--ink2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 label { font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 12px 16px; border-radius: 12px; background: var(--chrome); color: #fff; box-shadow: var(--shadow); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; pointer-events: auto; }
html[data-screen="editor"] .toast { bottom: 108px; }   /* above the timeline, never over it */
textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); font: inherit; resize: vertical; }
.opt { font-weight: 400; color: var(--muted); }
.hint { margin: -6px 0 0; font-size: 12px; color: var(--muted); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.points li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.points b { display: block; font-size: 14px; }
.points small { color: var(--muted); font-size: 12px; }
.points .ghost { min-height: 34px; }
.ex-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.ex-row .eyebrow { margin: 0; }
select.ex-sel { width: auto; min-width: 220px; min-height: 38px; }
.polish { align-items: flex-start !important; margin-top: 8px; }
.polish span { font-weight: 400; color: var(--ink2); }
.polish b { color: var(--ink); }
.toast button { margin-left: 10px; border: 0; background: transparent; color: var(--amber-light); font-weight: 600; }

@media (max-width: 860px) { html[data-screen="editor"] .toast { bottom: 160px; } }   /* above the selection bar and the waveform */
