/* Vimlero studio — Swiss direction, second generation: soft radii, depth, motion. One blue action per screen. */
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("/studio/fonts/readex-pro-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("/studio/fonts/readex-pro-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url("/studio/fonts/readex-pro-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url("/studio/fonts/readex-pro-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-weight: 400; font-display: swap; src: url("/studio/fonts/readex-pro-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 500; font-display: swap; src: url("/studio/fonts/readex-pro-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 600; font-display: swap; src: url("/studio/fonts/readex-pro-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-weight: 700; font-display: swap; src: url("/studio/fonts/readex-pro-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/studio/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --white: #FFFFFF; --paper: #F8F8F6; --bg: #F3F3F0; --line-2: #E8E8E3; --line: #DCDCD6; --mute-2: #B9BAB3; --mute: #5E6168; --ink-2: #2A2D33; --ink: #111214;
  --c50: #F1F3FF; --c100: #E1E6FF; --c200: #C9D0FF; --cobalt: #2F4BFF; --c700: #1E36D6;
  --ok: #0E8A5F; --ok-bg: #E7F4EE; --warn: #B76E00; --warn-bg: #FBF0E0; --err: #D93636; --err-bg: #FCEAEA;
  --stage: #1B1C1F; --stage-2: #16171A; --c300: #8FA0FF; --gold: #FFD23F;
  --r: 12px; --r-sm: 8px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(17,18,20,.04), 0 10px 30px rgba(17,18,20,.05);
  --shadow-up: 0 2px 4px rgba(17,18,20,.05), 0 20px 44px rgba(17,18,20,.1);
  --sans: "Readex Pro", system-ui, sans-serif; --mono: "IBM Plex Mono", "Readex Pro", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell */
.app { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; background: var(--paper); border-inline-end: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.wm { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 6px 10px 22px; font-weight: 700; font-size: 22px; letter-spacing: -.04em; color: var(--ink); text-decoration: none; }
.mark { border-radius: 4px; }
.mark { display: block; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500; color: var(--mute); text-decoration: none; border: 0; background: none; width: 100%; text-align: start; transition: background .15s ease, color .15s ease; }
.nav:hover { background: var(--line-2); color: var(--ink); }
.nav.on { background: var(--ink); color: #fff; font-weight: 600; }
.nav[aria-disabled="true"] { color: var(--mute-2); cursor: default; background: none; }
.nav .soon { margin-inline-start: auto; font-size: 11px; }
.grow { flex-grow: 1; }
.wallet { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.wallet .num { font-family: var(--mono); font-size: 24px; line-height: 1.2; }
.bar { height: 4px; background: var(--c100); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 4px; background: var(--cobalt); border-radius: 2px; }
.bar.dark { background: var(--ink-2); }
.who { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; font-size: 13px; line-height: 1.4; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { min-height: 68px; flex-shrink: 0; border-bottom: 1px solid var(--line); background: rgba(243,243,240,.86); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 32px; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 22px; font-weight: 700; }
.body { padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; white-space: nowrap; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn.wide { width: 100%; }
a.btn { text-decoration: none; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.bp { background: var(--cobalt); color: #fff; box-shadow: 0 8px 20px rgba(47,75,255,.22); } .bp:hover:not(:disabled) { background: var(--c700); }
.bk { background: var(--ink); color: #fff; }
/* The final yes of anything that deletes: red, with white words. */
.bd { background: var(--err); color: #fff; box-shadow: 0 8px 20px rgba(180,35,35,.22); } .bd:hover:not(:disabled) { background: #9E1F1F; } .bd:disabled { opacity: .5; }
.bo { background: #fff; color: var(--ink); border: 1px solid var(--line); } .bo:hover:not(:disabled) { border-color: var(--ink); }
.bg { background: transparent; color: var(--mute); }
.btn:disabled { background: var(--line-2); color: var(--mute-2); border-color: var(--line-2); box-shadow: none; }
.danger { color: var(--err); }
.input { height: 46px; border: 1px solid #CFCFC9; border-radius: var(--r-sm); background: #fff; padding: 0 14px; width: 100%; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(47,75,255,.15); }
.input.bad { border-color: var(--err); box-shadow: 0 0 0 4px rgba(217,54,54,.12); }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--mute); }
.hint { font-size: 12px; color: var(--mute); line-height: 1.7; }
.err-text { font-size: 12px; color: var(--err); }
.search { width: 300px; max-width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--mute); }
.search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px; background: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.c-run { background: var(--c50); color: var(--c700); } .c-ok { background: var(--ok-bg); color: var(--ok); } .c-wait { background: var(--warn-bg); color: #8A5300; } .c-bad { background: var(--err-bg); color: #B42323; } .c-ink { background: var(--ink); color: #fff; } .c-gray { background: var(--line-2); color: var(--mute); }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--line-2); border-radius: 10px; }
.seg button { flex: 1; height: 34px; border: 0; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 500; color: var(--mute); padding: 0 8px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17,18,20,.08); }
.seg button:disabled { color: var(--mute-2); }
.toggle { width: 44px; height: 26px; border-radius: 999px; background: var(--mute-2); border: 0; position: relative; padding: 0; flex-shrink: 0; transition: background .15s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s ease, right .15s ease; }
.toggle[aria-checked="true"] { background: var(--cobalt); }
.toggle[aria-checked="true"]::after { right: auto; left: 3px; }
.select { height: 40px; border: 1px solid #CFCFC9; border-radius: var(--r-sm); background: #fff; padding: 0 10px; font-size: 14px; min-width: 200px; }

/* Tabs */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--line-2); border-radius: 10px; font-size: 14px; flex-wrap: wrap; align-self: flex-start; }
.tabs button { border: 0; background: none; height: 38px; padding: 0 14px; border-radius: 7px; color: var(--mute); font-weight: 500; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(17,18,20,.08); }

/* Projects */
.grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; gap: 10px; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.thumb { aspect-ratio: 16 / 10; background: var(--stage); position: relative; border: 0; padding: 0; width: 100%; display: block; border-radius: var(--r-sm); overflow: hidden; }
.thumb.draft { background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--mute); font-size: 13px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.filecard img.mini { object-fit: cover; }
.thumb .dur { position: absolute; bottom: 8px; left: 8px; font: 500 11px var(--mono); padding: 2px 6px; border-radius: 4px; background: rgba(17,18,20,.7); color: #fff; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ptitle { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: none; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.newcard { min-height: 240px; height: 100%; border: 1.5px dashed var(--mute-2); border-radius: var(--r); background: none; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--mute); font-size: 14px; width: 100%; transition: border-color .15s ease, color .15s ease; }
.pcard.new { background: transparent; border: 0; padding: 0; box-shadow: none; }
.newcard:hover { border-color: var(--ink); color: var(--ink); }
.menu { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-up); padding: 6px; min-width: 200px; display: flex; flex-direction: column; }
.menu button { border: 0; background: none; text-align: start; padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.menu button:hover { background: var(--bg); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.empty { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 56px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; box-shadow: var(--shadow); }
.empty h2 { margin: 0; font-size: 22px; }

/* Wizard */
.wiz { min-height: 100vh; display: flex; flex-direction: column; }
.steps { display: flex; gap: 6px; width: min(640px, 100%); }
.st { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--mute-2); border: 0; background: none; padding: 0; text-align: right; }
.st i { height: 4px; border-radius: 2px; background: var(--line); display: block; }
.st.d { color: var(--mute); } .st.d i { background: var(--ink); }
.st.c { color: var(--cobalt); font-weight: 600; } .st.c i { background: var(--cobalt); }
.wbody { flex: 1; padding: 40px 56px 48px; display: flex; flex-direction: column; gap: 44px; }
.wsec { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wsec .shead { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 40px; }
.wsec .shead h2 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.whead { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.whead .n { font: 500 13px var(--mono); color: var(--mute); margin-bottom: 8px; }
.whead h2 { margin: 0; font-size: 32px; line-height: 1.25; }
.whead p { margin: 0; font-size: 15px; line-height: 1.8; max-width: 460px; color: var(--mute); }
.foot { min-height: 76px; flex-shrink: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 32px; position: sticky; bottom: 0; flex-wrap: wrap; }
.opt { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; text-align: start; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.opt:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { border: 2px solid var(--cobalt); padding: 17px; background: var(--c50); box-shadow: 0 0 0 4px rgba(47,75,255,.12); }
.opt:disabled { opacity: .45; }
.opt .tick { position: absolute; top: 12px; inset-inline-end: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--cobalt); color: #fff; display: none; align-items: center; justify-content: center; font-size: 13px; }
.opt[aria-pressed="true"] .tick, .opt[aria-checked="true"] .tick { display: flex; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cols4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cols5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.cols6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; }
.drop { border: 1.5px dashed var(--mute-2); border-radius: var(--r); background: #fff; min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 24px; color: var(--mute); transition: border-color .15s ease, background .15s ease; }
.drop b { display: block; font-size: 19px; color: var(--ink); }
.drop.live { cursor: pointer; }
.drop.live:hover { border-color: var(--ink); }
.drop.over { border-color: var(--cobalt); background: var(--c50); }
.filecard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.filecard .mini { width: 44px; height: 60px; background: var(--stage); border-radius: 6px; flex-shrink: 0; }
.detect { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; font-size: 14px; }
.detect .lbl { grid-column: span 2; }
.upbar { height: 4px; background: var(--c100); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.upbar > span { display: block; height: 4px; background: var(--cobalt); width: 0; transition: width .2s; }
.note { padding: 13px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; line-height: 1.8; display: flex; gap: 10px; }
.note::before { content: ""; width: 3px; align-self: stretch; background: var(--ok); flex-shrink: 0; }
.note.warn::before { background: var(--warn); }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute-2); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tpl { flex-direction: row; align-items: center; gap: 14px; }
.tpl .mini { width: 34px; height: 60px; background: var(--stage); border-radius: 5px; flex-shrink: 0; position: relative; }
.tpl .mini::after { content: ""; position: absolute; bottom: 10px; left: 4px; right: 4px; height: 5px; background: var(--cobalt); }
.tpl b { font-size: 15px; display: block; }
.tpl .use { font-size: 13px; font-weight: 600; color: var(--cobalt); white-space: nowrap; margin-inline-start: auto; }
.asp { flex-direction: row; align-items: center; gap: 18px; }
.asp .box { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.asp .box i { border: 2px solid var(--ink); display: block; }
.asp[aria-pressed="true"] .box i { border-color: var(--cobalt); }
.phone { background: var(--stage); border-radius: 10px; position: relative; overflow: hidden; flex-shrink: 0; }
.phone .head { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%; background: #3B3F47; }
.phone .body-s { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); background: #33363D; }
.lay { align-items: center; }
.lay .t { font-weight: 600; font-size: 14px; }
.lay .s { font-size: 12px; text-align: center; line-height: 1.5; color: var(--mute); }
.sty { padding: 0; gap: 0; overflow: hidden; }
.sty .pv { border-radius: var(--r) var(--r) 0 0; }
.sty[aria-pressed="true"] { padding: 0; }
.sty .pv { height: 84px; background: var(--stage); position: relative; overflow: hidden; }
.sty .meta { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.sty .meta b { font-size: 14px; }
.sty .meta span { font-size: 12px; color: var(--mute); }
.lvl { flex-direction: row; align-items: center; gap: 18px; }
.lvl .info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.lvl .info b { font-size: 26px; }
.lvl .tick { display: none !important; }
.lvl .info span { font-size: 12px; line-height: 1.6; color: var(--mute); }
.lvl .price { text-align: left; flex-shrink: 0; padding-left: 12px; }
.lvl .price .mono { font-size: 22px; }
.lvl.studio { background: var(--ink); color: #fff; border-color: var(--ink); background-image: radial-gradient(70% 60% at 85% 0%, rgba(47,75,255,.45), transparent 70%); }
.lvl.studio .info span, .lvl.studio .muted { color: var(--mute-2); }
.lvl.studio[aria-pressed="true"] { background: var(--ink); border-color: var(--cobalt); }
.cap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
/* Between a phone and a wide screen the caption choices in pairs do not fit next to the preview: one under the other. */
@media (min-width: 961px) and (max-width: 1180px) { .cap-grid .pair { grid-template-columns: minmax(0, 1fr); } }
.rowline { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px 22px; }
.bgopt { padding: 0; gap: 0; }
.bgopt[aria-pressed="true"] { padding: 0; }
.bgopt .sw { height: 58px; background: var(--ink-2); border-radius: var(--r) var(--r) 0 0; display: flex; align-items: center; justify-content: center; }
.bgopt .l { padding: 7px; font-size: 12px; text-align: center; }
.capdemo { color: #fff; font-weight: 700; font-size: 15px; }
.cap-soft { background: rgba(17,18,20,.55); border-radius: 10px; padding: 3px 10px; }
.cap-word .hl { background: var(--cobalt); border-radius: 5px; padding: 0 5px; }
.cap-bar { background: #fff; color: var(--ink); padding: 3px 10px; }
.cap-outline { -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.cap-none { text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.stage { background: var(--stage); border-radius: var(--r); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 16px; }
.stage .cap { position: absolute; left: 0; right: 0; display: flex; justify-content: center; padding: 0 12px; text-align: center; }
.stage .cap span.line { font-weight: 700; color: #fff; }
.brands-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.brandpick { flex-direction: row; align-items: center; gap: 10px; padding: 9px 12px; }
.brandpick[aria-pressed="true"] { padding: 8px 11px; }
.swatches { display: flex; }
.swatches i { width: 14px; height: 22px; display: block; }
.linkish { border: 0; background: none; color: var(--cobalt); font-weight: 600; font-size: 13px; padding: 0 6px; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(17,18,20,.55); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 780px; max-width: 100%; max-height: calc(100vh - 48px); overflow: auto; background: #fff; border-radius: var(--r-lg); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(17,18,20,.35); animation: pop .25s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal.small { width: 460px; }
.mhead { padding: 24px 32px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.mhead h2 { margin: 0; font-size: 26px; }
.mbody { padding: 20px 32px; display: flex; flex-direction: column; gap: 14px; }
.mfoot { padding: 16px 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qgrid { display: grid; grid-template-columns: 1fr 280px; }
.qlist { padding: 16px 32px; border-left: 1px solid var(--line); }
.qline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #EFEFEA; font-size: 14px; }
.qside { padding: 16px 26px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.qside .big { font: 500 44px/1 var(--mono); }
.qsave { padding: 16px 32px; border-top: 1px solid var(--line); background: var(--c50); display: flex; align-items: center; gap: 14px; }
.qwarn { padding: 12px 32px; border-top: 1px solid var(--line); background: var(--warn-bg); font-size: 13px; line-height: 1.7; color: #5E4200; }

/* Caption preview fonts (same files the renderer burns in) */
@font-face { font-family: "Cap-readex-pro"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/readex-pro-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-readex-pro"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/readex-pro-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Cap-cairo"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/cairo-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-cairo"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/cairo-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Cap-tajawal"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/tajawal-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-tajawal"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/tajawal-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Cap-almarai"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/almarai-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-almarai"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/almarai-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Cap-ibm-plex-sans-arabic"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/ibm-plex-sans-arabic-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-ibm-plex-sans-arabic"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/ibm-plex-sans-arabic-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Cap-noto-kufi-arabic"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/noto-kufi-arabic-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cap-noto-kufi-arabic"; font-weight: 700; font-display: swap; src: url("/studio/caption-fonts/noto-kufi-arabic-latin-700.woff2") format("woff2"); }
.stage .cap .sub { display: block; margin-top: 6px; font-size: .58em; direction: ltr; }
.cpick { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cpick .swatch { width: 44px; height: 44px; border: 1px solid var(--line); padding: 3px; background: #fff; position: relative; }
.cpick .swatch input { width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.cpick button { border: 0; background: none; font-size: 11px; color: var(--mute); padding: 0; }
.cpick button[aria-pressed="true"] { color: var(--cobalt); font-weight: 600; }
.colors3 { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.colors3 .colors-note { flex-basis: 100%; }
.fontfile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }

/* Progress */
.prog { display: grid; grid-template-columns: 1fr 520px; flex: 1; min-height: calc(100vh - 68px); }
.prog .left { padding: 36px 56px; display: flex; flex-direction: column; gap: 20px; }
.pstep { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.pstep.w { color: var(--mute-2); }
.pstep.r { font-weight: 600; }
.pbox { width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--line); }
.pstep.d .pbox { background: var(--ok); border-color: var(--ok); color: #fff; }
.pstep.r .pbox { border: 2px solid var(--cobalt); }
.pstep.r .pbox::after { content: ""; width: 10px; height: 10px; background: var(--cobalt); }
.pstep.f .pbox { background: var(--err); border-color: var(--err); color: #fff; }
.pbar { height: 6px; background: var(--c100); }
.pbar > span { display: block; height: 6px; background: var(--cobalt); transition: width .4s; }
.transcript { background: #fff; border-right: 1px solid var(--line); padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; overflow: auto; max-height: calc(100vh - 68px); }
.transcript p { margin: 0; font-size: 17px; line-height: 2.1; }
.transcript .ask { background: var(--warn-bg); padding: 1px 4px; }
.stagepane { background: var(--stage); display: flex; align-items: center; justify-content: center; padding: 32px; }
.stagepane video { width: 100%; max-height: 70vh; background: #000; }
.qline .chip { height: 22px; }

/* Review */
.rv { display: grid; grid-template-columns: 1fr 440px; min-height: calc(100vh - 68px); }
.rv-text { padding: 32px 56px; display: flex; flex-direction: column; gap: 22px; font-size: 20px; line-height: 2.2; position: relative; }
.rv-seg { display: flex; gap: 24px; }
.rv-seg .t { font: 500 12px var(--mono); color: var(--mute); width: 60px; flex-shrink: 0; line-height: 3.6; }
.rv-seg p { margin: 0; }
.w { cursor: pointer; border-radius: 2px; }
.w:hover { background: var(--line-2); }
.w.fix { text-decoration: underline; text-decoration-color: var(--cobalt); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.w.ask { background: var(--warn-bg); padding: 1px 4px; }
.w.now { background: var(--ink); color: #fff; padding: 1px 4px; }
.rv-stage { background: var(--stage); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; position: sticky; top: 0; height: calc(100vh - 68px); }
.rv-stage video { width: 100%; max-height: 62vh; background: #000; }
.legend { width: 100%; border-top: 1px solid var(--ink-2); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--mute-2); }
.legend span { display: flex; gap: 10px; align-items: center; }
.legend i { width: 22px; flex-shrink: 0; display: block; }
.pop { position: absolute; z-index: 30; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-up); font-size: 14px; line-height: 1.6; }
.pop .ph { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pop .pb { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.pop .pb button { border: 0; background: none; text-align: right; padding: 9px 10px; font-size: 14px; }
.pop .pb button.pri { background: var(--c50); color: var(--c700); font-weight: 600; }
.pop .pb button:hover { background: var(--bg); }
.pop .pb input { height: 40px; border: 1px solid var(--mute-2); padding: 0 10px; margin-top: 4px; font-size: 14px; }

/* Result */
.res { display: grid; grid-template-columns: 1fr 440px; min-height: calc(100vh - 68px); }
.res-stage { background: var(--stage); display: flex; align-items: center; justify-content: center; padding: 32px; }
.res-stage video { max-width: 100%; max-height: calc(100vh - 132px); background: #000; }
.res-side { background: #fff; border-right: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.res-side h1 { margin: 0; font-size: 32px; }
.res-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }

/* Editor */
.ed { display: grid; grid-template-columns: 480px 1fr; min-height: calc(100vh - 68px); }
.ed-side { background: #fff; border-left: 1px solid var(--line); padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ed-body { display: flex; flex-direction: column; gap: 20px; }
.ed-body.locked { opacity: .5; pointer-events: none; }
.ed-stage { background: var(--stage); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; position: sticky; top: 0; height: calc(100vh - 68px); }
.ed-player { display: flex; flex-direction: column; gap: 12px; height: 100%; max-height: calc(100vh - 150px); align-items: center; justify-content: center; width: 100%; }
.ed-frame { position: relative; overflow: hidden; background: #000; height: 100%; max-width: 100%; max-height: calc(100vh - 210px); cursor: pointer; }
.ed-pan { position: absolute; inset: 0; overflow: hidden; }
.ed-inner { position: absolute; inset: 0; will-change: transform, filter; }
.ed-video { position: absolute; display: block; max-width: none; }
.ed-layer { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; color-scheme: normal; }
.ed-controls { display: flex; align-items: center; gap: 12px; width: min(100%, 520px); direction: ltr; }
.ed-play { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; flex-shrink: 0; }
.ed-scrub { flex: 1; accent-color: var(--cobalt); }
.ed-clock { color: var(--mute-2); font-size: 12px; white-space: nowrap; }
.ed-note { color: var(--mute-2); margin: 0; min-height: 20px; text-align: center; }
.ed-text { font-size: 18px; line-height: 2.1; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 330px); overflow: auto; padding-left: 6px; }
.ed-text p { margin: 0; }
.w.rm-ai { color: var(--mute-2); text-decoration: line-through; text-decoration-color: var(--mute-2); }
.w.rm-me { color: #B42323; text-decoration: line-through; text-decoration-thickness: 2px; }
.w.sel { background: var(--c100); }
.ed-legend { border-top: 0; padding-top: 0; flex-direction: row; gap: 18px; color: var(--mute); }
.ed-legend i { height: 2px; }
.lg-ai { background: var(--mute-2); } .lg-me { background: #B42323; }
.ed-act { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-up); }
.ed-versions { display: flex; flex-direction: column; gap: 8px; }
.ed-ver { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ed-ver.on { border-color: var(--ink); }
.ed-sum { margin-top: 8px; }
.chat-list { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 360px); min-height: 220px; overflow: auto; }
.chat-empty { display: flex; flex-direction: column; gap: 12px; }
.chat-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-ex .chip { border: 0; cursor: pointer; height: auto; padding: 6px 10px; white-space: normal; text-align: right; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.7; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.msg p { margin: 0; white-space: pre-wrap; }
.msg.me { align-self: flex-start; background: var(--ink); color: #fff; }
.msg.ai { align-self: flex-end; background: var(--bg); }
.msg.typing { color: var(--mute); }
.chat-box { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.chat-input { width: 100%; resize: vertical; border: 1px solid #CFCFC9; border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 15px; line-height: 1.6; }
.chat-input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(47,75,255,.15); }
.chat-box .prow { justify-content: space-between; }
.rv-form { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.rv-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--mute); }
.rv-form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.rv-form input[type=text], .rv-form input[type=number], .rv-form input[type=password], .rv-form select { height: 38px; border: 1px solid var(--line); background: #fff; padding: 0 10px; }
.rv-days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rv-days input { width: 92px; }
.rv-chip { border: 1px solid var(--line); background: #fff; padding: 4px 10px; font-size: 13px; }
.rv-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rv-list { display: flex; flex-direction: column; gap: 8px; }
.rv-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rv-item.off { opacity: .7; }
.rv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rv-meta { font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.rv-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rv-actions input { width: 80px; height: 32px; border: 1px solid var(--line); padding: 0 8px; }
.rv-c { background: #fff; border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rv-c.done { opacity: .6; }
.rv-c .rv-time { font-family: var(--mono); color: var(--cobalt); background: none; border: 0; padding: 0; font-size: 13px; }
.rv-c p { margin: 0; }
.chat-tools { display: flex; gap: 6px; align-items: center; }
.chat-tool { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink); }
.chat-tool.rec { background: #B42323; color: #fff; border-color: #B42323; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.att { position: relative; width: 64px; height: 64px; background: var(--stage); overflow: hidden; display: grid; place-items: center; color: #fff; font-size: 11px; }
.att img { width: 100%; height: 100%; object-fit: cover; }
.att .x { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border: 0; background: rgba(17,18,20,.75); color: #fff; font-size: 12px; line-height: 20px; padding: 0; }
.att .dur { position: absolute; bottom: 2px; right: 4px; font: 500 10px var(--mono); }
.att.up { opacity: .55; }
.msg .atts { display: flex; gap: 6px; flex-wrap: wrap; }
.msg .atts .att { width: 56px; height: 56px; }
.ed-side .pair, .ed-side .trio { grid-template-columns: 1fr; } .ed-side .cols5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Brands */
.brands { display: grid; grid-template-columns: 1fr 480px; flex: 1; }
.kits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.kit { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow); }
.kit .sw { height: 120px; display: flex; }
.kit .sw i { flex: 1; display: block; }
.kit .sw i:first-child { flex: 2; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 40px; font-style: normal; }
.kit .meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.panel { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.panel .ph { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel .pb { padding: 20px 24px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.colors input[type="color"] { width: 40px; height: 40px; border: 1px solid var(--line); padding: 2px; background: #fff; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; }

/* Boot + toast */
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.boot .card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px; width: min(460px, 100%); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; box-shadow: var(--shadow-up); }
/* Centred without a transform (the pop animation ends on transform: none), never wider than the screen, and a
   long word or file name wraps instead of running off the edge. */
.toast { position: fixed; top: 80px; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: min(420px, calc(100vw - 32px)); box-sizing: border-box; z-index: 60; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; text-align: start; box-shadow: var(--shadow-up); animation: pop .25s ease both; }
.toast.bad { background: var(--err); }

/* Library (admin) */
.lib-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lib-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.lib-stat .num { font-family: var(--mono); font-size: 22px; line-height: 1.3; }
.lib-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lib-bar input { flex: 1; min-width: 220px; height: 40px; border: 1px solid var(--line); padding: 0 12px; background: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lib-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lib-card.off { opacity: .55; }
.lib-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--line-2); }
.lib-card audio { width: 100%; height: 36px; }
.lib-icon { height: 72px; display: grid; place-items: center; background: var(--paper); }
.lib-icon img { width: 40px; height: 40px; }
.lib-font { font-size: 22px; line-height: 1.5; padding: 10px; background: var(--paper); min-height: 72px; }
.lib-grade { width: 100%; aspect-ratio: 9 / 16; max-height: 300px; object-fit: cover; display: block; }
.lib-card video { width: 100%; aspect-ratio: 9 / 16; max-height: 300px; object-fit: contain; background: var(--stage); cursor: pointer; }
.lib-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.lib-card .tags span { font-size: 11px; background: var(--line-2); color: var(--mute); padding: 1px 6px; }
.lib-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Review page (/r/<token>) */
.rvp { min-height: 100vh; display: flex; flex-direction: column; }
.rvp-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 24px 32px; align-items: start; }
.rvp-stage { background: var(--stage); display: flex; flex-direction: column; align-items: center; padding: 16px; }
.rvp-video { width: 100%; max-height: 72vh; background: #000; }
.rvp-marks { position: relative; width: 100%; height: 10px; margin-top: 8px; background: rgba(255,255,255,.12); }
.rvp-marks span { position: absolute; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: #F2B33D; transform: translateX(-50%); }
.rvp-side { display: flex; flex-direction: column; gap: 12px; }
.rvp-side textarea { border: 1px solid var(--line); padding: 8px 10px; resize: vertical; }
.rvp-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.rvp-center .rv-form { width: 100%; max-width: 340px; text-align: right; }
@media (max-width: 860px) {
  .rvp .top { height: auto; flex-wrap: wrap; padding: 12px 16px; }
  .rvp-main { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}

/* Licences and credits (/credits) */
.credits { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; display: flex; flex-direction: column; gap: 18px; }
.credits h1 { font-size: 26px; margin: 0; }
.credits h2 { font-size: 17px; margin: 0 0 6px; }
.credits section { background: #fff; border: 1px solid var(--line); padding: 16px 18px; }
.credits p { margin: 0 0 6px; }
.credits a { color: var(--cobalt); }

/* Director effects in the editor preview */
.ed-ovs{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.ed-ovs video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0}
.ed-shade{position:absolute;inset:0;pointer-events:none;opacity:0}
.ed-fxnote:empty{display:none}
.ed-fxnote{margin:6px 0 0}

/* Sign-in / sign-up / reset */
.auth { min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; min-width: 0; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.auth-top .wm { padding: 0; font-size: 24px; }
.auth-center { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 0; animation: rise .6s ease both; }
.auth-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-head h1 { margin: 0; font-weight: 700; font-size: 32px; line-height: 1.25; letter-spacing: -.01em; }
.auth-head p { margin: 0; font-size: 15px; line-height: 1.8; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 10px; }
.auth-tabs button { flex: 1 1 0; height: 44px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--mute); }
.auth-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(17,18,20,.08); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .field .lbl { color: var(--ink-2); font-size: 14px; }
.auth-note { margin: 0; min-height: 22px; font-size: 14px; color: var(--err); }
.auth-note:empty { display: none; }
.auth-foot { font-size: 13px; }
.hint.center { text-align: center; margin: 0; }
.linkish { text-decoration: none; }
.auth-side { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-width: 0; position: relative; overflow: hidden; }
.auth-glow { position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 30%, rgba(47,75,255,.28), transparent 70%); }
.auth-pitch { position: relative; display: flex; flex-direction: column; gap: 10px; }
.auth-pitch .kicker { font-size: 13px; color: var(--c300); }
.auth-pitch .big { font-weight: 700; font-size: 28px; line-height: 1.35; max-width: 460px; }
.auth-stage { position: relative; display: flex; gap: 20px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.auth-phone { width: 220px; aspect-ratio: 9 / 16; background: var(--stage); border: 1px solid var(--ink-2); border-radius: 14px; position: relative; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.phone-head { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); width: 86px; height: 86px; border-radius: 50%; background: #3B3F47; }
.phone-torso { position: absolute; left: 50%; top: 43%; transform: translateX(-50%); width: 170px; height: 220px; border-radius: 85px 85px 0 0; background: #2E3137; }
.phone-cap { position: absolute; left: 0; right: 0; top: 56%; text-align: center; padding: 0 14px; font-weight: 700; font-size: 22px; line-height: 1.5; }
.phone-cap span { background: var(--cobalt); padding: 0 6px; border-radius: 4px; }
.auth-phone .tc { position: absolute; bottom: 10px; left: 10px; font-size: 11px; background: rgba(17,18,20,.7); padding: 2px 6px; border-radius: 4px; }
.auth-steps { width: 260px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.auth-card { background: var(--stage-2); border: 1px solid var(--ink-2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.auth-card .ok { color: var(--ok); }
.auth-card .pulse { color: var(--c300); animation: pulse 1.4s ease-in-out infinite; }
.auth-small { position: relative; font-size: 13px; line-height: 1.8; color: var(--mute-2); margin: 0; }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.body > *, .wbody > * { animation: rise .45s ease both; }
@media (max-width: 900px) { .auth-side { display: none; } .auth-main { padding: 20px; } }

/* Responsive shell */
@media (max-width: 960px) {
  .app { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 16px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .side .wm { padding: 0 8px 0 0; flex-basis: 100%; }
  .side .nav { width: auto; height: 38px; font-size: 14px; }
  .side .grow { display: none; }
  .side .wallet { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; margin-inline-start: auto; }
  .side .wallet .num { font-size: 16px; }
  .top { padding: 12px 16px; }
  .body, .wbody { padding: 20px 16px; }
  .wbody { gap: 28px; }
  .cols3, .cols4, .cols5, .cols6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .cap-grid, .pair, .trio, .prog, .rv, .res, .ed, .brands, .qgrid { grid-template-columns: 1fr; }
  .ed-stage, .rv-stage { position: static; height: auto; }
  .transcript { max-height: none; border-right: 0; }
  .foot { padding: 12px 16px; }
  .modal { border-radius: var(--r); }
}
@media (max-width: 600px) {
  .cols3, .cols4, .cols5, .cols6 { grid-template-columns: 1fr; }
  .top h1 { font-size: 18px; }
  .search { width: 100%; }
  .whead { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wsec .shead h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Sidebar: user block */
.who { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); margin-top: 6px; }
.who:hover { background: var(--line-2); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-mail { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
.wallet .btn { margin-top: 4px; }

/* Projects page */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.page-head .hint { margin: 4px 0 0; font-size: 14px; }
.newcard-ico { width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.newcard b { font-size: 15px; color: var(--ink); }
.tip { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tip-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--c50); color: var(--cobalt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tip-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.tip-text b { font-size: 15px; }
.prow.start { justify-content: flex-start; gap: 12px; flex-wrap: wrap; }

/* Settings */
.body.settings { flex-direction: row; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.subnav { width: 220px; flex: 1 1 220px; max-width: 220px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; }
.subnav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--mute); text-decoration: none; font-size: 14px; font-weight: 500; }
.subnav a:hover { background: var(--line-2); color: var(--ink); }
.subnav a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(17,18,20,.08); }
.set-main { flex: 999 1 480px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.set { padding: 28px; display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 90px; }
.set-head { display: flex; flex-direction: column; gap: 4px; }
.set-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.set-head .hint { font-size: 14px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid #EEEEEA; }
.set-row:first-child { border-top: 0; padding-top: 0; }
.set-row-text { display: flex; flex-direction: column; gap: 2px; }
.set-row-text b { font-size: 15px; }
.set-box { border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.set-box .big { font-size: 28px; }
.set-list { display: flex; flex-direction: column; gap: 6px; }
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.langs button { height: 48px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; transition: border-color .15s ease, background .15s ease; }
.langs button .hint { font-size: 11px; }
.langs button:hover { border-color: var(--ink); }
.langs button[aria-pressed="true"] { border: 2px solid var(--cobalt); background: var(--c50); padding: 0 13px; }
.danger-zone { border-color: #F1C9C9; }
.btn.danger { color: #B42323; border-color: #F1C9C9; }
.btn.danger:hover { border-color: #B42323; }
@media (max-width: 960px) { .subnav { position: static; max-width: none; flex-direction: row; flex-wrap: wrap; } .set { padding: 20px; } }

/* Wizard polish */
.wbody { width: 100%; max-width: 1160px; margin: 0 auto; }
.st { font-size: 13px; }
.drop { flex-direction: row; gap: 20px; }
.drop-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--c50); color: var(--cobalt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.drop.live:hover .drop-ico { background: var(--c100); }
.empty-mini { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 28px 16px; text-align: center; }
.prog .left { max-width: 760px; }
.pbar { border-radius: 3px; overflow: hidden; }
.pbox { border-radius: 6px; }
.pstep.d .pbox { border-radius: 50%; }
.transcript { border-inline-start: 1px solid var(--line); }
.stagepane video, .rv-stage video, .res-stage video, .rvp-video { border-radius: 10px; }
.rv-text { max-width: 820px; }
.ed-frame { border-radius: 12px; }
.ed-side { border-inline-start: 1px solid var(--line); }
.kit .sw { border-radius: var(--r) var(--r) 0 0; }
.ed-side .tabs { display: flex; align-self: stretch; }
.ed-side .tabs button { flex: 1 1 auto; padding: 0 8px; font-size: 13px; height: 36px; }

/* Editor, second generation */
.edv { min-height: 100vh; display: flex; flex-direction: column; background: var(--stage); }
.ed-top { height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: rgba(243,243,240,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 6; }
.ed-top-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ed-top-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ed-back { width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; color: var(--ink); flex-shrink: 0; }
.ed-back:hover { border-color: var(--ink); background: #fff; }
[dir="ltr"] .ed-back svg { transform: scaleX(-1); }
.ed-wm { padding: 0; font-size: 20px; }
.crumb { color: var(--mute-2); }
.crumb-link { text-decoration: none; font-size: 14px; }
.ed-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.ed-main { flex: 1 1 auto; display: flex; min-height: 0; }
.ed-rail { width: 76px; flex-shrink: 0; background: var(--paper); border-inline-end: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; position: sticky; top: 64px; height: calc(100vh - 64px); }
.ed-rail button { width: 56px; height: 56px; border: 0; border-radius: 12px; background: transparent; color: var(--mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 600; transition: background .15s ease, color .15s ease; }
.ed-rail button:hover { background: var(--line-2); color: var(--ink); }
.ed-rail button.on { background: var(--ink); color: #fff; }
.ed-side { width: 400px; flex-shrink: 0; background: #fff; border-inline-end: 1px solid var(--line); padding: 0; display: flex; flex-direction: column; gap: 0; min-width: 0; position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto; }
.ed-phead { padding: 18px 20px 14px; border-bottom: 1px solid #EEEEEA; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; background: #fff; z-index: 2; }
.ed-phead b { font-size: 17px; }
.ed-phead .hint { font-size: 13px; }
.ed-grip { display: none; }
.ed-side .ed-body { padding: 16px 20px 20px; }
.ed-side .chat-list { max-height: none; flex: 1 1 auto; }
.ed-stage { flex: 1 1 auto; min-width: 0; background: var(--stage); display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 16px; padding: 24px 32px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto; }
.ed-player { max-height: none; height: max(220px, calc(100vh - 64px - 48px - 170px - var(--lanes, 0px))); flex: 0 0 auto; width: 100%; }
.ed-frame { max-height: none; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.ed-frame:hover { cursor: pointer; }
/* Timeline */
.tl-wrap { width: min(100%, 760px); display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.tl-row { display: flex; align-items: center; gap: 12px; }
.tl-t { font-size: 12px; color: #fff; width: 44px; flex: none; text-align: center; }
/* Whiteboard: the board choice in the style step, and the handwriting for its preview art. */
@font-face { font-family: "Hand"; src: url("/studio/caption-fonts/hand-arabic.ttf") format("truetype"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Hand"; src: url("/studio/caption-fonts/hand-latin.ttf") format("truetype"); }
.board-pick { display: inline-flex; align-items: center; gap: 8px; }
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.logo-thumb { height: 44px; max-width: 140px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 4px; }
.board-sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); display: inline-block; }
/* The editor's timeline of the final video: the playhead in the middle, the timeline moving under it. */
.ct { width: min(100%, 980px); gap: 8px; }
.ct-top { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ct-time { color: #fff; font-size: 12px; min-width: 110px; text-align: center; }
.ct-frame { display: flex; gap: 6px; align-items: flex-start; }
.ct-icons { width: 30px; flex: none; display: flex; flex-direction: column; }
.ct-ic { display: flex; align-items: center; justify-content: center; color: var(--mute-2); background: none; border: 0; padding: 0; width: 30px; }
button.ct-ic { cursor: help; }
.ct-view { position: relative; flex: 1 1 0; min-width: 0; }
.ct-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.ct-scroll::-webkit-scrollbar { display: none; }
.ct-content { position: relative; }
.ct-ph { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; z-index: 6; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.ct-ph::before { content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top: 8px solid #fff; }
.ct-tip { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: var(--cobalt); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 6px; z-index: 7; pointer-events: none; white-space: nowrap; }
.ct-tick { position: absolute; top: 0; height: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.ct-tick i { position: absolute; top: 0; left: 4px; font: 500 10px/12px var(--mono); color: var(--mute-2); font-style: normal; white-space: nowrap; }
.ct-seg { position: absolute; background: var(--ink-2); border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ct-cut { position: absolute; width: 10px; margin-left: -5px; border: 0; padding: 0; background: transparent; cursor: pointer; z-index: 4; }
.ct-cut::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); }
.ct-cut:hover::before { background: #fff; }
.ct .el-it { touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.ct .el-it.grab { touch-action: none; cursor: grab; }
.ct .el-it.grab:active { cursor: grabbing; }
.ct-hd { position: absolute; top: -2px; bottom: -2px; width: 12px; background: #fff; border-radius: 4px; cursor: ew-resize; touch-action: none; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ct-hd.left { left: -6px; } .ct-hd.right { right: -6px; }
.ct-hd::after { content: ""; position: absolute; top: 30%; bottom: 30%; left: 50%; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.el-btn.on { background: #fff; color: var(--ink); }
/* Moving things on the video: the box around the picked thing, its handles, the middle lines and the apps' zones. */
.tf-ov { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.tf-box { position: absolute; box-sizing: border-box; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: auto; cursor: move; touch-action: none; }
.tf-h { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); touch-action: none; }
.tf-h.tl { left: -8px; top: -8px; cursor: nwse-resize; } .tf-h.tr { right: -8px; top: -8px; cursor: nesw-resize; }
.tf-h.bl { left: -8px; bottom: -8px; cursor: nesw-resize; } .tf-h.br { right: -8px; bottom: -8px; cursor: nwse-resize; }
.tf-box.only-y { cursor: ns-resize; }
.tf-g { position: absolute; background: var(--gold); pointer-events: none; }
.tf-g.v { left: 50%; top: 0; bottom: 0; width: 1px; } .tf-g.h { top: 50%; left: 0; right: 0; height: 1px; }
.tf-zone { position: absolute; background: rgba(217,54,54,.22); border: 1px dashed rgba(255,255,255,.5); opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.tf-ov.dragging .tf-zone { opacity: 1; }
@media (pointer: coarse) { .tf-h { width: 22px; height: 22px; } .tf-h.tl, .tf-h.bl { left: -12px; } .tf-h.tr, .tf-h.br { right: -12px; } .tf-h.tl, .tf-h.tr { top: -12px; } .tf-h.bl, .tf-h.br { bottom: -12px; } }
/* The editor's rows: everything the montage placed, one row per kind, lined up with the main row. */
.el-lanes { display: flex; flex-direction: column; gap: 6px; }
.el-lane { display: flex; align-items: center; gap: 12px; }
.el-ic { width: 44px; flex: none; height: 22px; display: flex; align-items: center; justify-content: center; color: var(--mute-2); background: none; border: 0; padding: 0; cursor: help; }
.el-pad { width: 44px; flex: none; }
.el-track { position: relative; flex: 1 1 0; height: 22px; background: rgba(255,255,255,.05); border-radius: 5px; }
.el-it { position: absolute; top: 2px; bottom: 2px; min-width: 6px; border: 0; border-radius: 4px; padding: 0 5px; cursor: pointer; color: #fff; font: 600 10px/18px var(--sans); overflow: hidden; text-align: start; transition: filter .15s ease; }
.el-it:hover { filter: brightness(1.2); }
.el-it span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.el-it.k-camera { background: #56627D; }
.el-it.k-pictures { background: #23936A; }
.el-it.k-texts { background: var(--gold); color: var(--ink); }
.el-it.k-effects { background: var(--cobalt); }
.el-it.k-captions { background: #6E56CF; }
.el-it.k-music { background: #C9772A; }
.el-it.k-sounds { background: #B8467A; }
.el-it.k-voice { background: #2E7FA8; }
.el-it.muted { background: repeating-linear-gradient(135deg, #3a3d44 0 6px, #2d3036 6px 12px); color: var(--mute-2); }
.ct-seg { overflow: hidden; }
.ct-wave { display: block; width: 100%; height: 100%; }
.el-volbox { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.el-vol { width: 140px; accent-color: var(--cobalt); }
.el-it.off { opacity: .35; }
.el-it.on { box-shadow: 0 0 0 2px #fff; z-index: 2; }
.el-ph { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--cobalt); inset-inline-start: 0; pointer-events: none; z-index: 3; transition: inset-inline-start .08s linear; }
.el-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; color: #fff; font-size: 13px; padding-top: 4px; min-height: 40px; }
.el-name { max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.el-at { color: var(--mute-2); font-size: 12px; }
.el-note { color: var(--mute-2); font-size: 12px; }
.el-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font: 600 13px var(--sans); cursor: pointer; }
.el-btn:hover { background: rgba(255,255,255,.16); }
.el-btn:disabled { opacity: .5; cursor: default; }
.el-btn.ghost { width: 32px; padding: 0; justify-content: center; }
.tl-t.muted { color: var(--mute-2); }
.tl-track { position: relative; flex: 1 1 0; height: 40px; display: flex; gap: 3px; }
.tl-seg, .tl-gap { flex: 0 0 auto; min-width: 4px; border: 0; border-radius: 6px; padding: 0; cursor: pointer; transition: filter .15s ease; }
.tl-seg { background: var(--ink-2); }
.tl-seg:hover { filter: brightness(1.35); }
.tl-gap { background: #4A4D55; opacity: .7; }
.tl-gap:hover { background: var(--c300); opacity: 1; }
.tl-mk, .tl-ttl { position: absolute; top: -10px; transform: translateX(50%); border: 0; cursor: pointer; z-index: 2; }
.tl-mk { width: 18px; height: 18px; border-radius: 50%; background: var(--cobalt); color: #fff; font: 700 11px/18px var(--mono); padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tl-ttl { height: 18px; border-radius: 4px; background: var(--gold); color: var(--ink); font: 700 10px/18px var(--sans); padding: 0 6px; white-space: nowrap; }
[dir="ltr"] .tl-mk, [dir="ltr"] .tl-ttl { transform: translateX(-50%); }
.tl-ph { position: absolute; top: -14px; bottom: -14px; width: 2px; background: var(--cobalt); inset-inline-start: 0; pointer-events: none; z-index: 3; transition: inset-inline-start .08s linear; }
.tl-ph::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top: 8px solid var(--cobalt); }
.tl-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--mute-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { display: block; width: 14px; height: 8px; border-radius: 3px; }
.lg-keep { background: var(--ink-2); } .lg-gap { background: #4A4D55; } .lg-zoom { width: 10px !important; height: 10px !important; border-radius: 50% !important; background: var(--cobalt); } .lg-ttl { background: var(--gold); }
.tl-hint { margin: 0; text-align: center; color: var(--mute-2); font-size: 11px; }
.ed-note { color: var(--mute-2); }
@media (max-width: 900px) {
  .edv { min-height: 100dvh; }
  .ed-top { height: 56px; padding: 0 10px; }
  .ed-wm, .crumb, .crumb-link { display: none; }
  .ed-title { max-width: 34vw; font-size: 14px; }
  .ed-top .chip { display: none; }
  .ed-fxnote { display: none; }
  .ed-top .bo.sm { padding: 0 10px; }
  .ed-top .btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .ed-main { flex-direction: column; }
  .ed-stage { order: 1; position: static; height: auto; padding: 12px 16px 8px; gap: 10px; flex: 0 0 auto; }
  /* «صورتك»: the video stays at the top while the choices scroll under it; the timeline steps aside. */
  .pic-open .ed-stage { position: sticky; top: 56px; z-index: 5; }
  .pic-open .ed-stage .tl-wrap, .pic-open .ed-stage .ed-note, .pic-open .ed-fxnote { display: none; }
  .pic-open .ed-frame { max-height: 34vh; }
  .ed-player { height: 44vh; }
  .ed-controls { width: 100%; }
  .tl-wrap { padding-top: 10px; gap: 6px; }
  .tl-track { height: 30px; }
  .tl-row, .el-lane { gap: 8px; }
  .tl-t, .el-ic, .el-pad { width: 36px; }
  .el-track { height: 24px; }
  .el-btn { height: 40px; padding: 0 14px; }
  .el-btn.ghost { width: 40px; }
  .ct-hd { width: 18px; } .ct-hd.left { left: -9px; } .ct-hd.right { right: -9px; }
  .ct-cut { width: 22px; margin-left: -11px; }
  .tl-legend { display: none; }
  .ed-side { order: 2; position: static; width: auto; height: auto; flex: 1 1 auto; min-height: 40vh; border-inline-end: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
  .ed-phead { padding: 10px 16px 10px; }
  .ed-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 6px; }
  .ed-rail { order: 3; position: sticky; top: auto; bottom: 0; height: auto; width: 100%; flex-direction: row; justify-content: space-around; padding: 4px 4px 8px; border-inline-end: 0; border-top: 1px solid var(--line); background: #fff; z-index: 6; }
  .ed-rail button { width: auto; flex: 1 1 0; height: 52px; border-radius: 10px; }
  .ed-rail button.on { background: transparent; color: var(--cobalt); }
}

/* ---------- The chat (first screen), account menu, tab bar ---------- */
.navs { display: flex; flex-direction: column; gap: 4px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.nav-group > .lbl { padding: 0 12px; font-size: 11px; }
.backrow { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); font-weight: 600; font-size: 14px; width: 100%; text-align: start; }
.backrow:hover { background: var(--line-2); }
.side .btn.wide { margin: 4px 0 8px; }
.side .sect { font-size: 12px; font-weight: 600; color: var(--mute); padding: 6px 12px 2px; }
.chats { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.chat-row { display: flex; align-items: center; border-radius: var(--r-sm); }
.chat-row:hover { background: var(--line-2); }
.chat-item { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-size: 14px; border-radius: var(--r-sm); }
.chat-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.on { background: var(--line-2); color: var(--ink); font-weight: 600; }
.chat-row .icon-btn { opacity: 0; }
.chat-row:hover .icon-btn, .chat-row .icon-btn:focus-visible { opacity: 1; }
@media (hover: none) { .chat-row .icon-btn { opacity: 1; } }
.icon-btn.sm { width: 32px; height: 32px; }
.chat-top .icon-btn, .top .icon-btn { width: 44px; height: 44px; color: var(--ink); }
.trash-link { margin: 8px 12px; font-size: 13px; align-self: flex-start; }
.hint.pad { padding: 6px 12px; }
.acct { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-align: start; color: var(--ink); }
.acct:hover { border-color: var(--mute-2); }
.acct-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.acct-text .hint { line-height: 1.4; }
.ax-pop { position: fixed; z-index: 60; width: 320px; max-height: min(80vh, 640px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(17,18,20,.22); padding: 12px; display: flex; flex-direction: column; gap: 8px; animation: popIn .16s ease; }
.ax-pop.small { width: 200px; padding: 6px; }
.ax-pop.models, .ax-pop.spend-pop { width: 380px; }
.ax-pop.sheet { left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: auto; max-height: 86vh; border-radius: 18px 18px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheetUp .2s ease; }
.ax-pop.sheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 4px; flex-shrink: 0; }
@keyframes popIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.pop-head { padding: 4px 4px 2px; font-size: 15px; }
.ax-pop .sect { font-size: 12px; color: var(--mute); font-weight: 600; margin: 6px 4px 0; }
.mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; text-align: start; }
.mi:hover { background: var(--bg); }
.mi.danger { color: var(--err); }
.ax-pop hr { border: 0; height: 1px; background: var(--line); margin: 4px 0; width: 100%; }
.acct-head { display: flex; align-items: center; gap: 10px; padding: 4px; }
.acct-box { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.acct-nav { display: flex; flex-direction: column; gap: 2px; }
.ax-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: start; flex-shrink: 0; }
.ax-opt:hover { border-color: var(--ink); }
.ax-opt.on { border: 2px solid var(--cobalt); background: #F7F8FF; }
.ax-opt > span { display: flex; flex-direction: column; min-width: 0; }
.ax-opt small { font-size: 12px; color: var(--mute); }
.tag { flex-shrink: 0; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.input.num { width: 96px; flex-shrink: 0; }

/* The chat fills the window exactly (100% of html/body), so the composer is never pushed under the fold. */
#app { height: 100%; }
.chat-app { height: 100%; min-height: 0; }
.chat-app .main.chat-main { height: 100%; min-height: 0; }
.chat-main { position: relative; }
.chat-top { min-height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--line); }
.pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; font-weight: 600; font-size: 15px; }
.pick:hover { background: var(--line-2); }
.chat-top .pick { margin-inline-end: auto; }
.only-mobile, .only-mobile-flex { display: none !important; }
.thread { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.thread-in { width: 100%; max-width: 780px; margin: 0 auto; padding: 28px 24px; display: flex; flex-direction: column; gap: 20px; flex: 1 0 auto; }
.welcome { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.welcome h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); font-weight: 700; letter-spacing: -.01em; animation: popIn .4s ease; }
.ax-msg.me { align-self: flex-start; max-width: 85%; }
.ax-msg.me .bubble { background: var(--line-2); border-radius: 16px; padding: 10px 16px; font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.ax-msg.ai { font-size: 15px; line-height: 1.9; display: flex; flex-direction: column; gap: 10px; word-break: break-word; }
.ax-msg.ai p { margin: 0; }
.ax-msg.ai h3 { margin: 6px 0 0; font-size: 17px; }
.ax-msg.ai h4 { margin: 4px 0 0; font-size: 15px; }
.ax-msg.ai ul, .ax-msg.ai ol { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 4px; }
.ax-msg.ai code { font-family: var(--mono); font-size: 13px; background: var(--line-2); padding: 1px 6px; border-radius: 4px; }
.md-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.7; }
.md-table th, .md-table td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-align: start; vertical-align: top; }
.md-table th { background: var(--paper); font-weight: 600; white-space: nowrap; }
.md-table tr:last-child td { border-bottom: 0; }
.cost { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.cost .skill { background: var(--c50); color: var(--c700); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.ax-typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.ax-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mute-2); animation: blink 1.2s infinite ease-in-out; }
.ax-typing i:nth-child(2) { animation-delay: .2s; }
.ax-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.msg-err { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--err-bg); color: #8E1F1F; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.card.checkin { padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.card.checkin p { margin: 0; }
.prow.wrap { flex-wrap: wrap; }
.composer-wrap { flex-shrink: 0; width: 100%; max-width: 780px; margin: 0 auto; padding: 0 24px 20px; }
.composer { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 24px rgba(17,18,20,.06); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.composer:focus-within { border-color: var(--mute-2); }
.composer-input { border: 0; outline: 0; resize: none; background: none; width: 100%; min-height: 44px; max-height: 220px; padding: 10px; font-size: 15px; line-height: 1.6; }
.composer-row { display: flex; align-items: center; gap: 4px; }
.spend { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.spend:hover { background: var(--bg); }
.spend.auto { color: #8A5300; }
.icon-btn.send { width: 44px; height: 44px; border-radius: 12px; background: var(--cobalt); color: #fff; }
.icon-btn.send:hover:not(:disabled) { background: var(--c700); }
.icon-btn.send.stopping { background: var(--ink); }
.body.narrow { max-width: 860px; width: 100%; margin: 0 auto; }
.usage-sum { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 18px 22px; }
.usage-sum .big { font-size: 26px; }
.usage-sum .btn { margin-inline-start: auto; }
.use-day { display: flex; flex-direction: column; gap: 8px; }
.use-day .lbl { margin: 0; }
.use-list { padding: 0 16px; }
.ax-use { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.ax-use:last-child { border-bottom: 0; }
a.ax-use:hover b { color: var(--c700); }
.use-text { display: flex; flex-direction: column; min-width: 0; }
.use-text b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-use .amt { font-weight: 600; }
.ax-use .plus { color: var(--ok); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.input.area { height: auto; padding: 10px 14px; line-height: 1.6; resize: vertical; }
.input.area.code { font-family: var(--mono); font-size: 13px; }
.trash { display: flex; flex-direction: column; gap: 8px; }
.tabbar { display: none; }
.pics { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.pics.n1 { grid-template-columns: minmax(0, 1fr); max-width: 380px; }
.pic { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: var(--line-2); border: 1px solid var(--line); }
.pic.pending { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; background: linear-gradient(110deg, var(--line-2) 30%, #F8F8F6 50%, var(--line-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.pic-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pic-open img { display: block; width: 100%; height: auto; }
.pic-dl { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(255,255,255,.92); color: var(--ink); }
.pic-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.pic-card .prow { justify-content: space-between; }
.pic-cost { font-size: 16px; }
.pic-opts { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.lib-link { font-weight: 600; text-decoration: none; }
.pic-full { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }
.pic-prompt { margin: 10px 0 0; text-align: left; }
.lib-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.lib-item { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.lib-item .pic-open { aspect-ratio: 1 / 1; overflow: hidden; }
.lib-item .pic-open img { width: 100%; height: 100%; object-fit: cover; }
.lib-item figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px 6px 12px; }
.lib-acts { display: inline-flex; gap: 2px; }
@media (max-width: 960px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tabbar a, .tabbar button { font-size: 10px; } }
.composer-row .pick { min-height: 40px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); border-radius: var(--r-sm); }
.composer-row .pick:hover { background: var(--bg); }
.pick-short { display: none; }
.spend-ico { display: none; }
.chat-name { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) {
  .pick-full { display: none; }
  .pick-short { display: inline; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .spend-text { display: none; }
  .spend-ico { display: inline-flex; }
  .composer-row .spend { padding: 0 6px; }
}
.fam-tabs { display: flex; align-self: stretch; margin: 4px 0 2px; }
.fam-tabs button { flex: 1 1 0; justify-content: center; }
.model-list { display: flex; flex-direction: column; gap: 8px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-msg.me { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.composer-files { padding: 4px 4px 0; }
.composer-files[hidden] { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; min-height: 40px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.fchip.busy { opacity: .7; }
.fchip.bad { border-color: var(--err); }
.fchip-img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.fchip-ico { width: 32px; height: 32px; border-radius: 6px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--mute); }
.fchip-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fchip-state { font-size: 12px; color: var(--mute); white-space: nowrap; }
.fthumb img { display: block; max-width: 220px; max-height: 220px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.icon-btn.tool { width: 44px; height: 44px; color: var(--ink-2); border-radius: 12px; }
.icon-btn.tool:hover { background: var(--bg); }
.icon-btn.tool.rec { color: var(--cobalt); background: var(--c50); }
.recbar { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; font-size: 14px; }
.recbar[hidden] { display: none; }
.recbar.live { display: block; padding: 4px 0; }
.recbar.live > .rec-bar { width: 100%; }
.recbar .bars { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.recbar .bars i { width: 3px; border-radius: 2px; background: var(--cobalt); animation: wave 1s infinite ease-in-out; height: 8px; }
.recbar .bars i:nth-child(2) { animation-delay: .15s; } .recbar .bars i:nth-child(3) { animation-delay: .3s; } .recbar .bars i:nth-child(4) { animation-delay: .45s; } .recbar .bars i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.review-note { padding: 0 10px; }
.review-note[hidden] { display: none; }
.composer.drop { border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(47,75,255,.15); }
.composer-input[hidden] { display: none; }

@media (max-width: 960px) {
  .app { flex-direction: column; }
  .side { display: none; }
  .tabbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { flex: 1 1 0; min-width: 0; height: 58px; border: 0; background: none; color: var(--mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; text-decoration: none; }
  .tabbar .on { color: var(--ink); font-weight: 800; }
  .tabbar .on svg { stroke-width: 2.4; }
  .main { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.kb .tabbar { display: none; }
  body.kb .main { padding-bottom: 0; }
  .chat-top { padding: 6px 8px; min-height: 56px; }
  .chat-top .pick { margin: 0 auto; }
  .only-mobile { display: inline-flex !important; }
  .only-mobile-flex { display: flex !important; }
  .thread-in { padding: 16px; gap: 16px; }
  .composer-wrap { padding: 0 10px 10px; }
  .ax-msg.me { max-width: 92%; }
  .usage-sum { gap: 16px; }
  .only-mobile-flex + .body .page-head .page-title { display: none; }
}

/* Videos from the chat */
.pic.vid { background: #000; }
.pic-video { display: block; width: 100%; max-height: 70vh; background: #000; }
.pic.pending.vid { aspect-ratio: 9 / 16; max-width: 280px; }
.pic.pending.vid.a16-9 { aspect-ratio: 16 / 9; max-width: none; }
.pic.pending.vid.a1-1 { aspect-ratio: 1 / 1; max-width: 360px; }
.pic-open.vid { position: relative; background: #000; }
.pic-open.vid video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.play-badge svg { fill: currentColor; }
video.pic-full { width: 100%; background: #000; }

/* Montage card in the chat */
.montage-card { display: grid; gap: 10px; padding: 16px; max-width: 520px; }
.montage-card p { margin: 0; line-height: 1.7; }
.montage-file { display: flex; align-items: center; gap: 6px; }
.notes-box { min-height: 56px; resize: vertical; font: inherit; }

/* Project tabs on phones: one row that scrolls sideways */
@media (max-width: 960px) {
  .page-head .tabs { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .page-head .tabs::-webkit-scrollbar { display: none; }
  .page-head .tabs button { flex: 0 0 auto; white-space: nowrap; }
}

/* Wizard: one-column steps (upload, templates) and the credits pill that opens top-up */
.wsingle { width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.wsingle .opt.tpl { cursor: default; }
.wsingle .opt.tpl .btn { margin-inline-start: auto; flex-shrink: 0; }
.wallet-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); border: 1px solid #BFE3D2; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wallet-pill .mono { font-size: 14px; }
.wallet-pill:hover { background: #D6EEE2; }
.wsingle .opt.tpl { width: 100%; }

/* Wizard top bar: solid so it reads as fixed; round close button; clickable logo; the chosen template */
.wtop { background: var(--bg); backdrop-filter: none; }
.wiz-logo { border: 0; background: none; padding: 0; display: inline-flex; cursor: pointer; border-radius: 8px; }
.wiz-logo:focus-visible, .wiz-close:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.wiz-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 2px rgba(17,18,20,.06); transition: background .15s, border-color .15s; }
.wiz-close:hover { background: var(--line-2); border-color: var(--mute-2); }
.wsingle .opt.tpl.chosen { border-color: var(--cobalt); background: var(--c50); box-shadow: 0 0 0 1px var(--cobalt) inset; }
@media (max-width: 960px) {
  .wtop { gap: 10px 12px; padding: 10px 16px; }
  .wtop .wtop-start, .wtop .wtop-end { width: auto !important; }
  .wtop .wtop-start { flex: 1 1 0; min-width: 0; }
  .wtop .wtop-title { min-width: 0; overflow: hidden; }
  .wtop .wtop-title > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wtop .steps { order: 3; flex: 1 0 100%; width: 100%; }
  .wtop .wallet-pill { height: 32px; padding: 0 10px; font-size: 13px; }
}

/* Brand pages: the list with a "new brand" card, and the brand form on its own page */
.kits { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kits .pcard.new .newcard { min-height: 220px; }
.kit .meta { gap: 8px; }
.kit-edit { align-self: flex-start; margin-top: 4px; }
.brand-form { max-width: 640px; width: 100%; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.brand-form .select, .brand-form .input { width: 100%; }
.brand-form-foot { justify-content: flex-end; gap: 10px; padding-top: 4px; }
.swatch { position: relative; display: inline-flex; }
.swatch-x { position: absolute; top: -7px; inset-inline-end: -7px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 1px 2px rgba(17,18,20,.1); }
.swatch-x:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.fontfile-name { font-size: 13px; color: var(--ink-2); }
@media (max-width: 960px) { .brand-form { padding: 18px 16px; } .kits { grid-template-columns: 1fr; } }
.brand-form .colors { gap: 14px; }

/* Captions step on phones: a pinned preview under the top bar, backgrounds two by two, the dialect list full width */
@media (max-width: 960px) {
  .cap-grid .cap-stage { order: -1; position: sticky; top: var(--wtop-h, 128px); z-index: 4; height: 170px; overflow: hidden; justify-content: flex-start; padding: 0; margin: -20px -16px 0; border-radius: 0; box-shadow: 0 6px 12px -8px rgba(17,18,20,.35); }
  .cap-grid .cap-stage .phone { flex-shrink: 0; margin-top: -150px; transition: margin-top .2s ease; }
  .cap-grid .cap-stage[data-pos="top"] .phone { margin-top: 0; }
  .cap-grid .cap-stage[data-pos="bottom"] .phone { margin-top: -250px; }
  .dialect-row { flex-direction: column; align-items: stretch !important; gap: 6px !important; }
  .dialect-row .select { width: 100%; }
}
@media (max-width: 600px) { .cap-grid .cols5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Brand colours: picked by the client, each with its code; the colour chooser */
.brand-colors { gap: 14px; align-items: flex-start; }
.brand-swatch { flex-direction: column; align-items: center; gap: 4px; }
.swatch-btn { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 2px #fff; }
.swatch-btn:hover { border-color: var(--ink); }
.swatch-hex { font-size: 11px; color: var(--mute); }
.add-color { height: 48px; }
.picker { display: flex; flex-direction: column; gap: 16px; }
.color-big { width: 72px; height: 48px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.color-chip { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); flex-shrink: 0; }
.hex-in { width: 130px; text-transform: uppercase; }
.pick-wrap { position: relative; display: inline-block; align-self: center; max-width: 100%; line-height: 0; }
.pick-canvas { max-width: 100%; height: auto; border-radius: 10px; cursor: crosshair; touch-action: none; border: 1px solid var(--line); }
.pick-marker { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4); pointer-events: none; }

/* "Extract my brand" card */
.ex-card { max-width: 640px; width: 100%; margin: 0 auto 16px; padding: 18px 24px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #F7F8FF, #fff); border-color: var(--c200); }
.ex-card .input { flex: 1; min-width: 0; }
.ex-result { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.ex-sw { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--mute); }
.ex-sw i { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: block; }
@media (max-width: 960px) { .ex-card { padding: 16px; } }

/* Colour chooser: the code field keeps its "#", an empty start, the colours found in a picture */
.hex-box { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; height: 40px; overflow: hidden; }
.hex-box:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--c100); }
.hex-hash { padding: 0 2px 0 12px; color: var(--mute); font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; user-select: none; }
.hex-box .hex-in { border: 0; box-shadow: none; height: 38px; width: 92px; padding: 0 10px 0 2px; background: transparent; }
.hex-box .hex-in:focus { outline: none; box-shadow: none; }
.color-chip.is-empty { background: repeating-conic-gradient(#E8E8E3 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.found-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.found-sw { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 11px; color: var(--mute); }
.found-sw i { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.found-sw.on { border-color: var(--cobalt); background: var(--c50); color: var(--ink); }
.found-tick { position: absolute; top: -7px; inset-inline-end: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--cobalt); color: #fff; font-size: 12px; display: none; align-items: center; justify-content: center; }
.found-sw.on .found-tick { display: inline-flex; }
.found-sw.minor { border-style: dashed; }

.color-chip { height: 40px; width: 40px; align-self: center; }
.hex-row { flex-wrap: nowrap; align-items: center; }
.color-big-wrap { position: relative; display: inline-flex; }
.color-big-wrap.is-empty::after { content: ""; position: absolute; inset: 5px; border-radius: 7px; pointer-events: none; background: repeating-conic-gradient(#E8E8E3 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.pick-wrap[hidden], .found-colors[hidden] { display: none !important; }
.color-big-wrap { width: 72px; height: 48px; flex: 0 0 auto; }
.color-big-wrap .color-big { width: 72px; height: 48px; display: block; }
.color-chip { flex: 0 0 40px; min-height: 40px; max-height: 40px; }
.picker .field { align-items: flex-start; }
.found-sw.has { opacity: .55; cursor: default; }
.found-have { font-size: 10px; color: var(--ok); font-weight: 600; }
.danger-btn { color: var(--err); border-color: #F2C4C4; }
.danger-btn:hover { background: var(--err-bg); border-color: var(--err); }
.brand-form-foot .grow { flex: 1; }
.kit-acts { margin-top: 4px; }
.kit-acts .kit-edit { margin-top: 0; }

/* Section pages (montage, brands, library…): the top bar stays in its place and scrolls away with the page.
   The project steps keep their fixed bar (.wtop). The ⋯ menu floats over everything. */
.app .main > .top { position: static; }
.menu-float { position: fixed; z-index: 60; }

/* Trash: the 30-day note, days left on each chat (red when close), restore or delete for good */
.trash-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: #6B4500; font-size: 13px; line-height: 1.6; }
.trash-row { gap: 10px; align-items: center; }
.trash-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.trash-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-left { font-size: 12px; }
.trash-left.soon { color: var(--err); font-weight: 600; }

/* Wizard: a missing choice (red frame, a short shake, a line under the title) */
.wsec.need { outline: 2px solid var(--err); outline-offset: 10px; border-radius: 14px; }
.need-text { margin: 4px 0 10px; color: var(--err); font-weight: 600; font-size: 14px; }
@keyframes need-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.wsec.shake { animation: need-shake .45s ease; }
@media (prefers-reduced-motion: reduce) { .wsec.shake { animation: none; } }
.face-seg { width: 300px; max-width: 100%; }
.stage-label { display: none; }
@media (max-width: 960px) {
  /* The footer: the note on its own line, the two buttons on one row (back on the right, next on the left) */
  .foot { flex-wrap: wrap; row-gap: 8px; }
  .foot > .hint { order: -1; flex: 1 0 100%; text-align: center; font-size: 12px; }
  .foot > .hint:empty { display: none; }
  .foot > .btn { flex: 0 0 auto; }
  /* Captions step: a clean preview strip with its name, no cut pieces of the person */
  .cap-grid .cap-stage { background: linear-gradient(160deg, #2A2D33, #16171A); }
  .cap-grid .cap-stage .phone { background: transparent; box-shadow: none; border: 0; }
  .cap-grid .cap-stage .phone .head, .cap-grid .cap-stage .phone .body-s { display: none; }
  .cap-grid .cap-stage .stage-label { display: block; position: absolute; top: 8px; inset-inline-start: 12px; z-index: 2; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
  .cap-grid .cap-stage { position: sticky; }
}
@media (max-width: 600px) { .wsec .shead:has(.face-seg) { flex-wrap: wrap; gap: 10px; } .face-seg { width: 100%; } }

/* Template cards: ✕ in the corner deletes the template (grey, red on hover); a small "chosen" chip */
.wsingle .opt.tpl { position: relative; }
.tpl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpl-chip { height: 22px; font-size: 12px; }
.tpl-del { position: absolute; top: -9px; inset-inline-end: -9px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 1px 3px rgba(17,18,20,.12); }
.tpl-del:hover, .tpl-del:focus-visible, .tpl-del:active { background: var(--err-bg); color: var(--err); border-color: var(--err); }
.wsingle .opt.tpl { cursor: pointer; }
.wsingle .opt.tpl:hover { border-color: var(--c200); }
.wsingle .opt.tpl:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* "We read your file": the kind the frames showed, the client's choice, gentle warnings */
.content-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.content-card.ask { border-color: var(--warn); }
.content-reason { margin: -4px 0 0; color: var(--ink-2); font-size: 14px; }
.content-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opt.ckind { flex-direction: row; align-items: center; gap: 12px; text-align: start; }
.opt.ckind b { display: block; font-size: 14px; }
.opt.ckind .hint { display: block; font-size: 12px; line-height: 1.5; margin-top: 2px; }
.ckind-ico { font-size: 24px; line-height: 1; flex-shrink: 0; }
.content-warn { background: var(--warn-bg); color: #6B4500; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
.content-warn p { margin: 0; }
@media (max-width: 960px) { .content-kinds { grid-template-columns: 1fr; } }
.content-card.need { outline: 2px solid var(--err); outline-offset: 4px; }
.content-card.shake { animation: need-shake .45s ease; }

/* The client's pictures for the video: the upload section, and their chips in the review */
.media-sec { margin-top: 8px; }
.media-hint { margin: -6px 0 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.media-card { position: relative; display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.media-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--line-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb.sm { width: 44px; height: 44px; }
.media-kind { position: absolute; bottom: 4px; inset-inline-start: 4px; background: rgba(0,0,0,.65); color: #fff; font: 500 10px var(--mono); padding: 1px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.media-ico { color: var(--mute); }
.media-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.media-name { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.media-note { height: 34px; font-size: 13px; }
.script-sec { margin-top: 8px; }
.camera-sec { margin-top: 8px; }
.cam-card { max-width: 520px; }
.cam-sync { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.sync { display: flex; flex-direction: column; gap: 12px; }
.sync-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sync-grid video { width: 100%; max-height: 38vh; background: #000; border-radius: 8px; }
.sync-slider { width: 100%; direction: ltr; }
@media (max-width: 640px) { .sync-grid { grid-template-columns: 1fr; } }
.script-ta { min-height: 150px; resize: vertical; font-size: 14px; line-height: 1.8; padding: 10px 12px; }
.w.cut { text-decoration: line-through; text-decoration-color: #B23A3A; text-decoration-thickness: 2px; color: var(--mute); }
.w.kept { text-decoration: underline dotted var(--mute); text-underline-offset: 6px; }
.chip-btn { cursor: pointer; border: 0; font: inherit; }
.rv-missing { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 8px; line-height: 1.8; }
.media-x { top: -8px; inset-inline-end: -8px; }
.lib-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; }
.lib-pick-item { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line-2); padding: 0; cursor: pointer; }
.lib-pick-item img, .lib-pick-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-pick-item:hover { border-color: var(--cobalt); }
.w-media { display: inline-flex; width: 30px; height: 30px; border-radius: 7px; overflow: hidden; border: 2px solid var(--cobalt); padding: 0; margin: 0 2px -8px; background: #fff; cursor: pointer; vertical-align: baseline; }
.w-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-media.off { border-color: var(--mute-2); opacity: .5; }
.w-media.oncut { border-color: #B23A3A; }
.warn-line { color: #8A5A00; line-height: 1.6; }
.rv-text.moving .w { cursor: crosshair; }
.rv-text.moving .w:hover { background: var(--c100); }
.rv-moving { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--c50); border: 1px solid var(--c200); color: var(--c700); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.media-pop .pb .hint { margin-bottom: 4px; }

.ed-cam { position: absolute; overflow: hidden; pointer-events: none; }
.ed-cam.ring { box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(0,0,0,.35); }
.ed-camv { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Optional picks (platforms, goal): pills that wrap on every screen size. */
.pickrow { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.3; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed="true"] { border-color: var(--cobalt); background: var(--c50); color: var(--c700); font-weight: 600; box-shadow: 0 0 0 3px rgba(47,75,255,.12); }
.pick:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.goal-text { margin-top: 12px; }
@media (max-width: 560px) { .pick { flex: 1 1 calc(50% - 8px); text-align: center; padding: 8px 10px; } }


/* The webcam picture found in a screen recording: the frame with it marked, beside the explanation. */
.bubble-sec { margin-top: 8px; }
.bubble-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bubble-still { position: relative; display: block; width: 220px; max-width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.bubble-still img { display: block; width: 100%; height: auto; }
.bubble-mark { position: absolute; border: 3px solid var(--cobalt); border-radius: 8px; box-shadow: 0 0 0 9999px rgba(17,18,20,.35); }
.bubble-mark.round { border-radius: 50%; }
.bubble-mark.off { border-color: var(--mute-2); box-shadow: none; }
.bubble-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bubble-text .hint { margin: 0; line-height: 1.7; }

/* ---------- Loading ---------- */
/* First load: the logo breathing softly in the middle. Hidden for the first quarter second, so a quick start shows nothing. */
.boot-logo { flex-direction: column; gap: 18px; opacity: 0; animation: boot-in .3s ease .25s forwards; }
.boot-logo .mark { border-radius: 14px; animation: boot-breathe 1.8s ease-in-out infinite; }
.boot-slow { font-size: 13px; opacity: 0; animation: boot-in .4s ease 8s forwards; }
@keyframes boot-in { to { opacity: 1; } }
@keyframes boot-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .72; } }

/* Moving to a page that takes a moment: grey blocks with a soft shimmer where the content will be. */
.skel .sk { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--line-2) 0%, #FBFBF9 45%, var(--line-2) 90%); background-size: 300% 100%; animation: sk-shimmer 1.4s ease-in-out infinite; }
.skel .sk-title { width: 180px; height: 28px; }
.skel .sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.skel .sk-card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.skel .sk-media { height: 120px; border-radius: var(--r); }
.skel .sk-line { height: 12px; width: 80%; }
.skel .sk-line.short { width: 45%; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* A button whose action is still working: a small spinner before its label. */
.btn.is-busy, button.is-busy { pointer-events: none; opacity: .85; }
.btn.is-busy::before, button.is-busy::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .boot-logo .mark, .skel .sk, .btn.is-busy::before, button.is-busy::before { animation-duration: 2.4s; }
  .boot-logo .mark { animation: none; }
}

/* ---------- Upload step: parts of the main video, the question before a second file, clips, notes ---------- */
.parts { display: flex; flex-direction: column; gap: 10px; }
.parts-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.part { display: flex; flex-direction: column; gap: 8px; }
.part-card { position: relative; }
.part-card[draggable="true"] { cursor: grab; }
.part-card.dragging { opacity: .45; }
.part-card.drag-over { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--c100); }
.part-no { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 13px var(--mono); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.part-kind { margin-top: 8px; height: 22px; font-size: 11px; }
.part-move { display: inline-flex; flex-direction: column; gap: 2px; }
.part-move .icon-btn { width: 30px; height: 26px; }
.part-move .icon-btn:disabled { opacity: .3; cursor: default; }
.part-down svg { transform: rotate(180deg); }
.part-x { color: var(--mute); }
.part-x:hover { color: var(--err); background: var(--err-bg); }
.part-cam { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-inline-start: 40px; }
.part-cam .cam-card { flex: 1; min-width: 240px; }
.cam-ok { color: var(--ok); }
.cam-warn { color: #8A5300; }
.add-kinds { display: grid; gap: 12px; }
.add-kind { flex-direction: row; align-items: center; gap: 14px; cursor: pointer; padding: 18px 20px; }
.add-kind:hover { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--c50); }
.add-kind b { display: block; font-size: 16px; margin-bottom: 4px; }
.add-kind .hint { display: block; line-height: 1.7; }
.add-kind-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--c50); color: var(--cobalt); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.clips-drop { min-height: 130px; }
.clips-drop:not(.live) { cursor: progress; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.clip-card { position: relative; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.clip-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--line-2); }
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-card .media-name { padding: 0 2px; }
.clip-card .media-note { height: 36px; }
.notes-sec { margin-top: 8px; }
.notes-ta { min-height: 110px; }
.note-tools { display: flex; flex-wrap: wrap; gap: 8px; }
/* Recording a spoken note: a bar across the row with cancel, a beating red dot, the time, moving sound bars, stop. */
.rec-slot { display: contents; }
.rec-slot.on { display: block; flex: 1 1 100%; }
.rec-bar { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 6px 4px 4px; border: 1px solid var(--err); border-radius: 999px; background: var(--err-bg); color: var(--err); }
.rec-bar .rec-cancel { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; color: var(--mute); }
.rec-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--err); animation: rec-beat 1.1s ease-in-out infinite; }
@keyframes rec-beat { 50% { opacity: .25; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.rec-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.rec-waves { flex: 1 1 auto; min-width: 40px; height: 30px; display: block; color: var(--err); }
.rec-stop { flex: 0 0 auto; gap: 8px; background: var(--err); border-color: var(--err); color: #fff; border-radius: 999px; min-height: 40px; }
.rec-stop:hover { filter: brightness(1.06); }
.rec-square { width: 11px; height: 11px; border-radius: 2px; background: currentColor; }
.note-link-row { display: flex; gap: 8px; }
.note-link-row .input { flex: 1; min-width: 0; height: 40px; }
.note-link-msg { margin: 0; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.7; }
.note-file-list { display: flex; flex-direction: column; gap: 8px; }
.note-file { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.note-file-thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--muted, #6B6B66); }
.note-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.note-file-text .media-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.note-file .seg { flex: none; }
.understood { display: flex; flex-direction: column; gap: 14px; }
.understood-sum { margin: 0; background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px; line-height: 1.8; }
@media (max-width: 640px) { .note-file { flex-wrap: wrap; } .note-file .seg { width: 100%; } .note-file .seg button { flex: 1; } }
@media (max-width: 640px) {
  /* Phone: name and length get the whole middle; "uploaded" and the arrows sit on a second line. */
  .part-card { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) auto; grid-template-areas: "no thumb info x" "no thumb done move"; gap: 8px 10px; padding: 12px; align-items: center; }
  .part-card .part-no { grid-area: no; }
  .part-card .mini { grid-area: thumb; }
  .part-card .part-info { grid-area: info; }
  .part-card .part-done { grid-area: done; justify-self: start; height: 24px; }
  .part-card .part-move { grid-area: move; flex-direction: row; justify-self: end; }
  .part-card .part-x { grid-area: x; }
  .part-card .part-info .hint { font-size: 11px; }
  .part-cam { padding-inline-start: 0; }
  .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .clip-card .media-note { font-size: 12px; padding: 0 8px; }
}

/* ---------- A fixed look for the client's picture (shape, corner, size) ---------- */
.look-box { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.look-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.look-row .seg { flex-wrap: wrap; }
@media (max-width: 640px) { .look-row { flex-direction: column; align-items: stretch; } .look-row .seg button { flex: 1; } }

/* ---------- How a screen of another shape sits in the video ---------- */
.fthumb { position: relative; display: block; border-radius: 6px; background: #1d2026; overflow: hidden; margin-bottom: 4px; }
.fthumb .fblur { position: absolute; inset: 0; background: linear-gradient(135deg, #5b6bb5, #2c335c); filter: blur(3px); opacity: .7; }
.fthumb .fscr { position: absolute; display: block; background: linear-gradient(135deg, #3A4A8F, #1F2547); border: 1.5px solid #fff; border-radius: 2px; box-sizing: border-box; }
.fthumb .fzoom { position: absolute; width: 14px; height: 14px; border: 2px solid #FFD166; border-radius: 50%; right: 6px; bottom: 30%; }
.fthumb .fbrand { background: linear-gradient(160deg, #E2B33C, #0F3D3E); filter: none; opacity: 1; }
.fthumb .fface { background: #D9C8B4; border-color: #fff; }
.fthumb .fcard { background: #fff; opacity: .85; border-color: transparent; }
.redo-card { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line, #E3DED6); border-radius: 12px; display: grid; gap: 8px; }
.al-page { display: grid; gap: 18px; max-width: 760px; }
.al-kinds { display: grid; gap: 10px; }
.al-kind { display: flex; gap: 10px; align-items: flex-start; }
.al-kind span { display: grid; gap: 2px; }
.al-chats { display: grid; gap: 6px; margin: 8px 0; }

/* touch screens: a close button and a card's menu are big enough for a finger */
@media (pointer: coarse) { .mhead .icon-btn, .pcard .icon-btn { width: 44px; height: 44px; } }

/* The montage tool's chat: the recording bar sits where the writing box was. */
.chat-box > .rec-bar { margin: 2px 0; }
.composer-row .icon-btn.tool[hidden] { display: none; }

/* After stop, until the words are in the box: the same bar, calm grey, with a turning circle (the mic waits too). */
.rec-bar.writing { justify-content: center; gap: 10px; border-color: var(--line); background: var(--line-2); color: var(--ink); padding: 4px 16px; }
.rec-writing { font-size: 14px; font-weight: 600; }
.rec-spin { flex: 0 0 auto; display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent; opacity: .75; animation: rec-turn .8s linear infinite; }
@keyframes rec-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rec-spin { animation-duration: 2.4s; } }
.icon-btn.tool.wait, .chat-tool.wait { opacity: 1; cursor: progress; color: var(--mute); }

/* Whiteboard: the hand and pen choices */
.hand-pick { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; min-width: 76px; font-size: 12px; }
.hand-thumb { width: 56px; height: 56px; object-fit: contain; display: block; }
.hand-auto { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--soft, rgba(0,0,0,.05)); }
.sub-h { font-size: 14px; margin: 14px 0 6px; }

/* «دي صورتي»: the client's photo for a voice-only video */
.photo-thumb { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }

/* Phones: the hand choices three to a row (small pictures), and a finger-sized "suggested" colour button. */
.hand-pick { border-radius: 16px; }
@media (max-width: 560px) {
  .pickrow .hand-pick { flex: 1 1 calc(33.33% - 8px); min-width: 0; padding: 6px 4px; font-size: 11px; }
  .hand-thumb, .hand-auto { width: 44px; height: 44px; }
}
.col-auto { min-height: 32px; padding: 6px 8px; }

/* A note box: several lines that grow with the text, with the room left and "saved" under it. */
.note-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
textarea.note-box { display: block; width: 100%; box-sizing: border-box; min-height: 38px; height: auto; padding: 8px 10px; line-height: 22px; resize: none; overflow-y: auto; font: inherit; font-size: 13.5px; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 16px; font-size: 11.5px; }
.note-count { margin-inline-start: auto; opacity: .55; }
.note-count.near { color: #E0563B; opacity: 1; }
.note-state { opacity: .7; }
.note-state.ok { color: #1F9D55; opacity: 1; }

/* «انسخ أسلوب مونتاج فيديو»: the example card at the top of the templates step. */
.copy-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); padding: 20px 22px; }
.copy-card.on { border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt) inset; background: var(--c50); }
.copy-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.copy-row { display: flex; gap: 8px; width: 100%; }
.copy-row .copy-link { flex: 1; min-width: 0; text-align: left; }
.copy-or { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--ink-3, #8A8D93); font-size: 13px; }
.copy-or::before, .copy-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.copy-wait { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.copy-ready { display: flex; gap: 16px; align-items: flex-start; }
.copy-video { width: 132px; max-height: 236px; border-radius: var(--r); background: var(--stage); object-fit: contain; flex-shrink: 0; }
.copy-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.copy-text .hint { margin: 0; }
.copy-fail { margin: 0; }
.tpl-list { display: flex; flex-direction: column; gap: 12px; }
.tpl-list.off { opacity: .45; pointer-events: none; }
@media (max-width: 560px) {
  .copy-card { padding: 16px; }
  .copy-row { flex-direction: column; }
  .copy-row .btn { width: 100%; }
  .copy-ready { flex-direction: column; }
  .copy-video { width: 100%; max-height: 320px; }
}
.copy-known { font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center; height: 132px; color: var(--cobalt); background: var(--c100); }

/* The sign-in window: a browser's frame around our browser's live screen. */
.sitewin-scrim { align-items: center; padding: 12px; }
.modal.sitewin { width: min(1240px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 14px; }
.modal.sitewin.phone { width: min(460px, calc(100vw - 12px)); }
.modal.sitewin.phone { height: calc(100vh - 24px); }
@supports (height: 100dvh) { .modal.sitewin { max-height: calc(100dvh - 24px); } .modal.sitewin.phone { height: calc(100dvh - 24px); } }
/* On a phone the whole page picture fits between the bar and the buttons (a finger drags the site, not the window). */
.modal.sitewin.phone .sitewin-stage { min-height: 0; align-items: center; overflow: hidden; }
.modal.sitewin.phone .sitewin-pic { width: auto; height: 100%; max-width: 100%; max-height: 100%; }
.sitewin-top { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #E9EAEE; border-bottom: 1px solid #D5D7DD; direction: ltr; }
.sitewin-dots { display: flex; gap: 6px; margin-inline-end: 4px; }
.sitewin-dots i { width: 11px; height: 11px; border-radius: 50%; background: #C7C9D1; }
.sitewin-nav { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #4A4D55; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.sitewin-nav:hover { background: #DADCE3; }
.sitewin-address { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 16px; background: #fff; color: #4A4D55; font-size: 13px; }
.sitewin-url { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitewin-load { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--cobalt), transparent); background-size: 40% 100%; background-repeat: no-repeat; opacity: 0; }
.sitewin-load.on { opacity: 1; animation: sitewin-load 1.1s linear infinite; }
@keyframes sitewin-load { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.sitewin-stage { position: relative; background: #fff; min-height: 240px; overflow: auto; outline: none; flex: 1; display: flex; justify-content: center; align-items: flex-start; }
.sitewin-pic { display: block; width: 100%; height: auto; max-height: calc(100vh - 190px); object-fit: contain; cursor: default; user-select: none; touch-action: none; }
.modal.sitewin:not(.phone) .sitewin-pic { width: auto; max-width: 100%; }
.sitewin-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--paper); }
.sitewin-wait[hidden] { display: none; }
.sitewin-tap { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid var(--cobalt); pointer-events: none; animation: sitewin-tap .45s ease-out forwards; }
@keyframes sitewin-tap { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.sitewin-type { margin: 8px 12px 0; width: calc(100% - 24px); }
/* The phone's keyboard belongs to this field: out of sight, still focusable; 16px so a phone never zooms in on it. */
.sitewin-keys { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; pointer-events: none; }
.sitewin-guard { padding: 9px 14px; font-size: 13px; line-height: 1.5; border-bottom: 1px solid var(--line); }
.sitewin-guard[hidden] { display: none; }
.sitewin-guard.check { background: #FFF6DC; color: #6B4A00; }
.sitewin-guard.refused { background: #FDECEC; color: #8E1C18; }
.sitewin-foot { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--white); }
.sitewin-note { flex: 1; margin: 0; font-size: 12px; line-height: 1.5; }
.sitewin-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 700px) { .sitewin-foot { flex-direction: column; align-items: stretch; } .sitewin-actions { justify-content: space-between; } .sitewin-dots { display: none; } }
@media (prefers-reduced-motion: reduce) { .sitewin-load.on, .sitewin-tap { animation-duration: 2.4s; } }
.set-sites { display: flex; flex-direction: column; gap: 4px; }
.set-site-add { display: flex; gap: 8px; margin-top: 12px; }
.ap-list { display: flex; flex-direction: column; gap: 10px; }
.ap-card { border: 1px solid #E4E4DF; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.ap-card p { margin: 0; }
.ap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ap-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.ap-btns { display: flex; gap: 8px; }
.site-safe { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #F2F6F2; color: #2D4A33; }
.site-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.site-log-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #EEEEEA; }
.site-log { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.site-run { border: 1px solid #EEEEEA; border-radius: 10px; padding: 8px 12px; }
.site-run summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.site-step { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.site-step img { width: 120px; height: auto; border-radius: 6px; border: 1px solid #E4E4DF; display: block; }
.site-sub { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.site-state i { width: 8px; height: 8px; border-radius: 50%; background: #2E9D5B; }
.site-state.out { color: #B4231F; } .site-state.out i { background: #D93A35; }
.site-state.blocked { color: #8A5A00; } .site-state.blocked i { background: #E0A100; }
@media (max-width: 560px) { .set-sites .set-row { flex-direction: column; align-items: stretch; } .site-actions { justify-content: flex-start; } }
.set-site-add .input { flex: 1; min-width: 0; text-align: left; }

/* The library's covers: each in its own shape, on one row height */
.lib-covers .lib-item .pic-open.cover { aspect-ratio: auto; height: 220px; display: grid; place-items: center; background: var(--line-2); }
.lib-covers .lib-item .pic-open.cover img { width: auto; max-width: 100%; height: 220px; max-height: 220px; object-fit: contain; }
.lib-cover-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lib-cover-meta b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-cover-meta .hint { font-size: 11.5px; }

/* Windows on a phone: less side padding, so their content has room */
@media (max-width: 520px) { .mhead { padding: 18px 18px 14px; } .mhead h2 { font-size: 21px; } .mbody { padding: 16px 18px; } .mfoot { padding: 12px 18px; } }

/* «المدير» answering inside the main chat. */
.mgr-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; margin-bottom: 6px; }
.mgr-card { display: grid; gap: 8px; padding: 14px; max-width: 520px; margin-top: 10px; justify-items: start; }
.mgr-card p { margin: 0; line-height: 1.7; }
.mgr-link { display: inline-block; margin-top: 8px; font-size: 13px; }

/* «الفريق»: the team page, the account switch, and a section a member was not given. */
.team-page { display: grid; gap: 16px; max-width: 860px; }
.team-list { display: grid; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.team-row:last-child { border-bottom: 0; }
.team-main { flex: 1; min-width: 180px; display: grid; gap: 2px; justify-items: start; }
.team-form { display: grid; gap: 14px; }
.team-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.team-check input { margin-top: 4px; }
.team-check b, .team-check .hint { display: block; }
.team-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.team-replies { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--c50, #F6F7FB); }
.team-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.team-seg-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.team-seg-btn[aria-pressed="true"] { border-color: var(--c500, #3355FF); color: var(--c700, #1F33B8); background: var(--c50, #EEF1FF); font-weight: 600; }
.ws-box { display: grid; gap: 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); }
.ws-item.on { font-weight: 700; }
.ws-banner { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 6px 10px; border-radius: 10px; background: #FFF4D6; color: #7A5200; font-size: 12px; overflow: hidden; }
.ws-banner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty.blocked { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 72px 20px; }
.empty.blocked h1 { font-size: 20px; margin: 0; }
.empty.blocked p { max-width: 460px; margin: 0; line-height: 1.8; }

/* A team member inside an owner's account: the account button (and its tab on the phone) say whose it is. */
.acct.acting { background: #FFF4D6; border-color: #E9CF86; }
.acct.acting .who-name { color: #7A5200; }
.tabbar button.ws { color: #7A5200; }
.tabbar button.ws span { font-weight: 700; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Voice notes on the usage page. */
.usage-voice { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; }
.usage-voice-text { flex: 1; min-width: 200px; display: grid; gap: 2px; }

.usage-voice-hour { flex-basis: 100%; display: grid; gap: 6px; }
.usage-voice-bar { height: 8px; border-radius: 999px; background: var(--line-2, #EEF0F4); overflow: hidden; }
.usage-voice-bar span { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--c500, #3355FF); }

/* «فيديو من غير تصوير»: the choice after the project's name, and the first pages. */
.kindpicks { display: grid; gap: 12px; }
.opt.kindpick { flex-direction: row; align-items: center; gap: 14px; min-height: 76px; width: 100%; }
.opt.kindpick b { display: block; font-size: 16px; }
.kindpick-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--c50); color: var(--cobalt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mk-page { gap: 40px; }
.opt.mk-box { min-height: 112px; gap: 6px; }
.opt.mk-box b { font-size: 16px; }
.mk-box-ico { color: var(--mute); display: flex; }
.opt.mk-box[aria-pressed="true"] .mk-box-ico { color: var(--cobalt); }
.mk-thumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mk-thumb { position: relative; width: 104px; height: 132px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.mk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-thumb-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(17,18,20,.72); color: #fff; display: flex; align-items: center; justify-content: center; }
.mk-link { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-link .input { flex: 1 1 260px; min-width: 0; text-align: left; }
.mk-product { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 14px 16px; display: grid; gap: 6px; }
.mk-about { margin: 0; font-size: 13px; line-height: 1.7; color: var(--mute); max-height: 6.8em; overflow: auto; }
.mk-file { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px 12px; }
.mk-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.mk-idea { min-height: 120px; }
.mk-durs { gap: 12px; flex-wrap: wrap; }
.mk-seconds { width: 190px; }
.opt.lvl.mk-lvl { min-height: 72px; }
@media (max-width: 600px) { .mk-thumb { width: 88px; height: 112px; } .mk-seconds { width: 100%; } }
.mk-wait { align-items: center; text-align: center; padding: 56px 16px; gap: 16px; }
.mk-wait-text { margin: 0; font-size: 16px; font-weight: 600; }
.mk-dots { display: inline-flex; gap: 6px; align-items: center; }
.mk-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); animation: mk-dot 1.2s ease-in-out infinite; }
.mk-dots i:nth-child(2) { animation-delay: .2s; } .mk-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes mk-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mk-dots i { animation: none; opacity: .6; } }
.mk-hook { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--c50); }
.mk-hook-text { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 600; line-height: 1.7; color: var(--c700); overflow-wrap: anywhere; }
.mk-all { display: flex; gap: 12px; align-items: flex-start; }
.mk-edit { min-height: 44px; flex-shrink: 0; }
.mk-lines { display: grid; gap: 12px; }
.mk-group { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 4px 14px; }
.mk-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 6px; font-size: 13px; }
.mk-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.mk-line:first-child { border-top: 0; }
.mk-time { width: 64px; flex-shrink: 0; font-size: 12px; color: var(--mute); }
.mk-line-text { flex: 1 1 320px; min-width: 0; margin: 0; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.mk-from-photo { background: var(--ok-bg); color: var(--ok); } .mk-from-clip { background: var(--warn-bg); color: #8A5300; } .mk-from-scene { background: var(--c50); color: var(--c700); }
.mk-line-edit { flex: 1 1 320px; min-width: 0; display: grid; gap: 8px; }
.mk-line-ta { min-height: 84px; resize: vertical; font-size: 15px; line-height: 1.8; padding: 10px 12px; }
.mk-questions { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px 14px; display: grid; gap: 6px; font-size: 13px; }
.mk-questions ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 2px; line-height: 1.7; }
.mk-q[aria-pressed="true"] { border-color: var(--cobalt); color: var(--cobalt); }
.mk-ask { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-ask .input { flex: 1 1 280px; min-width: 0; min-height: 44px; }
.mk-ask .btn { min-height: 44px; }
.mk-warn { margin: 0; color: #8A5300; }
.mk-working { margin: 0; display: flex; gap: 10px; align-items: center; }
.mk-stale { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: #8A5300; font-size: 14px; font-weight: 600; }
@media (max-width: 600px) { .mk-hook { flex-direction: column; align-items: stretch; } .mk-time { width: auto; } .mk-line-text { flex-basis: 100%; } .wsec .shead:has(.mk-q) { flex-wrap: wrap; gap: 10px; } .mk-q { width: 100%; } }
.mk-page .cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .mk-page .cols2 { grid-template-columns: 1fr; } }
.mk-filter { display: grid; gap: 8px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink); }
.mk-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.mk-chip:disabled { opacity: .6; }
.mk-voices { display: grid; }
.mk-voice { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.mk-voice:first-child { border-top: 0; }
.mk-voice.picked .mk-voice-main b { color: var(--cobalt); }
.mk-voice-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mk-voice-main b { font-size: 15px; overflow-wrap: anywhere; }
.mk-voice-about { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-play { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.mk-play[aria-pressed="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.mk-play[aria-pressed="true"] .mk-dots i { background: #fff; }
.mk-play.off { opacity: .35; }
.mk-play .mk-dots { gap: 3px; } .mk-play .mk-dots i { width: 5px; height: 5px; }
.mk-chosen { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--c50); }
.mk-chosen.gone { background: var(--warn-bg); }
.mk-chosen .btn { min-height: 44px; }
.mk-chosen .btn[aria-pressed="true"] { border-color: var(--cobalt); color: var(--cobalt); }
.mk-audio { max-width: 100%; height: 40px; }
.mk-shots-page { max-width: 980px; }
.mk-build-row .mk-shot-line { padding-bottom: 10px; }
.mk-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mk-shot { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.mk-shot.ok { border-color: var(--ok); }
.mk-shot-pic { position: relative; background: var(--line-2); max-height: 420px; width: 100%; }
.mk-shot-pic a, .mk-shot-pic img { display: block; width: 100%; height: 100%; }
.mk-shot-pic img { object-fit: cover; }
.mk-shot-wait { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center; padding: 12px; font-size: 13px; font-weight: 600; background: rgba(243,243,240,.86); }
.mk-shot-body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.mk-shot-body .btn { min-height: 44px; }
.mk-shot-line { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.mk-shot-ask { display: grid; gap: 8px; }
.mk-shot-ask .input { min-height: 44px; }
@media (max-width: 600px) { .mk-shots { grid-template-columns: 1fr; } }
.mk-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.mk-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mk-facts > div:nth-child(-n+2) { border-top: 0; }
.mk-facts dt { color: var(--mute); } .mk-facts dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.mk-price { display: grid; }
.mk-price-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.mk-price-row:first-child { border-top: 0; }
.mk-price-row.total { border-top: 2px solid var(--ink); font-size: 17px; font-weight: 700; }
.mk-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-part { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.mk-part b { font-size: 16px; }
.mk-rules { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.8; }
.mk-approve { min-height: 48px; padding: 0 24px; font-size: 15px; }
.mk-approved { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 600px) { .mk-facts, .mk-parts { grid-template-columns: 1fr; } .mk-facts > div:nth-child(2) { border-top: 1px solid var(--line-2); } .mk-approve { width: 100%; }
  .mk-steps .st { font-size: 0; min-width: 0; } .mk-steps .st.c { font-size: 12px; white-space: nowrap; flex: 2 1 auto; } }
@media (max-width: 600px) { .mk-voice { flex-wrap: wrap; } .mk-voice .mk-edit { width: 100%; } .mk-file:has(.mk-audio) { flex-direction: column; align-items: stretch; } }

/* «الشخصيات»: the list, and the three steps of a new character */
.ch-lead { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ch-lead p { margin: 0; color: var(--mute); max-width: 560px; line-height: 1.8; }
.ch-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.ch-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.ch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.ch-card-pic { display: block; border-radius: var(--r-sm); overflow: hidden; }
.ch-collage { display: grid; grid-template-columns: 2fr 1fr; gap: 3px; height: 300px; background: var(--line-2); }
.ch-collage.one { grid-template-columns: 1fr; }
.ch-collage img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; min-height: 0; }
.ch-collage-side { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; height: 300px; min-height: 0; }
.ch-blank { height: 300px; background: var(--stage); display: flex; align-items: center; justify-content: center; }
.ch-ring { width: 112px; height: 112px; border-radius: 50%; border: 2px dashed var(--c300); display: flex; align-items: center; justify-content: center; }
.ch-figure { fill: #3A3C42; }
.ch-name { margin: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-about { margin: 0; padding: 0 4px; font-size: 13px; color: var(--mute); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; }
.ch-card .btn { height: 44px; }
.ch-ico { width: 44px; padding: 0; flex-shrink: 0; }
.ch-new { min-height: 420px; height: 100%; }
.ch-wiz .wtop-start, .ch-wiz .wtop-end { width: 300px; }
.ch-steps { list-style: none; margin: 0; padding: 0; width: min(460px, 100%); }
.ch-steps .st { cursor: default; text-align: start; }
.ch-page { width: 100%; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; animation: ch-in .35s ease both; }
@keyframes ch-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ch-head h1 { margin: 0; font-size: 32px; line-height: 1.25; font-weight: 700; }
.ch-head p { margin: 8px 0 0; color: var(--mute); max-width: 520px; line-height: 1.8; }
.ch-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.ch-num { font: 500 13px var(--mono); color: var(--mute); margin-bottom: 8px; width: fit-content; direction: ltr; }
.ch-again { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ch-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.ch-kind { flex-direction: row; align-items: flex-start; gap: 14px; }
.ch-kind.off { opacity: .6; }
.ch-kind.off:hover { border-color: var(--line); box-shadow: none; }
.ch-kind-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-kind-ico.blue { background: var(--cobalt); }
.ch-kind-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding-inline-end: 28px; }
.ch-kind-text b { font-size: 16px; }
.ch-kind .chip { flex-shrink: 0; }
.ch-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow); min-width: 0; }
.ch-desc { min-height: 104px; height: auto; padding: 12px 14px; font-size: 16px; line-height: 1.8; resize: vertical; }
.ch-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px 28px; }
.ch-quick .seg button { height: 38px; }
.ch-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ch-opts.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ch-opt { display: flex; flex-direction: column; gap: 8px; text-align: start; padding: 8px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 1px 2px rgba(17,18,20,.04); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
button.ch-opt:hover:not(:disabled) { border-color: var(--ink); }
.ch-opt.on, button.ch-opt.on:hover:not(:disabled) { border: 2px solid var(--cobalt); padding: 7px; background: var(--c50); box-shadow: 0 0 0 4px rgba(47,75,255,.12); }
.ch-opt-pic { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--line-2); }
.ch-opt-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-tick { position: absolute; top: 10px; inset-inline-end: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--cobalt); color: #fff; display: none; align-items: center; justify-content: center; font-size: 13px; }
.ch-opt.on .ch-tick { display: flex; }
.ch-over { position: absolute; inset: 0; background: rgba(17,18,20,.6); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
.ch-over .mk-dots i { background: #fff; }
.ch-opt-text { display: flex; flex-direction: column; gap: 2px; padding: 4px 4px 2px; }
.ch-opt-text b { font-size: 14px; }
.ch-opt-text span { font-size: 12px; color: var(--mute); line-height: 1.6; }
.ch-ask-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-ask-row .input { flex: 1 1 320px; width: auto; }
.ch-ask-row .btn { height: 46px; }
.ch-box > .lbl + .ch-ask-row, .ch-box > .ch-ask-row + .hint { margin-top: -10px; }
.ch-save { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; align-items: start; }
.ch-sheet { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.ch-shot { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: var(--line-2); min-height: 206px; }
.ch-shot.big { grid-row: span 2; aspect-ratio: 3 / 4; min-height: 0; }
.ch-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.ch-shot.top img { object-position: top; }
.ch-shot figcaption { position: absolute; bottom: 10px; inset-inline-start: 10px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(17,18,20,.72); color: #fff; pointer-events: none; }
.ch-save > .ch-shot.big { aspect-ratio: 3 / 4; min-height: 0; max-height: 520px; }
.ch-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ch-facts li { display: flex; gap: 10px; align-items: flex-start; }
.ch-check { color: var(--ok); font-weight: 700; flex-shrink: 0; }
.ch-wiz .foot .hint { text-align: center; }
@media (max-width: 860px) {
  .ch-opts, .ch-opts.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-head h1 { font-size: 24px; }
  .ch-box { padding: 18px 16px; }
  .ch-again { align-items: flex-start; }
  .ch-wiz .wbody { padding: 24px 16px 32px; }
  .ch-quick .seg { flex-wrap: wrap; }
  .ch-quick .seg button { flex: 1 1 40%; }
  .ch-wiz .foot { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) { .ch-page { animation: none; } .ch-card { transition: none; } }

/* «الشخصيات»: a real person's live recording */
button.ch-kind { cursor: pointer; font: inherit; color: inherit; width: 100%; }
.ch-cam { display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch; }
.ch-cam-stage { flex: 999 1 520px; min-width: 0; min-height: 600px; background: var(--stage); border-radius: var(--r-lg); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: #fff; box-shadow: var(--shadow-up); }
.ch-cam-stage.intro { justify-content: center; gap: 22px; padding: 40px 24px; text-align: center; }
.ch-cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); background: var(--stage-2); }
.ch-cam-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,18,20,.55) 0%, rgba(17,18,20,0) 22%, rgba(17,18,20,0) 52%, rgba(17,18,20,.82) 100%); pointer-events: none; }
.ch-cam-stage.intro::after { display: none; }
.ch-cam-top, .ch-cam-mid, .ch-cam-text { position: relative; z-index: 1; }
.ch-cam-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; box-sizing: border-box; }
.ch-cam-live { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(17,18,20,.55); font-size: 12px; font-weight: 600; }
.ch-cam-live i { width: 8px; height: 8px; border-radius: 50%; background: #FF5A5A; animation: ch-blink 1.4s ease-in-out infinite; }
@keyframes ch-blink { 50% { opacity: .35; } }
.ch-cam-count { font-size: 13px; color: #E8E8E3; }
.ch-cam-mid { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 12px; box-sizing: border-box; }
.ch-cam-guide { position: relative; border: 4px dashed rgba(255,255,255,.85); transition: border-color .3s ease, box-shadow .3s ease, border-radius .4s ease, width .4s ease, height .4s ease; box-sizing: border-box; }
.ch-cam-guide.face { width: min(300px, 62%); aspect-ratio: 1; border-radius: 50%; }
.ch-cam-guide.body { height: min(400px, 92%); aspect-ratio: 9 / 19; border-radius: 28px; }
.ch-cam-guide.hold { border-style: solid; border-color: #fff; animation: ch-hold var(--hold, 2200ms) linear both; }
@keyframes ch-hold { from { box-shadow: 0 0 0 0 rgba(255,255,255,.5); } to { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.ch-cam-guide.ok { border-style: solid; border-color: #2BD18B; box-shadow: 0 0 0 8px rgba(43,209,139,.2); }
.ch-cam-guide.to-right::after, .ch-cam-guide.to-left::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-top: 4px solid #fff; border-inline-end: 4px solid #fff; animation: ch-nudge 1.1s ease-in-out infinite; }
.ch-cam-guide.to-right::after { right: -52px; border-inline-end: 0; border-right: 4px solid #fff; --turn: 45deg; --dx: 8px; }
.ch-cam-guide.to-left::after { left: -52px; border-inline-end: 0; border-left: 4px solid #fff; --turn: -45deg; --dx: -8px; }
@keyframes ch-nudge { 0%, 100% { transform: translateX(0) rotate(var(--turn)); opacity: .5; } 50% { transform: translateX(var(--dx)) rotate(var(--turn)); opacity: 1; } }
.ch-cam-text { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 24px 28px; text-align: center; box-sizing: border-box; min-height: 120px; justify-content: flex-end; }
.ch-cam-say { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.35; color: #fff; }
.ch-cam-sub { margin: 0; font-size: 15px; color: #DCDCD6; min-height: 24px; }
.ch-cam-words { background: rgba(17,18,20,.62); border: 1px solid rgba(255,255,255,.16); border-radius: var(--r); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; align-items: center; max-width: 560px; }
.ch-cam-words[hidden] { display: none; }
.ch-cam-words .hint { color: #B9BAB3; }
.ch-cam-words p { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.8; }
.ch-cam-words b { color: var(--gold); letter-spacing: .12em; font-size: 22px; unicode-bidi: isolate; }
.ch-cam-bars { display: flex; gap: 4px; align-items: center; height: 24px; }
.ch-cam-bars i { width: 4px; height: 20px; border-radius: 2px; background: var(--c300); animation: ch-bar .9s ease-in-out infinite; }
.ch-cam-bars i:nth-child(2) { animation-delay: .15s; } .ch-cam-bars i:nth-child(3) { animation-delay: .3s; } .ch-cam-bars i:nth-child(4) { animation-delay: .45s; } .ch-cam-bars i:nth-child(5) { animation-delay: .6s; }
@keyframes ch-bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.ch-ring.big { width: 148px; height: 148px; }
.ch-cam-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: #DCDCD6; text-align: start; max-width: 420px; }
.ch-cam-tips li { display: flex; gap: 10px; align-items: baseline; }
.ch-cam-tips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c300); flex-shrink: 0; transform: translateY(-2px); }
.ch-cam-side { flex: 1 1 300px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ch-cam-side .ch-box { padding: 20px; gap: 10px; }
.ch-cam-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ch-cam-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--mute); }
.ch-cam-list li > span:last-child { display: flex; flex-direction: column; line-height: 1.5; }
.ch-cam-list b { font-size: 15px; font-weight: 600; }
.ch-cam-list .hint { font-size: 12px; }
.ch-cam-list li.now { background: var(--c50); color: var(--ink); }
.ch-cam-list li.done { color: var(--ink); }
.ch-cam-badge { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--line-2); color: var(--mute); }
.ch-cam-list li.now .ch-cam-badge { background: var(--cobalt); color: #fff; }
.ch-cam-list li.done .ch-cam-badge { background: var(--ok); color: #fff; }
.ch-cam-notes { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.ch-cam-notes > div { display: flex; gap: 10px; align-items: flex-start; }
.ch-cam-notes svg { flex-shrink: 0; margin-top: 2px; }
.ch-agree { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-size: 14px; line-height: 1.7; cursor: pointer; min-height: 44px; }
.ch-agree input { width: 20px; height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--cobalt); }
.ch-cam-stills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ch-cam-stills .ch-shot { aspect-ratio: 3 / 4; min-height: 0; }
.ch-cam-problems { margin: 0; padding: 16px 18px; list-style: none; display: flex; flex-direction: column; gap: 10px; background: var(--err-bg); border-radius: var(--r); font-size: 14px; color: #8A1C1C; line-height: 1.7; }
.ch-cam-problems li { display: flex; gap: 10px; align-items: flex-start; }
.ch-cam-problems li > span { width: 20px; height: 20px; border-radius: 50%; background: #B42323; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
@media (max-width: 860px) {
  .ch-cam-stage { min-height: 520px; flex-basis: 100%; border-radius: var(--r); }
  .ch-cam-say { font-size: 22px; }
  .ch-cam-guide.to-right::after { right: -34px; } .ch-cam-guide.to-left::after { left: -34px; }
  .ch-cam-stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-cam-words p { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .ch-cam-live i, .ch-cam-bars i, .ch-cam-guide.hold, .ch-cam-guide.to-right::after, .ch-cam-guide.to-left::after { animation: none; } }

/* The page an invited person opens on their phone to record themselves (/c/<token>) */
.ch-inv-btn { height: 48px; }
.pc { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pc-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.04em; }
.pc-mark i { width: 18px; height: 18px; border-radius: 4px; background: var(--cobalt); display: block; }
.pc-body { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 24px 20px 32px; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; }
.pc-body .ch-cam-stage { min-height: 0; flex: none; }
.pc-body .ch-cam-stage.intro { padding: 32px 20px; }
.pc-run { display: flex; flex-direction: column; gap: 12px; }
.pc-run .ch-cam-stage { height: calc(100dvh - 190px); min-height: 460px; }
.pc-actions { display: flex; flex-direction: column; gap: 10px; }
.pc-actions .hint { margin: 0; text-align: center; }
.pc-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 48px 8px; }
.pc-msg h1 { margin: 0; font-size: 26px; line-height: 1.35; }
.pc-msg p { margin: 0; color: var(--mute); line-height: 1.8; max-width: 420px; }
.pc-ok { order: -1; width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 40px; display: flex; align-items: center; justify-content: center; }
.pc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); flex-shrink: 0; margin-top: 9px; }

/* The live recording, watched: the back camera, the body's outline, what to fix now, the voice heard */
.ch-cam-video.rear { transform: none; }
.ch-cam-tools { display: inline-flex; align-items: center; gap: 12px; }
.ch-cam-flip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(17,18,20,.55); color: #fff; font: 600 12px var(--sans); cursor: pointer; }
.ch-cam-flip:hover { background: rgba(17,18,20,.8); }
.ch-cam-stage.loading .ch-cam-flip { visibility: hidden; }
.ch-cam-guide[hidden] { display: none; }
.ch-cam-mid { position: relative; }
.ch-cam > .ch-cam-stage:not(.intro) { height: min(640px, calc(100vh - 230px)); min-height: 480px; }
.ch-cam-body { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 94%; max-height: 460px; width: auto; fill: none; stroke: rgba(255,255,255,.9); stroke-width: 3; stroke-dasharray: 9 7; stroke-linejoin: round; transition: stroke .3s ease; overflow: visible; }
.ch-cam-body.hold { stroke: #fff; stroke-dasharray: none; }
.ch-cam-body.ok { stroke: #2BD18B; stroke-dasharray: none; filter: drop-shadow(0 0 8px rgba(43,209,139,.55)); }
.ch-cam-sub.warn { color: var(--gold); font-weight: 600; }
.ch-cam-stage.heard .ch-cam-bars i { animation: none; transition: transform .1s linear; transform: scaleY(.2); }

/* «فيديو من غير تصوير»: the character of the shots with a person, and what the look at each picture found */
.mk-person { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.mk-person-list { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-person-card { width: 132px; padding: 8px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink); display: flex; flex-direction: column; gap: 8px; align-items: stretch; font: 600 14px var(--sans); text-align: center; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.mk-person-card:hover { border-color: var(--ink); }
.mk-person-card.on, .mk-person-card.on:hover { border: 2px solid var(--cobalt); padding: 7px; background: var(--c50); box-shadow: 0 0 0 4px rgba(47,75,255,.12); }
.mk-person-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: var(--r-sm); background: var(--line-2); display: block; }
.mk-person-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-checks { margin: 0; padding: 10px 12px; list-style: none; display: flex; flex-direction: column; gap: 6px; background: var(--ok-bg); border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: #0A6646; }
.mk-checks.warn { background: var(--warn-bg); color: #6B4200; }
.mk-checks li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.6; }
.mk-checks li > span { flex-shrink: 0; font-weight: 700; width: 14px; text-align: center; }
.mk-checks li.bad { color: #8A1C1C; font-weight: 600; }

/* The recording: how much of the body, the number in boxes, the reading buttons, the countdown */
.ch-body-pick { gap: 10px; }
.ch-body-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ch-body-opt { text-align: start; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); display: flex; flex-direction: column; gap: 4px; font: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ch-body-opt:hover { border-color: var(--ink); }
.ch-body-opt.on, .ch-body-opt.on:hover { border: 2px solid var(--cobalt); padding: 11px; background: var(--c50); box-shadow: 0 0 0 4px rgba(47,75,255,.12); }
.ch-body-opt b { font-size: 14px; }
.ch-body-opt span { font-size: 12px; color: var(--mute); line-height: 1.6; }
.ch-cam-code { display: flex; gap: 8px; justify-content: center; direction: ltr; }
.ch-cam-code b { width: 46px; height: 54px; border-radius: 10px; background: rgba(255,210,63,.14); border: 1.5px solid rgba(255,210,63,.6); color: var(--gold); font-size: 28px; display: flex; align-items: center; justify-content: center; letter-spacing: 0; }
.ch-cam-order { font-size: 12px; color: #B9BAB3; }
.ch-cam-talk { margin-top: 4px; min-width: 200px; height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--cobalt); color: #fff; font: 700 16px var(--sans); cursor: pointer; box-shadow: 0 8px 24px rgba(47,75,255,.4); transition: background .2s ease, opacity .2s ease; }
.ch-cam-talk.rec { background: #E5484D; box-shadow: 0 8px 24px rgba(229,72,77,.4); }
.ch-cam-talk:disabled { opacity: .45; cursor: default; }
.ch-cam-countdown { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; font-size: 140px; font-weight: 700; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.5); pointer-events: none; }
.ch-cam-countdown[hidden] { display: none; }
@media (max-width: 860px) { .ch-cam-code b { width: 40px; height: 48px; font-size: 24px; } .ch-cam-talk { width: 100%; } }

/* A saved character's looks and body pictures */
.ch-looks { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.ch-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ch-sec-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.ch-sec-head p { margin: 4px 0 0; max-width: 520px; }
.ch-look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 14px; }
.ch-look { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.ch-look:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.ch-look-pic { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--line-2); }
.ch-look-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.ch-look-pic .chip { position: absolute; top: 8px; inset-inline-start: 8px; }
.ch-look-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 4px 2px; min-height: 32px; }
.ch-look-foot b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-look-acts { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ch-look-foot .linkish { font-size: 13px; }
.ch-look-resume { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r); border: 1.5px dashed var(--cobalt); background: var(--c50); color: var(--ink); text-align: start; font: inherit; cursor: pointer; }
.ch-look-resume img { width: 56px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }
.ch-look-resume span { display: flex; flex-direction: column; gap: 2px; }
.ch-look-stage { display: flex; flex-direction: column; gap: 10px; }
.ch-look-keep { padding-top: 16px; border-top: 1px solid var(--line-2); }
.ch-ideas { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-idea { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 500 13px var(--sans); cursor: pointer; }
.ch-idea:hover { border-color: var(--ink); color: var(--ink); }
.ch-body-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.ch-body-grid .ch-shot { aspect-ratio: 3 / 4; min-height: 0; }
.ch-body-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(17,18,20,.7); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ch-empty-line { margin: 0; padding: 18px; border: 1.5px dashed var(--mute-2); border-radius: var(--r); text-align: center; }
.mk-person-looks { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mk-person-card.sm { width: 108px; }

.ch-cam-anyway { margin-top: 6px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.45); background: rgba(17,18,20,.55); color: #fff; font: 600 14px var(--sans); cursor: pointer; }
.ch-cam-anyway:hover { background: rgba(17,18,20,.8); }
.ch-later { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.7; padding: 10px 12px; border-radius: var(--r-sm); background: var(--c50); }
.ch-later svg { flex-shrink: 0; margin-top: 3px; color: var(--cobalt); }

.ch-cam-more { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 4px; }
.ch-cam-more .ch-cam-talk { margin-top: 0; }
.ch-cam-more .ch-cam-anyway { margin-top: 0; height: 52px; }
.ch-nudge { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); background: var(--c50); border: 1px solid var(--c200); flex-wrap: wrap; }
.ch-nudge > svg { color: var(--cobalt); flex-shrink: 0; }
.ch-nudge > span { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.ch-nudge b { font-size: 15px; }

/* «ملف الشخصية»: a model's card of every angle */
.ch-save-prof { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 960px) { .ch-save-prof { grid-template-columns: 1fr; } }
.ch-prof { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ch-prof-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; aspect-ratio: 4 / 3; }
.ch-prof-tile { position: relative; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; background: var(--line-2); cursor: zoom-in; min-height: 0; font: inherit; }
.ch-prof-tile.big { grid-row: span 2; }
.ch-prof-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.ch-prof-tile:hover img { transform: scale(1.03); }
.ch-prof-cap { position: absolute; bottom: 8px; inset-inline-start: 8px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(17,18,20,.72); color: #fff; }
.ch-prof-tile.empty { cursor: default; display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px; border: 1.5px dashed var(--mute-2); background: var(--paper); color: var(--mute); font-size: 12px; font-weight: 600; }
.ch-prof-tile.empty.making { background: linear-gradient(100deg, var(--line-2) 30%, var(--paper) 50%, var(--line-2) 70%); background-size: 300% 100%; animation: ch-shimmer 1.4s linear infinite; border-style: solid; border-color: transparent; }
@keyframes ch-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.ch-prof-note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--c50); border: 1px solid var(--c200); flex-wrap: wrap; }
.ch-prof-note > svg { color: var(--cobalt); flex-shrink: 0; }
.ch-prof-note > span { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
.ch-orig { border-top: 1px solid var(--line-2); padding-top: 14px; }
.ch-orig summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; min-height: 36px; list-style: none; }
.ch-orig summary::-webkit-details-marker { display: none; }
.ch-orig p { margin: 6px 0 10px; }
.ch-orig-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ch-orig-pic { border: 0; padding: 0; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; cursor: zoom-in; background: var(--line-2); }
.ch-orig-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ch-lb { display: flex; flex-direction: column; gap: 12px; }
.ch-lb-stage { position: relative; height: min(72vh, 720px, calc(100dvh - 210px)); min-height: 260px; border-radius: var(--r); background: var(--stage); overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.ch-lb-stage.zoomed { cursor: grab; }
.ch-lb-stage.zoomed:active { cursor: grabbing; }
.ch-lb-img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: center; will-change: transform; pointer-events: none; }
.ch-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ch-lb-nav, .ch-lb-zoom { display: flex; align-items: center; gap: 6px; }
.ch-lb-meta { display: flex; flex-direction: column; align-items: center; min-width: 110px; line-height: 1.3; }
.ch-lb-cap { font-weight: 600; }
.ch-lb-count, .ch-lb-z { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.ch-lb-z { min-width: 44px; text-align: center; }
@media (max-width: 640px) { .ch-lb-stage { height: min(64vh, 560px, calc(100dvh - 210px)); } .ch-lb-bar { justify-content: center; } }
button.ch-look-pic { border: 0; padding: 0; cursor: zoom-in; width: 100%; display: block; font: inherit; }
.ch-look-count { position: absolute; bottom: 8px; inset-inline-end: 8px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(17,18,20,.7); color: #fff; }
.ch-look-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ch-look-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; cursor: zoom-in; border-radius: var(--r-sm); background: var(--line-2); }
.ch-packs { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ch-pack-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ch-pack { text-align: start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); display: flex; flex-direction: column; gap: 2px; font: inherit; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.ch-pack:hover { border-color: var(--ink); transform: translateY(-1px); }
.ch-pack b { font-size: 14px; }
.ch-pack span { font-size: 12px; color: var(--mute); line-height: 1.5; }
/* The invitation: a card to send it, and a page that waits for the person */
.ch-inv-card { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink); text-align: start; font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ch-inv-card:hover { border-color: var(--cobalt); transform: translateY(-2px); box-shadow: var(--shadow-up); }
.ch-inv-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--c50); color: var(--cobalt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ch-inv-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ch-inv-text b { font-size: 15px; }
.ch-inv-text span { font-size: 13px; color: var(--mute); line-height: 1.6; }
.ch-inv-go { color: var(--mute); flex-shrink: 0; }
[dir="ltr"] .ch-inv-go svg { transform: scaleX(-1); }
.ch-inv-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .ch-inv-layout { grid-template-columns: 1fr; } }
.ch-inv-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ch-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(14,138,95,.45); animation: ch-pulse 1.8s ease-out infinite; }
.ch-live-dot.off { background: var(--mute-2); animation: none; }
@keyframes ch-pulse { to { box-shadow: 0 0 0 10px rgba(14,138,95,0); } }
.ch-inv-share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ch-wa { background: #1FA855; color: #fff; text-decoration: none; }
.ch-wa:hover:not(:disabled) { background: #168A45; }
.ch-inv-steps { margin: 0; padding: 18px; list-style: none; display: flex; flex-direction: column; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.ch-inv-steps li { display: flex; gap: 12px; align-items: flex-start; }
.ch-inv-steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.ch-inv-steps .ch-cam-badge { background: var(--ink); color: #fff; }
.ch-inv-facts { padding: 4px 2px; }
@media (prefers-reduced-motion: reduce) { .ch-prof-tile.empty.making, .ch-live-dot { animation: none; } }

/* «فيديو من غير تصوير»: one frame for the nine pages — three stages above, the page and «ملخص فيديوك» side by side, the next step named below. */
.mk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mk-top-start { width: 300px; justify-content: flex-start; gap: 14px; min-width: 0; }
.mk-top-end { width: 300px; justify-content: flex-end; gap: 14px; }
.mk-top-name { font-weight: 700; font-size: 15px; }
.mk-stages { display: flex; align-items: flex-start; gap: 32px; }
.mk-stage { display: flex; flex-direction: column; gap: 8px; width: 132px; }
.mk-stage-name { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--mute); text-align: start; cursor: pointer; }
.mk-stage.c .mk-stage-name { color: var(--cobalt); font-weight: 600; }
.mk-stage.d .mk-stage-name { color: var(--ok); }
.mk-stage-name:hover { color: var(--ink); }
.mk-stage-bars { display: flex; gap: 4px; }
.mk-stage-bars button { flex: 1; height: 4px; padding: 0; border: 0; border-radius: 2px; background: var(--line-2); cursor: pointer; position: relative; }
.mk-stage-bars button::before { content: ""; position: absolute; inset: -8px 0; }
.mk-stage.c .mk-stage-bars button { background: var(--line); }
.mk-stage-bars button.d, .mk-stage.c .mk-stage-bars button.d { background: var(--c300); }
.mk-stage-bars button.c, .mk-stage.c .mk-stage-bars button.c { background: var(--cobalt); }
.mk-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ok); white-space: nowrap; }
.mk-saved i { font-style: normal; font-weight: 700; }
.mk-saved.busy { color: var(--mute); }
.mk-saved.busy i { visibility: hidden; }
.mk-at { display: none; }
.mk-body { max-width: 1312px; padding-top: 36px; gap: 0; }
.mk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.mk-layout.solo { grid-template-columns: minmax(0, 1fr); }
.mk-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.mk-main .wsingle.mk-page { max-width: none; margin: 0; gap: 28px; }
.mk-head { display: flex; flex-direction: column; gap: 6px; }
.mk-num { font-size: 12px; color: var(--mute); letter-spacing: .08em; align-self: flex-start; }
.mk-page > .wsec > .shead h2 { font-size: 17px; }
.mk-head h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.mk-head p { margin: 0; font-size: 15px; color: var(--mute); }
.mk-sum { position: sticky; top: 96px; }
.mk-sum-box { background: #fff; border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mk-sum-head { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: default; font-size: 16px; }
.mk-sum-head::-webkit-details-marker { display: none; }
.mk-sum-peek { display: none; }
.mk-sum-tip { margin: 4px 0 8px; font-size: 12px; }
.mk-sum-rows { display: flex; flex-direction: column; }
.mk-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px; margin: 0 -8px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: start; cursor: pointer; transition: background .15s ease; }
.mk-sum-row:last-child { border-bottom: 0; }
.mk-sum-row:hover { background: var(--paper); }
.mk-sum-row.here { cursor: default; background: var(--c50); }
.mk-sum-k { color: var(--mute); flex-shrink: 0; }
.mk-sum-v { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; text-align: end; }
.mk-sum-row.here .mk-sum-v { color: var(--c700); font-weight: 600; }
.mk-sum-v.none { color: var(--mute-2); font-weight: 400; }
.mk-sum-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.mk-sum-go { color: var(--mute-2); display: inline-flex; opacity: 0; transition: opacity .15s ease; }
.mk-sum-row:hover .mk-sum-go, .mk-sum-row:focus-visible .mk-sum-go { opacity: 1; }
.mk-sum-sw { display: inline-flex; gap: 4px; }
.mk-sum-sw i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(17,18,20,.12); }
.mk-sum-note { margin: 12px 0 0; padding: 12px; border-radius: 12px; background: var(--paper); font-size: 12px; color: var(--mute); line-height: 1.6; }
.mk-foot { padding: 12px 64px; }
.mk-foot-note b { color: var(--ink); font-weight: 600; }
.mk-page .cols4 { gap: 14px; }
.mk-page .opt.mk-box { min-height: 140px; justify-content: flex-end; padding: 20px; border-radius: 16px; border-width: 1.5px; }
.mk-page .opt.mk-box[aria-pressed="true"] { padding: 19.5px; }
.mk-page .mk-box-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--bg); align-items: center; justify-content: center; margin-bottom: auto; color: var(--ink); }
.mk-page .opt.mk-box[aria-pressed="true"] .mk-box-ico { background: #fff; color: var(--cobalt); }
.mk-page .opt.mk-box[aria-pressed="true"] b, .mk-page .opt.mk-box[aria-pressed="true"] .hint { color: var(--c700); }
.mk-have-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.mk-have-grid.one { grid-template-columns: minmax(0, 1fr); }
.mk-have-grid > .wsec { background: #fff; border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); gap: 12px; }
.mk-have-grid .shead h2 { font-size: 16px; }
.mk-add-wrap { display: contents; }
.mk-add-tile { width: 104px; height: 132px; border-radius: 10px; border: 1.5px dashed var(--mute-2); background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.mk-add-tile svg { color: var(--cobalt); }
.mk-add-tile:hover { border-color: var(--cobalt); background: var(--c50); }
.mk-or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); margin-top: 4px; }
.mk-or::before, .mk-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.mk-page .opt.asp, .mk-page .opt.lvl { border-radius: 16px; border-width: 1.5px; }
.mk-page .opt.lvl.mk-lvl { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; }
.mk-page .opt.lvl.mk-lvl[aria-pressed="true"] { padding: 19.5px; }
.mk-lvl .info b { font-size: 18px; }
.mk-lvl .info span { font-size: 13px; }
.mk-lvl[aria-pressed="true"] .info b, .mk-lvl[aria-pressed="true"] .info span { color: var(--c700); }
.mk-lvl-bars { display: flex; gap: 4px; }
.mk-lvl-bars i { width: 18px; height: 6px; border-radius: 3px; background: var(--line-2); }
.mk-lvl-bars i.on { background: var(--ink); }
.mk-lvl[aria-pressed="true"] .mk-lvl-bars i { background: var(--c200); }
.mk-lvl[aria-pressed="true"] .mk-lvl-bars i.on { background: var(--cobalt); }
.mk-durs .seg { background: none; padding: 0; gap: 8px; flex-wrap: wrap; }
.mk-durs .seg button { height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; }
.mk-durs .seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.mk-page .opt.mk-box:not(:has(.mk-box-ico)) { min-height: 96px; justify-content: flex-start; }
.mk-person { background: #fff; border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.mk-page .wsec.need { outline: 0; }
.mk-page .need-text { display: inline-flex; align-self: flex-start; margin: 0 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-weight: 500; font-size: 13px; }

@media (max-width: 1179px) {
  .mk-top-start, .mk-top-end { width: auto; }
  .mk-stages { gap: 20px; }
  .mk-stage { width: 104px; }
  .mk-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mk-sum { position: static; }
  .mk-sum-head { cursor: pointer; }
  .mk-sum-peek { display: block; font-size: 13px; color: var(--mute); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .mk-sum-box[open] .mk-sum-peek { display: none; }
  .mk-sum-box:not([open]) { padding: 14px 18px; }
  .mk-foot { padding: 12px 24px; }
}
@media (max-width: 760px) {
  .mk-top { flex-wrap: wrap; }
  .mk-top .wtop-title .hint { display: none; }
  .mk-stages { order: 3; flex: 1 0 100%; gap: 10px; }
  .mk-stage { flex: 1; width: auto; gap: 0; }
  .mk-stage-name { display: none; }
  .mk-stage-bars { gap: 3px; }
  .mk-saved span { display: none; }
  .mk-at { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px 0; font-size: 13px; }
  .mk-at span { color: var(--mute); font-size: 12px; }
  .mk-body { padding-top: 16px; }
  .mk-head h1 { font-size: 26px; }
  .mk-head p { font-size: 14px; }
  .mk-num { display: none; }
  .mk-page .cols4, .mk-page .cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk-page .opt.mk-box { min-height: 104px; padding: 14px; }
  .mk-page .opt.mk-box[aria-pressed="true"] { padding: 13.5px; }
  .mk-page .mk-box-ico { display: none; }
  .mk-have-grid { grid-template-columns: minmax(0, 1fr); }
  .mk-have-grid > .wsec { padding: 16px; }
  .mk-add-tile { width: 88px; height: 112px; }
  .mk-foot { padding: 12px 16px 18px; flex-wrap: nowrap; }
  .mk-foot-note { display: none; }
  .mk-foot .btn.bp { flex: 1; }
}
@media (max-width: 420px) { .mk-page .cols3 { grid-template-columns: minmax(0, 1fr); } }

/* «القصة»: three openings side by side, each shot a card that can be dragged; a skeleton while it is written. */
.mk-hooks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mk-hookcard { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); text-align: start; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.mk-hookcard:hover { border-color: var(--mute-2); }
.mk-hookcard[aria-checked="true"] { border: 2px solid var(--cobalt); padding: 15.5px; background: var(--c50); }
.mk-hookcard-n { font-size: 11px; color: var(--mute); }
.mk-hookcard[aria-checked="true"] .mk-hookcard-n { color: var(--c700); }
.mk-hookcard-t { font-size: 15px; line-height: 1.65; font-weight: 500; overflow-wrap: anywhere; }
.mk-hookcard[aria-checked="true"] .mk-hookcard-t { color: var(--c700); }
.mk-lines { display: flex; flex-direction: column; gap: 10px; }
.mk-group { transition: box-shadow .15s ease, transform .15s ease; }
.mk-group-title { display: inline-flex; align-items: center; gap: 4px; }
.mk-grip { width: 32px; height: 36px; margin-inline-start: -8px; border: 0; border-radius: 8px; background: none; color: var(--mute); cursor: grab; display: inline-flex; align-items: center; justify-content: center; touch-action: none; }
.mk-grip svg { fill: currentColor; }
.mk-grip:hover { color: var(--ink); background: var(--paper); }
.mk-grip:disabled { cursor: default; opacity: .5; }
.mk-lines.sorting { user-select: none; -webkit-user-select: none; }
.mk-group.dragging { box-shadow: var(--shadow-up); transform: scale(1.01); border-color: var(--cobalt); position: relative; z-index: 2; }
.mk-group.dragging .mk-grip { cursor: grabbing; color: var(--cobalt); }
.mk-drag-hint { margin: 0; font-size: 12px; }
.mk-writing { gap: 18px; }
.mk-writing-text { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 500; color: var(--cobalt); }
@keyframes mk-sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.mk-sk { display: block; height: 12px; border-radius: 6px; background: linear-gradient(100deg, var(--line-2) 30%, var(--paper) 50%, var(--line-2) 70%); background-size: 300% 100%; animation: mk-sk 1.4s linear infinite; }
.mk-sk-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: #fff; min-height: 96px; box-sizing: border-box; }
.mk-sk-lines { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); padding: 4px 20px; }
.mk-sk-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--bg); }
.mk-sk-row:first-child { border-top: 0; }
.mk-sk-row > span { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mk-sk-box { width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0; }
.mk-sk-pill { width: 80px; height: 24px; border-radius: 12px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .mk-sk { animation: none; } }

/* «الصوت»: voices as cards with a sound line; the chosen one in a dark bar. */
.mk-voices { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mk-voice { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; }
.mk-voice:first-child { border-top: 1.5px solid var(--line); }
.mk-voice.picked { border: 2px solid var(--cobalt); padding: 15.5px; }
.mk-voice-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mk-voice-bottom { display: flex; align-items: center; gap: 12px; }
.mk-picked { background: var(--cobalt); color: #fff; font-weight: 600; }
.mk-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 30px; min-width: 0; }
.mk-wave i { flex: 1; max-width: 4px; border-radius: 2px; background: var(--line); }
.mk-voice.picked .mk-wave i, .mk-wave.on i { background: var(--c300); }
.mk-wave.on i:nth-child(-n+7) { background: var(--cobalt); }
.mk-chosen.now { background: var(--ink); color: #fff; padding: 20px 22px; border-radius: var(--r-lg); gap: 16px; }
.mk-chosen.now .hint { color: var(--mute-2); }
.mk-chosen.now b { font-size: 18px; }
.mk-chosen.now .btn.bo { background: transparent; color: #fff; border-color: var(--mute); }
.mk-chosen.now .btn.bo:hover { border-color: #fff; }
.mk-chosen.now .btn.mk-try { background: #fff; color: var(--ink); border-color: #fff; font-weight: 600; }
.mk-chosen.now .btn[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }

/* «الكتابة والموسيقى»: the choices beside a live picture of the screen. */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 32px; align-items: start; }
.mk-split-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.mk-prev { margin: 0; position: sticky; top: 96px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mk-prev-screen { position: relative; width: 250px; aspect-ratio: 9 / 16; border-radius: 30px; background: #2A2418 radial-gradient(120% 70% at 50% 30%, #4A3D28, #1B1C1F); border: 9px solid var(--ink); box-sizing: border-box; display: flex; justify-content: center; padding: 26px 16px; overflow: hidden; }
.mk-prev-screen.r16x9 { width: 270px; aspect-ratio: 16 / 9; border-radius: 16px; border-width: 7px; padding: 12px 16px; }
.mk-prev-screen.r1x1 { width: 260px; aspect-ratio: 1; border-radius: 18px; border-width: 7px; padding: 16px; }
.mk-prev-screen.at-top { align-items: flex-start; }
.mk-prev-screen.at-middle { align-items: center; }
.mk-prev-screen.at-bottom { align-items: flex-end; padding-bottom: 22%; }
.mk-prev-words { color: #fff; font-weight: 700; font-size: 24px; line-height: 1.35; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.45); overflow-wrap: anywhere; }
.mk-prev-screen.r16x9 .mk-prev-words { font-size: 15px; }
.mk-prev-screen.r1x1 .mk-prev-words { font-size: 19px; }
.mk-prev-off { color: rgba(255,255,255,.55); font-size: 13px; align-self: center; }
.mk-prev-bar { position: absolute; bottom: 12px; inset-inline: 14px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); }
.mk-prev-bar i { display: block; width: 35%; height: 100%; border-radius: 2px; background: #fff; }
.mk-chips.mk-music { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mk-music .mk-chip { min-height: 60px; border-radius: 14px; border-width: 1.5px; font-size: 14px; }
.mk-music .mk-chip[aria-pressed="true"] { background: var(--c50); border: 2px solid var(--cobalt); color: var(--c700); }

@media (max-width: 1179px) { .mk-split { grid-template-columns: minmax(0, 1fr) 240px; } .mk-prev-screen { width: 220px; } }
@media (max-width: 760px) {
  .mk-hooks { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .mk-hooks::-webkit-scrollbar { display: none; }
  .mk-hookcard, .mk-sk-card { flex: 0 0 78%; scroll-snap-align: start; }
  .mk-voices { grid-template-columns: minmax(0, 1fr); }
  .mk-split { grid-template-columns: minmax(0, 1fr); }
  .mk-prev { position: static; order: -1; }
  .mk-prev-screen { width: 150px; border-width: 6px; border-radius: 22px; padding: 16px 10px; }
  .mk-prev-screen.r16x9 { width: 100%; }
  .mk-prev-screen.r1x1 { width: 190px; }
  .mk-prev-words { font-size: 15px; }
  .mk-chips.mk-music { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-chosen.now { padding: 16px; }
}

/* Main button tones: dark for "approve the rest", soft while something is still being made. */
.btn.bp.mk-next-ink { background: var(--ink); border-color: var(--ink); }
.btn.bp.mk-next-soft { background: var(--c100); border-color: var(--c100); color: var(--c700); box-shadow: none; }

/* «السعر»: the bill beside what the client gets and the rules. */
.mk-pricepage { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px !important; align-items: start; max-width: 1040px !important; }
.mk-pricepage-side { display: flex; flex-direction: column; gap: 18px; }
.mk-bill, .mk-gets { background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mk-bill h2, .mk-gets h2, .mk-rulebox h2 { margin: 0 0 10px; font-size: 16px; }
.mk-bill-part { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 8px; margin-top: 4px; font-size: 12px; color: var(--mute); border-bottom: 1px solid var(--line-2); }
.mk-bill-part + .mk-price-row { border-top: 0; }
.mk-bill .mk-price-row { font-size: 15px; padding: 11px 0; border-top: 1px solid var(--bg); }
.mk-bill .mk-price-row b { font-weight: 500; }
.mk-bill-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 2px solid var(--ink); }
.mk-bill-total span { font-size: 16px; font-weight: 600; }
.mk-bill-total b { font-size: 34px; font-weight: 700; line-height: 1; }
.mk-bill-total small { font-size: 15px; font-weight: 500; color: var(--mute); }
.mk-bill-bal { margin: 8px 0 0; font-size: 13px; color: var(--mute); }
.mk-bill-bal.short { color: var(--err); font-weight: 600; }
.mk-bill .mk-approved { margin-top: 14px; }
.mk-gets .mk-facts { grid-template-columns: minmax(0, 1fr); }
.mk-gets .mk-facts > div { border-top: 1px solid var(--line-2); }
.mk-gets .mk-facts > div:first-child { border-top: 0; }
.mk-gets .mk-facts dt { display: inline-flex; align-items: center; gap: 8px; }
.mk-gets .mk-facts dt svg { color: var(--ok); flex-shrink: 0; }
.mk-rulebox { background: var(--paper); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px 22px; }
.mk-rulebox .mk-rules { font-size: 13px; color: var(--ink-2); }

/* «المشاهد»: progress and "approve all" on top, pictures as cards with their label and state on them. */
.mk-shots-page { max-width: none !important; }
.mk-shots-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mk-shots-meter { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.mk-shots-meter b { font-size: 14px; }
.mk-meter { display: block; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.mk-meter i { display: block; height: 100%; border-radius: 3px; background: var(--ok); transition: width .3s ease; }
.mk-all-btn { border-color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.mk-shots { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mk-shot { border: 0; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); gap: 8px; }
.mk-shot.ok { box-shadow: var(--shadow); }
.mk-shot:has(.mk-shot-ask) { box-shadow: 0 0 0 2px var(--cobalt), var(--shadow); }
.mk-shot-pic { border-radius: 11px; overflow: hidden; }
.mk-shot-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mk-shot-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-shot-tag { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(17,18,20,.72); color: #fff; pointer-events: none; }
.mk-shot-ok, .mk-shot-wait-tag { position: absolute; bottom: 10px; inset-inline-end: 10px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.mk-shot-ok { background: var(--ok-bg); color: var(--ok); }
.mk-shot-wait-tag { background: #fff; color: var(--c700); }
.mk-shot-body { padding: 2px 6px 6px; gap: 10px; }
.mk-shot-line { font-size: 13px; color: var(--ink-2); }
.mk-shot-body .btn { min-height: 40px; flex: 1; }
.mk-shot-ask .input { border-color: var(--cobalt); }

/* «التجهيز»: a dark card with a ring of what is ready, then the clips to watch. */
.mk-build-hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 26px 30px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.mk-build-hero .mk-dots i { background: #fff; }
.mk-ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.mk-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.mk-build-hero-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.mk-build-hero-text b { font-size: 21px; font-weight: 600; }
.mk-build-hero-text span { font-size: 14px; color: var(--mute-2); line-height: 1.6; }
.mk-build-hero-note { font-size: 13px !important; }
.btn.mk-hero-btn { background: #fff; color: var(--ink); border-color: #fff; font-weight: 600; min-height: 46px; }
.mk-build-list { background: #fff; border-radius: var(--r-lg); padding: 4px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mk-build-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.mk-build-row:first-child { border-top: 0; }
.mk-build-thumb { width: 40px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--line-2); flex-shrink: 0; display: block; }
.mk-build-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-build-main .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-done-title { display: flex; flex-direction: column; gap: 4px; }
.mk-done-title b { font-size: 18px; display: inline-flex; align-items: center; gap: 10px; }
.mk-done-ok { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: none; }
.mk-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.mk-clip { background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.mk-clip-video { width: 100%; aspect-ratio: 9 / 16; max-height: 440px; border-radius: 11px; background: var(--stage); object-fit: cover; display: block; }
.mk-clip-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 4px; font-size: 14px; }

@media (max-width: 900px) { .mk-pricepage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .mk-bill, .mk-gets { padding: 18px; }
  .mk-bill-total b { font-size: 28px; }
  .mk-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk-shot-body .prow { flex-direction: column; align-items: stretch; }
  .mk-build-hero { padding: 20px; gap: 18px; }
  .mk-ring { width: 88px; height: 88px; }
  .mk-ring svg { width: 88px; height: 88px; }
  .mk-ring span { font-size: 19px; }
  .mk-build-list { padding: 4px 14px; }
  .mk-clips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 420px) { .mk-shots { grid-template-columns: minmax(0, 1fr); } }

/* «المشاهد»: the optional movement line under a picture. */
.mk-move { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mute); }
.mk-move-in { min-height: 40px; font-size: 13px; padding: 0 10px; background: var(--paper); }
/* «التجهيز»: changing a finished shot in words. */
.mk-clip.asking { box-shadow: 0 0 0 2px var(--cobalt), var(--shadow); }
.mk-clip-still { position: relative; overflow: hidden; }
.mk-clip-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-clip-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(17,18,20,.55); color: #fff; font-size: 13px; font-weight: 500; text-align: center; padding: 12px; }
.mk-clip-over .mk-dots i { background: #fff; }
.mk-clip-change { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px 6px; font-size: 13px; }
.mk-clip-acts { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.mk-clip-acts .btn { min-height: 40px; }
.mk-redo-ask { display: flex; flex-direction: column; gap: 8px; padding: 0 4px 4px; }
.mk-redo-ta { min-height: 76px; resize: vertical; font-size: 13px; line-height: 1.6; border-color: var(--cobalt); }
.mk-redo-card p { margin: 0 0 12px; line-height: 1.8; }
.mk-redo-price { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--paper); }
.mk-redo-price b { font-size: 22px; }
.mk-music-own { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); }
.mk-music-own.on .mk-music-ask { border: 2px solid var(--cobalt); background: var(--c50); }
.mk-music-ask { min-height: 46px; }

/* «ⓘ»: the mark takes the colour of the words around it; the bubble is dark on light places, light on dark ones. */
.itip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; margin: 0 4px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; opacity: .5; font: 600 10.5px/1 var(--mono); vertical-align: middle; cursor: help; flex-shrink: 0; position: relative; transition: opacity .15s ease, background .15s ease; }
.itip::before { content: ""; position: absolute; inset: -13px; }
.itip:hover, .itip:focus-visible, .itip[aria-describedby] { opacity: 1; }
.itip[aria-describedby] { background: color-mix(in srgb, currentColor 12%, transparent); }
.itip span { transform: translateY(.5px); }
.itip-bubble { position: fixed; z-index: 9999; box-sizing: border-box; padding: 11px 14px; border-radius: 12px; background: #16171A; color: #F3F3F0; font: 400 13px/1.7 var(--sans); white-space: pre-line; text-align: start; box-shadow: 0 10px 30px rgba(17,18,20,.22), 0 2px 6px rgba(17,18,20,.12); opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; pointer-events: none; }
.itip-bubble.down { transform: translateY(-4px); }
.itip-bubble.on { opacity: 1; transform: none; }
.itip-bubble.light { background: #FFFFFF; color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.itip-arrow { position: absolute; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); }
.itip-bubble.up .itip-arrow { bottom: -5px; }
.itip-bubble.down .itip-arrow { top: -5px; }
@media (prefers-reduced-motion: reduce) { .itip-bubble { transition: none; } }

/* Rules: each choice a card with what it does, its «ⓘ» and whether it costs. */
.so-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.so-choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: inherit; color: var(--ink); text-align: start; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.so-choice:hover { border-color: var(--mute-2); }
.so-choice[aria-checked="true"] { border: 2px solid var(--cobalt); padding: 11.5px 13.5px; background: var(--c50); color: var(--c700); }
.so-choice-top { display: flex; align-items: center; gap: 2px; font-weight: 600; font-size: 14px; }
.so-choice-desc { font-size: 12px; line-height: 1.6; color: var(--mute); }
.so-choice[aria-checked="true"] .so-choice-desc { color: var(--c700); }
.so-cost { margin-inline-start: auto; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.so-cost.paid { background: var(--c100); color: var(--c700); }
@media (max-width: 600px) { .so-choices { grid-template-columns: minmax(0, 1fr); } }
.mk-from-wrap { display: inline-flex; align-items: center; }
.mk-checks-head { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--mute); margin-bottom: 4px; }
.so-brain-head { display: flex; align-items: center; gap: 2px; font-size: 16px; }
/* «علامة: مصنوع بالذكاء الاصطناعي» on a new post. */
.so-ailabel-wrap:empty { display: none; }
.so-ailabel { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); transition: border-color .15s ease, background .15s ease; }
.so-ailabel.on { border-color: var(--c200); background: var(--c50); }
.so-ailabel .toggle { flex-shrink: 0; margin-top: 2px; }
.so-ailabel-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.so-ailabel-text b { font-size: 14px; }
.so-ailabel.on .so-ailabel-text b { color: var(--c700); }
.so-ailabel-none { font-size: 12px; }
.so-ailabel-warn { margin: 0; line-height: 1.8; }
/* «كمّل من حيث وقفت»: the last unfinished draft, above the projects. */
.resume { display: flex; align-items: center; gap: 20px; background: #fff; border: 2px solid var(--c200); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; position: relative; }
.resume-thumb { width: 92px; height: 116px; flex-shrink: 0; border-radius: var(--r); background: var(--stage); border: 0; padding: 0; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; color: var(--mute-2); cursor: pointer; }
.resume-thumb.empty { background: var(--paper); border: 1px solid var(--line); color: var(--mute); }
.resume-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.resume-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.resume-label { font-size: 12px; font-weight: 600; color: var(--cobalt); }
.resume-title { font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-meta { font-size: 13px; color: var(--mute); }
.resume-meta b { color: var(--ink); font-weight: 600; }
.resume-bar, .pcard-bar { display: flex; gap: 4px; max-width: 320px; margin-top: 4px; }
.resume-bar i, .pcard-bar i { flex: 1; height: 5px; border-radius: 3px; background: var(--line-2); }
.resume-bar i.d, .pcard-bar i.d { background: var(--cobalt); }
.resume-bar i.c, .pcard-bar i.c { background: var(--c100); }
.pcard-bar { gap: 3px; margin-top: -2px; }
.pcard-bar i { height: 4px; }
.resume-more { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--cobalt); text-align: start; cursor: pointer; width: fit-content; }
.resume-more:hover { color: var(--c700); text-decoration: underline; }
.resume-go { height: 48px; padding: 0 26px; border-radius: var(--r); background: var(--ink); color: #fff; border: 0; font: inherit; font-size: 15px; font-weight: 600; flex-shrink: 0; cursor: pointer; }
.resume-go:hover { background: var(--ink-2); }
.resume-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--mute); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.resume-x:hover { background: var(--bg); color: var(--ink); }
.pcard-at { font-size: 12px; color: var(--mute); }
@media (max-width: 700px) {
  .resume { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .resume-thumb { width: 64px; height: 80px; }
  .resume-body { flex-basis: calc(100% - 80px); }
  .resume-go { width: 100%; }
}
/* A video exported with its three openings: A, B and C side by side in the page's top bar. */
.vers { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 6px; }
.vers-l { font-size: 12px; color: var(--mute); margin-inline-end: 2px; }
.vers-v { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; text-decoration: none; }
.vers-v:hover { border-color: var(--ink); }
.vers-v.here { background: var(--ink); border-color: var(--ink); color: #fff; }

/* A section title with its (i). */
.tip-title { display: inline-flex; align-items: center; gap: 8px; }
