/* cz-ug-face-retired */

:root{--font-ug:Alkatip Basma Tom,Alkatip Basma Tom,"Microsoft Uighur",sans-serif}
@font-face{font-family:Inter;src:url('/fonts/inter-latin.woff2') format('woff2');font-display:swap;font-weight:100 900;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;src:url('/fonts/inter-latin-ext.woff2') format('woff2');font-display:swap;font-weight:100 900;unicode-range:U+0100-02BA,U+1D00-1DBF,U+1E00-1E9F,U+20A0-20C4}
/* cz-ug-face-retired */
/* cz-ug-face-retired */
/* cz-ug-face-retired */
/* cz-ug-face-retired */
/* cz-ug-face-retired */
html[data-site-lang=ug] body,html[lang^=ug] body{font-family:"Alkatip Basma Tom",Inter,sans-serif;font-variant-numeric:tabular-nums}html[data-site-lang=ug] .adm-surface{font-family:"Alkatip Basma Tom",Inter,sans-serif!important}
#cz-account-entry{text-align:center;margin:16px 0 0;font:12px/1.7 Alkatip Basma Tom,Arial,sans-serif}#cz-account-entry button{cursor:pointer;background:none;color:#c7c1dc;border:0;border-bottom:1px solid #9f95c54d;padding:3px 0;font:inherit}#cz-account-entry button:hover{color:white;border-color:#e8e1ff}
#cz-account-dialog{color:#efedf7;background:radial-gradient(ellipse at top right,#34294d30,transparent 70%),#101017;border:1px solid #ffffff1c;border-radius:18px;padding:32px;width:min(430px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 35px 100px #0008;font:13px/1.7 Alkatip Basma Tom,Arial,sans-serif}#cz-account-dialog::backdrop{background:#030207b8;backdrop-filter:blur(10px)}#cz-account-dialog h2{font-size:23px;font-weight:500;margin:0 25px 12px 0;line-height:1.5}#cz-account-dialog>p{font-size:13px;color:#a7a2b7;margin:0 0 25px}#cz-account-dialog form label{display:grid;gap:7px;color:#c8c4d6;font-size:12px;margin:16px 0}#cz-account-dialog form label[hidden]{display:none}#cz-account-dialog input{width:100%;min-height:45px;background:#08080e;color:white;border:1px solid #ffffff1a;border-radius:9px;padding:10px 12px;font:14px Alkatip Basma Tom,Arial,sans-serif;box-sizing:border-box}#cz-account-dialog input:focus{outline:2px solid #b8a6ea;outline-offset:2px}#cz-account-dialog small{color:#9991ab;font-size:13px}#cz-account-dialog button{font-family:"Alkatip Basma Tom",inherit;cursor:pointer}#cz-account-dialog button:focus-visible{outline:2px solid #c0acee;outline-offset:3px}#cz-account-dialog .cz-dialog-close{position:absolute;top:16px;inset-inline-end:18px;width:30px;height:30px;line-height:1;background:transparent;color:#bcb6cf;border:0;font-size:24px}#cz-account-dialog .cz-account-submit{width:100%;padding:12px;border:0;border-radius:25px;background:#eae5f8;color:#17121f;font-size:13px;min-height:45px}#cz-account-dialog button:disabled{opacity:.5;cursor:wait}#cz-account-dialog .cz-account-switch{display:block;margin:20px auto 0;background:none;border:0;color:#c7b7e9;font-size:13px;padding:5px}.cz-account-message{font-size:13px;min-height:20px;color:#e0bdd0}
html.cz-retained body{background:#050408!important}html.cz-retained #mkx-nav{background:#0b091278!important;backdrop-filter:blur(28px) saturate(140%)!important;border:1px solid #ffffff12!important;border-radius:12px!important;box-shadow:none!important}html.cz-retained #mkx-nav .mkx-cta{background:#ece7f6!important;color:#17121f!important;border-radius:25px!important;border-color:#ffffff24!important;box-shadow:none!important}html.cz-retained #mkx-nav .mkx-langbtn{background:#ffffff06!important;box-shadow:none!important}html.cz-retained .adm-card{background:#101019!important;border-color:#ffffff0d!important}
@media(max-width:480px){#cz-account-dialog{padding:27px 22px}#cz-account-dialog input{font-size:16px}}

/* Fullscreen tools own their command bars; keep global navigation from covering them. */
html.cz-workspace #mkx-nav,html.cz-workspace #mkx-sheet{display:none!important;pointer-events:none!important}

/* Shared CreatveZone visual language for retained React screens. */
html.cz-retained{--cz-page:#060509;--cz-panel:#0d0c13;--cz-panel-raised:#12111a;--cz-line:#ffffff12;--cz-copy:#f1eef7;--cz-muted:#a6a0b4;--cz-accent:#c9bdf0;--cz-action:#eeeaf5;color-scheme:dark;scrollbar-color:#393545 #08070b}
html.cz-retained body{background:var(--cz-page)!important;color:var(--cz-copy);background-image:radial-gradient(ellipse at 50% -18%,#27203b45,transparent 48%)!important;overflow-x:clip}
html.cz-retained ::selection{background:#aaa0ce66;color:#fff}
html.cz-retained :focus-visible{outline-color:#c9bdf0!important}
html.cz-retained #mkx-nav{position:fixed!important;top:18px!important;left:50%!important;right:auto!important;width:calc(100% - 48px)!important;max-width:1440px!important;transform:translateX(-50%)!important;padding-inline:20px!important;background:#09080da8!important;border:1px solid #ffffff16!important;border-radius:14px!important;backdrop-filter:blur(28px) saturate(135%)!important;box-shadow:0 12px 40px #0003!important;z-index:90!important}
html.cz-retained #mkx-nav .mkx-brand-txt{font-weight:600!important;letter-spacing:0!important}
html.cz-retained #mkx-nav .mkx-links{gap:clamp(12px,1.6vw,24px)!important}
html.cz-retained #mkx-nav .mkx-links a{color:#bbb6c8!important;transition:color .18s ease,opacity .18s ease!important}
html.cz-retained #mkx-nav .mkx-links a:hover,html.cz-retained #mkx-nav .mkx-links a[data-on="1"]{color:#fff!important}
html.cz-retained #mkx-nav .mkx-lang,html.cz-retained #mkx-nav .mkx-langbtn{background:#ffffff08!important;border:1px solid #ffffff12!important;box-shadow:none!important}
html.cz-retained #mkx-nav .mkx-cta{background:var(--cz-action)!important;color:#17151d!important;border:1px solid #ffffff2b!important;border-radius:999px!important;box-shadow:none!important}
html.cz-retained main [class*="bg-[#0"],html.cz-retained main [class*="bg-slate-950"],html.cz-retained main [class*="bg-slate-900"]{background-color:var(--cz-panel)!important}
html.cz-retained main [class*="border-white/"]{border-color:var(--cz-line)!important}
html.cz-retained main [class*="rounded-[18px]"][class*="border"],html.cz-retained main [class*="rounded-[20px]"][class*="border"],html.cz-retained main [class*="rounded-[22px]"][class*="border"],html.cz-retained main [class*="rounded-2xl"][class*="border"]{border-radius:10px!important}
html.cz-retained main [class*="text-blue-"],html.cz-retained main [class*="text-sky-"]{color:#c8bde8!important}
html.cz-retained main [class*="border-blue-"],html.cz-retained main [class*="border-sky-"]{border-color:#c8bde833!important}
html.cz-retained main [class*="bg-blue-"],html.cz-retained main [class*="bg-sky-"]{background-color:#a69bc51c!important}
html.cz-retained main [class*="bg-neon-400/"]{background-color:#b9addd1a!important}
html.cz-retained main [class*="text-[#9cc4ff]"],html.cz-retained main [class*="text-[#9bc7ff]"],html.cz-retained main [class*="text-[#9ac2ff]"]{color:#c8bde8!important}
html.cz-retained main [class*="bg-[#2f6bf0]"],html.cz-retained main [class*="bg-[#2f7bff]"],html.cz-retained main [class*="bg-[#2161f3]"],html.cz-retained main [class*="bg-[#3f8bff]"]{background-color:#b9addd20!important}
html.cz-retained main [class*="border-[#4a86f7]"],html.cz-retained main [class*="border-[#3f8bff]"],html.cz-retained main [class*="border-neon-400/"]{border-color:#c8bde844!important}
html.cz-retained main [class*="rounded-[24px]"][class*="border"],html.cz-retained main [class*="rounded-[26px]"][class*="border"]{border-radius:10px!important}
html.cz-retained main [class*="bg-gradient"][class*="from-[#1"]{background-image:none!important;background-color:var(--cz-panel)!important}
html.cz-retained main .btn-primary,html.cz-retained main .fig-pill-btn{background:#eeeaf5!important;background-image:none!important;color:#17151d!important;border:1px solid #ffffff35!important;border-radius:999px!important;box-shadow:none!important}
html.cz-retained main button[class*="from-blue-"],html.cz-retained main a[class*="from-blue-"],html.cz-retained main button[class*="bg-blue-"],html.cz-retained main a[class*="bg-blue-"]{background:#eeeaf5!important;background-image:none!important;color:#17151d!important;border-color:#ffffff35!important;box-shadow:none!important}
html.cz-retained main .btn-primary svg,html.cz-retained main .fig-pill-btn svg,html.cz-retained main button[class*="from-blue-"] svg,html.cz-retained main a[class*="from-blue-"] svg,html.cz-retained main button[class*="bg-blue-"] svg,html.cz-retained main a[class*="bg-blue-"] svg{color:inherit!important}
html.cz-retained main input,html.cz-retained main textarea,html.cz-retained main select{accent-color:#c9bdf0}
html.cz-retained main input:focus,html.cz-retained main textarea:focus,html.cz-retained main select:focus{border-color:#c9bdf080!important;box-shadow:0 0 0 3px #c9bdf01a!important;outline:none!important}
html.cz-retained .adm-card{background:var(--cz-panel)!important;border-color:var(--cz-line)!important;border-radius:10px!important}

/* Full-screen studios keep their own layout but share the same neutral surfaces and focus color. */
html.cz-workspace{--cz-workspace:#08080d;--cz-workspace-panel:#101018;--cz-workspace-line:#ffffff12;color-scheme:dark;scrollbar-color:#393545 #08070b}
html.cz-workspace body{background:var(--cz-workspace)!important;color:#f1eef7}
html.cz-workspace header,html.cz-workspace [class*="bg-[#0e"],html.cz-workspace [class*="bg-[#0f"],html.cz-workspace [class*="bg-[#10"],html.cz-workspace [class*="bg-[#11"],html.cz-workspace [class*="bg-[#12"]{background-color:var(--cz-workspace-panel)!important}
html.cz-workspace [class*="border-white/"]{border-color:var(--cz-workspace-line)!important}
html.cz-workspace [class*="text-blue-"],html.cz-workspace [class*="text-sky-"]{color:#c8bde8!important}
html.cz-workspace [class*="border-blue-"],html.cz-workspace [class*="border-sky-"]{border-color:#c8bde833!important}
html.cz-workspace button[class*="from-blue-"],html.cz-workspace a[class*="from-blue-"]{background:#eeeaf5!important;background-image:none!important;color:#17151d!important;border-color:#ffffff35!important;box-shadow:none!important}
html.cz-workspace input:focus,html.cz-workspace textarea:focus,html.cz-workspace select:focus{border-color:#c9bdf080!important;box-shadow:0 0 0 3px #c9bdf01a!important;outline:none!important}

@media(max-width:719px){html.cz-retained #mkx-nav{top:12px!important;width:calc(100% - 24px)!important;padding-inline:12px!important;border-radius:12px!important}html.cz-retained #mkx-nav .mkx-links{gap:10px!important}}
@media(prefers-reduced-motion:reduce){html.cz-retained *,html.cz-workspace *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
/* Retained account, purchase and resource screens share the public glass system. */
html.cz-retained{--cz-panel:#ffffff05;--cz-panel-soft:#ffffff04;--cz-line:transparent;color-scheme:dark}html.cz-retained body{font-family:"Alkatip Basma Tom",Inter,"Microsoft YaHei",Arial,sans-serif;font-size:15px;line-height:1.65}html.cz-retained[data-site-lang=ug] body{font-family:"Alkatip Basma Tom",Arial,sans-serif}html.cz-retained #mkx-nav{top:22px!important;left:50%!important;transform:translateX(-50%)!important;width:calc(100% - 80px)!important;max-width:1360px!important;height:64px!important;padding:0 24px!important;background:#ffffff06!important;backdrop-filter:blur(28px) saturate(125%)!important;border:0!important;border-radius:24px!important;box-shadow:0 16px 60px #0002!important}html.cz-retained .mkx-brand-txt{font-family:"Alkatip Basma Tom",Arial,sans-serif!important;letter-spacing:-.05em;font-size:20px!important;font-weight:600!important}html.cz-retained .mkx-div{display:none!important}html.cz-retained .mkx-links{gap:24px!important;margin-inline:25px!important}html.cz-retained .mkx-links a{font-size:14px!important;font-weight:400!important}html.cz-retained #mkx-nav button,html.cz-retained #mkx-nav .mkx-cta{border:0!important;background:#ffffff09!important;box-shadow:none!important}html.cz-retained :is(main .btn,main .btn-primary,main .fig-pill-btn,main button[class*="bg-blue-"],main a[class*="bg-blue-"]){border:0!important;border-radius:999px!important;background:#ffffff0c!important;background-image:none!important;color:#edecf4!important;box-shadow:none!important;backdrop-filter:blur(18px);font-weight:500!important;white-space:nowrap}html.cz-retained main .btn:hover,html.cz-retained main .fig-pill-btn:hover{background:#ffffff16!important}html.cz-retained main :is(.glass,.fig-card,[class*="border-white/"],.glass-hairline){border-color:transparent!important;box-shadow:none!important}html.cz-retained main :is([class*="text-[10"],[class*="text-[11"]){font-size:13px!important}html.cz-retained main :is([class*="text-[12"],[class*="text-[13"]){font-size:14px!important}html.cz-retained main :is(.font-bold,.font-extrabold){font-weight:500!important}html.cz-retained main .border-t,html.cz-retained main .border-b{border-color:transparent!important}html.cz-retained main :is(input,select,textarea){border:0!important;background-color:#08091466!important;border-radius:12px!important;min-height:40px}html.cz-retained main input[type=checkbox]{min-height:0}html.cz-retained footer{border:0!important;background:transparent!important;color:#92919f}html.cz-retained footer>.absolute{display:none}html.cz-retained footer .border-t{border:0!important}html.cz-retained footer .shell{padding-top:40px;padding-bottom:30px}html.cz-retained footer .grid{gap:30px}html.cz-retained :is(.adm-modal-panel,#cz-account-dialog){border:0!important;border-radius:24px!important;background:#15151fde!important;backdrop-filter:blur(35px) saturate(120%);box-shadow:0 40px 120px #0007!important}html.cz-retained .adm-modal-panel :is(button,input){border:0!important}html.cz-retained .adm-modal-backdrop{backdrop-filter:blur(12px);background:#03030b99!important}html.cz-retained :is(button,a,input,textarea,select):focus-visible{outline:2px solid #c6bedf!important;outline-offset:4px}
html.cz-route-member main section:first-of-type>div>div>div{border-radius:26px!important;background:#ffffff05!important;background-image:none!important}html.cz-route-member main section:nth-of-type(2) .no-scrollbar{padding:8px;background:#ffffff04!important;border-radius:20px!important;gap:5px}html.cz-route-member main section:nth-of-type(2) button{padding:11px 17px!important;font-size:14px!important;border:0!important;background:transparent!important;border-radius:14px!important;font-weight:400!important}html.cz-route-member main section:nth-of-type(2) button[class*="bg-white"]{background:#ffffff0e!important}html.cz-route-member main .glass,html.cz-route-member main .fig-card{border-radius:22px!important;backdrop-filter:blur(20px);background:#ffffff05!important}html.cz-route-member main section:first-of-type{padding-top:48px}html.cz-route-member main [class*="border-blue-"]{border-color:transparent!important}
html.cz-route-material .cz-material-shell{max-width:1280px;margin:auto}.cz-resource-hero{padding:16px 0 42px;max-width:850px}.cz-resource-hero h1{font-size:clamp(38px,4.2vw,64px);line-height:1.2;letter-spacing:-.04em;font-weight:500;margin:18px 0}.cz-resource-hero p{font-size:17px;line-height:1.9;color:#aeacbc;max-width:720px}.cz-resource-filters{margin-bottom:26px;gap:20px!important}.cz-resource-filters label{height:48px!important;background:#ffffff06!important;border:0!important;border-radius:16px!important}.cz-resource-filters input{background:transparent!important;font-size:15px!important}.cz-resource-filters button{padding:10px 20px!important;font-size:14px!important;border:0!important}.cz-resource-card{padding:22px!important;border-radius:24px!important;min-height:340px;gap:18px!important;background:#ffffff05!important;backdrop-filter:blur(24px);transition:transform .25s,background .25s}.cz-resource-card:hover{transform:translateY(-5px);background:#ffffff09!important}.cz-resource-art{width:100%!important;height:150px!important;border:0!important;border-radius:18px!important;background:radial-gradient(ellipse at 50% 20%,#ac9fe321,transparent 65%),#ffffff03!important;box-shadow:none!important}.cz-resource-art svg{width:46px;height:46px;color:#c9c1e6!important;filter:drop-shadow(0 8px 24px #9280b850)}.cz-resource-art img{width:100%;height:100%;object-fit:cover}.cz-resource-card p:first-child{font-size:17px!important;line-height:1.6!important;white-space:normal!important;-webkit-line-clamp:2;min-height:27px}.cz-resource-card p:nth-child(2){font-size:14px!important;line-height:1.8!important;-webkit-line-clamp:2;min-height:50px}.cz-resource-card>div:last-child{padding-top:10px;border:0!important}.cz-resource-card button{height:40px!important;padding-inline:20px!important;font-size:14px!important}
html.cz-route-material .cz-resource-hero,html.cz-route-material .cz-resource-filters{display:none!important}
html.cz-route-material main section.relative:has(.cz-material-shell){padding-top:8px!important;padding-bottom:48px!important}
/* Scrollable studio forms must retain their intrinsic height inside flex layouts. */
html.cz-workspace:not(.cz-route-chat) aside>div[class*="overflow-y-auto"]>*{flex-shrink:0}html.cz-workspace:not(.cz-route-chat) button{white-space:nowrap!important;border-color:transparent!important}html.cz-workspace:not(.cz-route-chat) :is(button,input,textarea,select){font-family:"Alkatip Basma Tom",inherit}html.cz-workspace:not(.cz-route-chat) :is([class*="text-[10"],[class*="text-[11"]){font-size:12px!important}html.cz-workspace:not(.cz-route-chat) .border-t,html.cz-workspace:not(.cz-route-chat) .border-b,html.cz-workspace:not(.cz-route-chat) .border-r{border-color:transparent!important}html.cz-route-music aside [class*="grid-cols-2"]>div{min-width:0}html.cz-route-music aside button{max-width:100%;font-size:12px!important}html.cz-route-music aside [class*="flex items-center justify-between"]{gap:8px;flex-wrap:wrap}html.cz-route-music aside input,html.cz-route-music aside textarea{font-size:14px!important}
/* Canvas coordinates and timelines retain their spatial direction in every locale. */
html[lang="ug"] :is(.react-flow,.react-flow__viewport){direction:ltr}html[lang="ug"] :is(input,textarea){text-align:start}

/* The retained global header owns language/fullscreen controls. Keep profile actions readable in all locales. */
html.cz-route-member main section:first-of-type [data-no-i18n="true"]{display:none!important}
html.cz-route-member main section:first-of-type div:has(>[data-no-i18n="true"]){display:none!important}
html.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap{gap:10px!important}
html.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap>button{flex:none!important;width:auto!important;min-width:118px;white-space:nowrap!important;word-break:normal!important}
html.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap>button span{white-space:nowrap!important;word-break:normal!important}

/* Compact long-term storage control shared by image, video, music and canvas results. */
.cz-retention-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff12, #ffffff05);
  box-shadow: inset 0 1px #ffffff0b, 0 8px 22px #0002;
  backdrop-filter: blur(14px) saturate(125%);
}
.cz-retention-trigger {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ffffff10 !important;
  color: #f3f0f7 !important;
  font-size: 12.5px !important;
  font-variant-numeric: tabular-nums;
}
.cz-retention-note {
  min-width: 0;
  color: #b7b3c4;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.cz-retention-control[data-active="true"] .cz-retention-trigger {
  background: color-mix(in srgb, var(--accent, #b4a5e6), transparent 76%) !important;
  color: #fff !important;
}
@media (max-width: 680px) {
  .cz-retention-control { align-items: flex-start; border-radius: 14px; }
  .cz-retention-note { white-space: normal; max-width: 22ch; }
}

/* RefineFrame-compatible visual states for generated image previews. */
.cz-refine-frame { position: relative; overflow: hidden; isolation: isolate; }
.cz-refine-frame > img { transition: filter .45s ease, transform .45s ease, opacity .45s ease; }
.cz-refine-frame[data-refine-state="queued"] > img { filter: blur(4px) saturate(.6); transform: scale(1.04); opacity: .55; }
.cz-refine-frame[data-refine-state="generating"] > img { filter: blur(1.5px) saturate(.8); transform: scale(1.02); opacity: .85; }
.cz-refine-frame[data-refine-state="refining"] > img { filter: blur(.5px) saturate(.95); transform: scale(1.005); opacity: 1; }
.cz-refine-frame[data-refine-state="complete"] > img { filter: none; transform: none; opacity: 1; }
.cz-refine-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 38%, #ffffff22 50%, transparent 62%); background-size: 260% 100%; }
.cz-refine-frame[data-refine-state="queued"]::after,
.cz-refine-frame[data-refine-state="generating"]::after,
.cz-refine-frame[data-refine-state="refining"]::after { opacity: 1; animation: cz-refine-sweep 2.2s linear infinite; }
@keyframes cz-refine-sweep { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@media (prefers-reduced-motion: reduce) { .cz-refine-frame > img { transition: opacity .2s ease; } .cz-refine-frame::after { animation: none; opacity: 0; } }

/* Keep course cards in a readable two-column layout on narrow phones. */
@media (max-width: 480px) {
  html .catalog-section > .catalog-grid.course,
  html .catalog-grid.course { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}


/* cz-unify-v1 */
html[dir="rtl"] body{text-align:right}

html[dir="rtl"] .card,html[dir="rtl"] article{text-align:right}
html[dir="rtl"] input,html[dir="rtl"] textarea{direction:rtl;text-align:right}
html[dir="rtl"] input[type="url"],html[dir="rtl"] input[type="email"],html[dir="rtl"] code,html[dir="rtl"] .mono{direction:ltr;text-align:left;unicode-bidi:embed}
html[dir="rtl"] .price,html[dir="rtl"] .amount{unicode-bidi:plaintext}
html[dir="rtl"] table{direction:rtl}
html[dir="rtl"] th,html[dir="rtl"] td{text-align:right}
html[dir="rtl"] .retention-row,html[dir="rtl"] .storage-row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}

/* cz-polish-v2 */
html[dir="rtl"] header nav,html[dir="rtl"] nav ul,html[dir="rtl"] .nav-links{flex-direction:row!important}
html .catalog-grid:is(.apps,.course) h3{white-space:nowrap!important;-webkit-line-clamp:1!important;min-height:0!important;display:block!important;overflow:hidden;text-overflow:ellipsis}
html .catalog-grid:is(.apps,.course) .card-desc{min-height:0!important;-webkit-line-clamp:2}
html .cz-resource-card p:first-child{min-height:0!important;-webkit-line-clamp:1;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
html .cz-resource-card p:nth-child(2){min-height:0!important}
html .cz-resource-card>div:nth-child(2)>p:first-child{min-height:0!important;-webkit-line-clamp:1;white-space:nowrap!important}
html .cz-resource-card>div:nth-child(2)>p:nth-child(2){min-height:0!important}
html[dir="rtl"] .czse-outline button>span:last-child{-webkit-line-clamp:1;white-space:nowrap!important}
html body *{max-width:100%;box-sizing:border-box}
html .cz-resource-card,html .catalog-grid .card,html [class*="rounded-2xl"],html [class*="rounded-3xl"]{overflow:hidden}
html [class*="from-blue-"],html [class*="to-blue-"],html [class*="bg-blue-"],html [class*="from-indigo-"],html [class*="bg-indigo-"],html [class*="from-sky-"],html [class*="bg-sky-"]{--tw-gradient-from:#8b7cc8!important;--tw-gradient-to:#6f5fae!important;background-color:#7a6ab8!important}
html [class*="bg-gradient"][class*="from-blue-"],html [class*="bg-gradient"][class*="from-indigo-"]{background-image:linear-gradient(to bottom right,#8b7cc8,#6f5fae)!important}
html [class*="text-blue-"],html [class*="text-indigo-"],html [class*="text-sky-"]{color:#c8bde8!important}
html [class*="border-blue-"],html [class*="border-indigo-"],html [class*="border-sky-"]{border-color:#c8bde855!important}

/* cz-polish-v3 */
html .resource-body h2,html .resource-body h3{white-space:nowrap!important;-webkit-line-clamp:1!important;display:block!important;min-height:0!important;overflow:hidden;text-overflow:ellipsis}
html .resource-body p{min-height:0!important}
html .cz-resource-card h2,html .cz-resource-card h3{white-space:nowrap!important;-webkit-line-clamp:1!important;display:block!important;min-height:0!important;overflow:hidden;text-overflow:ellipsis}
html [class*="price"],html .price-row{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html .catalog-grid h3,html .resource-body h2{font-size:15px!important}

/* cz-theme-v4 */
html{--neon-400:#8b7cc8!important;--neon-300:#a79ad8!important;--neon-500:#6f5fae!important;--violet-500:#6f5fae!important;--violet-400:#8b7cc8!important;--mint-400:#9a8fc0!important;--blue-500:#7a6ab8!important;--blue-600:#6f5fae!important;--indigo-500:#6f5fae!important;--sky-500:#8b7cc8!important}
html [class*="bg-neon-400"],html [class*="from-neon-400"],html [class*="to-neon-400"]{background-color:#8b7cc8!important}
html [class*="bg-gradient"][class*="neon-400"]{background-image:linear-gradient(to bottom right,#a79ad8,#6f5fae)!important}
html [class*="text-neon-400"],html [class*="text-violet-"]{color:#c8bde8!important}
html [class*="ring-neon"],html [class*="border-neon"]{border-color:#c8bde855!important;--tw-ring-color:#c8bde855!important}

/* cz-badge-price-v5 (cleaned: never force flex-basis:100% on inline badges) */
html .font-mono[class*="text-[30px]"]{font-size:24px!important;letter-spacing:0.03em!important}
/* cz-final-css-v1 */
html .silk-controls{transform:scale(0.86);transform-origin:bottom right;opacity:.82}
html[dir="rtl"] .silk-controls{transform-origin:bottom left}
html .silk-toggle{font-size:12px!important;padding:5px 12px!important;border-radius:999px!important}
html .hero-compose-trigger{font-size:13px!important;padding:8px 18px!important}

html .studio-year-art span:first-child{font-size:56px!important;font-weight:700!important;line-height:1.1!important}
html .studio-year-art span:last-child{font-size:13.5px!important;opacity:.75}
html .language-popover{background:rgba(16,13,24,0.96)!important;backdrop-filter:blur(14px);border:1px solid rgba(200,189,232,0.18)!important;border-radius:14px!important;padding:8px!important;box-shadow:0 12px 32px rgba(0,0,0,0.5)!important;min-width:176px!important}
html .language-popover .language-caption{font-size:12px!important;opacity:.68;padding:4px 8px 6px!important;display:block}
html .language-popover button{border-radius:9px!important;padding:8px 10px!important;font-size:13px!important;width:100%;display:flex;align-items:center;gap:8px;background:transparent!important}
html .language-popover button:hover{background:rgba(200,189,232,0.12)!important}
html .language-popover .language-code{font-size:13px!important;opacity:.65;border:1px solid rgba(255,255,255,0.16);border-radius:6px;padding:2px 6px;margin-inline-start:auto;width:auto;height:auto}
html .font-mono,html [class*="tabular"]{font-variant-numeric:tabular-nums}

/* --- first-paint gate: never show the fallback face ------------------------- */
html.cz-paint-pending body{visibility:hidden !important}
html.cz-paint-pending{background:#08090d}
html.cz-paint-ready body{visibility:visible}
/* Hold the alliance sanctuary until the gate decision is made (no pre-gate flash) */
html.cz-paint-pending .join-page,
html.cz-paint-pending .join-sanctuary{visibility:hidden !important}

/* Shared across Vue, retained tool screens, login and administration. */
@property --ambient-base {
  syntax: "<color>";
  inherits: true;
  initial-value: #030609;
}
@property --ambient-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #00d9ef;
}
@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #087f9c;
}
@property --accent-bright {
  syntax: "<color>";
  inherits: true;
  initial-value: #8ffaff;
}
@property --accent-secondary {
  syntax: "<color>";
  inherits: true;
  initial-value: #c52b83;
}
html[data-ambient-preset] {
  transition:
    --ambient-base 0.85s ease,
    --ambient-glow 0.85s ease,
    --accent 0.85s ease,
    --accent-bright 0.85s ease,
    --accent-secondary 0.85s ease;
  --theme-action: linear-gradient(
    112deg,
    var(--accent),
    var(--accent-secondary)
  );
}
html[data-ambient-preset] body {
  isolation: isolate;
  background: var(--ambient-base) !important;
  background-image: none !important;
}
html[data-ambient-preset] {
  --cz-page: var(--ambient-base);
  --cz-panel: color-mix(in srgb, var(--ambient-base), #11151f 58%);
  --cz-panel-raised: color-mix(in srgb, var(--ambient-base), #1b2331 65%);
  --cz-accent: var(--accent-bright);
  --cz-action: var(--accent);
  --cz-workspace: var(--ambient-base);
  --cz-workspace-panel: color-mix(in srgb, var(--ambient-base), #11151f 65%);
}
html[data-ambient-preset] .silk-subdued {
  position: fixed;
  inset: -24px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  filter: blur(16px) saturate(0.82);
  opacity: 0.78;
  background: var(--ambient-base);
}
html[data-ambient-preset] .silk-subdued canvas {
  display: block;
  width: 100%;
  height: 100%;
}
html[data-ambient-preset] .silk-subdued .silk-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#03050962, #030509a6),
    radial-gradient(ellipse at 50% 35%, #03050966, transparent 75%);
}
.silk-preset-number {
  position: absolute;
  inset-inline-end: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border-radius: 8px;
  background: var(--ambient-base, #07090d);
  color: var(--accent-bright, #b4e6ff);
  border: 1px solid #ffffff20;
  font: 8px/1 system-ui;
}
.silk-cycle {
  position: relative;
}
html[data-ambient-preset] .silk-controls-subdued {
  position: fixed;
  top: auto;
  bottom: 18px;
  right: 28px;
  left: auto;
  inset-inline-end: 28px;
  z-index: 80;
  display: flex;
  gap: 8px;
  direction: ltr;
}
.silk-controls-subdued .silk-toggle > span {
  display: none;
}
.silk-controls-subdued .silk-toggle,
.silk-controls-subdued .silk-cycle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  background: #090d148c;
  color: var(--accent-bright);
  backdrop-filter: blur(16px);
  cursor: pointer;
}
.silk-controls-subdued :is(button):focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}
html[data-ambient-preset]
  :is(
    .button.primary,
    .join-submit,
    .join-status-button,
    .join-order-submit,
    .cz-account-submit,
    .btn-primary,
    .fig-pill-btn,
    .adm-btn-primary,
    #mkx-nav .mkx-cta
  ) {
  background: var(--theme-action) !important;
  color: #fff !important;
  border-color: color-mix(
    in srgb,
    var(--accent-bright),
    transparent 55%
  ) !important;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--accent), transparent 83%);
}
html[data-ambient-preset] :is(button, a)[class*="from-blue-"],
html[data-ambient-preset] :is(button, a)[class*="bg-blue-"],
html[data-ambient-preset] :is(button, a)[class*="bg-[#2f"],
html[data-ambient-preset] :is(button, a)[class*="bg-[#2161"] {
  background: var(--theme-action) !important;
  color: #fff !important;
}
html[data-ambient-preset]
  :is(
    .page-hero,
    .catalog-hero,
    .service-hero,
    .join-page,
    .join-hero,
    .join-editorial,
    .join-contact
  ) {
  background: transparent !important;
}
html[data-ambient-preset] .join-landscape {
  opacity: 0.1;
}
html[data-ambient-preset] .join-hero:after {
  background: linear-gradient(90deg, #03050990, transparent 70%);
}
html[data-ambient-preset]
  :is(
    .product-card,
    .tool-card,
    .service-card,
    .tool-feature,
    .catalog-toolbar,
    .next-panel,
    .ecosystem-item,
    .site-footer
  ) {
  background: color-mix(
    in srgb,
    var(--ambient-base),
    transparent 24%
  ) !important;
  backdrop-filter: blur(18px);
  border-color: color-mix(
    in srgb,
    var(--accent-bright),
    transparent 88%
  ) !important;
}
html[data-ambient-preset] :is(.tool-feature, .next-panel) {
  background:
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--ambient-glow), transparent 94%),
      transparent
    ),
    color-mix(in srgb, var(--ambient-base), transparent 20%) !important;
}
html[data-ambient-preset]
  :is(.join-arrow-circle, .join-direction-number, .join-tier-kicker) {
  color: var(--accent-bright);
  border-color: color-mix(in srgb, var(--accent-bright), transparent 65%);
}
html[data-ambient-preset] :is(input, textarea, select) {
  accent-color: var(--accent);
}
html[data-ambient-preset] :focus-visible {
  outline-color: var(--accent-bright) !important;
}
html[data-ambient-preset] .silk-fallback {
  background:
    radial-gradient(
      ellipse at 85% 20%,
      color-mix(in srgb, var(--ambient-glow), transparent 35%),
      transparent 55%
    ),
    radial-gradient(
      ellipse at 12% 80%,
      var(--accent-secondary),
      transparent 65%
    ),
    var(--ambient-base);
}
html[data-ambient-preset].cz-retained main,
html[data-ambient-preset].cz-retained main > section {
  background-color: transparent !important;
}
html[data-ambient-preset].cz-retained main [class*="bg-[#0"],
html[data-ambient-preset].cz-retained main [class*="bg-[#1"],
html[data-ambient-preset].cz-retained .adm-card {
  background-color: color-mix(
    in srgb,
    var(--cz-panel),
    transparent 20%
  ) !important;
  backdrop-filter: blur(16px);
}
html[data-ambient-preset].cz-workspace :is(body > div, main),
html[data-ambient-preset].cz-workspace [class*="bg-[#0"],
html[data-ambient-preset].cz-workspace [class*="bg-[#1"] {
  background-color: color-mix(
    in srgb,
    var(--cz-panel),
    transparent 23%
  ) !important;
}
html[data-ambient-preset] .adm-surface {
  background: color-mix(
    in srgb,
    var(--ambient-base),
    transparent 25%
  ) !important;
  --adm-accent: var(--accent);
}
html[data-ambient-preset] .adm-card {
  background: color-mix(in srgb, var(--ambient-base), #151a24 50%) !important;
}
html[data-ambient-preset] .adm-surface .adm-btn-primary {
  background: var(--theme-action) !important;
  color: white !important;
}
html[data-ambient-preset]
  main
  :is([class*="text-blue-"], [class*="text-sky-"]) {
  color: var(--accent-bright) !important;
}
html[data-ambient-preset]
  main
  :is([class*="border-blue-"], [class*="border-sky-"]) {
  border-color: color-mix(in srgb, var(--accent), transparent 65%) !important;
}
@media (prefers-reduced-motion: reduce) {
  html[data-ambient-preset] {
    transition: none;
  }
}

html.cz-workspace[data-ambient-preset] .silk-controls-subdued {
  right: 18px;
  left: auto;
  inset-inline-end: 18px;
  bottom: 96px;
}

html[data-ambient-preset] .silk-scene {
  isolation: isolate;
}
html[data-ambient-preset] .silk-scene canvas.silk-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 850ms ease;
  will-change: opacity;
}
html.cz-retained[data-ambient-preset] .page-shell,
html.cz-retained[data-ambient-preset] main > section {
  background-color: transparent !important;
  color: #f0eef6;
}
html.cz-retained[data-ambient-preset] :is(.mobile-dark-shell, #mkx-nav) {
  background: color-mix(in srgb, var(--ambient-base), transparent 14%) !important;
  border-color: #ffffff18 !important;
  box-shadow: 0 14px 42px #0005, inset 0 1px #ffffff0d;
  backdrop-filter: blur(22px) saturate(130%);
}
html.cz-retained[data-ambient-preset] main :is(.glass, .adm-card, [class*="rounded-[14px]"], [class*="rounded-[18px]"], [class*="rounded-[20px]"], [class*="rounded-2xl"]) {
  border-color: #ffffff18 !important;
  background: color-mix(in srgb, var(--ambient-base), #17171e 36%) !important;
  box-shadow: inset 0 1px #ffffff0b, 0 14px 38px #0002;
  backdrop-filter: blur(20px) saturate(125%);
}
html[data-ambient-preset]
  :is(
    button,
    a.button,
    a[role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"]
  ) {
  border-color: transparent !important;
  background: linear-gradient(135deg, #ffffff17, #ffffff08) !important;
  color: #f4f2f8 !important;
  box-shadow: 0 7px 24px #0002 !important;
  backdrop-filter: blur(16px) saturate(130%);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease,
    transform 220ms ease, color 220ms ease !important;
}
html[data-ambient-preset]
  :is(
    .button.primary,
    .join-submit,
    .join-status-button,
    .join-order-submit,
    .cz-account-submit,
    .btn-primary,
    .fig-pill-btn,
    .adm-btn-primary,
    #mkx-nav .mkx-cta
  ) {
  border: 0 !important;
  background: linear-gradient(135deg, #ffffff17, #ffffff08) !important;
  color: #f4f2f8 !important;
  box-shadow: 0 7px 24px #0002 !important;
}
html.cz-retained[data-ambient-preset] main :is(button[class], a[class][role="button"], input[type="submit"]) {
  border: 0 !important;
  background: linear-gradient(135deg, #ffffff17, #ffffff08) !important;
  color: #f4f2f8 !important;
  box-shadow: 0 7px 24px #0002 !important;
  backdrop-filter: blur(16px) saturate(130%);
}
html[data-ambient-preset]
  :is(
    button,
    a.button,
    a[role="button"],
    input[type="button"],
    input[type="submit"],
    input[type="reset"]
  ):hover:not(:disabled) {
  border-color: transparent !important;
  background: linear-gradient(135deg, #ffffff22, #ffffff0d) !important;
  box-shadow: 0 10px 28px #0003 !important;
}
html[data-ambient-preset] :is(button, input, select, textarea):focus-visible {
  outline: 2px solid #e8e4ef !important;
  outline-offset: 3px;
}
html[data-ambient-preset]
  :is(dialog, [role="dialog"], .modal, .modal-content, .toast, .notification, [data-sonner-toast]) {
  color: #f0eef6;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ambient-base), #1c1b23 35%);
  box-shadow: 0 28px 90px #0008, inset 0 1px #ffffff12;
  backdrop-filter: blur(24px) saturate(135%);
}
html[data-ambient-preset] :is(dialog, [role="dialog"])::backdrop {
  background: #030308ad;
  backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
  html[data-ambient-preset] .silk-scene canvas.silk-layer {
    transition: none;
  }
}

/* Text fields use a quiet inset focus halo, not an offset rectangular outline. */
html[data-ambient-preset] :is(input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select):is(:focus,:focus-visible) {
  outline: none !important;
  outline-offset: 0;
  box-shadow: inset 0 0 0 1px #e8e4ef50, 0 0 0 3px #e8e4ef08;
}

/* Chat-specific reference skin. Loaded last, after the shared ambient theme. */
html.cz-route-chat.cz-workspace,
html.cz-route-chat.cz-workspace body,
html.cz-route-chat.cz-workspace body main,
html.cz-route-chat.cz-workspace .gemini-shell,
html.cz-route-chat.cz-workspace .gemini-main,
html.cz-route-chat.cz-workspace .gemini-sidebar {
  background: #0b0b0b !important;
  background-image: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}
html.cz-route-chat.cz-workspace .gemini-shell {
  direction: ltr;
  color: #b4b4b4 !important;
  font-family: "Alkatip Basma Tom",Inter,"Microsoft YaHei",sans-serif;
  height: 100dvh !important;
  position: fixed !important;
  inset: 0;
  z-index: 50;
}
html.cz-route-chat.cz-workspace .gemini-shell header {
  display: none !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  :is(button, a, textarea, input, select) {
  box-shadow: none !important;
  border: 0 !important;
  background-image: none !important;
  backdrop-filter: none !important;
  font-weight: 400;
}
html.cz-route-chat.cz-workspace .gemini-shell button {
  color: #b4b4b4 !important;
  background-color: transparent !important;
}
html.cz-route-chat.cz-workspace .gemini-shell button:hover {
  background-color: #252525 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .sr-only {
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar {
  border: 0 !important;
  position: relative !important;
}
@media (max-width: 767px) {
  html.cz-route-chat.cz-workspace .gemini-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 260px !important;
    min-width: 260px !important;
    z-index: 65 !important;
  }
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-collapsed {
  width: 52px !important;
  min-width: 52px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded {
  width: 260px !important;
  min-width: 260px !important;
  background: #141414 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar > div:first-child {
  height: 56px !important;
  padding: 0 6px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar > div:first-child button {
  width: 40px !important;
  height: 40px !important;
  background: transparent !important;
}
html.cz-route-chat.cz-workspace .cz-chat-rail-actions {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  gap: 0;
}
html.cz-route-chat.cz-workspace .cz-chat-rail-actions :is(button, a) {
  display: grid !important;
  place-items: center !important;
  flex: none;
  width: 32px !important;
  height: 32px !important;
  color: #b4b4b4 !important;
  border-radius: 50%;
  padding: 0 !important;
  background: transparent !important;
}
html.cz-route-chat.cz-workspace .cz-chat-rail-actions button:first-child {
  background: #151515 !important;
  margin-bottom: 16px;
}
html.cz-route-chat.cz-workspace .cz-chat-rail-actions .cz-chat-avatar {
  margin-top: auto !important;
  margin-bottom: 18px !important;
  width: 28px !important;
  height: 28px !important;
  background: #004f7c !important;
  color: #b0cfe0 !important;
}
html.cz-route-chat.cz-workspace .gemini-main > div[class*="overflow-y-auto"] {
  padding: 0 24px !important;
}
html.cz-route-chat.cz-workspace
  .gemini-main
  > div[class*="overflow-y-auto"]
  > div:has(> h1) {
  min-height: 100dvh !important;
  padding: 0 0 30px !important;
  max-width: 900px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell h1 {
  font-family: "Alkatip Basma Tom",Inter,"Microsoft YaHei",sans-serif!important;
  font-size: 36px !important;
  line-height: 48px !important;
  font-weight: 400 !important;
  color: #b4b4b4 !important;
  margin: 0 0 36px !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}
html.cz-route-chat.cz-workspace .gemini-shell div:has(> .cz-chat-composer) {
  width: min(660px, 100%) !important;
  max-width: 660px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer {
  width: 100% !important;
  min-height: 64px !important;
  padding: 12px 16px !important;
  background: #191919 !important;
  border: 0 !important;
  border-radius: 32px !important;
  box-shadow: none !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-input-row {
  display: flex;
  gap: 8px;
  min-height: 40px;
  align-items: center;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-input-row textarea {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
  color: #b4b4b4 !important;
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 16px !important;
  line-height: 24px !important;
  min-height: 40px !important;
  max-height: 160px !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  .cz-chat-input-row
  textarea::placeholder {
  color: #929699 !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  .cz-chat-input-row
  textarea:focus-visible {
  outline: none !important;
}
html.cz-route-chat.cz-workspace
  .cz-chat-actions
  > button[data-chat-web-search] {
  position: absolute;
  top: -48px;
  right: 0;
  width: 28px;
  height: 28px;
  opacity: 0;
  pointer-events: none;
}
html.cz-route-chat.cz-workspace
  .cz-chat-actions:focus-within
  > button:first-child,
html.cz-route-chat.cz-workspace .cz-chat-actions:hover > button:first-child {
  opacity: 1;
  pointer-events: auto;
  background: #191919 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-actions {
  gap: 12px !important;
  position: relative;
}
html.cz-route-chat.cz-workspace .gemini-shell button[data-chat-model] {
  font-size: 14px !important;
  line-height: 20px;
  height: 32px !important;
  background: transparent !important;
  padding: 0 10px !important;
  border: 0 !important;
  color: #b4b4b4 !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  button[data-chat-model]
  > span[class*="bg-"] {
  display: none !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-mic {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  padding: 0 !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  .cz-chat-mic[aria-pressed="true"] {
  color: #c1b3ff !important;
  background: #352275 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell button[data-chat-send] {
  width: 32px !important;
  height: 32px !important;
  background: #352275 !important;
  color: #b8a5fa !important;
  border-radius: 50% !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes {
  display: flex !important;
  width: 100%;
  justify-content: center !important;
  margin-top: 14px !important;
  gap: 0 !important;
  direction: ltr;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button {
  height: 38px !important;
  min-width: 56px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  line-height: 20px !important;
  color: #b4b4b4 !important;
  border-radius: 999px !important;
  background: transparent !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  .cz-chat-modes
  button[aria-pressed="true"] {
  background: #292929 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell [role="dialog"],
html.cz-route-chat.cz-workspace .gemini-shell .adm-modal-panel {
  background: #1b1b1b !important;
  border: 0 !important;
  color: #ddd !important;
  box-shadow: 0 24px 80px #0008 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell [class*="bg-[#141"],
html.cz-route-chat.cz-workspace .gemini-shell [class*="bg-[#181"],
html.cz-route-chat.cz-workspace .gemini-shell [class*="bg-[#1e1"] {
  background-color: #191919 !important;
  border-color: transparent !important;
}
html.cz-route-chat.cz-workspace
  .gemini-shell
  :is([class*="ring-1"], [class*="border-white/"]) {
  --tw-ring-color: transparent !important;
  border-color: transparent !important;
}
@media (max-width: 719px) {
  html.cz-route-chat.cz-workspace .gemini-shell h1 {
    font-size: 25px !important;
    white-space: normal;
    line-height: 1.5 !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-actions {
    gap: 2px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell button[data-chat-model] {
    max-width: 120px !important;
    padding: 0 4px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-main > div[class*="overflow-y-auto"] {
    padding: 0 12px !important;
  }
}

html.cz-route-chat.cz-workspace
  .gemini-sidebar
  .cz-chat-rail-actions
  > :is(button, a) {
  width: 32px !important;
  height: 32px !important;
}
html.cz-route-chat.cz-workspace
  .gemini-sidebar
  .cz-chat-rail-actions
  > .cz-chat-avatar {
  width: 28px !important;
  height: 28px !important;
}
html.cz-route-chat.cz-workspace body {
  overflow: hidden !important;
  scrollbar-width: none;
}
html.cz-route-chat.cz-workspace :is(#cz-ambient-scene, .silk-controls) {
  display: none !important;
}
html.cz-route-chat.cz-workspace{overflow:hidden!important;scrollbar-width:none;scrollbar-gutter:auto!important}
/* One neutral chat palette, including history, replies, menus and generated-result cards. */
html.cz-route-chat.cz-workspace .gemini-shell {--chat-canvas:#0b0b0b;--chat-surface:#191919;--chat-raised:#242424;--chat-text:#d1d1d1;--chat-muted:#aaa}
html.cz-route-chat.cz-workspace .gemini-shell [class*="bg-[#"]{background-color:var(--chat-surface)!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
html.cz-route-chat.cz-workspace .gemini-shell :is([class*="from-[#"],[class*="bg-gradient"]){background-image:none!important;background-color:var(--chat-surface)!important}
html.cz-route-chat.cz-workspace .gemini-shell :is([class*="text-blue"],[class*="text-indigo"],[class*="text-cyan"],[class*="text-emerald"],[class*="text-violet"],[class*="text-slate"],[class*="text-[#"]){color:var(--chat-text)!important}
html.cz-route-chat.cz-workspace .gemini-shell :is(.gemini-main,.gemini-sidebar.cz-rail-collapsed){background:var(--chat-canvas)!important}
html.cz-route-chat.cz-workspace .gemini-shell .gemini-sidebar.cz-rail-expanded{background:#141414!important}
html.cz-route-chat.cz-workspace .gemini-shell button[aria-pressed=true]{background:#2b2b2b!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer{background:var(--chat-surface)!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-history-label{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;font-size:13px;line-height:1.5}
.cz-history-label small{flex-shrink:0;font-size:13px;opacity:.7;font-variant-numeric:tabular-nums}
.cz-chat-receipt{margin-top:14px;max-width:680px;font-size:12px;line-height:1.7;color:#a8a8a8;direction:inherit}
.cz-chat-receipt summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;cursor:pointer;list-style:none}
.cz-chat-receipt summary span{margin-inline-start:auto;color:#bcbcbc}
.cz-chat-receipt-body,.cz-model-sheet{background:#202020!important;color:#c8c8c8!important;border:0!important;border-radius:18px;padding:20px;font-size:13px;line-height:1.8;box-shadow:0 16px 50px #0006}
.cz-chat-receipt-body{margin-top:10px;box-shadow:none}
.cz-chat-receipt-body p,.cz-model-sheet p{font-size:12px;color:#aaa;margin:10px 0;white-space:normal}
.cz-chat-receipt dl,.cz-model-sheet dl{display:grid;grid-template-columns:minmax(110px,1fr) minmax(120px,1.4fr);gap:10px 18px;margin:12px 0}
.cz-chat-receipt dd,.cz-model-sheet dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cz-model-details{position:relative;font-size:12px;line-height:1.5}
.cz-model-details summary{display:flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap;list-style:none;padding:6px;border-radius:99px}
.cz-model-details summary:hover{background:#292929}
.cz-model-sheet{position:absolute;z-index:90;bottom:40px;inset-inline-end:0;width:min(520px,75vw);max-height:65vh;overflow:auto;text-align:start}
.cz-model-sheet h3{font-size:16px;font-weight:500;margin:0 0 12px}
.cz-chat-receipt :focus-visible,.cz-model-details :focus-visible{outline:2px solid #aaa;outline-offset:3px}
html[lang^=ug] :is(.cz-chat-receipt,.cz-model-details,.cz-model-sheet){font-size:15px;line-height:1.9}

.cz-output-limit{display:grid;gap:8px;font-size:12px;margin:14px 0}.cz-output-limit input{background:#303030!important;color:#ddd!important;border:0!important;border-radius:10px;padding:9px 12px;width:100%;outline-offset:3px}

/* Override inherited site glass tints at the chat workspace boundary. */
html.cz-route-chat.cz-workspace .gemini-sidebar :is(a,[class*="bg-white"],[class*="border-t"]){background:transparent!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
html.cz-route-chat.cz-workspace .gemini-sidebar :is(a:hover,button:hover){background:#262626!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-chat-avatar{background:#292929!important;color:#d0d0d0!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label){height:auto!important;min-height:52px;padding-block:7px}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;text-align:start;white-space:normal}
.cz-history-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:hover .cz-history-title{padding-inline-end:76px}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label)>div.absolute{bottom:auto!important;top:5px!important;background:#191919!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label small{font-size:13px;line-height:1.5}
html.cz-route-chat.cz-workspace .adm-modal-panel :is([class*="bg-[#"],[class*="bg-blue"],[class*="bg-emerald"],[class*="bg-amber"],[class*="bg-red"]){background:#282828!important;background-image:none!important;border-color:transparent!important;box-shadow:none!important}
html.cz-route-chat.cz-workspace .adm-modal-panel :is([class*="text-[#"],[class*="text-blue"],[class*="text-emerald"],[class*="text-red"]){color:#d0d0d0!important}

html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label)>div.absolute{opacity:0!important;pointer-events:none!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label):is(:hover,:focus-within)>div.absolute{opacity:1!important;pointer-events:auto!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label :is(span,small){background:transparent!important}

/* Retained pages and the Vue entry use different document renderers. */
@view-transition{navigation:none}
html[lang^=ug] :is(.cz-chat-receipt,.cz-model-details){direction:rtl;text-align:start}
html[lang^=ug] :is(.cz-chat-receipt dd,.cz-model-sheet dd){unicode-bidi:plaintext}
@media(prefers-reduced-motion:no-preference){html.cz-route-chat.cz-chat-ready .gemini-main{animation:cz-chat-appear .18s ease-out both}@keyframes cz-chat-appear{from{opacity:0}to{opacity:1}}}

/* Chat refinement: neutral surfaces and compact, state-driven controls. */
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label{min-width:0;width:100%;gap:3px}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label){background:transparent!important;isolation:isolate}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label):hover{background:#242424!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label) [class*="absolute"]{background:transparent!important;background-image:none!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-details{margin:4px 0 8px}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet{position:fixed;left:272px;right:auto;bottom:20px;width:min(500px,calc(100vw - 300px));max-height:80vh;z-index:100}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-usage{margin:6px 0 0;max-width:100%;font-size:12.5px!important;line-height:1.6;color:#9d9da3}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-usage summary{padding:0;display:block;font-size:12.5px!important;list-style:none}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-usage summary>span{margin:0;color:#969696}
.cz-chat-usage summary::-webkit-details-marker{display:none}
.cz-model-picker{position:absolute;right:0;width:330px;max-width:calc(100vw - 40px);z-index:80;border:0;border-radius:20px;padding:14px;background:#1c1c1c;color:#d1d1d1;box-shadow:0 18px 50px #0008;text-align:start}
.cz-model-picker.opens-up{bottom:calc(100% + 12px)}.cz-model-picker.opens-down{top:calc(100% + 12px)}
.cz-model-picker-heading{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#aaa;margin-bottom:10px}
.cz-model-picker button{border:0!important;box-shadow:none!important;color:inherit!important;background:transparent!important;cursor:pointer}
.cz-model-picker-heading button{width:26px;height:26px;font-size:18px}
.cz-edition-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#151515;border-radius:12px;padding:4px}
.cz-edition-tabs button{padding:8px 12px;border-radius:9px;font-size:12px;font-weight:500}
.cz-edition-tabs button[aria-selected=true]{background:#303030!important}.cz-edition-tabs small{margin-inline-start:8px;font-size:13px;color:#999}
.cz-model-search{display:block;width:100%;margin:12px 0 8px;background:#141414!important;border:0!important;border-radius:10px;padding:9px 12px;color:#ddd!important;font-size:12px;outline-offset:2px}
.cz-model-options{max-height:300px;overflow:auto;scrollbar-width:thin}.cz-model-options>button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:40px;padding:10px;border-radius:10px;font-size:12px;text-align:start}
.cz-model-options>button:hover,.cz-model-options>button[aria-pressed=true]{background:#303030!important}.cz-model-alias{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;direction:ltr}
.cz-model-meta{display:flex;gap:8px;align-items:center;white-space:nowrap;font-variant-numeric:tabular-nums;color:#999}.cz-model-meta small{font-size:13px;font-weight:400}.cz-model-options>p{padding:12px;font-size:12px;color:#aaa}
.cz-storage-setting{margin:8px 0 12px;position:relative}.cz-storage-row{display:flex;align-items:center;gap:9px;min-height:30px}.cz-storage-row small{font-size:13px!important;line-height:1.6;color:#999;flex:1}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-storage-row button{display:inline-flex;width:30px;height:17px;flex-shrink:0;padding:2px;border:0!important;border-radius:20px;background:#363636!important;align-items:center}
.cz-storage-row button>span{width:13px;height:13px;border-radius:50%;background:#aaa;transition:transform .18s}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-storage-row button[aria-checked=true]{background:#666!important}.cz-storage-row button[aria-checked=true]>span{transform:translateX(13px);background:#fff}.cz-storage-row button:disabled{opacity:.4;cursor:wait}
.cz-storage-setting p{font-size:13px!important;line-height:1.6;margin:7px 0;color:#aaa}.cz-storage-consent{padding:10px;border-radius:12px;background:#252525}.cz-storage-consent button{border:0;border-radius:8px;padding:6px 10px;background:#353535;color:#ccc;margin-inline-end:5px;font-size:13px}

html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label)>button:hover{background:transparent!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-storage-row button{direction:ltr}
.cz-model-picker :focus-visible{outline:2px solid #aaa;outline-offset:2px}

/* Keep model choices within the available space above/below the composer. */
.cz-model-picker{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.cz-model-picker-heading,.cz-edition-tabs,.cz-model-search{flex-shrink:0}
.cz-model-options{min-height:0;flex:0 1 auto;overscroll-behavior:contain}

/* Chat refinement: compact composer, calm sentence-based billing and non-overlapping history. */
html.cz-route-chat.cz-workspace .gemini-shell h1{font-size:clamp(20px,2.1vw,28px)!important;line-height:1.65!important;margin-bottom:24px!important;white-space:normal;text-wrap:balance;max-width:100%;font-weight:400!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer{min-height:52px!important;padding:8px 14px!important;border-radius:28px!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-input-row{min-height:36px!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-input-row textarea{min-height:36px!important;padding:6px 0!important;line-height:24px!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes{align-items:center;gap:3px!important;flex-wrap:wrap;margin-top:10px!important}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button{height:34px!important;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;font-size:12px!important;line-height:1.5!important;min-width:48px!important;padding:0 11px!important;border:0!important;box-shadow:none!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .group:has(.cz-history-label){position:relative!important;padding:8px 10px!important;min-height:60px;border-radius:12px!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-open{width:100%;padding:0!important;text-align:start;line-height:1.6!important;background:transparent!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label{display:flex;flex-direction:column;align-items:stretch;gap:5px!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-title{font-size:12px!important;line-height:1.7!important;width:100%;text-align:start}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label small{display:block;font-family:"Alkatip Basma Tom",Inter,sans-serif!important;font-size:12px!important;color:#929298;max-width:calc(100% - 76px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:22px;text-align:start;min-height:22px}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-actions{position:absolute;bottom:6px;inset-inline-end:6px;display:flex;align-items:center;gap:2px;padding:0!important;opacity:.65;pointer-events:auto;background:none!important;background-image:none!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-actions:hover,html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-actions:focus-within{opacity:1}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-actions button{width:24px;height:24px;display:grid;place-items:center;padding:4px!important;border:0!important;background:transparent!important;border-radius:6px!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-actions button:hover{background:#353535!important}
html.cz-route-chat.cz-workspace .gemini-sidebar a[href^="/tools/"]{min-width:0;gap:9px!important}
html.cz-route-chat.cz-workspace .gemini-sidebar a[href^="/tools/"] span{font-size:12.5px!important;line-height:1.6;white-space:nowrap}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-details summary{font-size:12.5px!important;line-height:1.7;display:flex;align-items:center;gap:6px}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet{width:min(420px,calc(100vw - 290px));background:#1b1b1b!important;border:0!important;border-radius:18px;padding:20px;box-shadow:0 16px 50px #0006;text-align:start;overflow:auto}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet h3{font-family:"Alkatip Basma Tom",Inter,sans-serif!important;font-size:14px!important;margin:0 0 12px;direction:ltr;text-align:start;color:#dedee2;font-weight:500}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet p{font-size:12.5px!important;line-height:1.9!important;margin:0 0 10px;color:#b2b2b8;font-weight:400!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet .cz-output-limit{font-size:12.5px!important;line-height:1.8;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-output-limit input{width:100%;height:34px!important;min-height:34px!important;border:0!important;padding:6px 10px!important;font-size:13px!important;background:#292929!important;border-radius:9px!important}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-storage-row{gap:8px!important;min-width:0;min-height:30px;align-items:flex-start}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-storage-row small{display:block;min-width:0;white-space:normal!important;font-size:12px!important;font-weight:400!important;line-height:1.6!important;text-align:start;flex:1}
html.cz-route-chat.cz-workspace .gemini-sidebar button:focus-visible,html.cz-route-chat.cz-workspace .cz-chat-modes button:focus-visible{outline:2px solid #aaa!important;outline-offset:2px}
@media(max-width:767px){html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet{left:12px;right:12px;bottom:12px;width:auto;max-height:75dvh}html.cz-route-chat.cz-workspace .gemini-shell h1{font-size:22px!important;line-height:1.7!important}html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button{padding:0 8px!important;font-size:13px!important}}

html.cz-route-chat.cz-workspace .gemini-sidebar .group:hover .cz-history-title{padding-inline-end:0!important}

/* Direct capabilities, no nested menu; wrap as whole controls on narrow screens. */
html.cz-route-chat.cz-workspace .cz-chat-modes{flex-wrap:wrap!important;gap:6px!important;max-width:100%;height:auto!important}
.cz-skill-toggles{display:contents}
html.cz-route-chat.cz-workspace .cz-chat-modes button{white-space:nowrap;flex:none;min-height:34px!important}
html.cz-route-chat.cz-workspace .cz-chat-modes [data-chat-web-search]{width:34px!important;padding:0!important;display:grid!important;place-items:center}
html.cz-route-chat.cz-workspace .cz-chat-modes [data-chat-skill][aria-pressed=true]{background:#353535!important;color:#f1f1f1!important}
@media(max-width:600px){html.cz-route-chat.cz-workspace .cz-chat-modes{justify-content:center!important;row-gap:6px!important}html.cz-route-chat.cz-workspace .cz-chat-modes button{font-size:13px!important;padding-inline:9px!important}}
/* History controls own their two-line height; generic button sizing must not clip metadata. */
html.cz-route-chat.cz-workspace .gemini-sidebar button.cz-history-open{height:auto!important;min-height:0!important;max-height:none!important;line-height:1.7!important;overflow:visible!important;padding:0!important;align-self:center}
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-history-label{height:auto!important;min-height:0!important}


/* === cz: animated thinking / waiting indicators (added) === */
.cz-thinking-block{margin:10px 0;border:1px solid rgba(63,139,255,.18);border-radius:14px;background:rgba(63,139,255,.06);overflow:hidden}
.cz-thinking-block>summary{display:flex;align-items:center;gap:8px;padding:9px 12px;cursor:pointer;list-style:none;color:#a8c7fa;font-size:12.8px;font-weight:600}
.cz-thinking-block>summary::-webkit-details-marker{display:none}
.cz-thinking-block>summary small{color:#7f8794;font-weight:400}
.cz-thinking-dots{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.cz-thinking-dots>span{width:6px;height:6px;border-radius:9999px;background:#3f8bff;display:inline-block;animation:cz-think-bounce 1.05s infinite ease-in-out}
.cz-thinking-dots>span:nth-child(2){animation-delay:.16s;background:#7aadff}
.cz-thinking-dots>span:nth-child(3){animation-delay:.32s;background:#a8c7fa}
.cz-thinking-dots:not(.is-live)>span{animation:none;opacity:.75}
@keyframes cz-think-bounce{0%,80%,100%{transform:translateY(0);opacity:.45}40%{transform:translateY(-5px);opacity:1}}
.cz-thinking-dot{display:inline-block;width:8px;height:8px;border-radius:9999px;background:#3f8bff;animation:cz-think-pulse 1.1s ease-in-out infinite}
@keyframes cz-think-pulse{0%{transform:scale(.85);opacity:.55}50%{transform:scale(1.15);opacity:1}100%{transform:scale(.85);opacity:.55}}
.cz-thinking-body{padding:2px 12px 12px;color:#a9b1bf;font-size:12.8px;line-height:1.75;white-space:pre-wrap;max-height:320px;overflow:auto}
.cz-chat-waiting{display:inline-flex;align-items:center;gap:10px;padding:9px 14px;border-radius:9999px;border:1px solid rgba(63,139,255,.22);background:rgba(63,139,255,.08);animation:cz-wait-in .28s ease both}
.cz-chat-waiting-dots{display:inline-flex;align-items:center;gap:4px}
.cz-chat-waiting-dots>span{display:inline-block;width:7px;height:7px;border-radius:9999px;background:#3f8bff;animation:cz-think-bounce 1s infinite ease-in-out!important}
.cz-chat-waiting-dots>span:nth-child(2){animation-delay:.15s!important;background:#7aadff}
.cz-chat-waiting-dots>span:nth-child(3){animation-delay:.3s!important;background:#a8c7fa}
@keyframes cz-wait-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes cz-think-soft{0%,100%{opacity:.45}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.cz-thinking-dots>span,.cz-chat-waiting-dots>span,.cz-thinking-dot{animation:cz-think-soft 1.5s ease-in-out infinite!important}.cz-chat-waiting{animation:none!important}}

/* Uyghur webfont must survive this stack: append the self-hosted Alkatip Basma Tom fallback. */
html.cz-route-chat.cz-workspace .gemini-sidebar .cz-model-sheet h3 {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
}

/* Shared editorial rhythm across the Vue portal and retained account/resource pages. */
:root{--cz-copy:14px;--cz-caption:12px;--cz-heading:clamp(26px,3vw,42px);--cz-gap:20px}
.site-header .brand-word,#mkx-nav .mkx-brand-txt{font-size:19px!important;font-weight:650!important;letter-spacing:-.05em!important;white-space:nowrap}
.site-header .brand-word small{font-size:12px;letter-spacing:.12em}
.site-header .brand-mark{font-size:26px}
/* Keep the same compact identity in the Vue header and retained pages. */
.site-header .brand-mark{position:relative;display:grid;place-items:center;width:32px;height:32px;padding:0;border:1.5px solid #dededb;border-radius:11px;transform:rotate(-12deg);font-size:0;letter-spacing:0;color:transparent}
.site-header .brand-mark:before{content:"";position:absolute;inset:6px;border:1px solid #ffffffa0;border-radius:50%}
.site-header .brand-mark:after{content:"";position:absolute;top:2px;right:1px;width:7px;height:7px;border-radius:50%;background:#dededb;box-shadow:0 0 10px #ffffff55}
.site-header .brand-mark>span{display:none}
.site-header .brand-word{font-size:21px!important;letter-spacing:0!important;font-weight:700!important}
html[lang=ug] .site-header .desktop-nav a{font-size:13px!important;font-weight:400!important}
/* Search, sort and category controls are separate groups, not nested outlined bars. */
.catalog-controls,.category-tabs{border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}
.catalog-controls{gap:12px;align-items:center;margin-bottom:16px}
.catalog-controls .search-field{max-width:560px;min-height:44px;border:0!important;background:#ffffff06;border-radius:12px}
.catalog-controls .search-field input{font-size:13px!important;min-height:44px;height:44px}
.catalog-controls .sort-field{border:0!important;min-height:44px;border-radius:12px;background:#ffffff06;padding-inline:12px}
.catalog-controls .sort-field select{font-size:12px!important;min-height:44px;padding-block:0}
.catalog-controls .result-count{font-size:12px;color:#9ba6b6}
.category-tabs{min-height:36px;gap:8px;margin-bottom:24px;flex-wrap:wrap;overflow:visible}
.category-tabs button{min-height:34px;padding:7px 16px!important;line-height:1.5!important;font-size:12px!important;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
.catalog-grid:is(.apps,.course){align-items:stretch;gap:22px}
.catalog-grid:is(.apps,.course) .catalog-card{display:flex;flex-direction:column;min-width:0;min-height:0}
.catalog-grid.apps .software-art{height:160px;min-height:160px}
.catalog-grid.course .course-art{height:auto;aspect-ratio:2.8;min-height:0}
.catalog-grid:is(.apps,.course) .card-body{display:flex;flex:1;flex-direction:column;padding:20px;min-height:0;gap:0}
.catalog-grid:is(.apps,.course) .eyebrow{font-size:12.5px!important;line-height:1.65;min-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html .catalog-grid:is(.apps,.course) h3{font-size:16px!important;font-weight:500;line-height:1.65!important;margin:10px 0 0;min-height:3.3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:break-word;letter-spacing:0}
html .catalog-grid:is(.apps,.course) .card-desc{font-size:13px!important;line-height:1.8!important;min-height:3.6em;margin:8px 0 0;-webkit-line-clamp:2;overflow:hidden}
.catalog-grid:is(.apps,.course) .price-row{margin-top:auto;padding-top:14px;min-height:42px;gap:8px;align-items:center}
.catalog-grid:is(.apps,.course) .price{font-size:21px;line-height:1.3}
.catalog-grid:is(.apps,.course) .price-row>span:not(.price){font-size:12.5px}
.catalog-grid:is(.apps,.course) .card-link{display:flex;justify-content:center;align-items:center;gap:10px;min-height:40px;margin:14px 0 0;padding:9px 14px!important;font-size:12px!important;line-height:1.6!important;text-align:center;white-space:nowrap}
.catalog-grid:is(.apps,.course) .card-link svg{flex-shrink:0;width:15px;height:15px}
.catalog-section{padding-bottom:48px}
.catalog-note{padding:16px!important;min-height:0;font-size:12px!important;line-height:1.8}
/* One footer geometry and readable type scale. */
.site-footer{margin-top:0!important;border:0!important;background:#05090cbb!important;color:#a3adbb;padding:0!important;position:relative;z-index:1}
.site-footer .container{width:calc(100% - 2 * clamp(22px,4.6vw,76px));max-width:1320px;margin-inline:auto}
.site-footer .footer-top{display:grid;grid-template-columns:1.2fr 1.2fr 1fr 40px;gap:36px;padding-block:36px!important;align-items:start}
.site-footer .footer-brand .brand{display:inline-flex;align-items:center;gap:10px;width:max-content;max-width:100%;color:#e4e8ef}
.site-footer .brand-mark{font:600 28px/1 Arial,sans-serif;letter-spacing:-.08em;color:#e4e8ef}
.site-footer .brand-word{display:block;font:600 20px/1.2 Arial,sans-serif;letter-spacing:-.05em}
.site-footer .brand-word small{display:block;font:9px/1.8 Arial,sans-serif;letter-spacing:.15em;color:#98a2b2;margin-top:4px}
.site-footer .footer-brand p{font-size:13px!important;line-height:1.8!important;max-width:300px;margin:14px 0 0!important}
.site-footer .footer-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;align-content:start}
.site-footer .footer-links h2{grid-column:1/-1;font-weight:500;font-size:13px!important;line-height:1.7!important;margin:0 0 7px!important;color:#d9dfe7;letter-spacing:0}
.site-footer .footer-links a{font-size:12px!important;line-height:1.9!important;margin:0!important;overflow-wrap:break-word;color:#a3adbb}
.site-footer .footer-links a:hover{color:#fff}
.site-footer .back-top{width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:50%;background:#ffffff08;font-size:20px}
.site-footer .footer-bottom{display:flex;justify-content:space-between;gap:18px;align-items:center;padding-block:17px!important;border-top:0!important;font-size:11px!important;line-height:1.8}
.site-footer a:focus-visible{outline:2px solid #d5dce8;outline-offset:4px;border-radius:3px}
/* Retained resource catalog: titles, metadata, price and action align independently. */
.cz-resource-card{min-height:0!important;gap:14px!important;padding:20px!important;border-radius:14px!important;justify-content:flex-start!important}
.cz-resource-card .cz-resource-art{height:124px!important;border-radius:10px!important;flex:none}
.cz-resource-card>div:nth-child(2){flex:1;min-width:0}
html .cz-resource-card>div:nth-child(2)>p:first-child{font-size:14px!important;font-weight:500!important;line-height:1.75!important;min-height:3.5em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal!important}
html .cz-resource-card>div:nth-child(2)>p:nth-child(2){font-size:12px!important;line-height:1.8!important;min-height:3.6em;margin-top:7px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal!important}
html .cz-resource-card>div:nth-child(2)>p:nth-child(3){font-size:11px!important;line-height:1.8!important;min-height:20px;flex-wrap:wrap;gap:6px}
.cz-resource-card>div:last-child{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;margin-top:0!important;padding-top:0!important;border:0!important}
html .cz-resource-card>div:last-child>span{font-size:14px!important;line-height:1.5!important;white-space:nowrap}
html .cz-resource-card>div:last-child>button{font-size:12px!important;min-height:36px!important;line-height:1.5!important;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px 14px!important;white-space:nowrap}
/* About: one site navigation, readable titles and balanced imagery instead of overlaps. */
.about-portfolio .portfolio-hero{display:grid;grid-template-columns:1.1fr .9fr;grid-template-rows:1fr auto;align-items:center;gap:28px;min-height:650px;height:auto;max-width:1440px;margin:auto;padding:140px clamp(24px,6vw,86px) 60px;overflow:visible}
.about-portfolio .portfolio-title-wrap{position:relative;inset:auto;width:100%;max-width:660px;align-self:center;z-index:2}
.about-portfolio .portfolio-title-wrap h1{font-size:clamp(42px,5.1vw,74px);line-height:1.18;white-space:pre-line;width:auto;overflow-wrap:break-word;letter-spacing:-.035em}
.about-portfolio:lang(ug) .portfolio-title-wrap h1{font-size:clamp(30px,3.3vw,48px);line-height:1.65;letter-spacing:0;font-weight:400}
.about-portfolio .portfolio-eyebrow{font-size:12px;line-height:1.8;letter-spacing:0}
.about-portfolio .portfolio-portrait{position:relative;inset:auto;grid-column:2;grid-row:1/3;justify-self:center;width:100%;max-width:440px;height:430px;transform:none;animation:none;object-fit:contain;object-position:center bottom}
.about-portfolio .portfolio-hero-bottom{position:static;display:flex;flex-wrap:wrap;gap:18px;align-items:center;grid-row:2;grid-column:1}
.about-portfolio .portfolio-hero-bottom p{max-width:470px;font-size:14px;line-height:1.9}
.about-portfolio .portfolio-pill{font-size:12px;line-height:1.7;gap:20px;min-height:42px;padding:10px 18px;white-space:nowrap;letter-spacing:0}
.about-portfolio .portfolio-scroll{position:static;transform:none;grid-column:1/-1;justify-self:center;font-size:12px;letter-spacing:0;margin-top:8px}
.about-portfolio :is(.portfolio-story,.portfolio-services,.portfolio-projects,.portfolio-contact-section){padding:56px clamp(24px,6vw,86px);max-width:1440px;margin-inline:auto}
.about-portfolio :is(.portfolio-story-main h2,.portfolio-section-title h2,.portfolio-contact-section h2){font-size:clamp(30px,3.5vw,50px);line-height:1.35;letter-spacing:0}
.about-portfolio:lang(ug) :is(.portfolio-story-main h2,.portfolio-section-title h2,.portfolio-contact-section h2){font-size:clamp(25px,2.7vw,38px);line-height:1.75;font-weight:400}
.about-portfolio .portfolio-story-main{grid-template-columns:1fr 1fr;gap:50px;padding:30px 0}
.about-portfolio .portfolio-story-copy{padding-top:0}
.about-portfolio :is(.portfolio-story-copy p,.portfolio-contact-section p){font-size:14px;line-height:1.95}
.about-portfolio .portfolio-story-copy strong{font-size:13px;margin-top:18px}
.about-portfolio :is(.portfolio-index,.portfolio-section-title>span,.portfolio-contact-section>div>span){font-size:12px;line-height:1.8;letter-spacing:0;color:#a4aab3}
.about-portfolio .portfolio-stats{padding-top:16px;gap:60px}
.about-portfolio .portfolio-stats b{font-size:30px}.about-portfolio .portfolio-stats span{font-size:11px;letter-spacing:.03em}
.about-portfolio .portfolio-services{background:#ffffff04;color:#e7e9ed;border-radius:0}
.about-portfolio .portfolio-service-list article{grid-template-columns:44px 1fr 1.3fr 24px;gap:20px;padding:22px 0}
.about-portfolio .portfolio-service-list article+article{border:0}
.about-portfolio .portfolio-service-list b{font-size:24px;color:#87919f;font-weight:400}
.about-portfolio .portfolio-service-list h3{font-size:20px;line-height:1.8;font-weight:500}
.about-portfolio .portfolio-service-list p{font-size:13px;line-height:1.9;color:#a5aebb;max-width:500px}
.about-portfolio .portfolio-section-title{margin-bottom:28px;align-items:center}
.about-portfolio .portfolio-project{margin-bottom:32px}
.about-portfolio .portfolio-project-meta{gap:16px;margin-bottom:14px}
.about-portfolio .portfolio-project-meta>strong{font-size:28px;font-weight:400;color:#9aa4b0}
.about-portfolio .portfolio-project-meta div>span{font-size:11px}
.about-portfolio .portfolio-project-meta h3{font-size:17px}
.about-portfolio .portfolio-project>img{height:auto;aspect-ratio:2.35;object-fit:cover;max-height:480px;min-height:180px;background:#ffffff04}
.about-portfolio .portfolio-marquee{padding:12px 0 24px}
.about-portfolio .portfolio-marquee img{width:clamp(220px,25vw,360px);height:clamp(135px,15vw,216px)}
.about-portfolio .portfolio-contact-section{align-items:center;gap:30px;background:radial-gradient(ellipse at 80% 65%,#1d493b55,transparent 65%),#0a0e10}
.about-portfolio .portfolio-contact-section h2{margin:14px 0}
.about-portfolio .portfolio-footer{font-size:12px;line-height:1.8;letter-spacing:0;gap:20px;flex-wrap:wrap;padding:24px clamp(24px,6vw,86px)}
/* Community: align title/content tracks, replace decorative mock screens with relevant artwork. */
.join-page .join-section{padding-block:46px}
.join-page .join-hero{min-height:640px;padding-bottom:64px}
.join-page.join-rtl .join-hero-copy>p{font-size:14px;line-height:1.95;max-width:540px;margin-top:20px;margin-bottom:22px}
.join-page .join-hero-scroll{font-size:12px;bottom:20px}
.join-page.join-rtl .join-direction-list h3{font-size:23px;line-height:1.7;font-weight:400}
.join-page .join-direction-list article{grid-template-columns:.8fr 1.2fr;gap:40px;align-items:start;padding-block:24px;border:0}
.join-page.join-rtl :is(.join-direction-list p,.join-value-list p,.join-level-grid li,.join-step-grid p){font-size:13px;line-height:1.95}
.join-page .join-tags{margin-top:14px}
.join-page .join-project{min-height:0;gap:40px;margin-bottom:28px;grid-template-columns:1fr 1fr}
.join-page .join-project-art{display:grid;place-items:center;align-content:center;gap:20px;aspect-ratio:1.8;min-height:200px;border-radius:16px;background:radial-gradient(ellipse at 50% 48%,#7f97c31a,transparent 66%),#ffffff03}
.join-page .join-work-icon{width:clamp(80px,8vw,120px);height:clamp(80px,8vw,120px);object-fit:contain;filter:drop-shadow(0 14px 24px #83b8ff33);transition:transform .4s}
.join-page .join-project:hover .join-work-icon{transform:translateY(-5px)}
.join-page .join-work-label{font:11px/1.5 Arial,sans-serif;letter-spacing:.12em;color:#99a3b1}
.join-page .join-project h3{font-size:26px;line-height:1.7;font-weight:400}
.join-page .join-project p{font-size:13px;line-height:1.9;margin:12px 0 18px}
.join-page .join-value-list article{grid-template-columns:26px .85fr 1.15fr;gap:24px;padding-block:22px;border:0}
.join-page .join-value-list h3{font-size:20px!important;line-height:1.8!important;font-weight:400}
.join-page .join-seat{margin-top:28px;gap:32px;padding-block:26px}
.join-page .join-level-grid{gap:28px}
.join-page .join-level-grid article{padding-top:18px;border:0}
.join-page .join-level-number{font-size:42px}
.join-page .join-level-grid h3{font-size:20px!important;line-height:1.7;margin:14px 0 10px}
.join-page .join-step-grid{gap:24px}
.join-page .join-step-grid h3{font-size:18px;line-height:1.8}
.join-page .join-contact-layout{gap:44px;margin-top:32px}
.join-page .join-contact-layout>div>p{font-size:14px;line-height:1.9}
.join-page .join-faq summary{font-size:14px;padding-block:18px;line-height:1.8}
.join-page.join-rtl .join-faq details>div{font-size:13px;line-height:1.95}
.join-page .join-footer{padding:40px 5% 24px}
.join-page .join-footer>p{font-size:clamp(22px,2.5vw,34px);line-height:1.8;margin:0 auto 20px;max-width:900px;text-align:center}
.join-page .join-footer-bottom{margin-top:28px;padding-top:18px;gap:22px;font-size:12px;flex-wrap:wrap}
.join-page .join-policy,.join-page.join-rtl .join-policy,.join-page.join-rtl .join-policy>p{font-size:12px;line-height:1.9}
@media(max-width:1000px){.site-footer .footer-top{grid-template-columns:1fr 1fr;gap:28px}.site-footer .back-top{grid-column:2;justify-self:end}.site-header .brand-word{font-size:17px!important}.about-portfolio .portfolio-hero{gap:20px}.about-portfolio .portfolio-portrait{height:360px}}
@media(max-width:720px){
 .catalog-controls{flex-wrap:wrap}.catalog-controls .search-field{max-width:none;flex:1 1 100%;width:100%}.catalog-controls .sort-field{flex:0 1 auto}.catalog-controls .result-count{margin-inline-start:auto}
 .catalog-grid:is(.apps,.course) .card-body{padding:16px}.catalog-grid.course .course-art{aspect-ratio:2}
 .site-footer .footer-top{grid-template-columns:1fr 1fr;gap:24px;padding-block:28px!important}.site-footer .footer-brand{grid-column:1/-1}.site-footer .footer-brand p{max-width:none}.site-footer .footer-links{grid-template-columns:1fr;gap:7px}.site-footer .footer-links a{font-size:12px!important}.site-footer .back-top{grid-column:1/-1;justify-self:end}.site-footer .footer-bottom{flex-direction:column;align-items:flex-start;gap:8px}
 .about-portfolio .portfolio-hero{grid-template-columns:1fr;padding:116px 22px 32px;min-height:0;gap:22px}
 .about-portfolio .portfolio-title-wrap{grid-row:1;grid-column:1;max-width:none;text-align:center}
 .about-portfolio .portfolio-title-wrap h1{font-size:clamp(34px,8vw,48px);line-height:1.2}
 .about-portfolio:lang(ug) .portfolio-title-wrap h1{font-size:clamp(27px,7vw,36px);line-height:1.65}
 .about-portfolio .portfolio-portrait{grid-column:1;grid-row:2;height:280px;width:100%;max-width:330px}
 .about-portfolio .portfolio-hero-bottom{grid-column:1;grid-row:3;justify-content:center;text-align:center;gap:16px}
 .about-portfolio .portfolio-scroll{grid-row:4;margin-top:0}
 .about-portfolio :is(.portfolio-story,.portfolio-services,.portfolio-projects,.portfolio-contact-section){padding:36px 22px}
 .about-portfolio .portfolio-story-main{grid-template-columns:1fr;gap:22px;padding:22px 0}
 .about-portfolio .portfolio-stats{justify-content:space-between;gap:12px}.about-portfolio .portfolio-stats span{font-size:10px;letter-spacing:0}
 .about-portfolio .portfolio-service-list article{grid-template-columns:30px 1fr 20px;gap:10px}.about-portfolio .portfolio-service-list p{grid-column:2;grid-row:2}.about-portfolio .portfolio-service-list h3{font-size:18px}
 .about-portfolio .portfolio-contact-section{display:flex;flex-direction:column;align-items:flex-start;gap:20px}
 .about-portfolio .portfolio-project>img{aspect-ratio:1.6}.about-portfolio .portfolio-footer{padding:22px;font-size:11px}
 .join-page .join-section{padding-block:32px}.join-page .join-direction-list article{grid-template-columns:1fr;gap:12px}.join-page.join-rtl .join-direction-list h3{font-size:21px}
 .join-page .join-project{grid-template-columns:1fr;gap:20px;margin-bottom:32px}.join-page .join-project-art{order:0;min-height:190px}.join-page .join-project h3{font-size:22px}
 .join-page .join-value-list article{grid-template-columns:24px 1fr;gap:10px 16px}.join-page .join-value-list article>p{grid-column:2}
 .join-page .join-level-grid{grid-template-columns:1fr;gap:26px}.join-page .join-level-grid article{padding-top:0}.join-page .join-level-grid ul{margin-block:8px}
 .join-page .join-contact-layout{gap:28px;margin-top:26px}.join-page .join-footer-bottom{gap:14px;font-size:11px}
}

/* Explicit locale heading rules take precedence over the retained generic h2 scale. */
html[data-site-lang] .site-footer .footer-links h2{font-size:13px!important;font-weight:500!important;line-height:1.7!important}
html[data-site-lang=ug] .cz-resource-hero h1{font-size:26px!important;line-height:1.65!important}
html[data-site-lang=ug] .cz-resource-hero p{font-size:13px!important;line-height:1.95!important}
#mkx-nav{top:18px!important;left:24px!important;right:24px!important;width:auto!important;max-width:1600px!important;margin-inline:auto!important;min-height:62px!important;border:0!important;border-radius:16px!important;background:#080d14b3!important;backdrop-filter:blur(24px)!important;box-shadow:0 0 0 1px #ffffff08!important;padding:12px 22px!important}
#mkx-nav .mkx-brand{gap:10px!important;direction:ltr}
#mkx-nav .mkx-mark{display:block;position:relative;width:23px!important;height:23px!important;border:2px solid #e9e5f7;border-radius:50%;overflow:visible;background:transparent!important;flex-shrink:0}
#mkx-nav .mkx-mark:after{content:'';position:absolute;inset-inline-end:-5px;top:7px;width:6px;height:6px;border-radius:50%;background:#ddd5f1}
#mkx-nav .mkx-mark{width:27px!important;height:27px!important;border-radius:10px!important;transform:rotate(-12deg)}
#mkx-nav .mkx-mark:before{content:'';position:absolute;inset:5px;border:1px solid #ffffffa0;border-radius:50%}
#mkx-nav .mkx-brand-txt{font-size:21px!important;font-weight:700!important;letter-spacing:0!important}
.mkx-fullscreen{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;border:0;border-radius:11px;background:#ffffff08;color:#ddd;cursor:pointer;transition:background .18s,transform .18s}
.mkx-fullscreen:hover{background:#ffffff14;transform:translateY(-1px)}
.mkx-fullscreen:focus-visible{outline:2px solid #ddd;outline-offset:3px}
.cz-fullscreen-toggle{width:36px!important;height:36px!important;min-width:36px!important;display:grid;place-items:center;border:0!important;border-radius:11px!important;background:#ffffff08!important;color:#ddd!important}
.cz-fullscreen-toggle:hover{background:#ffffff14!important}
#mkx-nav .mkx-div{display:none!important}
#mkx-nav .mkx-links a{font-size:12px!important;line-height:1.8!important;font-weight:400!important}
#mkx-nav .mkx-right{gap:10px}
.join-page .join-project .join-project-art{background:radial-gradient(ellipse at 50% 48%,#7f97c318,transparent 66%),#ffffff03;border-radius:14px}
.catalog-grid:is(.apps,.tools) .catalog-card{border:0!important;border-radius:22px!important;background:#ffffff06!important;overflow:hidden;box-shadow:0 12px 32px #0002;backdrop-filter:blur(22px)}
.catalog-grid.apps .software-art{background:radial-gradient(ellipse at 50% 54%,#ffffff0c,transparent 68%),#111!important;border:0!important}
.catalog-grid.apps .software-art:before,.catalog-grid.apps .art-cross,.catalog-grid.apps .art-type,.catalog-grid.apps .art-version{display:none!important}
.catalog-grid.apps .software-art img{width:88px;height:88px;filter:drop-shadow(0 12px 24px #0008)}
.catalog-grid:is(.apps,.tools) .card-link{border-radius:12px!important;background:#ffffff0a!important;color:#ddd!important}
@media(min-width:901px){.join-page .join-manifesto{height:110svh}.join-page .join-manifesto-stage{height:78svh}.join-page .join-manifesto-words{inset:18% 12%}}
@media(max-width:720px){#mkx-nav{top:12px!important;left:14px!important;right:14px!important;min-height:54px!important;padding:10px 14px!important}#mkx-nav .mkx-brand-txt{font-size:16px!important}#mkx-nav .mkx-links{display:none!important}}

/* Keep retained SSR footer invisible until the shared component hydrates. */
html.cz-retained footer:not(.cz-shared-footer){visibility:hidden}
html.cz-retained #mkx-nav{top:18px!important;left:24px!important;right:24px!important;max-width:1600px!important;width:auto!important;transform:none!important}
@media(max-width:720px){html.cz-retained #mkx-nav{top:12px!important;left:14px!important;right:14px!important}}

/* Retained React routes use compact action grids and intrinsic button sizing. */
html.cz-retained.cz-route-member [aria-label="تىل تاللاش"],html.cz-retained.cz-route-member [aria-label="Change language"],html.cz-retained.cz-route-member [aria-label="切换语言"]{min-width:0!important;width:auto!important;height:36px!important;padding-inline:9px!important;flex:0 0 auto!important}
html.cz-retained.cz-route-member [aria-label="تىل تاللاش"] svg~span,html.cz-retained.cz-route-member [aria-label="Change language"] svg~span{white-space:nowrap!important;font-size:12px!important;line-height:1.6!important}
html.cz-retained.cz-route-member .adm-surface{font-size:14px}
html.cz-retained.cz-route-tools-list footer,html.cz-retained.cz-route-tools-list{visibility:visible}
/* Later retained locale rules otherwise upscale Arabic text and override the compact footer. */
html.cz-retained[data-site-lang=ug] footer .footer-links h4,
html.cz-retained[data-site-lang=ug] footer .footer-links h2{font-size:13px!important;line-height:1.8!important}
html.cz-retained[data-site-lang=ug] footer a,
html.cz-retained[data-site-lang=ug] footer p{font-size:12px!important;line-height:1.9!important}
html.cz-retained .cz-resource-card p{font-size:inherit!important}
html.cz-retained[data-site-lang=ug] .cz-resource-card>div:nth-child(2)>p:first-child{font-size:14px!important;line-height:1.75!important}
html.cz-retained[data-site-lang=ug] .cz-resource-card>div:nth-child(2)>p:nth-child(2){font-size:12px!important;line-height:1.8!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div:has(>button[aria-expanded]){flex-wrap:wrap!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div:has(>button[aria-expanded])>button[aria-expanded]{min-width:0!important;flex:1 1 140px!important;width:auto!important;height:38px!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div:has(>button[aria-expanded])>button[aria-expanded] span{font-size:12px!important;line-height:1.7!important;white-space:nowrap!important}
@media(max-width:720px){html.cz-retained #mkx-nav{left:14px!important;right:14px!important;width:auto!important;max-width:none!important}.site-footer .footer-top{grid-template-columns:1fr 1fr}}
/* Final retained overrides follow the runtime locale normalization. */
html.cz-retained[data-site-lang] #mkx-nav{left:24px!important;right:24px!important;width:auto!important;max-width:1600px!important;transform:none!important}
html.cz-retained #mkx-nav .mkx-brand-txt{font-size:19px!important;letter-spacing:-.05em!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div.mt-4{display:flex!important;flex-wrap:wrap!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div.mt-4>button{min-width:0!important;flex:1 1 108px!important;padding-inline:9px!important;white-space:normal!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div.mt-4>div{min-width:0!important;flex:1 1 125px!important}
html.cz-retained.cz-route-member main section:first-of-type>div>div>div>div.mt-4>div>div>button{height:38px!important;padding-inline:9px!important}
@media(max-width:720px){html.cz-retained[data-site-lang] #mkx-nav{left:14px!important;right:14px!important;width:auto!important;max-width:none!important}.site-footer .footer-top{grid-template-columns:1fr 1fr}}
/* Retained page typography keeps Uyghur compact without reducing useful body copy. */
html.cz-retained[data-site-lang=ug] main h1{font-size:clamp(26px,3.3vw,42px)!important;line-height:1.75!important;letter-spacing:0!important;font-weight:400!important}
html.cz-retained[data-site-lang=ug] main h2{font-size:clamp(20px,2.4vw,30px)!important;line-height:1.8!important;letter-spacing:0!important;font-weight:400!important}
html.cz-retained[data-site-lang=ug] main h3{font-size:clamp(16px,1.5vw,20px)!important;line-height:1.8!important;letter-spacing:0!important;font-weight:400!important}
html.cz-retained[data-site-lang=ug] main p:not([class*="font-mono"]):not([class*="tabular"]):not([class*="text-[19px"]):not([class*="text-[2"]):not([class*="text-[3"]){font-size:13.5px!important;line-height:1.95!important}
html.cz-retained[data-site-lang=ug] main :is(p,span,b,strong,div)[class*="font-mono"]{font-family:"Alkatip Basma Tom",Inter,sans-serif!important;font-variant-numeric:tabular-nums!important;letter-spacing:0!important}
html.cz-retained[data-site-lang=ug] main :is(span,b,strong)[class*="text-[1"]{font-size:max(13.5px,1em)!important;line-height:1.7!important}
html.cz-retained #mkx-nav{padding-inline:20px!important;box-sizing:border-box!important}
/* Music generator quick actions use intrinsic wrapped text, never fixed-width overflow. */
html.cz-workspace.cz-route-music main .grid.grid-cols-2.gap-2 button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:48px!important;height:auto!important;padding:8px 10px!important;white-space:normal!important;text-align:center!important;line-height:1.65!important;font-size:11px!important}
html.cz-workspace.cz-route-music main .grid.grid-cols-3.h-9{height:auto!important;min-height:42px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
html.cz-workspace.cz-route-music main .grid.grid-cols-3.h-9 button{height:auto!important;min-height:32px!important;padding:5px 6px!important;white-space:normal!important;line-height:1.6!important;font-size:10px!important;border:0!important}
html.cz-workspace.cz-route-music main button.truncate{height:auto!important;min-height:36px!important;padding-block:8px!important;display:flex!important;align-items:center;justify-content:center;line-height:1.6!important;font-size:12px!important}
html.cz-retained.cz-route-member main .fig-card button{height:auto!important;min-height:34px!important;min-width:56px!important;padding:6px 12px!important;font-size:11px!important;line-height:1.7!important}
@media(max-width:720px){html.cz-retained #mkx-nav .mkx-admin{display:none!important}html.cz-retained #mkx-nav .mkx-right{gap:6px!important;min-width:0!important}html.cz-retained #mkx-nav .mkx-cta{max-width:88px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:10px!important}}
html.cz-retained.cz-route-member main .cz-member-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important;min-width:0}
html.cz-retained.cz-route-member main .cz-member-actions>button,html.cz-retained.cz-route-member main .cz-member-actions>div{min-width:0!important;flex:1 1 120px!important}
html.cz-retained.cz-route-member main .cz-member-actions>div button{width:auto!important;height:38px!important;min-width:0!important;max-width:100%;padding-inline:10px!important}
html.cz-retained.cz-route-member main .cz-member-actions>div button span{white-space:nowrap!important;line-height:1.7!important;font-size:12px!important}
@media(max-width:720px){html.cz-retained.cz-route-member main .cz-member-overview{grid-template-columns:minmax(0,1fr)!important}html.cz-retained.cz-route-member main .cz-member-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:720px){html.cz-retained.cz-route-member main .cz-member-overview>*{grid-column:auto!important;min-width:0!important}html.cz-retained.cz-route-member main .cz-member-overview .fig-card button{min-width:56px!important;width:auto!important;padding-inline:10px!important}}

/* Compact course library: four deliberate columns on desktop. */
html .catalog-section>.catalog-grid.course,html .catalog-grid.course{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;align-items:stretch}
html .catalog-grid.course .catalog-card{border:0!important;border-radius:22px;background:#ffffff06;overflow:hidden;box-shadow:0 12px 32px #0002;backdrop-filter:blur(22px)}
html .catalog-grid.course .course-art{aspect-ratio:16/10;height:auto;overflow:hidden;background:#ffffff04}
html .catalog-grid.course .course-art img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
html .catalog-grid.course .catalog-card:hover .course-art img{transform:scale(1.035)}
html .catalog-grid.course .card-body{padding:18px}
html .catalog-grid.course h3{font-size:14px!important;line-height:1.65!important}
html .catalog-grid.course .card-desc{font-size:12px!important}
html .catalog-grid.course .price{font-size:18px}
html .catalog-grid.course .card-link{min-height:34px;font-size:11px!important;padding:6px 12px!important;border:0!important;background:#ffffff09;border-radius:999px}
@media(max-width:1100px){html .catalog-section>.catalog-grid.course,html .catalog-grid.course{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:820px){html .catalog-section>.catalog-grid.course,html .catalog-grid.course{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){html .catalog-section>.catalog-grid.course,html .catalog-grid.course{grid-template-columns:minmax(0,1fr)}}

/* Compact portal controls and cards; scrolling remains available when content needs it. */
html .site-header .cz-fullscreen-toggle {width:30px!important;height:30px!important;min-height:30px!important;padding:6px!important;border-radius:9px!important}
html .site-header .cz-fullscreen-toggle svg{width:15px;height:15px}
html .language-trigger{min-height:30px!important;padding:5px 9px!important;font-size:11px!important;gap:6px!important;border:0!important;background:#ffffff09!important;border-radius:10px!important}
html .language-popover {width:176px!important;padding:5px!important;border:1px solid #ffffff1a!important;border-radius:13px!important;background:#0e131ad6!important;backdrop-filter:blur(30px) saturate(150%)!important;-webkit-backdrop-filter:blur(30px) saturate(150%)!important;box-shadow:0 18px 44px #000000a6!important}
html .language-popover>button {display:flex!important;align-items:center!important;width:100%!important;min-height:33px!important;padding:5px 8px!important;gap:8px!important;border:0!important;border-radius:7px!important;background:transparent!important;box-shadow:none!important;font-size:12.5px!important;line-height:1.5!important;white-space:nowrap}
html .language-popover>button[aria-checked=true]{background:#ffffff0d!important}
html .language-code{font-size:12px!important;opacity:.65;min-width:26px}
html .language-caption{display:none!important}
html .catalog-section:has(.catalog-grid.tools){padding-top:24px!important;padding-bottom:24px!important;min-height:0!important}
html .catalog-grid.tools .tool-card {min-height:0!important;height:auto!important;border-radius:24px!important}
html .catalog-grid.tools .tool-card-link{min-height:280px!important;padding:24px 22px 20px!important}
html .catalog-grid.tools .tool-card-art{height:92px!important;min-height:92px!important;margin-bottom:14px!important}
html .catalog-grid.tools .tool-card-art img{max-width:76px!important;max-height:76px!important}
html .catalog-grid.tools .tool-card-title{font-size:16px!important;line-height:1.5!important;margin-block:4px 8px!important}
html .catalog-grid.tools .tool-card-description{font-size:13px!important;line-height:1.75!important;min-height:44px!important}
html .catalog-grid.tools .tool-card-cta{min-height:36px!important;margin-top:20px!important;padding:6px 14px!important;font-size:12.5px!important}
html .catalog-section:has(.catalog-grid.tools) .catalog-note{display:none!important}
html[lang=ug] .catalog-grid.tools .tool-card-title{font-size:15.5px!important;font-weight:400!important;line-height:1.8!important}
html[lang=ug] .catalog-grid.tools .tool-card-description{font-size:13px!important;line-height:1.85!important}
html[lang=ug] :is(.card-link,.button,.language-trigger){font-size:12.5px!important;white-space:nowrap}
html .catalog-card {border-radius:22px!important}
@media(min-width:1100px) and (min-height:760px){html .catalog-section:has(.catalog-grid.tools){padding-top:12px!important}html .catalog-grid.tools{row-gap:18px!important}}
@media(max-width:700px){html .catalog-grid.tools .tool-card-link{min-height:260px!important;padding:20px 16px!important}html .catalog-grid.tools .tool-card-title{font-size:15px!important}}

html .catalog-section:has(.catalog-grid.tools){padding-top:122px!important}
@media(max-width:700px){html .catalog-section:has(.catalog-grid.tools){padding-top:102px!important}}

/* Fine, text-sized controls with stable touch targets. */
html.cz-route-script .cz-script-operation{position:fixed;inset-block-end:24px;inset-inline-start:24px;z-index:60;max-inline-size:min(420px,calc(100% - 48px));pointer-events:none;color:#eee}
html.cz-route-script .cz-script-conflict{display:grid;gap:12px;padding-block:12px;border-block:1px solid #ffffff20;color:#ddd;font-size:14px}
html.cz-route-script .cz-script-utility-button{width:fit-content;min-height:36px;padding:6px 12px;border:1px solid #ffffff30;border-radius:8px;background:#202020;color:#eee;font-size:13px}
html.cz-route-script .cz-script-utility-button:hover:not(:disabled){background:#303030}
html.cz-route-script .cz-script-utility-button:focus-visible{outline:2px solid #a4ceff;outline-offset:3px}
html.cz-route-script .cz-script-utility-button:disabled{opacity:.65}
html.cz-route-script .cz-script-compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html.cz-route-script .cz-script-compare-column{display:grid;gap:6px;min-inline-size:0}
html.cz-route-script .cz-script-compare-column textarea{width:100%;resize:vertical;padding:10px;border:1px solid #ffffff25;border-radius:8px;background:#151515;color:#eee}
html.cz-route-script .cz-script-operation-content{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:8px 12px;padding:12px 16px;border:1px solid #ffffff20;border-radius:8px;background:#1b1b1b;box-shadow:0 8px 32px #0007;animation:cz-script-arrive 180ms ease-out}
html.cz-route-script .cz-script-operation-icon{display:grid;place-items:center;color:#ddd;font-weight:700}
html.cz-route-script .cz-script-operation[data-state=waiting] svg{animation:cz-script-spin 900ms linear infinite}
html.cz-route-script .cz-script-operation[data-state=success] .cz-script-operation-icon{color:#8fceb0}
html.cz-route-script .cz-script-operation[data-state=error] .cz-script-operation-icon{color:#ffb3ba}
html.cz-route-script .cz-script-operation-track{grid-column:2;height:2px;background:#ffffff17;overflow:hidden;border-radius:4px}
html.cz-route-script .cz-script-operation-track::after{content:"";display:block;width:36%;height:100%;border-radius:inherit;background:#bbb;animation:cz-script-track 1.35s ease-in-out infinite alternate}
html.cz-route-script .cz-script-step[aria-current=step]{border-color:#ffffff70!important;background:#292929!important}
html.cz-route-script .cz-script-step:focus-visible{outline:2px solid #b1c6e0!important;outline-offset:2px}
html.cz-route-script .cz-script-step{white-space:normal!important;min-height:60px;height:auto!important;align-items:flex-start;text-align:start}
html.cz-route-script .cz-script-step span{overflow-wrap:anywhere}
html.cz-route-script .cz-script-shot-header{flex-wrap:wrap;padding:8px 12px}
html.cz-route-script .cz-script-shot-header button{flex:none;max-inline-size:100%;white-space:normal!important}
html.cz-route-script .director-shot-meta{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto auto;align-items:start;gap:8px 16px;padding:10px 12px;border-block-end:1px solid #ffffff14;font-size:13px;line-height:1.5}
html.cz-route-script .director-shot-meta>span{min-inline-size:0;overflow-wrap:anywhere}
html.cz-route-script .director-shot-type{font-weight:650;color:#ededed}
html.cz-route-script .director-shot-camera{color:#c4c4c4;text-align:start}
html.cz-route-script .director-shot-characters,html.cz-route-script .director-shot-duration{color:#bbb;background:#ffffff0d;padding:2px 6px;border-radius:4px}
html.cz-route-script .cz-script-review-stat{border-color:#ffffff20!important;background:#212121!important}
html.cz-route-canvas .cz-canvas-editor-actions input.cz-canvas-editor-title{width:clamp(14rem,20vw,25rem)!important;max-width:100%;text-overflow:ellipsis}
html.cz-route-script #cz-hist-btn,html.cz-route-script #cz-tpl-trigger{inset-block-end:auto;inset-block-start:64px}
@media(min-width:1024px){
  html.cz-route-script .cz-script-workflow-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  html.cz-route-script #cz-hist-btn{inset-block-start:auto;inset-block-end:24px}
}
@keyframes cz-script-spin{to{transform:rotate(360deg)}}
@keyframes cz-script-arrive{from{transform:translateY(5px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes cz-script-track{to{transform:translateX(175%)}}
@media(prefers-reduced-motion:reduce){html.cz-route-script .cz-script-operation-content,html.cz-route-script .cz-script-operation-icon svg,html.cz-route-script .cz-script-operation-track::after{animation:none!important}}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer textarea{font-size:13px!important;line-height:21px!important;padding-block:4px!important;min-height:29px!important;caret-color:#ddd}
.gemini-shell .cz-chat-attachment-anchor{position:relative!important;min-inline-size:32px!important;overflow:visible!important}
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu{
  box-sizing:border-box;position:absolute!important;z-index:80;left:0!important;right:auto!important;top:calc(100% + 8px)!important;
  inline-size:min(272px,calc(100vw - 24px))!important;min-inline-size:0!important;max-inline-size:calc(100vw - 24px)!important;
  display:grid!important;gap:3px;padding:5px;border:1px solid #ffffff20;border-radius:12px;
  background:#1c1d21;color:#e2e4e9;box-shadow:0 12px 32px #0008;white-space:normal!important;
  animation:cz-chat-attachment-in 150ms cubic-bezier(.2,.7,.2,1) both;
}
html[data-site-lang="ug"].cz-route-chat .gemini-shell .cz-chat-attachment-menu{direction:rtl}
html[data-site-lang="ug"].cz-route-chat .gemini-shell #cz-chat-attachments>button{font-size:13px!important}
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu[data-above=true]{top:auto!important;bottom:calc(100% + 8px)!important;animation-name:cz-chat-attachment-in-up}
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu>button{
  box-sizing:border-box;display:flex!important;inline-size:100%!important;min-height:42px!important;gap:10px;padding:7px 9px!important;
  align-items:center;justify-content:flex-start!important;text-align:start;white-space:normal!important;
  border:1px solid transparent!important;border-radius:8px!important;background:transparent!important;color:inherit!important;
  font-family:"Alkatip Basma Tom",Inter,sans-serif!important;
  font-size:13px!important;font-weight:500!important;line-height:1.45!important;
  transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease;
}
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu>button:hover{background:#ffffff0c!important;border-color:#ffffff0d!important;color:#fff!important}
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu>button:focus-visible{outline:2px solid #8ab4f8!important;outline-offset:1px}
.cz-chat-attachment-menu>button svg{flex:none;color:#b9c1ce}
.cz-chat-attachment-menu>button span{min-inline-size:0;overflow-wrap:anywhere;font-size:inherit!important;line-height:1.45}
@keyframes cz-chat-attachment-in{from{opacity:0;transform:translateY(-4px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes cz-chat-attachment-in-up{from{opacity:0;transform:translateY(4px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){html.cz-route-chat .gemini-shell .cz-chat-attachment-menu{animation:none!important;transition:none!important}}
html.cz-route-chat .gemini-shell .cz-chat-history-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px;min-height:38px;height:auto!important;padding:4px 5px;align-items:center}
html.cz-route-chat .gemini-shell .cz-chat-history-row>div:only-child{grid-column:1/-1}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-open{min-width:0;text-align:start!important;padding:3px 4px!important;line-height:1.4!important}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-label{display:grid!important;justify-items:start;min-width:0;gap:1px}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-title{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-charge{display:block!important;width:max-content!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;line-height:1.3!important}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-actions{position:static!important;transform:none!important;display:flex!important;align-items:center;gap:1px;opacity:1!important;pointer-events:auto!important}
html.cz-route-chat .gemini-shell .cz-chat-history-row .cz-history-actions button{display:grid!important;place-items:center;width:22px!important;height:24px!important;padding:0!important}
.cz-chat-file{max-inline-size:100%;min-inline-size:0}
.cz-chat-sent-files{display:flex;list-style:none;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-inline-size:85%;margin:0;padding:0}
.cz-chat-sent-files>li{display:flex;align-items:center;gap:7px;max-inline-size:100%;min-inline-size:0;padding:6px 9px;border:1px solid #ffffff1a;border-radius:8px;background:#1b1b1b;color:#d6d6d6;font-size:13px}
.cz-chat-sent-files bdi{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cz-chat-sent-files svg{flex:none}
html.cz-route-chat .gemini-shell .cz-chat-waiting{padding:9px 13px;border:1px solid #ffffff20;background:#191919;border-radius:12px;color:#ddd}
html.cz-route-chat .gemini-shell .cz-chat-waiting-dots{display:inline-flex;align-items:center;gap:4px;padding-inline-end:4px}
html.cz-route-chat .gemini-shell .cz-chat-waiting-dots>span{display:block;width:7px;height:7px;border-radius:50%;background:#3f8bff;box-shadow:0 0 8px rgba(63,139,255,.45);animation:cz-chat-dot 960ms ease-in-out infinite!important}
html.cz-route-chat .gemini-shell .cz-chat-waiting-dots>span:nth-child(2){animation-delay:120ms!important;background:#7aadff}
html.cz-route-chat .gemini-shell .cz-chat-waiting-dots>span:nth-child(3){animation-delay:240ms!important;background:#a8c7fa}
@keyframes cz-chat-dot{0%,65%,100%{opacity:.42;transform:translateY(0)}32%{opacity:1;transform:translateY(-4px)}}
@keyframes cz-chat-dot-soft{0%,100%{opacity:.45}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){html.cz-route-chat .gemini-shell .cz-chat-waiting-dots>span{animation:cz-chat-dot-soft 1.5s ease-in-out infinite!important}}
@media (min-width:1024px) and (hover:hover) and (pointer:fine){
  html.cz-workspace #cz-tool-toolbar[data-cz-compact]{transition:translate 180ms ease,opacity 170ms ease}
  html.cz-workspace #cz-tool-toolbar[data-cz-compact=true]:not(:focus-within){translate:0 -100%;opacity:0;pointer-events:none}
  html.cz-workspace .cz-toolbar-reveal{position:fixed;z-index:95;inset:0 0 auto 0;height:8px;pointer-events:none}
  html.cz-workspace .cz-toolbar-reveal[data-cz-visible=true]{pointer-events:auto}
}
@media (prefers-reduced-motion:reduce){html.cz-workspace #cz-tool-toolbar[data-cz-compact]{transition:none!important}}
@media (min-width: 1024px) {
  html.cz-workspace:is(.cz-route-image,.cz-route-video,.cz-route-music,.cz-route-design,.cz-route-script,.cz-route-canvas) {
    --cz-desktop-canvas: #0d0d0d;
    --cz-desktop-panel: #171717;
    --cz-desktop-edge: #ffffff19;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video,.cz-route-music,.cz-route-design,.cz-route-script,.cz-route-canvas) main .studio-blueprint-bg {
    background-color: var(--cz-desktop-canvas) !important;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video,.cz-route-music,.cz-route-script) main .studio-blueprint-bg {
    background-image: none !important;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video,.cz-route-music,.cz-route-design,.cz-route-script,.cz-route-canvas) #cz-tool-toolbar {
    background-color: var(--cz-desktop-panel) !important;
    border-block-end: 1px solid var(--cz-desktop-edge) !important;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video,.cz-route-music,.cz-route-design) main aside {
    background-color: var(--cz-desktop-panel) !important;
    border-color: var(--cz-desktop-edge) !important;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video) main aside {
    width: 320px !important;
    flex: 0 0 320px !important;
  }
  html.cz-workspace:is(.cz-route-image,.cz-route-video) main div.rounded-\[24px\]:has(> textarea) {
    background-color: var(--cz-desktop-panel) !important;
    box-shadow: none !important;
    border-color: var(--cz-desktop-edge) !important;
  }
  html.cz-route-image main #cz-image-panel {
    flex: 0 0 auto;
    align-self: center;
    width: min(100%, 760px);
    min-width: 0;
  }
  html.cz-route-image main #cz-image-panel :is(.cz-starter-row,.cz-preset-row) {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  html.cz-route-image main #cz-image-panel button.cz-starter-chip {
    padding: 5px 10px !important;
    min-height: 30px !important;
    background: #1c1c1c !important;
    border: 1px solid #ffffff1c !important;
    color: #dedede !important;
    border-radius: 999px !important;
    white-space: normal;
  }
  html.cz-route-image main #cz-image-panel button.cz-starter-chip:hover {
    background: #292929 !important;
  }
  html.cz-route-image main #cz-image-panel .cz-preset-label {
    flex: 0 0 6rem;
    color: #adadad;
  }
  html.cz-route-music main aside > .overflow-y-auto {
    min-width: 0;
    overflow-x: hidden;
  }
  html.cz-route-music main aside > .overflow-y-auto.flex-col {
    flex-wrap: nowrap !important;
    align-items: stretch;
  }
  html.cz-route-music main aside .grid.grid-cols-2.gap-1\.5:has(> button:nth-child(8)):has(+ textarea) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible !important;
  }
  html.cz-route-music main aside .grid.grid-cols-2.gap-1\.5:has(> button:nth-child(8)):has(+ textarea) > button {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html.cz-route-music main aside .flex-wrap > button {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html.cz-route-script main .czse-production-intro > img {
    display: block;
    width: 100%;
    max-width: none;
    height: clamp(150px, 24vh, 240px) !important;
    object-fit: cover;
    object-position: center 38%;
    border-radius: 8px;
  }
  html.cz-route-canvas #cz-template-rail {
    background: var(--cz-desktop-panel) !important;
    border-color: var(--cz-desktop-edge) !important;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)) !important;
    gap: 12px !important;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-card {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    text-align: start;
    background: #222 !important;
    border: 1px solid var(--cz-desktop-edge) !important;
    border-radius: 8px !important;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-card > .cz-template-cover {
    display: block;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-cover img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-card .cz-template-body {
    display: grid !important;
    align-content: start;
    gap: 4px;
    padding: 8px 10px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  html.cz-route-canvas #cz-template-rail .cz-template-card:focus-visible {
    outline: 2px solid #dedede !important;
    outline-offset: 2px;
  }
}

/* Keep the chat toolbar readable and visually consistent across locales. */
html.cz-route-chat.cz-workspace #cz-tool-toolbar {
  --cz-chat-control: #202126;
  --cz-chat-control-hover: #2a2d34;
  --cz-chat-control-active: #30343c;
  --cz-chat-control-edge: #ffffff18;
  --cz-chat-control-copy: #d7d9df;
  --cz-chat-control-accent: #8ab4f8;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(.cz-toolbar-back,.cz-toolbar-language,.cz-balance-pill,.cz-toolbar-locale > button:not(.cz-toolbar-language)) {
  box-sizing: border-box !important;
  min-height: 34px !important;
  border: 1px solid var(--cz-chat-control-edge) !important;
  border-radius: 10px !important;
  background: var(--cz-chat-control) !important;
  box-shadow: none !important;
  color: var(--cz-chat-control-copy) !important;
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-back {
  min-width: 64px !important;
  padding-inline: 12px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale {
  gap: 6px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-language {
  gap: 7px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > button:not(.cz-toolbar-language) {
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-language {
  width: auto !important;
  min-width: 36px !important;
  padding-inline: 10px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill {
  height: 34px !important;
  min-height: 34px !important;
  padding-inline: 11px !important;
  border-radius: 999px !important;
  direction: ltr !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill > span {
  font-family: "Alkatip Basma Tom",inherit!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill .cz-balance-num {
  color: #9bd6bd !important;
  font-variant-numeric: tabular-nums !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill .cz-balance-topup {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #34373e !important;
  color: #e1e3e8 !important;
  font-size: 12px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg {
  gap: 3px !important;
  padding: 3px !important;
  border: 1px solid #ffffff12 !important;
  border-radius: 11px !important;
  background: #1a1b1f !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item {
  box-sizing: border-box !important;
  min-height: 32px !important;
  padding: 4px 11px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #b7bac3 !important;
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item:is(.is-active,[data-cz-selected="true"]) {
  border-color: #ffffff12 !important;
  background: var(--cz-chat-control-active) !important;
  box-shadow: inset 0 -2px 0 var(--cz-chat-control-accent) !important;
  color: #f5f6f8 !important;
  font-weight: 600 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(.cz-toolbar-back,.cz-toolbar-language,.cz-balance-pill,.cz-toolbar-locale > button:not(.cz-toolbar-language)):hover:not(:disabled),
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item:hover:not(.is-active) {
  border-color: #ffffff2a !important;
  background: var(--cz-chat-control-hover) !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel {
  border-radius: 10px !important;
  border-color: #ffffff1a !important;
  background: #191a1e !important;
  box-shadow: 0 14px 34px #0009 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel :is(div,button,span) {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button {
  min-height: 36px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #d7d9df !important;
  font-weight: 500 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button[aria-current="true"] {
  border-color: #8ab4f833 !important;
  background: #29313d !important;
  box-shadow: inset 0 -2px 0 var(--cz-chat-control-accent) !important;
  color: #f5f7fb !important;
  font-weight: 600 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button:hover:not([aria-current="true"]) {
  background: #292c32 !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(a,button):focus-visible {
  outline: 2px solid var(--cz-chat-control-accent) !important;
  outline-offset: 2px !important;
}
@media (min-width: 1024px) {
  html.cz-route-chat.cz-workspace #cz-tool-toolbar {
    overflow: visible !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.cz-route-chat.cz-workspace #cz-tool-toolbar * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep the chat toolbar readable and visually consistent across locales. */
html.cz-route-chat.cz-workspace #cz-tool-toolbar {
  --cz-chat-control: #202126;
  --cz-chat-control-hover: #2a2d34;
  --cz-chat-control-active: #30343c;
  --cz-chat-control-edge: #ffffff18;
  --cz-chat-control-copy: #d7d9df;
  --cz-chat-control-accent: #8ab4f8;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(.cz-toolbar-back,.cz-toolbar-language,.cz-balance-pill,.cz-toolbar-locale > button:not(.cz-toolbar-language)) {
  box-sizing: border-box !important;
  min-height: 34px !important;
  border: 1px solid var(--cz-chat-control-edge) !important;
  border-radius: 10px !important;
  background: var(--cz-chat-control) !important;
  box-shadow: none !important;
  color: var(--cz-chat-control-copy) !important;
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-back {
  min-width: 64px !important;
  padding-inline: 12px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale {
  gap: 6px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-language {
  gap: 7px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > button:not(.cz-toolbar-language) {
  width: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-language {
  width: auto !important;
  min-width: 36px !important;
  padding-inline: 10px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill {
  height: 34px !important;
  min-height: 34px !important;
  padding-inline: 11px !important;
  border-radius: 999px !important;
  direction: ltr !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill > span {
  font-family: "Alkatip Basma Tom",inherit!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill .cz-balance-num {
  color: #9bd6bd !important;
  font-variant-numeric: tabular-nums !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill .cz-balance-topup {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: #34373e !important;
  color: #e1e3e8 !important;
  font-size: 12px !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg {
  gap: 3px !important;
  padding: 3px !important;
  border: 1px solid #ffffff12 !important;
  border-radius: 11px !important;
  background: #1a1b1f !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item {
  box-sizing: border-box !important;
  min-height: 32px !important;
  padding: 4px 11px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #b7bac3 !important;
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.35 !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item:is(.is-active,[data-cz-selected="true"]) {
  border-color: #ffffff12 !important;
  background: var(--cz-chat-control-active) !important;
  box-shadow: inset 0 -2px 0 var(--cz-chat-control-accent) !important;
  color: #f5f6f8 !important;
  font-weight: 600 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(.cz-toolbar-back,.cz-toolbar-language,.cz-balance-pill,.cz-toolbar-locale > button:not(.cz-toolbar-language)):hover:not(:disabled),
html.cz-route-chat.cz-workspace #cz-tool-toolbar .tool-seg-item:hover:not(.is-active) {
  border-color: #ffffff2a !important;
  background: var(--cz-chat-control-hover) !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel {
  border-radius: 10px !important;
  border-color: #ffffff1a !important;
  background: #191a1e !important;
  box-shadow: 0 14px 34px #0009 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel :is(div,button,span) {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button {
  min-height: 36px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #d7d9df !important;
  font-weight: 500 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button[aria-current="true"] {
  border-color: #8ab4f833 !important;
  background: #29313d !important;
  box-shadow: inset 0 -2px 0 var(--cz-chat-control-accent) !important;
  color: #f5f7fb !important;
  font-weight: 600 !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-toolbar-locale > .adm-modal-panel button:hover:not([aria-current="true"]) {
  background: #292c32 !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace #cz-tool-toolbar :is(a,button):focus-visible {
  outline: 2px solid var(--cz-chat-control-accent) !important;
  outline-offset: 2px !important;
}
@media (min-width: 1024px) {
  html.cz-route-chat.cz-workspace #cz-tool-toolbar {
    overflow: visible !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.cz-route-chat.cz-workspace #cz-tool-toolbar * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Chat sidebar, history and desktop chrome. */
html.cz-route-chat.cz-workspace .gemini-shell .gemini-sidebar {
  box-sizing: border-box;
  border-inline-end: 0 !important;
  overflow: hidden;
  transition: width 180ms ease, min-width 180ms ease, flex-basis 180ms ease !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .gemini-sidebar.cz-rail-collapsed {
  width: 64px !important;
  min-width: 64px !important;
  flex: 0 0 64px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .gemini-sidebar.cz-rail-expanded {
  width: 256px !important;
  min-width: 256px !important;
  flex: 0 0 256px !important;
  background: #141414 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions {
  display: flex !important;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 12px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions > :is(button, a) {
  box-sizing: border-box;
  display: grid !important;
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px !important;
  color: #b9bbc1;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions > :is(button, a):hover {
  background: #ffffff0b !important;
  color: #f1f2f4 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions > :is(button, a):active {
  transform: scale(.96);
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions > .cz-chat-avatar {
  width: 36px !important;
  height: 36px !important;
  flex-basis: 36px;
  margin-top: auto;
  border-radius: 50% !important;
  background: #202125 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer {
  box-sizing: border-box;
  min-width: 0;
  overflow: visible;
  border: 0 !important;
  padding: 6px 10px 10px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-storage-setting {
  min-width: 0;
  margin: 2px 0 6px;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-storage-row {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  align-items: start;
  gap: 8px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-storage-row button {
  width: 30px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin-top: 2px;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-storage-note-text {
  display: block;
  min-width: 0;
  color: #a9abb2;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-chat-recharge-button {
  box-sizing: border-box;
  min-width: 0;
  min-height: 54px;
  gap: 8px;
  padding: 7px 9px !important;
  border: 1px solid #ffffff10 !important;
  border-radius: 10px !important;
  background: #191a1d !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-chat-recharge-button > span {
  min-width: 0;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-chat-recharge-button > span:nth-child(2) {
  flex: 1 1 0%;
  text-align: start;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-chat-recharge-button > span:nth-child(2) > span:first-child {
  min-width: 0;
  flex-wrap: wrap;
  font-size: 12px !important;
  line-height: 1.4 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-sidebar-footer .cz-chat-recharge-button > span:nth-child(2) > span:last-child {
  display: block;
  margin-top: 2px;
  font-size: 11px !important;
  line-height: 1.4 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 44px !important;
  height: auto !important;
  padding: 4px 5px !important;
  border-radius: 9px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-open {
  display: flex !important;
  min-width: 0;
  min-height: 32px !important;
  align-items: center;
  overflow: hidden !important;
  padding: 2px 4px !important;
  line-height: 1.4 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  gap: 1px !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-title {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-charge {
  display: block !important;
  min-width: 0;
  max-width: 100% !important;
  overflow: hidden !important;
  color: #9b9da5;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-actions {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  padding: 0 !important;
  background: transparent !important;
  opacity: .8 !important;
  pointer-events: auto !important;
  transform: none !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row:is(:hover, :focus-within) .cz-history-actions {
  opacity: 1 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-history-row .cz-history-actions button {
  display: grid !important;
  width: 22px !important;
  height: 26px !important;
  place-items: center;
  padding: 0 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
  border: 0 !important;
  border-block-end: 0 !important;
  border-radius: 8px !important;
  background: rgba(11, 11, 11, .96) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    position: fixed !important;
    inset: 8px 12px auto !important;
    z-index: 94 !important;
    box-sizing: border-box;
    width: auto !important;
    min-height: 48px !important;
    height: auto !important;
    overflow: visible !important;
    transform: translateY(calc(-100% - 18px)) !important;
    translate: none !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
    transition: transform 180ms ease, opacity 150ms ease, visibility 0s linear 180ms !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar[data-cz-compact="false"] {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto !important;
    transition: transform 180ms ease, opacity 150ms ease, visibility 0s !important;
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal {
    position: fixed;
    inset: 0 0 auto;
    z-index: 96;
    height: 10px;
    background: transparent;
    pointer-events: none;
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal[data-cz-visible="true"] {
    pointer-events: auto;
  }
}
html.cz-route-chat.cz-workspace .gemini-main [data-message-role] {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-site-lang="ug"].cz-route-chat.cz-workspace .gemini-main [data-message-role="assistant"] .ug {
  max-width: 100%;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.85 !important;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  html.cz-route-chat.cz-workspace .gemini-shell .gemini-sidebar,
  html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-rail-actions > :is(button, a),
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    transition: none !important;
  }
}

html.cz-route-chat.cz-workspace .gemini-sidebar a[href="/tools"],
html.cz-route-chat.cz-workspace .gemini-sidebar a[href="/tools/"],
html.cz-route-chat.cz-workspace .gemini-sidebar a[href="/apps"],
html.cz-route-chat.cz-workspace .gemini-sidebar a[href="/apps/"] { display: none !important; }

/* Give the account balance room to breathe on desktop. */
@media (min-width: 1024px) {
  html.cz-route-chat.cz-workspace #cz-tool-toolbar .cz-balance-pill {
    min-width: 202px !important;
    flex: 0 0 auto !important;
    justify-content: center !important;
    gap: 8px !important;
    padding-inline: 14px !important;
  }
}

/* ===== IMAGE STUDIO PRO LAYOUT & MOBILE ZERO-OVERLAP (v20261125) ===== */
html.cz-route-image main #cz-image-panel {
  width: min(100%, 760px);
  margin: 10px auto 0;
  min-width: 0;
}
html.cz-route-image main #cz-image-panel .cz-starter-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 6px;
  align-items: center;
  padding-bottom: 2px;
}
html.cz-route-image main #cz-image-panel .cz-starter-row::-webkit-scrollbar { display: none; }
html.cz-route-image main #cz-image-panel .cz-starter-row > button.cz-starter-chip {
  flex: 0 0 auto;
  white-space: nowrap !important;
  padding: 5px 11px !important;
  min-height: 30px !important;
  font-size: 12px !important;
  background: #1a1b1e !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  color: #dedede !important;
  border-radius: 999px !important;
}
html.cz-route-image main #cz-image-panel .cz-starter-row > button.cz-preset-toggle {
  background: #232429 !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #f4f4f5 !important;
}
html.cz-route-image main #cz-image-panel .cz-preset-palette {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(24,25,28,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.cz-route-image main #cz-image-panel .cz-preset-palette[hidden] { display: none !important; }
html.cz-route-image main #cz-image-panel .cz-preset-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
html.cz-route-image main #cz-image-panel .cz-prompt-foot { display: none !important; }
html.cz-route-image .cz-img-composer-rows .cz-img-row { width: 100%; min-width: 0; }
html.cz-route-image aside button[role="switch"] { min-height: 24px !important; height: 24px !important; width: 42px !important; }
@media (max-width: 767px) {
  html.cz-route-image header#cz-tool-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    height: 52px !important;
    padding-inline: 8px !important;
    overflow: hidden !important;
  }
  html.cz-route-image header#cz-tool-toolbar > div {
    display: flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
  }
  html.cz-route-image header#cz-tool-toolbar .tool-seg,
  html.cz-route-image header#cz-tool-toolbar a[href^="/tools/"]:not(.cz-toolbar-back) { display: none !important; }
  html.cz-route-image header#cz-tool-toolbar .cz-toolbar-back { padding-inline: 8px !important; font-size: 12px !important; }
  html.cz-route-image header#cz-tool-toolbar .cz-balance-pill,
  html.cz-route-image header#cz-tool-toolbar button:has(.lucide-coins) {
    max-width: 132px !important;
    padding-inline: 8px !important;
    font-size: 11px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html.cz-route-image header#cz-tool-toolbar .cz-toolbar-language { padding-inline: 6px !important; min-width: 32px !important; }
  html.cz-route-image header#cz-tool-toolbar .cz-toolbar-language > span { display: none !important; }
  html.cz-route-image main .max-w-\[760px\] { width: 100% !important; }
  html.cz-route-image #cz-image-quote { font-size: 11px !important; }
}

/* Neutral chat palette with distinct surfaces, actions and selection states. */
html.cz-retained main,html.cz-workspace main { animation:cz-route-in .32s cubic-bezier(.2,.75,.25,1) both; }
@keyframes cz-route-in { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:none; } }
html.cz-route-leaving::after { content:""; position:fixed; inset:0; z-index:2147483646; background:#09090bf2; pointer-events:auto; animation:cz-cover-in .18s ease both; }
html.cz-route-leaving::before { content:attr(data-route-loading); position:fixed; inset:50% auto auto 50%; z-index:2147483647; max-width:calc(100vw - 40px); transform:translate(-50%,-50%); padding:13px 19px; border-radius:999px; color:#eee; background:#ffffff10; backdrop-filter:blur(18px); font-size:13px; line-height:1.7; text-align:center; unicode-bidi:plaintext; }
@keyframes cz-cover-in { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) { html.cz-retained main,html.cz-workspace main { animation:none; } html.cz-route-leaving::after { animation-duration:.01ms; } }
html.cz-workspace {
  --cz-canvas:#0b0b0b; --cz-surface:#151515; --cz-raised:#242424;
  --cz-copy:#e2e2e2; --cz-muted:#a3a3a3; --cz-control:#2a2a2a;
  --cz-selected:#444; --cz-primary:#e2e2df; --accent:#bcbcbc;
  --accent-bright:#eee; --accent-secondary:#aaa; --theme-action:#dededb;
  --ambient-base:#0b0b0b; --cz-accent:#ddd; --cz-action:#dededb;
  color-scheme:dark;
}
html.cz-workspace :is(#cz-ambient-scene,.silk-controls) { display:none!important; }
html.cz-workspace body,html.cz-workspace body main { padding:0!important; margin:0!important; }
html.cz-workspace .tool-page-in { margin-top:0!important; }
html.cz-workspace:not(.cz-route-chat) :is(body,body>div,main,header,aside,.studio-blueprint-bg) {
  background-color:var(--cz-canvas)!important; background-image:none!important; color:var(--cz-copy);
}
html.cz-workspace:not(.cz-route-chat) :is([class*="bg-[#"],[class*="bg-gradient"],[class*="bg-blue-"],[class*="bg-indigo-"],[class*="bg-purple-"],[class*="bg-emerald-"],.fig-card,.glass,.tool-seg,.tool-tabs) {
  background-color:var(--cz-surface)!important; background-image:none!important; border-color:transparent!important; box-shadow:none!important;
}
html.cz-workspace:not(.cz-route-chat) :is([class*="text-[#"],[class*="text-blue-"],[class*="text-neon-"],[class*="text-emerald-"],[class*="text-violet-"]) { color:var(--cz-copy)!important; }
html.cz-workspace:not(.cz-route-chat) :is([class*="text-[#7"],[class*="text-[#8"],[class*="text-[#9"],[class*="text-white/4"],[class*="text-white/5"]) { color:var(--cz-muted)!important; }
html.cz-workspace:not(.cz-route-chat) :is(h1,h2,h3) { color:#eee!important; font-weight:500!important; line-height:1.65!important; }
html.cz-workspace:not(.cz-route-chat) h1 { font-size:clamp(20px,2vw,28px)!important; }
html.cz-workspace:not(.cz-route-chat) h2 { font-size:18px!important; }
html.cz-workspace:not(.cz-route-chat) :is(button,a[role=button],.tool-seg-item) {
  min-width:0; max-width:100%; min-height:32px; font-size:12px!important; font-weight:400!important;
  line-height:1.6!important; white-space:normal; overflow-wrap:anywhere;
  border-color:transparent!important; box-shadow:none!important; background-image:none!important;
  transition:background-color .16s,color .16s,opacity .16s,transform .16s;
}
html.cz-workspace:not(.cz-route-chat) :is(button,a[role=button]) :is(span,p) { min-width:0; overflow-wrap:inherit; }
html.cz-workspace:not(.cz-route-chat) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select,option) {
  box-sizing:border-box; max-width:100%; color:#eee!important; background:#222!important;
  border:0!important; box-shadow:none!important; border-radius:12px; font-size:13px!important; line-height:1.75!important;
}
html.cz-workspace:not(.cz-route-chat) :is(input,textarea)::placeholder { color:#929292!important; opacity:1; }
html.cz-workspace:not(.cz-route-chat) :is(input,textarea,select):focus { outline:0!important; background-color:#2c2c2c!important; box-shadow:none!important; }
html.cz-workspace :is(input[type=checkbox],input[type=range],input[type=radio]) { accent-color:#d6d6d4!important; }
html.cz-workspace :is([role=dialog],.adm-modal-panel,.cz-model-picker,.cz-model-sheet) { background:#181818!important; color:#ddd!important; }
html.cz-workspace .cz-retention-control { background:#181818!important; box-shadow:none!important; }
html.cz-workspace .cz-retention-control[data-active=true] .cz-retention-trigger { background:#444!important; color:#fff!important; }
html.cz-workspace .gemini-shell .cz-chat-composer textarea:is(:focus,:focus-visible) { outline:0!important; border:0!important; box-shadow:none!important; }
html.cz-workspace .tool-seg { max-width:100%; overflow-x:auto!important; flex:1 1 auto; border:0!important; }
html.cz-workspace .tool-seg-item { flex:none!important; width:max-content; max-width:none!important; white-space:nowrap!important; }
html.cz-route-script button.group:has(>div.absolute) { isolation:isolate; }
html.cz-route-script button.group>div.absolute { max-width:100%; pointer-events:none; }
html.cz-route-script button.group>span.pointer-events-none.absolute { display:none!important; }
html.cz-workspace :is(button,a.tool-seg-item,a[role=button])[data-cz-tone] { color:#ddd!important; background-color:var(--cz-control)!important; }
html.cz-workspace :is(button,a.tool-seg-item,a[role=button])[data-cz-tone=quiet] { background-color:transparent!important; color:#bbb!important; }
html.cz-workspace :is(button,a.tool-seg-item,a[role=button])[data-cz-tone=selected],
html.cz-workspace :is(button,a.tool-seg-item,a[role=button])[data-cz-selected=true]:not([data-cz-tone=switch]):not([data-cz-tone=primary]) { background:#444!important; color:#fff!important; }
html.cz-workspace :is(button,a[role=button])[data-cz-tone=primary] { background:#e2e2df!important; color:#171717!important; font-weight:500!important; }
html.cz-workspace :is(button,a.tool-seg-item,a[role=button])[data-cz-tone]:not(:disabled):hover { background-color:#3a3a3a!important; color:#fff!important; }
html.cz-workspace :is(button,a[role=button])[data-cz-tone=primary]:not(:disabled):hover { background:#fff!important; color:#111!important; }
html.cz-workspace :is(button,a.tool-seg-item,a[role=button]):is([data-cz-tone=primary],[data-cz-tone=selected]) :is(span,p,svg,small,strong) { color:inherit!important; }
html.cz-workspace :is(button,a[role=button])[data-cz-tone]:disabled { background:#292929!important; color:#888!important; opacity:.45!important; cursor:not-allowed!important; }
html.cz-workspace :is(button,a,select):focus-visible { outline:2px solid #bcbcbc!important; outline-offset:3px!important; }
html.cz-workspace button[data-cz-tone=switch] { width:36px!important; min-width:36px!important; height:20px!important; min-height:20px!important; padding:0!important; background:#3b3b3b!important; }
html.cz-workspace button[data-cz-tone=switch][data-cz-selected=true] { background:#d5d5d2!important; }
html.cz-workspace button[data-cz-tone=switch]>span { background:#aaa!important; }
html.cz-workspace button[data-cz-tone=switch][data-cz-selected=true]>span { background:#252525!important; }
html.cz-workspace :is(.react-flow__node,.react-flow__controls button) { background:#202020!important; color:#ddd!important; border-color:transparent!important; }
html.cz-workspace:not(.cz-route-canvas) .react-flow__edge-path { stroke:#999!important; }
/* Existing React toolbar, floated above the workspace without reserving a row. */
html.cz-workspace header.cz-tool-toolbar,
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
  position:fixed!important; inset:8px 12px auto!important; width:auto!important; height:auto!important; min-height:56px;
  z-index:80!important; display:flex!important; flex-wrap:wrap!important; gap:8px 16px; padding:10px 14px!important;
  border:0!important; border-radius:18px; background:#171717f5!important; backdrop-filter:blur(24px)!important;
  box-shadow:0 12px 45px #0008!important; opacity:0; pointer-events:none;
  transform:translateY(calc(-100% - 16px)); transition:transform .24s ease,opacity .18s ease;
}
html.cz-workspace header.cz-tool-toolbar[data-open=true],
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar[data-open=true] { opacity:1; pointer-events:auto; transform:translateY(0); }
html.cz-workspace .cz-tool-toolbar>div { min-width:0!important; max-width:100%; flex-wrap:wrap!important; gap:8px; }
html.cz-workspace .cz-tool-toolbar>div:first-child { flex:1 1 260px; }
html.cz-workspace .cz-tool-toolbar>div:last-child { flex:1 1 560px; justify-content:flex-end; }
html.cz-workspace .cz-tool-toolbar>div:last-child>div { max-width:100%; flex-wrap:wrap!important; }
html.cz-workspace .cz-tool-toolbar>div:last-child>div:has(.tool-seg) { display:contents!important; }
html.cz-workspace .cz-tool-toolbar>div:last-child>div:has(.tool-seg)>div:has([data-no-i18n]) { flex:none!important; width:max-content; min-width:max-content; }
html.cz-workspace .cz-tool-toolbar .no-scrollbar { max-width:100%; overflow-x:auto; }
html.cz-workspace .cz-tool-toolbar .no-scrollbar>button { flex:none!important; width:max-content; white-space:nowrap!important; }
html.cz-workspace .cz-tool-toolbar button:has(.lucide-globe) { flex:none!important; white-space:nowrap!important; }
html.cz-workspace .cz-tool-toolbar .cz-toolbar-back { display:inline-flex!important; flex:none; align-items:center; gap:6px; padding:6px 11px!important; border:0!important; border-radius:12px; background:#303030!important; color:#eee!important; white-space:nowrap!important; font-size:12px!important; line-height:1.6!important; }
html.cz-workspace .cz-tool-toolbar :is(button,a.tool-seg-item)[data-cz-tone] { min-height:32px; border:0!important; border-radius:11px; background-color:#2c2c2c!important; color:#ddd!important; }
html.cz-workspace .cz-tool-toolbar :is(button,a.tool-seg-item)[data-cz-selected=true] { background:#494949!important; color:#fff!important; }
html.cz-workspace .cz-tool-toolbar button[data-cz-tone] :is(span,p,svg) { color:inherit!important; }
html.cz-workspace .cz-tool-toolbar :is(button,a.tool-seg-item):hover { background-color:#414141!important; }
html.cz-workspace .cz-chat-mobile-toolbar { display:none!important; }
html.cz-workspace .cz-toolbar-trigger {
  position:fixed!important; inset:0 0 auto!important; width:100%!important; height:12px!important; min-height:12px!important;
  z-index:79!important; margin:0!important; padding:0!important; border:0!important; border-radius:0!important;
  display:grid!important; place-items:start center!important; background:transparent!important; box-shadow:none!important;
}
html.cz-workspace .cz-toolbar-trigger>span { display:block; width:44px; height:3px; margin-top:3px; background:#ffffff30; border-radius:10px; transition:background .2s; }
html.cz-workspace .cz-toolbar-trigger:is(:hover,:focus-visible)>span { background:#aaa; }
@media(max-width:600px) {
  html.cz-workspace header.cz-tool-toolbar { inset:6px 6px auto!important; padding:10px!important; max-height:70dvh; overflow-y:auto; }
  html.cz-workspace .cz-tool-toolbar>div { flex:1 1 100%!important; justify-content:space-between; }
  html.cz-workspace .cz-tool-toolbar .tool-seg { flex:1 1 100%; order:10; }
  html.cz-workspace .cz-tool-toolbar .tool-seg-item { padding:6px 9px!important; font-size:13px!important; }
  html.cz-workspace .cz-tool-toolbar button:has(.lucide-globe) { min-width:32px!important; width:32px; padding:6px!important; }
  html.cz-workspace .cz-tool-toolbar button:has(.lucide-globe)>:is(span,.lucide-chevron-down) { display:none!important; }
  html.cz-workspace:not(.cz-route-chat) :is(h1,h2) { font-size:19px!important; }
}
@media(hover:none) { html.cz-workspace .cz-toolbar-trigger { height:28px!important; min-height:28px!important; } html.cz-workspace .cz-toolbar-trigger>span { width:56px; height:4px; margin-top:6px; background:#777; } }
@media(prefers-reduced-motion:reduce) { html.cz-workspace header.cz-tool-toolbar { transition:none!important; } }

/* Account surfaces echo the home page: restrained glass, a consistent type scale. */
html.cz-retained:is(.cz-route-member,.cz-route-login) {
  --cz-copy:#e3e3e3; --cz-muted:#aaa; --cz-panel:#ffffff08; --cz-panel-raised:#ffffff0d;
  --cz-accent:#ddd; --cz-action:#ffffff14; color-scheme:dark;
}
html.cz-retained:is(.cz-route-member,.cz-route-login) main { color:var(--cz-copy); }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is([class*="text-"],.dot) { color:var(--cz-copy)!important; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(.glass,.fig-card,[class*="bg-"],.m-me-tile-ico,.dot) {
  background-color:#ffffff08!important; background-image:none!important; border-color:transparent!important; box-shadow:none!important;
}
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(button,a[role=button],.btn,.btn-primary,.fig-pill-btn) {
  font-family:"Alkatip Basma Tom",inherit; font-size:12px!important; font-weight:400!important; line-height:1.65!important;
  min-width:0; max-width:100%; height:auto; min-height:36px; white-space:normal!important; overflow-wrap:anywhere;
  border:0!important; background:linear-gradient(135deg,#ffffff17,#ffffff08)!important; color:#e3e3e3!important;
  border-radius:16px; padding-block:8px;
}
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(button,a[role=button]) :is(span,p) { min-width:0; white-space:inherit!important; overflow-wrap:inherit; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(h1,h2,h3) { font-size:clamp(18px,2vw,26px)!important; font-weight:500!important; line-height:1.65!important; overflow-wrap:anywhere; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(p,label,small) { overflow-wrap:anywhere; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is([class*="text-[10"],[class*="text-[11"]) { font-size:13px!important; line-height:1.7!important; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is([class*="text-[12"],[class*="text-[13"]) { font-size:12px!important; line-height:1.7!important; }
html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(input,textarea,select) { max-width:100%; box-sizing:border-box; color:#ddd!important; background:#ffffff08!important; font-size:13px!important; }

/* Legacy product and course pages share the same readable detail scale. */
html.cz-retained:is(.cz-route-product,.cz-route-course-detail) main h1 {
  max-width:26ch; font-size:clamp(26px,2.4vw,34px)!important;
  line-height:1.4!important; text-wrap:balance; overflow-wrap:anywhere;
}
html.cz-retained.cz-route-course-detail main h2 {
  max-width:34ch; font-size:clamp(20px,2vw,27px)!important;
  line-height:1.55!important; text-wrap:balance; overflow-wrap:anywhere;
}
html.cz-retained:is(.cz-route-product,.cz-route-course-detail) main :is(h3,p,li,button,a) { overflow-wrap:anywhere; }
html.cz-retained:is(.cz-route-product,.cz-route-course-detail) main :is(button,a[role=button]) {
  min-width:0; max-width:100%; line-height:1.65; white-space:normal;
}
html.cz-retained:is(.cz-route-product,.cz-route-course-detail) main img { max-width:100%; }
@media(max-width:700px) {
  html.cz-retained:is(.cz-route-product,.cz-route-course-detail) main h1 { font-size:24px!important; line-height:1.5!important; }
  html.cz-retained.cz-route-course-detail main h2 { font-size:19px!important; }
}

/* Portals live outside main and need the same surface rules on every route. */
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog],.toast,.notification,[data-sonner-toast]) {
  box-sizing:border-box; max-width:calc(100vw - 24px); color:#ddd!important;
  background:#191919f5!important; border:0!important; border-radius:24px!important;
  box-shadow:0 24px 90px #0007!important; backdrop-filter:blur(24px);
  font-family:"Alkatip Basma Tom",inherit; font-size:12px; line-height:1.75; overflow-wrap:anywhere;
}
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is([class*="bg-"],[class*="from-"],[class*="to-"]) {
  background-color:#ffffff08!important; background-image:none!important; border-color:transparent!important; box-shadow:none!important;
}
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is([class*="text-"],p,label,small) { color:#c7c7c7!important; }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(h1,h2,h3) { color:#eee!important; font-size:20px!important; font-weight:500!important; line-height:1.6!important; }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(button,a[role=button]) {
  min-width:0; max-width:100%; height:auto; min-height:34px; font:inherit; font-size:12px!important;
  line-height:1.65!important; white-space:normal!important; overflow-wrap:anywhere;
  color:#ddd!important; background:#ffffff0c!important; border:0!important; box-shadow:none!important;
}
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(button,a[role=button]) :is(span,p) { min-width:0; white-space:inherit; overflow-wrap:inherit; }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(input,textarea,select,option) { box-sizing:border-box; max-width:100%; background:#242424!important; color:#ddd!important; border:0!important; font-size:13px!important; }
html:not(:has(.adm-surface)) .adm-modal-backdrop { background:#080808b8!important; backdrop-filter:blur(10px); }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(button,a):focus-visible { outline:2px solid #bbb!important; outline-offset:3px; }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(input,textarea,select):focus-visible { outline:0!important; box-shadow:inset 0 0 0 1px #aaa!important; }
/* QR codes require a white quiet zone, independent of the surrounding chrome. */
html:not(:has(.adm-surface)) :is(.adm-modal-panel,.cz-route-login main) div:has(>img[alt*="支付"]),
html.cz-route-login main div:has(>canvas) { background:#fff!important; }
html:not(:has(.adm-surface)) .adm-modal-panel .cz-payment-qr { background:#fff!important; }
html .cz-recharge-modal { width:min(600px,calc(100vw - 24px))!important; }
html #cz-account-dialog { width:min(430px,calc(100vw - 24px))!important; }
html .cz-system-dialog { width:min(420px,calc(100vw - 24px))!important; }
.cz-recharge-modal .cz-recharge-submit { flex-wrap:wrap; justify-content:center!important; gap:8px 16px!important; padding:12px!important; }
.cz-recharge-modal .cz-recharge-tier[aria-pressed=true] { background:#ffffff1c!important; box-shadow:inset 0 0 0 1.5px #ffffff42!important; }
.cz-recharge-modal .cz-recharge-tier { min-width:0; text-align:start!important; padding:14px!important; border-radius:16px!important; }
html.cz-workspace .cz-recharge-modal .cz-recharge-tier { background:#242424!important; }
html.cz-workspace .cz-recharge-modal .cz-recharge-tier[aria-pressed=true] { background:#383838!important; }
@media(max-width:600px) {
  html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) { border-radius:20px!important; }
  .cz-recharge-modal .cz-recharge-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:10px!important; }
  html.cz-retained.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap { gap:7px!important; }
  html.cz-retained.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap>button { min-width:0!important; flex:1 1 auto!important; }
  html.cz-workspace:not(.cz-route-chat) :is(h1,h2) { font-size:19px!important; }
  html.cz-route-login main [data-cosmic-hero] { height:180px!important; min-height:0!important; }
  html.cz-route-login main [data-cosmic-hero] img { height:100%!important; object-fit:cover!important; }
  html.cz-route-login main section { padding-top:12px!important; padding-bottom:24px!important; }
}
html.cz-route-login #local-test-access { position:relative!important; inset:auto!important; transform:none!important; margin:16px auto 70px!important; width:min(600px,calc(100% - 32px)); }
html.cz-route-login #local-test-access form { flex:1 1 220px; }
html.cz-route-login #local-test-access button { width:100%; font:12px/1.75 Alkatip Basma Tom,Arial,sans-serif!important; padding:10px 14px!important; }
@media(pointer:coarse) {
  html.cz-retained:is(.cz-route-member,.cz-route-login) main :is(input,textarea,select),
  html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) :is(input,textarea,select) { font-size:16px!important; }
}
/* Prevent intrinsic QR/error text widths from expanding the login grid track. */
html.cz-route-login main section > .grid { grid-template-columns:minmax(0,1fr); }
html.cz-route-login main section > .grid > div { min-width:0; }
html.cz-route-login main section > .grid > div:last-child > div { min-width:0; max-width:100%; }
html.cz-route-login main section > .grid > div:last-child :is(h1,p,[class*="whitespace-nowrap"]) {
  min-width:0; max-width:100%; white-space:normal!important; overflow-wrap:anywhere;
}
html.cz-route-login main section > .grid > div:last-child .flex-col.items-center > div:last-child:not(:first-child) {
  align-self:stretch; min-width:0; white-space:normal!important; overflow-wrap:anywhere;
}
@media(min-width:1024px) {
  html.cz-route-login main section > .grid { grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr); }
}
/* Account and payment actions retain the same hierarchy inside portal hosts. */
html.cz-retained:is(.cz-route-member,.cz-route-login) main button[data-cz-tone=primary],
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) button[data-cz-tone=primary] {
  background:#e2e2df!important; color:#171717!important; font-weight:500!important;
}
html.cz-retained:is(.cz-route-member,.cz-route-login) main button[data-cz-tone=selected],
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) button[data-cz-tone=selected] {
  background:#444!important; color:#fff!important;
}
html.cz-retained:is(.cz-route-member,.cz-route-login) main button[data-cz-tone=primary] :is(span,p,svg),
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) button[data-cz-tone=primary] :is(span,p,svg) { color:inherit!important; }
html:not(:has(.adm-surface)) :is(.adm-modal-panel,#cz-account-dialog,[role=dialog]) button[data-cz-tone]:disabled { background:#292929!important; color:#888!important; opacity:.45!important; }
/* The chat reference skin intentionally hides its permanent header; this one is hover-mounted. */
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar { display:flex!important; }
@media(max-width:600px) {
  html.cz-workspace .cz-tool-toolbar .tool-seg { display:flex!important; flex:1 1 100%; order:10; width:100%; }
}
html.cz-workspace #cz-toolbar-trigger,
html.cz-workspace #cz-toolbar-trigger:is(:hover,:focus,:active) { background:transparent!important; color:inherit!important; box-shadow:none!important; }
html.cz-workspace:not(.cz-route-chat) button.group>span.flex-1,
html.cz-workspace:not(.cz-route-chat) button.group>span.flex-1>span { white-space:normal!important; overflow-wrap:anywhere; }
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button[aria-pressed=true],
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button[data-chat-skill][aria-pressed=true] { background:#444!important; color:#fff!important; }
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button:not([aria-pressed=true]):not(:hover) { background:#181818!important; color:#aaa!important; }
@media(hover:none) {
  html.cz-workspace header.cz-tool-toolbar,
  html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar { top:30px!important; }
}
html.cz-route-chat.cz-workspace .gemini-shell:has(header.cz-tool-toolbar[data-open=true]) .cz-chat-document { opacity:0; pointer-events:none; }

/* Workspace canvas texture, shared controls and mixed-script typography. */
html.cz-workspace:not(.cz-route-chat) .tool-page-in,
html.cz-workspace:not(.cz-route-chat) .tool-page-in>div:not(aside),
html.cz-workspace:not(.cz-route-chat) .tool-page-in main,
html.cz-workspace:not(.cz-route-chat) [data-cz-workarea] {
 background-color:#0b0b0b!important;background-image:radial-gradient(#ffffff20 .65px,transparent .75px)!important;background-size:12px 12px!important;
}
html.cz-workspace,html.cz-workspace * {scrollbar-width:none}
html.cz-workspace ::-webkit-scrollbar{display:none}
html.cz-workspace header.cz-tool-toolbar {inset:12px 20px auto!important;padding:12px 18px!important;transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .24s ease}
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {inset:12px 20px auto!important;padding:12px 18px!important}
html.cz-workspace .cz-tool-toolbar>div:first-child {flex:0 1 auto!important;gap:12px!important}
html.cz-workspace .cz-tool-toolbar>div:last-child {flex:1 1 700px!important;gap:10px!important}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-back{margin-inline:4px!important;padding-inline:12px!important;min-height:34px}
html.cz-workspace .cz-tool-toolbar .tool-seg{gap:4px;padding:3px;background:transparent!important;scrollbar-width:none}
html.cz-workspace .cz-tool-toolbar .tool-seg-item {display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:5px 12px!important;font-size:12px!important;line-height:1.7!important;border-radius:10px}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale{display:inline-flex!important;flex:none!important;width:max-content;gap:6px}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-language{display:inline-flex!important;align-items:center;gap:6px;flex:none!important;min-width:36px;min-height:34px!important;line-height:1.7!important}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-language>:is(span,.lucide-chevron-down){display:inline-flex!important;line-height:1.7!important;letter-spacing:0!important}
html.cz-route-chat.cz-workspace .gemini-shell h1{font-size:clamp(19px,1.9vw,25px)!important;line-height:1.7!important}
html.cz-workspace[data-site-lang=ug] :is(button,input,textarea,select,label,p,small,h1,h2,h3,span){letter-spacing:0!important}
html.cz-workspace :is(textarea,input,p,option){unicode-bidi:plaintext}
html.cz-workspace:not(.cz-route-chat) aside :is(label,h3,p){line-height:1.85!important}
html.cz-workspace:not(.cz-route-chat) aside button:not([data-cz-tone=switch]){height:auto!important;white-space:normal!important;overflow-wrap:normal;word-break:normal;line-height:1.8!important;padding-block:6px!important}
html.cz-workspace:not(.cz-route-chat) aside .truncate{min-width:0;max-width:100%}
html.cz-workspace:not(.cz-route-chat) :is([class*="text-cyan-"],[class*="text-pink-"],[class*="text-amber-"],[class*="text-yellow-"],[class*="text-orange-"],[class*="text-green-"]){color:#c4c4c4!important}
html.cz-workspace:not(.cz-route-chat) :is([class*="bg-cyan-"],[class*="bg-pink-"],[class*="bg-amber-"],[class*="bg-yellow-"],[class*="bg-orange-"]){background-color:#242424!important}
@media(max-width:700px){html.cz-workspace header.cz-tool-toolbar,html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar{inset:28px 12px auto!important;padding:12px!important;max-height:70dvh;overflow:auto}html.cz-workspace .cz-tool-toolbar>div:first-child{width:100%}html.cz-workspace .cz-tool-toolbar>div:last-child{justify-content:flex-start!important}html.cz-workspace .cz-tool-toolbar .tool-seg{flex-wrap:wrap;overflow:visible!important;width:100%;flex:1 1 100%;order:10}html.cz-workspace .cz-tool-toolbar .tool-seg-item{font-size:13px!important;padding:5px 10px!important}html.cz-route-chat.cz-workspace .gemini-shell h1{font-size:20px!important}}
@media(prefers-reduced-motion:reduce){html.cz-workspace header.cz-tool-toolbar{transition:none!important}}

/* Final shared refinements applied after route-specific runtime styles. */
html.cz-workspace:not(.cz-route-chat) {
  --cz-dot: #232323;
  --cz-dot-gap: 10px;
}

html.cz-workspace:not(.cz-route-chat) :is(.tool-page-in, .studio-blueprint-bg, [data-cz-workarea]) {
  background-color: #0b0b0b !important;
  background-image: radial-gradient(circle at .5px .5px, var(--cz-dot) .5px, transparent .6px) !important;
  background-size: var(--cz-dot-gap) var(--cz-dot-gap) !important;
}

html.cz-route-canvas .react-flow {
  --xy-background-color: #0d0d0d;
  --xy-background-pattern-dots-color: #232323;
}

html.cz-route-canvas .react-flow.dark {
  --xy-background-pattern-dots-color: #232323;
}

html.cz-route-canvas .react-flow__node.react-flow__node-studio {
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar {
  box-sizing: border-box;
  max-width: calc(100vw - 32px);
  gap: 8px !important;
}

html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar > div {
  flex-wrap: nowrap !important;
}

html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar > div:last-child {
  min-width: 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar > div:last-child::-webkit-scrollbar,
html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar .tool-seg::-webkit-scrollbar {
  display: none;
}

html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar .cz-toolbar-back {
  min-height: 36px !important;
  min-width: 62px !important;
  margin: 0 4px !important;
  padding: 6px 12px !important;
  justify-content: center;
  flex: 0 0 auto !important;
  line-height: 1.25 !important;
}

html.cz-workspace:not(.cz-route-chat) .cz-toolbar-locale,
html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar button:has(.lucide-globe) {
  flex: 0 0 auto !important;
  min-width: 38px !important;
  min-height: 34px !important;
  border-radius: 8px !important;
  background: #202020 !important;
}

html.cz-workspace:not(.cz-route-chat) .cz-toolbar-trigger {
  width: 44px !important;
  height: 25px !important;
  min-height: 25px !important;
  padding: 3px 8px !important;
}

html.cz-workspace:not(.cz-route-chat) :is(input, textarea, select):focus-visible {
  outline: 1px solid #747474 !important;
  outline-offset: 1px;
}

html.cz-workspace:not(.cz-route-chat) :is(button, a[role="button"]) {
  overflow-wrap: normal !important;
  word-break: keep-all;
}

html.cz-workspace:not(.cz-route-chat) button :is(span, strong) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.cz-route-music aside textarea {
  min-height: 88px !important;
  max-height: 150px;
}

html.cz-route-music aside :is(input, textarea, select) {
  border-radius: 8px !important;
}

html.cz-route-music aside button {
  min-height: 30px !important;
  padding-block: 5px !important;
}

html.cz-route-music aside button:not([class*="h-11"])[class*="px-3"][class*="py-2"] {
  min-height: 34px !important;
  padding: 6px 9px !important;
  line-height: 1.3 !important;
}

/* Neutral admin palette modeled on the supplied dashboard reference. */
.adm-surface {
  --adm-canvas: #0b0b0b !important;
  --adm-panel: #151515 !important;
  --adm-line: #282828 !important;
  --adm-ink: #e5e5e5 !important;
  --adm-muted: #a1a1a1 !important;
  background: #0b0b0b !important;
  color: #e5e5e5 !important;
}

.adm-surface .adm-card {
  border: 1px solid #272727 !important;
  border-radius: 8px !important;
  background: #151515 !important;
  box-shadow: none !important;
}

.adm-shell > header,
.adm-shell > header::before {
  background: #0b0b0b !important;
  border-color: #242424 !important;
  box-shadow: none !important;
}

.adm-shell > header::before {
  background-image: none !important;
}

.adm-surface .adm-sidebar,
.adm-surface .adm-content,
.adm-surface .adm-trend,
.adm-surface .adm-accounting {
  background-color: #0b0b0b !important;
}

.adm-surface .adm-trend svg > path[fill="none"] {
  stroke: #10b981 !important;
  stroke-width: 2.4px !important;
}

.adm-surface .adm-trend svg {
  filter: none !important;
}

.adm-surface .adm-trend svg > path[fill]:not([fill="none"]) {
  fill: #10b981 !important;
  fill-opacity: .12 !important;
}

.adm-surface .adm-trend svg text {
  fill: #a3a3a3 !important;
  font-size: 10px !important;
}

.adm-surface .adm-accounting svg text {
  fill: #f1f1f1 !important;
  font-size: 11px !important;
  font-weight: 600;
}

.adm-surface :is(.adm-trend, .adm-accounting) {
  border: 1px solid #272727 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.adm-surface .adm-overview {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.adm-surface .adm-primary > .adm-card {
  grid-column: span 3 !important;
  min-height: 122px !important;
  padding: 16px !important;
  order: initial !important;
}

.adm-surface .adm-primary > .adm-card:is(:nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4)) {
  background: #151515 !important;
}

.adm-surface .adm-counts > .adm-card {
  grid-column: auto !important;
  border: 1px solid #272727 !important;
  border-radius: 8px !important;
  background: #151515 !important;
}

.adm-surface .adm-trend {
  order: 5 !important;
  grid-column: span 8 !important;
  padding: 18px !important;
}

.adm-surface .adm-accounting {
  order: 6 !important;
  grid-column: span 4 !important;
  padding: 18px !important;
}

.adm-surface .adm-counts {
  order: 7 !important;
  grid-column: span 12 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.adm-surface :is(.adm-brand, .adm-toolbar, .adm-primary, .adm-counts) svg {
  filter: grayscale(1);
}

.adm-surface :is(button, a, input, select, textarea) {
  border-radius: 6px !important;
}

.adm-surface :is(button, a)[class~="bg-[#2f7bff]"] {
  background: #e5e5e5 !important;
  color: #111 !important;
}

.adm-surface :is([class*="text-blue-"], [class*="text-sky-"], [class*="text-neon-"], [class*="text-frost-"]) {
  color: #c8c8c8 !important;
}

.adm-surface :is(input, select, textarea) {
  border: 1px solid #2b2b2b !important;
  background: #111 !important;
}

@media (max-width: 980px) {
  html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar > div {
    flex-wrap: wrap !important;
  }

  .adm-surface .adm-overview {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .adm-surface .adm-primary > .adm-card {
    grid-column: span 3 !important;
  }

  .adm-surface .adm-counts > .adm-card {
    grid-column: auto !important;
  }

  .adm-surface .adm-trend,
  .adm-surface .adm-accounting {
    grid-column: span 6 !important;
  }

  .adm-surface .adm-counts {
    grid-column: span 6 !important;
  }
}

@media (max-width: 600px) {
  html.cz-workspace:not(.cz-route-chat) .cz-tool-toolbar {
    max-width: calc(100vw - 20px);
  }

  .adm-surface .adm-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .adm-surface .adm-primary > .adm-card,
  .adm-surface .adm-counts > .adm-card {
    grid-column: span 1 !important;
  }

  .adm-surface .adm-trend,
  .adm-surface .adm-accounting {
    grid-column: span 2 !important;
  }

  .adm-surface .adm-counts {
    grid-column: span 2 !important;
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.cz-workspace main,
  .adm-surface :is(button, a, input, select, textarea) {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Exact shared dot rhythm, with ReactFlow owning its zoomable pattern. */
html.cz-workspace:not(.cz-route-chat) :is(.tool-page-in,.studio-blueprint-bg,[data-cz-workarea]) {background-color:#0d0d0d!important}
html.cz-route-canvas .react-flow {background-color:#0d0d0d!important;background-image:none!important}
html.cz-route-canvas .react-flow__attribution {display:none!important}
html.cz-route-canvas .react-flow__background {opacity:1!important}
html.cz-workspace header.cz-tool-toolbar,html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {inset:12px 20px auto!important;max-width:calc(100vw - 40px)!important;gap:12px!important;overflow:visible!important}
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {left:84px!important;max-width:calc(100vw - 104px)!important}
html.cz-workspace .cz-tool-toolbar>div:last-child {overflow:visible!important;flex-wrap:wrap!important}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-back {min-width:64px!important;min-height:34px!important;padding:6px 12px!important;flex-shrink:0!important;margin:0!important}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale {overflow:visible!important;flex-shrink:0!important}
html.cz-workspace .cz-tool-toolbar button.cz-toolbar-language {width:auto!important;min-width:36px!important;height:32px!important;padding:5px 9px!important;font-size:11px!important}
html.cz-workspace .cz-toolbar-trigger {top:0!important;left:50%!important;width:64px!important;transform:translateX(-50%);height:28px!important}
html.cz-route-music .cz-music-presets {margin:8px 0;color:#b7b7b7;font-size:11px}
html.cz-route-music .cz-music-presets summary {cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-radius:8px;background:#ffffff08}
html.cz-route-music .cz-music-presets summary::after {content:'+';font:16px/1 sans-serif}
html.cz-route-music .cz-music-presets[open] summary::after {content:'\2212';font:16px/1 sans-serif}
html.cz-route-music .cz-music-presets[open]>div {padding-top:8px}
html.cz-workspace.cz-route-music main .grid.grid-cols-2.gap-2 button {min-height:36px!important;padding:6px 10px!important;white-space:nowrap!important;line-height:1.5!important;font-size:12.5px!important}
html.cz-workspace.cz-route-music main .grid.grid-cols-3.h-9 button {min-height:36px!important;height:36px!important;white-space:nowrap!important;line-height:1.45!important;font-size:12.5px!important}
html.cz-workspace[lang=ug] :is(button,.tool-seg-item) {font-size:12.5px!important;letter-spacing:0!important}
html.cz-retained .silk-controls {display:none!important}
@media(max-width:700px){html.cz-workspace header.cz-tool-toolbar,html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {inset:30px 12px auto!important;max-width:calc(100vw - 24px)!important;max-height:70dvh;overflow-y:auto!important}html.cz-workspace .cz-tool-toolbar>div {flex-wrap:wrap!important}html.cz-workspace .cz-tool-toolbar>div:last-child {justify-content:flex-start!important}html.cz-route-canvas .cz-canvas-editor-actions {left:10px!important;right:10px!important}}

html.cz-workspace #cz-toolbar-trigger {inset:0 auto auto 50%!important;width:64px!important;height:28px!important;min-height:28px!important;transform:translateX(-50%)!important}
html.cz-route-canvas .cz-canvas-editor-actions {top:60px!important}
html.cz-route-canvas .react-flow__background {opacity:1!important}
html.cz-route-login main section>div.fixed:has(button[aria-label="\8BED\8A00\9009\62E9"]) {display:none!important}
html.cz-route-login #cz-account-entry {margin:16px 0!important;display:flex;justify-content:center}
html.cz-route-login #cz-account-entry>button {display:inline-flex!important;align-items:center;justify-content:center;min-width:38px!important;width:38px!important;height:36px!important;padding:8px!important;border-radius:10px!important;background:#ffffff0a!important}
html.cz-retained #mkx-nav {gap:14px!important;min-height:58px!important}
html.cz-retained #mkx-nav .mkx-right {flex:0 0 auto!important;gap:8px!important}
html.cz-retained #mkx-nav .mkx-right>button {flex-shrink:0!important;min-height:30px!important;height:30px!important;min-width:30px!important;padding:6px!important}
html.cz-retained #mkx-nav .mkx-langwrap{position:relative!important}
html.cz-retained #mkx-langmenu {min-width:0!important;width:100%!important;inset-inline-start:0!important;inset-inline-end:auto!important;left:auto!important;right:auto!important;top:calc(100% + 6px)!important;padding:6px!important;border-radius:14px!important;background:#18191be8!important;backdrop-filter:blur(24px)!important;border:1px solid #ffffff12!important}html.cz-retained #mkx-langmenu button {width:100%!important;min-height:34px!important;border:0!important;border-radius:8px!important;background:transparent!important;padding:6px 10px!important;font-size:12px!important;box-shadow:none!important}
html.cz-retained #mkx-langmenu button[data-on="1"]{background:#ffffff0d!important}
html.cz-retained :is(.cz-shared-footer,.site-footer) {display:none!important}
html.cz-retained main :is(button,a[role="button"]){white-space:nowrap;line-height:1.55}
@media(max-width:700px){html.cz-route-login main section {padding:96px 16px 30px!important;min-height:100dvh}html.cz-route-login main section>div.relative {border-radius:20px!important}html.cz-retained #mkx-nav .mkx-brand-txt{font-size:17px!important}html.cz-retained #mkx-nav {padding-inline:12px!important;gap:8px!important}}

/* Reference dashboard geometry, preserving the existing business data. */
.adm-surface .adm-card,.adm-surface :is(.adm-trend,.adm-accounting){border-radius:16px!important}
.adm-surface .adm-sidebar>.adm-card {background:#171717!important;border-radius:16px!important}
.adm-surface .adm-donut {filter:none!important}
.adm-surface .adm-donut::before {background:#151515!important;box-shadow:none!important}
.adm-surface .adm-donut>span {color:#f0f0f0!important;font-size:12px!important;font-weight:500}
.adm-surface .adm-mobile-nav button[aria-current="page"]{color:#fff!important;background:#383838!important}
.adm-surface .adm-mobile-nav button[aria-current="page"] * {color:inherit!important}
@media(min-width:1200px){.adm-surface .adm-overview{grid-template-rows:auto minmax(360px,1fr) auto!important}.adm-surface .adm-trend{grid-row:2!important;grid-column:1 / 9!important;height:100%;min-height:380px}.adm-surface .adm-accounting{grid-row:2 / 4!important;grid-column:9 / 13!important}.adm-surface .adm-counts{grid-row:3!important;grid-column:1 / 9!important}}
@media(max-width:719px){.adm-shell>header{height:auto!important;min-height:106px!important;padding:12px!important}.adm-shell>header>div{display:flex!important;flex-wrap:wrap!important;gap:10px!important}.adm-shell .adm-brand{flex:1 0 100%!important;width:100%!important;min-width:0!important;max-width:100%!important}.adm-shell .adm-toolbar{width:100%!important;justify-content:flex-start!important;gap:6px!important}.adm-shell .adm-brand>div>div>span:first-child::before{font-size:15px!important}.adm-surface .adm-mobile-nav{margin-top:4px!important}.adm-surface .adm-primary>.adm-card{padding:13px!important;min-height:128px!important}.adm-surface .adm-content>.rv::before{font-size:16px!important;line-height:1.5!important;white-space:normal!important}}

/* Keep script workflow dialogs at their intended compact width. */
html.cz-route-script .adm-modal-panel { width:min(460px,calc(100vw - 24px))!important; }

/* Desktop typography contract: Arabic-script input values and mixed-script labels
   must use the same shaping font as their visible text. */
@media (min-width:721px) {
  html[data-site-lang="ug"] :is(button,input,textarea,select,label,legend,h1,h2,h3,h4,h5,h6,p,dt,dd,li) {
    font-family:"Alkatip Basma Tom",Inter,"Microsoft YaHei",sans-serif!important;
    letter-spacing:0!important;
    font-variant-numeric:tabular-nums;
  }
  html.cz-workspace :is(input,textarea,select) {
    font-family:"Alkatip Basma Tom",Inter,"Microsoft YaHei",sans-serif!important;
    font-weight:400!important;
    letter-spacing:0!important;
    unicode-bidi:plaintext;
  }
  html.cz-workspace :is(input,textarea,select):focus:not(:focus-visible) {
    outline:0!important;
    box-shadow:none!important;
  }
  html.cz-route-script .cz-screenplay-editor :is(input,textarea) {
    font-size:13.5px!important;
    line-height:1.85!important;
  }
  html.cz-route-script .cz-screenplay-editor :is(button,[role="tab"]) {
    min-height:34px!important;
    padding-block:6px!important;
  }
  html.cz-route-script main > div > section:first-child {
    margin-bottom:12px!important;
  }
  html.cz-route-script .cz-screenplay-editor {
    padding:18px!important;
  }

  /* RTL flex scrollers otherwise open at the wrong end in Chromium, leaving
     the first recommendation/actions partially outside the viewport. */
  html.cz-route-image main .no-scrollbar.overflow-x-auto,
  html.cz-route-video main .no-scrollbar.overflow-x-auto {
    direction:ltr!important;
    scroll-padding-inline:8px;
    flex-wrap:wrap!important;
    overflow:visible!important;
  }
  html.cz-route-image main .no-scrollbar.overflow-x-auto > *,
  html.cz-route-video main .no-scrollbar.overflow-x-auto > * {
    direction:rtl;
  }
  html.cz-route-image main .no-scrollbar.overflow-x-auto,
  html.cz-route-video main .no-scrollbar.overflow-x-auto {
    scrollbar-width:none;
  }
  html.cz-route-video main .mt-2.flex.items-center.justify-between.gap-1\.5.border-t {
    overflow:hidden!important;
  }
  html.cz-route-video main .mt-2.flex.items-center.justify-between.gap-1\.5.border-t > .no-scrollbar.overflow-x-auto {
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html.cz-route-music aside {
    max-height:100dvh;
    overflow:hidden;
  }
  html.cz-route-music aside .flex.min-h-0.flex-1.flex-col.gap-2\.5.overflow-y-auto {
    gap:9px!important;
    padding-block:12px 20px!important;
    overflow-y:auto!important;
  }
  html.cz-route-music aside textarea {
    min-height:54px!important;
    max-height:92px!important;
    padding:9px 11px!important;
    line-height:1.6!important;
  }
  html.cz-route-music aside label {
    margin-bottom:4px!important;
    font-size:12.5px!important;
  }
  html.cz-route-music aside .grid.grid-cols-1.sm\:grid-cols-2.gap-2\.5 {
    gap:8px!important;
  }
}

/* Shared desktop chrome contract: same portal geometry for retained detail pages. */
@media(min-width:1024px){
html:not(.cz-workspace):not(:has(.adm-surface)) #mkx-nav{position:absolute!important;inset:18px auto auto 50%!important;transform:translateX(-50%)!important;box-sizing:border-box!important;width:calc(100% - 48px)!important;max-width:1600px!important;height:62px!important;min-height:62px!important;padding:0 22px!important;display:flex!important;align-items:center!important;gap:24px!important;border:1px solid #ffffff0d!important;border-radius:14px!important;background:#080e12b8!important;backdrop-filter:blur(28px)!important;box-shadow:none!important}
html:not(.cz-workspace) #mkx-nav .mkx-div,html:not(.cz-workspace) #mkx-nav .mkx-admin{display:none!important}
html:not(.cz-workspace) #mkx-nav .mkx-brand{display:inline-flex!important;align-items:center;gap:10px;flex:none;white-space:nowrap}
html:not(.cz-workspace) #mkx-nav .mkx-brand-txt{font-family:"Alkatip Basma Tom",Arial,sans-serif!important;font-size:21px!important;font-weight:700!important;letter-spacing:-.04em!important}
html:not(.cz-workspace) #mkx-nav .mkx-mark{display:block!important;position:relative;width:32px;height:32px;border:1.5px solid #dededb;border-radius:11px;transform:rotate(-12deg);background:none!important}
html:not(.cz-workspace) #mkx-nav .mkx-mark:before{content:"";position:absolute;inset:6px;border:1px solid #ffffffa0;border-radius:50%}
html:not(.cz-workspace) #mkx-nav .mkx-mark:after{content:"";position:absolute;top:2px;right:1px;width:7px;height:7px;border-radius:50%;background:#dededb}
html:not(.cz-workspace) #mkx-nav .mkx-links{display:flex!important;flex:1!important;justify-content:center!important;align-items:center!important;gap:23px!important;min-width:0}
html:not(.cz-workspace) #mkx-nav .mkx-links a{padding:0!important;font-size:12px!important;font-weight:400!important;line-height:1.6!important;white-space:nowrap;color:#a4a6b0!important}
html:not(.cz-workspace) #mkx-nav .mkx-links a[data-on="1"]{color:#eee!important}
html:not(.cz-workspace) #mkx-nav .mkx-right{display:flex!important;flex:none!important;align-items:center;gap:8px!important}
html:not(.cz-workspace) #mkx-nav .mkx-lang{display:inline-flex!important;align-items:center;gap:8px;height:32px!important;width:auto!important;padding:0 11px!important;font-size:11px!important;border:0!important;border-radius:11px!important;background:#ffffff0b!important;color:#ccc!important}
html:not(.cz-workspace) #mkx-nav .mkx-cta{height:32px!important;padding:0 15px!important;display:inline-flex!important;align-items:center;border:0!important;border-radius:20px!important;font-size:12px!important;font-weight:400!important;background:#f1f1f3!important;color:#19191c!important;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:not(.cz-workspace) #mkx-nav .mkx-fullscreen{height:32px!important;width:36px!important;padding:0!important;border:0!important;border-radius:11px!important;background:#ffffff0b!important}
html.cz-workspace:not(.cz-route-chat) header.cz-tool-toolbar{inset:12px 20px auto 20px!important;max-width:none!important;min-height:58px!important;height:58px!important;padding:10px 14px!important;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:6px!important;direction:ltr!important;overflow:visible!important;border-radius:18px!important}
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar{inset:12px 20px auto 84px!important;max-width:none!important;min-height:58px!important;height:58px!important;padding:10px 14px!important;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:6px!important;direction:ltr!important;overflow:visible!important;border-radius:18px!important}
html.cz-workspace .cz-tool-toolbar .cz-chrome-contents{display:contents!important}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot]{flex:none!important;min-width:0!important;direction:ltr}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot=back]{order:0!important;margin:0 4px 0 0!important;height:32px!important;min-height:32px!important;padding:0 12px!important;line-height:1.5!important}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot=title]{order:1!important;display:inline-flex!important;max-width:240px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important;font-weight:400!important}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot=locale]{order:2!important;display:inline-flex!important;gap:6px!important;overflow:visible!important}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot=links]{order:3!important;display:flex!important;gap:5px!important;overflow:visible!important;background:none!important;padding:0!important}
html.cz-workspace .cz-tool-toolbar [data-chrome-slot=balance]{order:4!important;display:inline-flex!important;margin-left:auto!important;gap:6px!important;overflow:visible!important}
html.cz-workspace .cz-tool-toolbar :is(button,a.tool-seg-item)[data-cz-tone],html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale button{height:34px!important;min-height:34px!important;padding:0 11px!important;font-size:12.5px!important;font-weight:400!important;line-height:1.5!important;white-space:nowrap!important;overflow:visible!important}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale button:has(.lucide-maximize2){width:34px!important;padding:0!important}
}

/* Desktop: late React header updates retain the shared slot geometry. */
@media(min-width:1024px){
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=back]{order:-10!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:68px!important;height:34px!important;max-height:34px!important;min-height:34px!important;flex-shrink:0!important;margin:0 4px 0 0!important;padding:0 12px!important;white-space:nowrap!important;font-size:12.5px!important;font-weight:400!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=title]{order:-9!important;max-width:210px!important;font-size:13px!important;font-weight:400!important;white-space:nowrap!important;overflow:hidden!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=title] span{font-size:13px!important;font-weight:400!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=model]{order:-8!important;width:176px!important;max-width:176px!important;height:34px!important;font-size:12.5px!important;font-weight:400!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=locale]{order:1!important;margin-left:auto!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=links]{order:2!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=balance]{order:3!important;margin-left:0!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=balance] button{display:inline-flex!important;align-items:center!important;gap:6px!important;white-space:nowrap!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=back],html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=locale]{position:relative!important;inset:auto!important}
}

@media(min-width:1024px){
html.cz-workspace header#cz-tool-toolbar{gap:6px!important}
html.cz-workspace header#cz-tool-toolbar .cz-chrome-contents>:not([data-chrome-slot]):not(.cz-chrome-contents){flex-shrink:0!important}
html.cz-workspace header#cz-tool-toolbar .cz-chrome-contents>:not([data-chrome-slot]):not(.cz-chrome-contents):is(div){display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:4px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=title]{max-width:160px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=balance]>span{display:none!important}
html.cz-workspace header#cz-tool-toolbar #cz-script-workflow{position:relative!important;inset:auto!important;order:4!important;flex:none!important;margin:0!important;z-index:50!important}
html.cz-workspace header#cz-tool-toolbar #czsw-trigger{height:34px!important;font-size:12px!important;padding:0 10px!important}
html.cz-workspace header#cz-tool-toolbar #czsw-panel{position:absolute!important;top:calc(100% + 12px)!important;right:0!important;left:auto!important;max-height:calc(100vh - 130px)!important;overflow:auto!important}
}
@media(min-width:1024px) and (max-width:1600px){
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=title]{max-width:105px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=model]{width:132px!important;max-width:132px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=links]{gap:2px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=links] a{padding:0 6px!important;font-size:12px!important}
html.cz-workspace header#cz-tool-toolbar [data-chrome-slot=balance] button>span:first-of-type{display:none!important}
html.cz-workspace header#cz-tool-toolbar #czsw-trigger{padding:0 8px!important;font-size:12px!important}
}

@media(min-width:1024px){
/* Billing explanations remain in the workspace; don't consume navigation width. */
html.cz-route-script header#cz-tool-toolbar .cz-chrome-contents>:is(span,button):not([data-chrome-slot]):not(.cz-toolbar-back){display:none!important}
}

/* --- workspace polish: unclipped wrapping chip rows and borderless composer --- */
html.cz-workspace:not(.cz-route-chat) :is(.no-scrollbar.flex,.no-scrollbar[class*="flex"]):has(> button):not(.cz-canvas-editor-actions){flex-wrap:wrap!important;gap:7px!important;overflow:visible!important;scrollbar-width:none;-ms-overflow-style:none}
html.cz-workspace:not(.cz-route-chat) :is(.no-scrollbar.flex,.no-scrollbar[class*="flex"]):has(> button)::-webkit-scrollbar{display:none;height:0}
html.cz-workspace:not(.cz-route-chat) :is(.no-scrollbar.flex,.no-scrollbar[class*="flex"]):has(> button)>*{flex:0 0 auto;min-height:33px}
@media(max-width:760px){
  html.cz-workspace:not(.cz-route-chat) :is(.no-scrollbar.flex,.no-scrollbar[class*="flex"]):has(> button){flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
}
html.cz-workspace:not(.cz-route-chat) div[class*="rounded-[24px]"]:has(textarea){border-color:transparent!important}
/* ============================================================================
   Creatve.Zone 闂?Global UX unification layer (Uyghur + Optical Latin/Numeral
   typography, zero micro-text floor, single-row balance pill, fluid motion).
   ========================================================================== */

/* ---------- 1. WeChat login chip: borderless, unified with header ---------- */
.cinematic-header .header-login,
html[dir="rtl"] .cinematic-header .header-login,
.site-header .header-login,
html.cz-retained #mkx-nav .mkx-cta {
  border: 0 !important;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.05) !important;
  background: #f4f3f9 !important;
  color: #111117 !important;
  outline: none !important;
}
.cinematic-header .header-login:hover,
.site-header .header-login:hover,
html.cz-retained #mkx-nav .mkx-cta:hover {
  background: #ffffff !important;
  border: 0 !important;
}
html[dir="rtl"] .header-login,
html[data-site-lang="ug"] .header-login {
  display: inline-flex !important;
}

/* ---------- 2. Universal Optical-Matched Uyghur + Latin/Numeral Typography ---------- */
html[data-site-lang="ug"] body,
html[lang^="ug"] body,
html[dir="rtl"] body,
html[data-site-lang="ug"] *:not(code):not(pre):not(svg):not(svg *),
html[lang^="ug"] *:not(code):not(pre):not(svg):not(svg *),
html[dir="rtl"] *:not(code):not(pre):not(svg):not(svg *) {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-variant-numeric: tabular-nums;
  font-synthesis: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-site-lang="ug"] :is(
  .font-bold, .font-extrabold, .font-semibold, .font-black,
  strong, b, h1, h2, h3, h4, h5, h6
),
html[lang^="ug"] :is(
  .font-bold, .font-extrabold, .font-semibold, .font-black,
  strong, b, h1, h2, h3, h4, h5, h6
) {
  font-weight: 400 !important;
}

/* Preserve Alkatip Basma Tom on hero/display headings while keeping Alkatip Basma Tom first for numbers/English! */
html[data-site-lang="ug"] main .cinematic-hero h1,
html[data-site-lang="ug"] main .cinematic-hero h1 *,
html[lang^="ug"] main .cinematic-hero h1,
html[lang^="ug"] main .cinematic-hero h1 *,
html[dir="rtl"] main .cinematic-hero h1,
html[dir="rtl"] main .cinematic-hero h1 *,
html[data-site-lang="ug"] [data-ug-heading="true"],
html[data-site-lang="ug"] [data-ug-heading="true"] * {
  font-family: "Alkatip Basma Tom",sans-serif!important;
  font-weight: 400 !important;
  line-height: 1.48 !important;
  letter-spacing: 0 !important;
}

html body .language-popover {
  border-radius: 16px !important;
  background: linear-gradient(160deg, rgba(14, 15, 21, 0.94), rgba(7, 8, 12, 0.97)) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  backdrop-filter: blur(32px) saturate(145%) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

/* UI badges, prices, ratios, counters, and model chips in Uyghur mode use
   optical-scaled tabular Inter (Alkatip Basma Tom) instead of tiny Consolas! */
html[data-site-lang="ug"] :is(.font-mono, [class*="font-mono"], [class*="tabular"]):not(code):not(pre),
html[lang^="ug"] :is(.font-mono, [class*="font-mono"], [class*="tabular"]):not(code):not(pre),
html[dir="rtl"] :is(.font-mono, [class*="font-mono"], [class*="tabular"]):not(code):not(pre) {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
  letter-spacing: 0 !important;
}
html[data-site-lang="ug"] :is(code, pre),
html[lang^="ug"] :is(code, pre) {
  font-family: "Alkatip Basma Tom","JetBrains Mono",ui-monospace,Consolas,monospace!important;
}

/* ---------- 3. Global 13px readability floor across all workspaces & portals ---------- */
html.cz-workspace :is(
  [class*="text-[8"], [class*="text-[9"], [class*="text-[10"], [class*="text-[11"], .text-xs, [class*="text-[12px]"], [class*="text-[12."], small, label, summary, select, option
):not(svg):not(svg *),
html.cz-retained :is(
  [class*="text-[8"], [class*="text-[9"], [class*="text-[10"], [class*="text-[11"], .text-xs, [class*="text-[12px]"], [class*="text-[12."], small, label, summary, select, option
):not(svg):not(svg *) {
  font-size: 13px !important;
  line-height: 1.55 !important;
}

html[data-site-lang="ug"] :is(h1, h2, h3),
html[lang^="ug"] :is(h1, h2, h3) {
  letter-spacing: 0 !important;
  line-height: 1.55 !important;
}

html[data-site-lang="ug"],
html[lang^="ug"],
html[dir="rtl"] {
  word-break: normal;
  overflow-wrap: break-word;
}

/* Fix -10px RTL horizontal overflow on /me/, /login/, /p/*, /course/* */
html.cz-retained,
html.cz-retained body {
  overflow-x: clip !important;
  max-width: 100vw !important;
}

/* ---------- 4. Buttons & chips: clean 12.5px闂?3px scale, one active state ---------- */
html[data-site-lang="ug"] :is(
  button:not(.resource-open):not(.cz-api-open):not([class*="flex-col"]):not([class*="text-left"]):not([class*="text-start"]),
  a.button, a[role="button"], input[type="button"], input[type="submit"],
  .button, .btn, .btn-primary, .fig-pill-btn, .mkx-cta, .header-login,
  .language-trigger, .join-btn, .join-domain-btn, .join-domain-pill
) {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  white-space: nowrap !important;
}

html[data-site-lang="ug"] :is(.cz-api-categories button, button.resource-open, button.cz-api-open, button[class*="flex-col"], button[class*="text-left"]) {
  white-space: normal !important;
  line-height: 1.65 !important;
}

html[data-site-lang="ug"] :is(
  .cz-chat-modes button, .cz-edition-tabs button, .cz-model-picker button,
  [role="tab"], [role="radio"], .join-domain-pill, .join-track-pill
) {
  font-size: 12.5px !important;
  white-space: nowrap !important;
}

html.cz-retained #mkx-nav .mkx-langmenu,
html.cz-retained #mkx-nav [class*="lang-menu"],
html.cz-retained #mkx-nav [role="menu"] {
  background: linear-gradient(160deg, rgba(14, 15, 21, 0.95), rgba(7, 8, 12, 0.98)) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(28px) saturate(140%) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62) !important;
}

html[data-site-lang="ug"] :is(textarea, input[type="text"], input:not([type])) {
  white-space: normal;
  word-break: normal;
  line-height: 1.7;
}

html.cz-retained[data-site-lang="ug"] :is(button, .btn, .btn-primary) {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

html.cz-retained[data-site-lang="ug"] :is(h1, h2, h3, .font-bold, .font-extrabold) {
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

/* ---------- 5. Dedicated Token Balance Pill (scoped ONLY to .cz-balance-pill) ---------- */
html button.cz-balance-pill {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  gap: 6px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  background: #202126 !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  color: #ececef !important;
  white-space: nowrap !important;
  overflow: visible !important;
  direction: ltr !important;
}
html button.cz-balance-pill:hover {
  background: #2a2c33 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}
html button.cz-balance-pill > span {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  flex: 0 0 auto !important;
}
html button.cz-balance-pill .cz-balance-num {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  color: #7ef0bb !important;
}
html button.cz-balance-pill .cz-balance-topup {
  padding: 3px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.11) !important;
  font-size: 12px !important;
  color: #f3f4f6 !important;
}

/* ---------- 6. Fluid 220ms interactive motion across all tools & pages ---------- */
@keyframes cz-panel-reveal {
  from { opacity: 0; transform: translateY(8px) scale(0.994); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
html.cz-workspace :is(button, a[role="button"], .tool-seg-item, select, input, textarea) {
  transition:
    background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
html.cz-workspace :is(button, a[role="button"]):not(:disabled):not(.cz-toolbar-trigger):hover {
  transform: translateY(-1px);
}
html.cz-workspace :is(button, a[role="button"]):not(:disabled):not(.cz-toolbar-trigger):active {
  transform: translateY(0) scale(0.98);
}
html :is([role="dialog"], .adm-modal-panel, .cz-model-picker, .cz-model-sheet) {
  animation: cz-panel-reveal 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}
html.cz-workspace [data-cz-panel-in="1"] {
  animation: cz-panel-reveal 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (max-width: 700px) {
  html.cz-workspace header.cz-tool-toolbar,
  html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
    flex-wrap: wrap !important;
    overflow-x: hidden !important;
  }
  html.cz-workspace header.cz-tool-toolbar > *,
  html.cz-workspace header.cz-tool-toolbar .cz-chrome-contents > * {
    flex-wrap: wrap !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html button.cz-balance-pill {
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 9px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.cz-workspace :is(button, a[role="button"], .tool-seg-item, select, input, textarea),
  html :is([role="dialog"], .adm-modal-panel, .cz-model-picker, .cz-model-sheet),
  html.cz-workspace [data-cz-panel-in="1"] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ---------- 7. Canvas template center rail (6 per row on desktop) ---------- */
html .cz-template-rail { margin-top: 2.4rem; }
html .cz-template-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
html .cz-template-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: #e6e7ea; letter-spacing: -0.01em; }
html .cz-template-head p { margin: 0; font-size: 13px; color: #8b93a7; }
html .cz-template-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
html button.cz-template-card {
  display: flex; flex-direction: column; align-items: stretch; gap: 9px;
  padding: 10px; text-align: start; cursor: pointer;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(24,25,30,0.92), rgba(18,19,23,0.92));
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  min-width: 0;
}
html button.cz-template-card:hover { border-color: rgba(139,124,255,0.55); transform: translateY(-2px); box-shadow: 0 10px 26px -18px rgba(0,0,0,0.9); }
html button.cz-template-card[data-busy="1"] { opacity: .55; pointer-events: none; }
html .cz-template-cover {
  display: flex; align-items: center; justify-content: center; height: 62px; border-radius: 10px;
  color: #cfd6ff; background: radial-gradient(120% 140% at 20% 0%, rgba(139,124,255,0.30), rgba(10,10,14,0) 60%), #14151a;
  border: 1px solid rgba(255,255,255,0.06);
}
html .cz-template-card[data-cat="video"] .cz-template-cover { color: #9fe8ff; background: radial-gradient(120% 140% at 20% 0%, rgba(94,234,212,0.22), rgba(10,10,14,0) 60%), #14151a; }
html .cz-template-card[data-cat="image"] .cz-template-cover { color: #ffc9a8; background: radial-gradient(120% 140% at 20% 0%, rgba(255,148,92,0.20), rgba(10,10,14,0) 60%), #14151a; }
html .cz-template-card[data-cat="audio"] .cz-template-cover { color: #c9b8ff; background: radial-gradient(120% 140% at 20% 0%, rgba(139,124,255,0.24), rgba(10,10,14,0) 60%), #14151a; }
html .cz-template-card[data-cat="film"] .cz-template-cover { color: #ffe0a3; background: radial-gradient(120% 140% at 20% 0%, rgba(230,196,122,0.22), rgba(10,10,14,0) 60%), #14151a; }
html .cz-template-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html .cz-template-body strong { font-size: 13px; font-weight: 600; color: #e8eaef; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html .cz-template-body small { font-size: 11.5px; color: #8b93a7; font-variant-numeric: tabular-nums; }
html .cz-template-use { align-self: flex-start; margin-top: 2px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #cfd6ff; background: rgba(139,124,255,0.14); border: 1px solid rgba(139,124,255,0.28); }
html .cz-template-note { display: inline-flex; align-items: center; min-height: 72px; font-size: 13px; color: #8b93a7; }
@media (max-width: 1280px) { html .cz-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { html .cz-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

html .cz-template-cover svg { width: 22px; height: 22px; opacity: .92; }

/* ---------- 8. Canvas workflow import / export controls (zoom dock) ---------- */
html .cz-canvas-io { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: 2px; }
html .cz-canvas-io .cz-io-sep { width: 1px; height: 14px; background: rgba(255,255,255,0.14); margin: 0 4px; }
html .cz-canvas-io .cz-io-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; border: 0;
  background: transparent; color: #a1a1aa; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
html .cz-canvas-io .cz-io-btn:hover { background: rgba(255,255,255,0.09); color: #fff; }
html .cz-canvas-io .cz-io-btn svg { flex: 0 0 auto; }
html .cz-canvas-io-note {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 8px);
  padding: 8px 14px; border-radius: 10px; font-size: 12.5px; color: #f4f6fa;
  background: rgba(24,25,30,0.96); border: 1px solid rgba(255,255,255,0.14);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
html .cz-canvas-io-note[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 10. Canvas mini-map ---------- */
html .cz-minimap {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; padding: 5px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.10);
  background: rgba(18,19,23,0.88); backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -18px rgba(0,0,0,0.9); pointer-events: auto;
}
html .cz-minimap svg { display: block; }
html .cz-minimap .cz-mm-node { fill: rgba(139,124,255,0.55); }
html .cz-minimap .cz-mm-view { fill: rgba(94,234,212,0.08); stroke: #5eead4; stroke-width: 1.2; }
@media (max-width: 820px) { html .cz-minimap { display: none; } }

/* ---------- 11. Canvas right-click command menu ---------- */
html .cz-ctxmenu {
  position: fixed; z-index: 120; min-width: 218px; padding: 6px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(23,24,29,0.97); backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.95);
  direction: inherit;
}
html .cz-ctxmenu .cz-ctx-item {
  display: flex; align-items: center; width: 100%; min-height: 34px;
  padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  color: #d9dbe2; font-size: 13px; text-align: start; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
html .cz-ctxmenu .cz-ctx-item:hover { background: rgba(139,124,255,0.16); color: #fff; }
html .cz-ctxmenu .cz-ctx-sep { height: 1px; margin: 5px 8px; background: rgba(255,255,255,0.09); }

/* ---------- 12. Prompt template drawer (image / video tools) ---------- */
html .cz-tpl-trigger {
  position: fixed; left: 16px; bottom: 64px; z-index: 78;
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 10px; border: 1px solid rgba(139,124,255,0.35);
  background: rgba(24,25,32,0.92); color: #d9dcff; font-size: 12.5px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px -18px rgba(0,0,0,0.9);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
html .cz-tpl-trigger:hover { background: rgba(139,124,255,0.18); border-color: rgba(139,124,255,0.6); color: #fff; }
html .cz-tpl-panel {
  position: fixed; left: 16px; bottom: 108px; z-index: 130;
  width: min(940px, calc(100vw - 32px));
  padding: 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,21,26,0.97); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.95);
}
html .cz-tpl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
html .cz-tpl-head strong { display: block; font-size: 14px; color: #eef0f6; }
html .cz-tpl-head small { display: block; margin-top: 2px; font-size: 12px; color: #8b93a7; }
html .cz-tpl-close {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #b9bfcc; cursor: pointer; font-size: 15px; line-height: 1;
}
html .cz-tpl-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
html .cz-tpl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
html .cz-tpl-grid .cz-template-body small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { html .cz-tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  html .cz-tpl-trigger { bottom: 84px; }
  html .cz-tpl-panel { bottom: 128px; }
  html .cz-tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 13. Template card covers (real thumbnails) ---------- */
html .cz-template-cover.has-img { padding: 0; overflow: hidden; }
html .cz-template-cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .95; transition: transform .25s ease, opacity .2s ease; }
html button.cz-template-card:hover .cz-template-cover img { transform: scale(1.04); opacity: 1; }

/* ---------- 14. Featured template badge + admin recommend button ---------- */
html .cz-template-card { position: relative; }
html .cz-template-badge {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  color: #1b1508; background: linear-gradient(180deg,#f2d79b,#e6c47a);
  box-shadow: 0 4px 12px -6px rgba(0,0,0,.8);
}
html .cz-canvas-io .cz-rec-btn { color: #e6c47a; }
html .cz-canvas-io .cz-rec-btn:hover { background: rgba(230,196,122,0.16); color: #ffe6b0; }

/* ---------- 15. Canvas shortcut cheat-sheet ---------- */
html .cz-canvas-help {
  position: fixed; left: 16px; bottom: 108px; z-index: 131; width: 268px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,21,26,0.97); backdrop-filter: blur(14px);
  box-shadow: 0 20px 46px -26px rgba(0,0,0,0.95); color: #d9dbe2;
}
html .cz-canvas-help .cz-help-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
html .cz-canvas-help .cz-help-head strong { font-size: 13px; color: #eef0f6; }
html .cz-canvas-help .cz-help-head button { width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: #9aa0ae; cursor: pointer; font-size: 15px; line-height: 1; }
html .cz-canvas-help .cz-help-head button:hover { background: rgba(255,255,255,0.08); color: #fff; }
html .cz-canvas-help ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
html .cz-canvas-help li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: #98a2b3; }
html .cz-canvas-help kbd {
  display: inline-block; padding: 2px 5px; margin-inline-end: 2px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05);
  font-family: "Alkatip Basma Tom",ui-monospace,monospace; font-size: 10.5px; color: #d3d7e0;
}

html .cz-canvas-help .cz-kbd { display: inline-flex; align-items: center; gap: 3px; direction: ltr; unicode-bidi: isolate; }
html .cz-canvas-help .cz-kbd i { font-style: normal; color: #6b7280; font-size: 10px; }

/* ---------- 16. Script 闂?canvas hand-off ---------- */
html .cz-script-tocanvas { display: flex; justify-content: flex-end; margin-top: 8px; }
html .cz-to-canvas-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 9px; border: 1px solid rgba(139,124,255,0.4);
  background: rgba(139,124,255,0.14); color: #dfe2ff; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
html .cz-to-canvas-btn:hover { background: rgba(139,124,255,0.24); border-color: rgba(139,124,255,0.65); color: #fff; }
html .cz-to-canvas-btn:disabled { opacity: .55; cursor: default; }

/* ---------- 17. Canvas fit twin button ---------- */
html .cz-fit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; border: 0; padding: 0;
  background: transparent; color: #a1a1aa; cursor: pointer;
}
html .cz-fit-btn:hover { background: rgba(255,255,255,0.09); color: #fff; }

/* ============================================================================
   18. Unified brand palette (replace foreign blues) + delicate Uyghur type
   ============================================================================ */
:root {
  --cz-accent: #6d5cff;
  --cz-accent-2: #8b7cff;
  --cz-accent-soft: #a79bff;
  --cz-teal: #5eead4;
  --cz-gold: #e6c47a;
}

/* Solid accent fills */
html [class~="bg-[#2f7bff]"],
html [class~="bg-[#3f8bff]"],
html [class~="bg-[#2563eb]"],
html [class~="bg-[#1d4ed8]"],
html [class~="bg-[#60a5fa]"] { background-color: var(--cz-accent) !important; }

/* Accent text */
html [class~="text-[#7aadff]"],
html [class~="text-[#9cc4ff]"],
html [class~="text-[#a8c7fa]"],
html [class~="text-[#93c5fd]"],
html [class~="text-[#60a5fa]"],
html [class~="text-[#3f8bff]"],
html [class~="text-[#2f7bff]"],
html [class~="text-[#2563eb]"] { color: var(--cz-accent-soft) !important; }

/* Accent borders and rings */
html [class~="border-[#2f7bff]"],
html [class~="border-[#3f8bff]"],
html [class~="border-[#60a5fa]"] { border-color: rgba(124, 108, 255, 0.55) !important; }
html [class~="ring-[#3f8bff]"],
html [class~="ring-[#2f7bff]"] { --tw-ring-color: rgba(124, 108, 255, 0.55) !important; }

/* Gradient stops used by primary buttons */
html [class~="from-[#2f7bff]"], html [class*="from-[#2f7bff]"] { --tw-gradient-from: var(--cz-accent) !important; }
html [class~="to-[#3f8bff]"], html [class*="to-[#3f8bff]"] { --tw-gradient-to: var(--cz-accent-2) !important; }
html [class~="via-[#3f8bff]"] { --tw-gradient-via: var(--cz-accent-2) !important; }

/* Translucent accent tints */
html [class~="bg-[#2f7bff]/15"], html [class~="hover:bg-[#2f7bff]/15"]:hover { background-color: rgba(124, 108, 255, 0.16) !important; }
html [class~="bg-[#2f7bff]/10"], html [class~="hover:bg-[#2f7bff]/10"]:hover { background-color: rgba(124, 108, 255, 0.12) !important; }
html [class~="bg-[#3f8bff]/15"], html [class~="hover:bg-[#3f8bff]/15"]:hover { background-color: rgba(124, 108, 255, 0.16) !important; }
html [class~="bg-[#3f8bff]/10"], html [class~="hover:bg-[#3f8bff]/10"]:hover { background-color: rgba(124, 108, 255, 0.12) !important; }
html [class~="hover:text-white"]:hover { color: #ffffff !important; }

/* Delicate Uyghur typography: never heavy, never cramped */
html[data-site-lang="ug"][data-site-lang="ug"] body { font-weight: 380; }
html[data-site-lang="ug"][data-site-lang="ug"] body :is(h1, h2, h3, h4, h5, h6) { font-weight: 380 !important; letter-spacing: 0 !important; }
html[data-site-lang="ug"][data-site-lang="ug"] body :is(.font-bold, .font-extrabold, .font-semibold, .font-black, strong, b) { font-weight: 400 !important; }
html[data-site-lang="ug"][data-site-lang="ug"] body :is(button, [role="button"], a, label, .tool-seg-item) { font-weight: 400 !important; letter-spacing: 0 !important; }
html[data-site-lang="ug"][data-site-lang="ug"] body :is(p, li, span, div) { letter-spacing: 0 !important; }
html[data-site-lang="ug"] :is(p, li) { line-height: 1.9; }

/* ---------- 19. Generation error banner ---------- */
html .cz-media-error {
  position: fixed; top: 58px; left: 50%; transform: translate(-50%, -10px);
  z-index: 200; display: inline-flex; align-items: center; gap: 10px; max-width: min(760px, 92vw);
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(244, 63, 94, 0.45);
  background: rgba(34, 20, 26, 0.97); color: #ffe4e6; font-size: 12.5px; line-height: 1.7;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.95); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
html .cz-media-error[data-show="1"] { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
html .cz-media-error .cz-media-error-ico {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(244, 63, 94, 0.2); color: #ffb4c0; font-weight: 600; font-size: 11px;
}
html .cz-media-error .cz-media-error-msg { flex: 1 1 auto; }
html .cz-media-error button {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 0;
  background: transparent; color: #ffb4c0; cursor: pointer; font-size: 15px; line-height: 1;
}
html .cz-media-error button:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- 20. Screenplay version history ---------- */
html .cz-hist-trigger {
  position: fixed; left: 132px; bottom: 64px; z-index: 78;
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(24,25,32,0.92); color: #d5d8e2; font-size: 12.5px; font-weight: 400;
  cursor: pointer; backdrop-filter: blur(10px); box-shadow: 0 10px 26px -18px rgba(0,0,0,0.9);
}
html .cz-hist-trigger:hover { background: rgba(255,255,255,0.08); color: #fff; }
html .cz-hist-panel {
  position: fixed; left: 16px; bottom: 108px; z-index: 131;
  width: min(460px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
  padding: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,21,26,0.97); backdrop-filter: blur(14px);
  box-shadow: 0 24px 56px -28px rgba(0,0,0,0.95);
}
html .cz-hist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
html .cz-hist-head strong { display: block; font-size: 13.5px; color: #eef0f6; font-weight: 400; }
html .cz-hist-head small { display: block; margin-top: 2px; font-size: 11.5px; color: #8b93a7; }
html .cz-hist-close { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.12); background: transparent; color: #b9bfcc; cursor: pointer; }
html .cz-hist-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
html .cz-hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-top: 1px solid rgba(255,255,255,0.06); }
html .cz-hist-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html .cz-hist-meta strong { font-size: 12.5px; color: #e6e8ef; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
html .cz-hist-meta small { font-size: 11px; color: #8b93a7; font-variant-numeric: tabular-nums; direction: ltr; }
html .cz-hist-row button { flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(139,124,255,0.4); background: rgba(139,124,255,0.14); color: #dfe2ff; font-size: 11.5px; cursor: pointer; }
html .cz-hist-row button:hover { background: rgba(139,124,255,0.24); color: #fff; }
html .cz-hist-empty { margin: 6px 2px; font-size: 12.5px; color: #8b93a7; }
@media (max-width: 760px) { html .cz-hist-trigger { left: 16px; bottom: 128px; } html .cz-hist-panel { bottom: 172px; } }

/* ---------- 21. Unified popover / dropdown surface ---------- */
html .cz-model-picker,
html .cz-model-sheet,
html .adm-modal-panel,
html .cz-tpl-panel,
html .cz-hist-panel,
html .cz-canvas-help,
html .cz-ctxmenu {
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(22, 23, 28, 0.97) !important;
  box-shadow: 0 22px 54px -26px rgba(0, 0, 0, 0.96) !important;
}
html .cz-model-picker .cz-model-picker-heading { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 8px; }
html .cz-model-picker .cz-model-options button:hover,
html .cz-model-picker .cz-edition-tabs button:hover { background: rgba(139, 124, 255, 0.16) !important; color: #ffffff !important; }
html .adm-modal-panel button:hover { background: rgba(139, 124, 255, 0.14) !important; }
html .cz-model-picker .cz-model-search {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 9px !important;
}
html .cz-model-picker .cz-model-search:focus { border-color: rgba(139, 124, 255, 0.55) !important; outline: none !important; }

/* Selected states inside unified popovers */
html .cz-model-picker [data-cz-selected="true"],
html .cz-model-picker [aria-selected="true"] {
  background: rgba(139, 124, 255, 0.22) !important;
  color: #ffffff !important;
  border-color: rgba(139, 124, 255, 0.55) !important;
}
html .cz-model-picker .cz-edition-tabs button { border-radius: 9px !important; }
html .cz-model-picker .cz-model-options button { border-radius: 9px !important; }

/* ---------- 22. Mid-width toolbar containment ---------- */
html .cz-balance-pill { min-width: max-content !important; flex-shrink: 0 !important; }
html .cz-balance-pill .cz-balance-num { white-space: nowrap !important; }
@media (max-width: 1240px) {
  html header.cz-tool-toolbar {
    left: 8px !important;
    right: 8px !important;
    max-width: calc(100vw - 16px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }
  html header.cz-tool-toolbar::-webkit-scrollbar { display: none; }
  html header.cz-tool-toolbar > *,
  html header.cz-tool-toolbar .cz-chrome-contents > * { flex: 0 0 auto !important; }
  html header.cz-tool-toolbar :is(button, a, span) { white-space: nowrap !important; }
  html header.cz-tool-toolbar .cz-tool-toolbar-title,
  html header.cz-tool-toolbar .cz-tool-title { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
}

/* ==========================================================================
   Canvas studio v2 闂?measured layout, visible connections, unified node chrome
   Scope: /tools/canvas editor only (html.cz-route-canvas)
   ========================================================================== */

html.cz-route-canvas {
  --cz-node-radius: 16px;
  --cz-node-border: rgba(255, 255, 255, 0.10);
  --cz-node-border-hover: rgba(255, 255, 255, 0.22);
  --cz-accent: #8b7cff;
  --cz-accent-soft: rgba(139, 124, 255, 0.18);
  --cz-surface: #15161b;
  --cz-surface-2: #101116;
  --cz-text: #ececf1;
  --cz-text-dim: #a4a5b0;
  --cz-text-mute: #7b7c87;
}

/* 1. Edge layer: the bundled React Flow stylesheet leaves .react-flow__edges
   at 0x0, so every connection is drawn but never visible. Size the layer. */
html.cz-route-canvas .react-flow .react-flow__edges {
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  top: 0 !important;
  left: 0 !important;
  position: absolute !important;
}
html.cz-route-canvas .react-flow .react-flow__edges > svg {
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  position: absolute !important;
  pointer-events: none;
}
html.cz-route-canvas .react-flow__edge-path {
  filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.22));
}
html.cz-route-canvas .react-flow__edge:hover .react-flow__edge-path,
html.cz-route-canvas .react-flow__edge.selected .react-flow__edge-path {
  stroke: var(--cz-accent) !important;
  stroke-width: 2.6 !important;
  filter: drop-shadow(0 0 8px rgba(139, 124, 255, 0.55));
}
html.cz-route-canvas .react-flow__connection-path {
  stroke: var(--cz-accent) !important;
  stroke-width: 2.2 !important;
}

/* 2. Top editor toolbar: one measured row, no wrapping, no overlap. */
html.cz-route-canvas .cz-canvas-editor-actions {
  top: 56px !important;
  left: 12px !important;
  right: 12px !important;
  height: 38px;
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  padding: 0 !important;
  scrollbar-width: none;
}
html.cz-route-canvas .cz-canvas-editor-actions > div:first-child {
  height: 32px;
  padding: 0 8px !important;
  border-radius: 10px !important;
  border: 1px solid var(--cz-node-border) !important;
  background: rgba(18, 19, 24, 0.94) !important;
  gap: 6px !important;
}
html.cz-route-canvas .cz-canvas-editor-actions button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
  border: 1px solid var(--cz-node-border) !important;
  background: rgba(18, 19, 24, 0.94) !important;
  color: var(--cz-text) !important;
  box-shadow: none !important;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
html.cz-route-canvas .cz-canvas-editor-actions button:hover {
  background: rgba(30, 31, 38, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}
html.cz-route-canvas .cz-canvas-editor-actions > div:first-child > button:first-child {
  border: 0 !important;
  background: transparent !important;
  padding: 0 6px !important;
  color: var(--cz-text-dim) !important;
}
html.cz-route-canvas .cz-canvas-editor-actions > div:first-child > button:first-child:hover {
  color: #fff !important;
}
html.cz-route-canvas .cz-canvas-editor-actions select {
  height: 32px !important;
  max-width: 168px !important;
  border-radius: 10px !important;
  border: 1px solid var(--cz-node-border) !important;
  background: rgba(18, 19, 24, 0.94) !important;
  font-size: 12.5px !important;
}
html.cz-route-canvas .cz-canvas-editor-actions input {
  height: 26px;
  font-size: 12.5px !important;
}
html.cz-route-canvas .cz-canvas-back-label {
  display: inline !important;
  white-space: nowrap;
}

/* overflow menu (filled by runtime.js) */
html.cz-route-canvas .cz-canvas-editor-actions[data-cz-tb="on"] :is(.cz-tb-secondary,[data-cz-secondary="1"]) {
  display: none !important;
}
html.cz-route-canvas .cz-tb-more { position: relative; display: inline-flex; }
html.cz-route-canvas .cz-tb-more-btn {
  width: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--cz-text) !important;
}
html.cz-route-canvas .cz-tb-more-btn[aria-expanded="true"] {
  background: var(--cz-accent-soft) !important;
  border-color: rgba(139, 124, 255, 0.6) !important;
}
html .cz-tb-menu {
  position: fixed;
  z-index: 120;
  min-width: 232px;
  max-width: 300px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 21, 26, 0.98);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(18px);
}
html .cz-tb-menu-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--cz-text) !important;
  font-size: 12.5px !important;
  text-align: start;
  cursor: pointer;
}
html .cz-tb-menu-item:hover,
html .cz-tb-menu-item:focus-visible {
  background: rgba(139, 124, 255, 0.16) !important;
  outline: none !important;
}
html .cz-tb-menu-item[disabled] { opacity: 0.45; cursor: not-allowed; }
html .cz-tb-menu-sep { height: 1px; margin: 5px 4px; background: rgba(255, 255, 255, 0.08); }

/* 3. Node chrome: kind badge + title + status header, prompt + meta footer. */
html.cz-route-canvas .react-flow__node-studio {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.cz-route-canvas .react-flow__node-studio [data-node-body] {
  border-radius: var(--cz-node-radius) !important;
  border: 1px solid var(--cz-node-border) !important;
  background: var(--cz-surface) !important;
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.92), 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
html.cz-route-canvas .react-flow__node-studio:hover [data-node-body] {
  border-color: var(--cz-node-border-hover) !important;
}
html.cz-route-canvas .react-flow__node-studio.selected [data-node-body] {
  border-color: rgba(139, 124, 255, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(139, 124, 255, 0.55), 0 26px 60px -24px rgba(109, 92, 255, 0.55) !important;
}
html.cz-route-canvas .cz-node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--cz-node-radius) var(--cz-node-radius) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  padding-inline-end: 10px;
  padding-inline-start: 10px;
  overflow: hidden;
}
html.cz-route-canvas .cz-node-kind {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  font: 700 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #cdc4ff;
  background: rgba(139, 124, 255, 0.14);
  border: 1px solid rgba(139, 124, 255, 0.28);
}
html.cz-route-canvas .cz-node-kind[data-kind="video"] { color: #9ad4ff; background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.3); }
html.cz-route-canvas .cz-node-kind[data-kind="audio"],
html.cz-route-canvas .cz-node-kind[data-kind="music"] { color: #a7f3d0; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
html.cz-route-canvas .cz-node-kind[data-kind="script"],
html.cz-route-canvas .cz-node-kind[data-kind="text"] { color: #fde68a; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
html.cz-route-canvas .cz-node-kind[data-kind="design"] { color: #fbcfe8; background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.3); }
html.cz-route-canvas .cz-node-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  color: var(--cz-text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.75;
  text-align: start;
}
html.cz-route-canvas .cz-node-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cz-text-mute);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}
html.cz-route-canvas .cz-node-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b5c66;
}
html.cz-route-canvas .cz-node-state[data-state="queued"] { color: #fcd34d; }
html.cz-route-canvas .cz-node-state[data-state="queued"]::before { background: #fcd34d; }
html.cz-route-canvas .cz-node-state[data-state="running"] { color: #7dd3fc; }
html.cz-route-canvas .cz-node-state[data-state="running"]::before { background: #7dd3fc; box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.2); }
html.cz-route-canvas .cz-node-state[data-state="succeeded"] { color: #6ee7b7; }
html.cz-route-canvas .cz-node-state[data-state="succeeded"]::before { background: #6ee7b7; }
html.cz-route-canvas .cz-node-state[data-state="failed"] { color: #fca5a5; }
html.cz-route-canvas .cz-node-state[data-state="failed"]::before { background: #fca5a5; }
html.cz-route-canvas .cz-node-state[data-state="cancelled"] { color: #a1a1aa; }

html.cz-route-canvas .cz-node-foot {
  padding: 9px 12px 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0 0 var(--cz-node-radius) var(--cz-node-radius);
  background: rgba(255, 255, 255, 0.014);
}
html.cz-route-canvas .cz-node-prompt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--cz-text-dim);
  font-size: 11.5px;
  line-height: 1.65;
  word-break: break-word;
  unicode-bidi: plaintext;
  text-align: start;
}
html.cz-route-canvas .cz-node-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--cz-text-mute);
  font: 500 9.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.cz-route-canvas .cz-node-meta span { overflow: hidden; text-overflow: ellipsis; }

/* media well inside the node */
html.cz-route-canvas .react-flow__node-studio [data-media-frame] {
  min-height: 104px;
  max-height: 300px;
  background: var(--cz-surface-2) !important;
}
html.cz-route-canvas .react-flow__node-studio [data-media-frame] img,
html.cz-route-canvas .react-flow__node-studio [data-media-frame] video {
  max-height: 300px;
}

/* 4. Ports: centered on the card, clear affordance, generous hit area. */
html.cz-route-canvas .studio-port {
  width: 18px !important;
  height: 18px !important;
  border: 1.5px solid rgba(196, 181, 253, 0.55) !important;
  background: #191a20 !important;
  color: #cdc4ff !important;
  box-shadow: 0 0 0 3px rgba(12, 12, 15, 0.9);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
html.cz-route-canvas .studio-port::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
}
html.cz-route-canvas .studio-port::after {
  font-size: 12px !important;
  line-height: 15px !important;
  color: inherit !important;
}
html.cz-route-canvas .studio-port:hover,
html.cz-route-canvas .studio-port.connectingfrom,
html.cz-route-canvas .studio-port.valid {
  border-color: var(--cz-accent) !important;
  background: #2a2440 !important;
  box-shadow: 0 0 0 6px rgba(139, 124, 255, 0.18), 0 0 0 3px rgba(12, 12, 15, 0.9) !important;
}
html.cz-route-canvas .studio-port.target { left: -9px; }
html.cz-route-canvas .studio-port.source { right: -9px; }
@media (pointer: coarse) {
  html.cz-route-canvas .studio-port { width: 24px !important; height: 24px !important; }
}

/* 5. Node actions ride inside the card's top-right corner, never above it. */
html.cz-route-canvas [data-canvas-node] { position: relative; }
html.cz-route-canvas .cz-canvas-node-actions {
  position: absolute !important;
  inset: 46px 8px auto auto !important;
  z-index: 14;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
html.cz-route-canvas [data-canvas-node]:is(:hover, :focus-within) > .cz-canvas-node-actions,
html.cz-route-canvas .react-flow__node.selected .cz-canvas-node-actions {
  opacity: 1;
  pointer-events: auto;
}
html.cz-route-canvas .cz-canvas-node-actions > div {
  gap: 2px !important;
  padding: 2px 4px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(20, 21, 26, 0.94) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55) !important;
}
html.cz-route-canvas .cz-canvas-node-actions button {
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center;
  border-radius: 6px !important;
  color: #a8a9b4 !important;
}
html.cz-route-canvas .cz-canvas-node-actions button:hover { color: #fff !important; background: rgba(255, 255, 255, 0.1) !important; }
html.cz-route-canvas .cz-canvas-node-actions span { font-size: 10px !important; color: #b9bac4 !important; }

/* 6. Viewport chrome: dock, zoom, minimap share one inset rhythm. */
html.cz-route-canvas .cz-minimap {
  right: 16px !important;
  bottom: 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(16, 17, 21, 0.92) !important;
  padding: 6px !important;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.9) !important;
}
html.cz-route-canvas .cz-mm-node { fill: rgba(139, 124, 255, 0.55); }
html.cz-route-canvas .cz-mm-view { fill: rgba(139, 124, 255, 0.12); stroke: rgba(196, 181, 253, 0.8); }

/* 7. Narrow desktop: keep one row by dropping secondary button labels. */
@media (max-width: 1320px) {
  html.cz-route-canvas .cz-canvas-editor-actions button > span:not(.cz-canvas-back-label) { display: none; }
  html.cz-route-canvas .cz-canvas-editor-actions select { max-width: 128px !important; }
  html.cz-route-canvas .cz-canvas-editor-actions > div:first-child input { width: 132px !important; }
}
@media (max-width: 1024px) {
  html.cz-route-canvas .cz-canvas-editor-actions > div:first-child input { display: none; }
}

/* 8. Zoom / view dock: consistent 28px hit targets instead of 13px text chips. */
html.cz-route-canvas div[class*="bottom-16"][class*="left-4"] {
  gap: 4px !important;
  padding: 4px 6px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(16, 17, 21, 0.92) !important;
  bottom: 16px !important;
  left: 16px !important;
}
html.cz-route-canvas div[class*="bottom-16"][class*="left-4"] button {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  display: grid !important;
  place-items: center;
  padding: 0 !important;
  border-radius: 7px !important;
  color: #a6a7b2 !important;
}
html.cz-route-canvas div[class*="bottom-16"][class*="left-4"] button:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
html.cz-route-canvas div[class*="bottom-16"][class*="left-4"] button svg {
  width: 14px !important;
  height: 14px !important;
}
html.cz-route-canvas div[class*="bottom-16"][class*="left-4"] > span {
  min-width: 42px;
  text-align: center;
  font-size: 11px;
  color: #e7e7ec !important;
}

html.cz-route-canvas .cz-minimap{cursor:pointer;outline:none}
html.cz-route-canvas .cz-minimap:hover{border-color:rgba(139,124,255,.55)!important}
html.cz-route-canvas .cz-minimap:focus-visible{outline:2px solid rgba(139,124,255,.75)!important;outline-offset:2px}

/* 9. Catalog pages keep a stable four-across rhythm on desktop (three on
   laptops), so a page with one or two items never stretches a card to a
   full-width banner. No auto-fit: track count is explicit per breakpoint. */
@media (min-width: 1400px) {
  html .catalog-grid:is(.apps, .course) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }
}
@media (min-width: 1000px) and (max-width: 1399px) {
  html .catalog-grid:is(.apps, .course) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
  }
}

/* 10. Full-viewport join lock + one-column catalogs on phones. */
@media (max-width: 820px) {
  html .cz-gate {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: auto !important;
    overscroll-behavior: contain;
  }
}
@media (max-width: 700px) {
  html .catalog-grid:is(.apps, .course) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (min-width: 701px) and (max-width: 999px) {
  html .catalog-grid:is(.apps, .course) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  html body .catalog-section > .catalog-grid.course,
  html body .catalog-grid.course,
  html body .catalog-grid.apps {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 11. Join terminal legibility on phones. */
@media (max-width: 680px) {
  html .cz-gate-term-bar { font-size: 10.5px !important; padding: 8px 12px !important; gap: 8px !important; }
  html .cz-gate-live { font-size: 10.5px !important; }
  html .cz-gate-body { padding: 14px 12px !important; }
  html .cz-gate-log { font-size: 10.5px !important; line-height: 1.55 !important; padding: 7px 9px !important; }
  html .cz-gate-log, html .cz-gate-log * { white-space: pre-wrap !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
  html .cz-gate-question { font-size: 13px !important; line-height: 1.85 !important; }
  html .cz-gate-foot {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 3px 12px !important;
    padding: 8px 12px !important;
    font-size: 10px !important;
    letter-spacing: 0 !important;
  }
}


/* ---------- Tool chrome + workspace polish v3 ---------- */
.cz-tool-native-title{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;color:#fff}
.cz-model-slot{display:inline-flex;align-items:center;flex:0 0 auto;margin-inline-start:auto}
.cz-model-slot .cz-model-title{display:none!important}
.cz-model-slot button>span.hidden.sm\:inline{display:none!important}
.cz-model-slot>button{height:28px!important;padding:2px 8px!important;border:1px solid #ffffff1a!important;border-radius:999px!important;background:#1b1c21!important;font-size:11px!important;max-width:190px;gap:4px!important}
.cz-model-slot>button>span[data-mkclamp]{max-width:150px!important}
.cz-model-slot>select{height:28px!important;font-size:11px!important;border-radius:999px!important;max-width:170px}
.cz-preset-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;align-items:stretch!important;width:100%!important}
.cz-preset-grid>button{width:100%!important;justify-content:center!important;min-width:0!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;padding-inline:8px!important}
@media(max-width:700px){.cz-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html.cz-route-canvas .react-flow__node .cz-node-head{min-height:42px!important;height:42px!important;padding:0 12px!important}
html.cz-route-canvas .react-flow__node .cz-node-foot{min-height:36px!important;height:auto!important;padding:2px 10px 4px!important;align-items:center!important}
html.cz-route-canvas .react-flow__node .cz-node-prompt{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;margin:0!important;font-size:10px!important;line-height:1.25!important}
html.cz-route-canvas .react-flow__node .cz-node-meta{margin-top:1px!important;font-size:9px!important;line-height:1.1!important}
html.cz-route-canvas .react-flow__node .cz-node-title,html.cz-route-canvas .react-flow__node .cz-node-state{line-height:1.2!important}

/* ---------- Mobile nav + tool chrome polish v4 ---------- */
@media(max-width:520px){
  html.cz-retained #mkx-nav .mkx-fullscreen{display:none!important}
  html.cz-retained #mkx-nav .mkx-lang span{display:none!important}
  html.cz-retained #mkx-nav .mkx-brand-txt{font-size:17px!important}
  html.cz-retained #mkx-nav .mkx-right{gap:6px!important}
  html.cz-retained #mkx-nav .mkx-cta{max-width:76px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
.cz-model-slot{background:#17181c!important;border:1px solid #ffffff14!important;border-radius:999px!important;padding:2px 5px!important}
.cz-model-slot>button{border:0!important;background:transparent!important}
html.cz-route-design header button[title]{background:#ffffff08!important;border:1px solid #ffffff10!important;border-radius:8px!important}
html.cz-route-design header button[title] svg{color:#c4c9d4!important;opacity:1!important}

/* Hide duplicate native locale/fullscreen controls on the login card (nav already provides them). */
html.cz-route-login .fixed.right-4.top-4.z-50{display:none!important}

/* Compact tool header on phones: one scrollable strip instead of a sheet. */
@media(max-width:900px){
  html.cz-workspace header.cz-tool-toolbar{
    position:fixed!important;inset:0 0 auto 0!important;top:0!important;left:0!important;right:0!important;
    width:100%!important;max-width:none!important;height:56px!important;min-height:56px!important;max-height:56px!important;
    transform:none!important;border-radius:0!important;padding:10px 12px!important;margin:0!important;
    display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
    overflow-x:auto!important;overflow-y:hidden!important;background:#141518f2!important;
    backdrop-filter:blur(18px)!important;z-index:80!important;box-shadow:0 1px 0 #ffffff0f!important
  }
  html.cz-workspace header.cz-tool-toolbar .cz-toolbar-locale,
  html.cz-workspace header.cz-tool-toolbar .cz-balance-pill,
  html.cz-workspace header.cz-tool-toolbar #cz-toolbar-trigger{display:none!important}
  html.cz-workspace header.cz-tool-toolbar .tool-seg{display:flex!important;flex:0 0 auto!important;overflow:visible!important;min-width:0!important}
  html.cz-workspace header.cz-tool-toolbar .tool-seg-item{flex:0 0 auto!important;padding:0 8px!important}
  html.cz-workspace header.cz-tool-toolbar .cz-tool-native-title{max-width:110px!important;font-size:13px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html.cz-workspace header.cz-tool-toolbar .cz-toolbar-back{flex:0 0 auto!important}
  html.cz-workspace main{padding-top:56px!important}
}

/* Phone tool bar: one simple row with back, tool name and tools link. */
@media(max-width:900px){
  html.cz-workspace header.cz-tool-toolbar,
  html.cz-workspace #cz-toolbar-trigger{display:none!important}
  html.cz-workspace main{padding-top:52px!important}
  .cz-mobile-bar{position:fixed;top:0;left:0;right:0;height:52px;z-index:120;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;background:#141518f2;border-bottom:1px solid #ffffff10;backdrop-filter:blur(16px);direction:rtl}
  .cz-mobile-bar a{color:#e8eaf0;text-decoration:none;font-size:13px;font-weight:600;white-space:nowrap;padding:6px 10px;border-radius:9px;border:1px solid #ffffff12;background:#ffffff08}
  .cz-mobile-bar .cz-mobile-title{font-size:14px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* Workspace toolbar handle: subtle instead of a coloured bubble. */
#cz-toolbar-trigger{width:42px!important;height:10px!important;min-height:10px!important;border-radius:999px!important;background:#ffffff1a!important;border:1px solid #ffffff12!important;opacity:.55!important;top:5px!important;transition:opacity .2s ease}
#cz-toolbar-trigger>span{display:none!important}
#cz-toolbar-trigger:hover,#cz-toolbar-trigger:focus-visible{opacity:1!important}

/* Uyghur typography refinement: slightly smaller, English/numbers share the same scale. */
html[lang="ug"] body{font-size:14px}
html[lang="ug"] [class*="text-[11px]"]{font-size:10.5px!important}
html[lang="ug"] [class*="text-[12px]"]{font-size:11.5px!important}
html[lang="ug"] [class*="text-[13px]"]{font-size:12px!important}
html[lang="ug"] [class*="text-[14px]"]{font-size:13px!important}
html[lang="ug"] [class*="text-[15px]"]{font-size:14px!important}
html[lang="ug"] [class*="text-[18px]"]{font-size:16.5px!important}
html[lang="ug"] [class*="text-[19px]"]{font-size:17.5px!important}
html[lang="ug"] [class*="text-[20px]"]{font-size:18px!important}
html[lang="ug"] [class*="text-[22px]"]{font-size:20px!important}
html[lang="ug"] [class*="text-[23px]"]{font-size:21px!important}
html[lang="ug"] [class*="text-[26px]"]{font-size:20px!important}
html[lang="ug"] [class*="text-[28px]"]{font-size:21px!important}
html[lang="ug"] [class*="text-[30px]"]{font-size:21px!important}
html[lang="ug"] [class*="text-[34px]"]{font-size:23px!important}
html[lang="ug"] [class*="text-[21px]"]{font-size:18px!important}
html[lang="ug"] [class*="text-[10.5px]"]{font-size:11px!important}
html[lang="ug"] [class*="text-[11.8px]"]{font-size:11px!important}
html[lang="ug"] [class*="text-[12.5px]"]{font-size:11.5px!important}
html[lang="ug"] [class*="text-[12.6px]"]{font-size:11.5px!important}
html[lang="ug"] [class*="text-[13.2px]"]{font-size:12px!important}
html[lang="ug"] [class*="text-[13.4px]"]{font-size:12px!important}
html[lang="ug"] [class*="text-[13.5px]"]{font-size:12px!important}
html[lang="ug"] [class*="text-[13.6px]"]{font-size:12px!important}
html[lang="ug"] [class*="text-[14.4px]"]{font-size:13px!important}
html[lang="ug"] [class*="text-[14.5px]"]{font-size:13px!important}
html[lang="ug"] [class*="text-[15.5px]"]{font-size:14px!important}
html[lang="ug"].cz-route-home h1{font-size:clamp(24px,2.6vw,31px)!important;line-height:1.48!important;font-weight:400!important}
html[lang="ug"].cz-route-home .header-inner{font-size:13px!important}
html[lang="ug"] .adm-surface{font-size:12.5px!important}
html[lang="ug"] .adm-surface :is(p,span,button,label,td,th,a,li){font-size:12.5px}

html.cz-route-design .cz-tool-native-title{max-width:280px!important}
html.cz-route-design header button[title] svg{stroke:#c4c9d4!important;color:#c4c9d4!important;opacity:1!important}

/* ==========================================================================
   Unified Studio Architecture v5:
   1. Permanent non-occluding top bar across all 7 tools (matching Chat)
   2. Neutral monochrome Chat surface palette (no extra coloured pills/glows)
   3. Standardized Canvas node heights, ports, and clean single-line footers
   4. Harmonized Uyghur + Latin/numeral typography & mobile viewport bounds
   ========================================================================== */

html.cz-workspace #cz-toolbar-trigger,
html.cz-workspace .cz-toolbar-trigger,
html.cz-workspace .cz-mobile-bar {
  display: none !important;
}

html.cz-workspace header.cz-tool-toolbar,
html.cz-workspace header#cz-tool-toolbar,
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 0 !important;
  background: #141518 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: none !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
  z-index: 40 !important;
}

html.cz-route-script.cz-workspace header#cz-tool-toolbar {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}
html.cz-route-script.cz-workspace .tool-page-in {
  padding-top: 52px !important;
}

html.cz-route-canvas.cz-workspace header.cz-canvas-editor-header {
  position: absolute !important;
  inset: 0 0 auto 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
}

@media (max-width: 900px) {
  html.cz-workspace main {
    padding-top: 0 !important;
  }
  html.cz-workspace header.cz-tool-toolbar,
  html.cz-workspace header#cz-tool-toolbar,
  html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  html.cz-workspace header.cz-tool-toolbar .cz-toolbar-locale,
  html.cz-workspace header.cz-tool-toolbar .cz-balance-pill,
  html.cz-workspace header.cz-tool-toolbar .tool-seg {
    display: inline-flex !important;
    flex: 0 0 auto !important;
  }
}

/* Unified Chat-like neutral dark surfaces in workspaces (no blueprint glow or extra purple buttons) */
html.cz-workspace .studio-blueprint-bg {
  background-image: none !important;
  background-color: #0e0e0f !important;
}
html.cz-workspace #cz-tpl-trigger {
  background: #1c1d21 !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #d4d4d8 !important;
  box-shadow: none !important;
}
html.cz-workspace #cz-tpl-trigger:hover {
  background: #26272c !important;
  color: #ffffff !important;
}
html.cz-workspace .cz-model-slot {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
html.cz-workspace .cz-model-slot > button {
  height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  background: #1e1f22 !important;
  font-size: 12px !important;
  max-width: 190px !important;
}

/* Canvas clean geometry: no neon glows, no rainbow badges, uniform node heights & aligned ports */
html.cz-route-canvas .cz-canvas-editor-actions {
  top: 58px !important;
  left: 12px !important;
  right: 84px !important;
  height: 34px !important;
}
html.cz-route-canvas .react-flow__edge-path {
  filter: none !important;
  stroke: rgba(212, 212, 216, 0.42) !important;
}
html.cz-route-canvas .react-flow__edge:hover .react-flow__edge-path,
html.cz-route-canvas .react-flow__edge.selected .react-flow__edge-path,
html.cz-route-canvas .react-flow__connection-path {
  stroke: #e4e4e7 !important;
  stroke-width: 2.2 !important;
  filter: none !important;
}
html.cz-route-canvas .react-flow__node-studio [data-node-body] {
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: #16171b !important;
  box-shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.85) !important;
}
html.cz-route-canvas .react-flow__node-studio.selected [data-node-body] {
  border-color: rgba(255, 255, 255, 0.36) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 18px 40px -18px rgba(0, 0, 0, 0.9) !important;
}
html.cz-route-canvas .react-flow__node .cz-node-head {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 10px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html.cz-route-canvas .cz-node-kind,
html.cz-route-canvas .cz-node-kind[data-kind] {
  color: #b8bac4 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
}
html.cz-route-canvas .cz-node-state,
html.cz-route-canvas .cz-node-state[data-state] {
  font-size: 11px !important;
  color: #9ca0ab !important;
}
html.cz-route-canvas .cz-node-state::before {
  box-shadow: none !important;
}
html.cz-route-canvas .react-flow__node .cz-node-foot {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html.cz-route-canvas .react-flow__node .cz-node-prompt {
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 11.5px !important;
  line-height: 1.4 !important;
  color: #9ca0ab !important;
  margin: 0 !important;
}
html.cz-route-canvas .studio-port {
  border-color: rgba(255, 255, 255, 0.32) !important;
  background: #1c1d22 !important;
  color: #e4e4e7 !important;
  box-shadow: 0 0 0 2px #0e0e0f !important;
}
html.cz-route-canvas .studio-port:hover,
html.cz-route-canvas .studio-port.connectingfrom,
html.cz-route-canvas .studio-port.valid {
  border-color: #ffffff !important;
  background: #2b2d35 !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12) !important;
}
html.cz-route-canvas .cz-mm-node { fill: rgba(228, 228, 231, 0.45) !important; }
html.cz-route-canvas .cz-mm-view { fill: rgba(255, 255, 255, 0.08) !important; stroke: rgba(255, 255, 255, 0.55) !important; }

/* Refined Uyghur + Latin/Numeral Typography Across All Vue & Retained Pages */
html:is([lang="ug"], [data-site-lang="ug"]):not(.cz-workspace) :is(main h1, .hero h1, .service-hero h1, .about-portfolio .portfolio-title-wrap h1) {
  font-size: clamp(22px, 2.3vw, 29px) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
html.cz-workspace:is([lang="ug"], [data-site-lang="ug"]) :is(main h1, h1) {
  font-size: 19px !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
}
@media (min-width: 1280px) {
  html.cz-route-image main div.lg\:flex-nowrap,
  html.cz-route-video main div.xl\:flex-nowrap {
    flex-wrap: nowrap !important;
    gap: 5px !important;
  }
  html.cz-route-image main div.lg\:flex-nowrap > :is(button, label, select),
  html.cz-route-video main div.xl\:flex-nowrap > :is(button, label, select) {
    padding-inline: 8px !important;
    font-size: 11.5px !important;
  }
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(main h2, section h2, .about-portfolio .portfolio-story-main h2, .about-portfolio .portfolio-section-title h2, .about-portfolio .portfolio-contact-section h2) {
  font-size: clamp(17.5px, 1.7vw, 21.5px) !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-workspace :is(main h1, h1) {
  font-size: 19px !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(.about-portfolio .portfolio-stats b, .join-page .join-level-number, .catalog-grid .price) {
  font-size: 20px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is([class*="font-extrabold"], [class*="font-bold"]) {
  font-weight: 500 !important;
}
html .silk-preset-number,
html .course-duration {
  font-size: 11px !important;
}

/* Mobile header & member tab bounds: prevent RTL left-edge overflow on 390px phones */
@media (max-width: 768px) {
  html .site-header .header-inner {
    padding-inline: 12px !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  html .site-header .brand-word {
    font-size: 16px !important;
  }
  html .site-header .header-actions {
    gap: 5px !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
  }
  html .site-header .cz-fullscreen-toggle {
    display: none !important;
  }
  html .site-header .language-trigger > span:not(.language-code) {
    display: none !important;
  }
  html .site-header .header-actions a {
    max-width: 96px !important;
    padding-inline: 8px !important;
    font-size: 11.5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html.cz-route-member main [role="tablist"],
  html.cz-route-member main .overflow-x-auto {
    max-width: 100% !important;
    flex-wrap: wrap !important;
  }
}


/* === Master Uyghur + Latin/Numeral Harmony & Delicate Weight System === */
html:is([lang="ug"], [data-site-lang="ug"]),
html:is([lang="ug"], [data-site-lang="ug"]) body,
html:is([lang="ug"], [data-site-lang="ug"]) :is(h1,h2,h3,h4,h5,h6,p,span,a,button,label,input,textarea,select,td,th,li,small,strong,b) {
  font-family: "Alkatip Basma Tom",Inter,sans-serif!important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(h1,h2,h3,h4,h5,h6,strong,b,a,button,span,p,label,th,[class*="font-bold"],[class*="font-extrabold"],[class*="font-semibold"],.cz-template-use,.mkx-cta,.chip) {
  font-weight: 400 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]):not(.cz-workspace) :is(main h1:not(.hero-copy h1), .page-hero h1, .service-hero h1, .about-portfolio .portfolio-title-wrap h1) {
  font-size: clamp(22px, 2.1vw, 27px) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]):not(.cz-workspace) :is(main h2, section h2, .about-portfolio h2) {
  font-size: clamp(16.5px, 1.45vw, 19.5px) !important;
  line-height: 1.6 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(.cz-route-product, .cz-route-course-detail) main h1 {
  font-size: 21px !important;
  line-height: 1.55 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(.cz-route-product, .cz-route-course-detail) main h2 {
  font-size: 16.5px !important;
  line-height: 1.6 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-route-member main h1 {
  font-size: 18px !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-route-member main h2 {
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  color: #f0f1f5 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-route-member main :is([class*="text-[30px]"], [class*="text-[28px]"]) {
  font-size: 19px !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-route-member main [class*="text-[20px]"] {
  font-size: 16px !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-workspace :is(main h1, h1) {
  font-size: 18px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]).cz-workspace :is(main h2, h2) {
  font-size: 15.5px !important;
  line-height: 1.55 !important;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(p, li, td, input, textarea) {
  font-size: 12.5px;
}
html:is([lang="ug"], [data-site-lang="ug"]) :is(button, select, .tool-seg-item, #mkx-nav a, .site-header .desktop-nav a) {
  font-size: 12px !important;
}
.service-showcase a, [class*="showcase"] a {
  white-space: normal !important;
}
.catalog-card [class*="format"], .material-art span {
  font-size: 18px !important;
  font-weight: 500 !important;
}

main a:has(img), main a:has(video), .service-page a {
  max-width: 100%;
  box-sizing: border-box;
}
.service-page a * {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}


/* === Studio Superpowers v6 Styles === */
/* Catalog track counts are owned by section 9 above; the old auto-fit rules
   that blew a lone card up to 680px were removed on purpose. */
.cz-gate-skip-btn {
  margin-inline-start: 10px;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f4f4f5 !important;
  font-size: 11.5px !important;
  cursor: pointer;
  white-space: nowrap;
}
.cz-gate-skip-btn:hover { background: rgba(255, 255, 255, 0.18) !important; }
.cz-me-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  padding: 5px;
  border-radius: 14px;
  background: #141518;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cz-me-tab {
  padding: 6px 13px !important;
  border-radius: 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: #a1a1aa !important;
  font-size: 12px !important;
  cursor: pointer;
}
.cz-me-tab.is-on {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
.cz-token-estimate {
  margin-top: 5px;
  font-size: 11px !important;
  color: #9ca3af !important;
  line-height: 1.4;
}
.cz-bridge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cz-img-bridge-bar {
  position: absolute;
  inset: auto 8px 8px 8px;
  z-index: 12;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.group\/shot:hover .cz-img-bridge-bar,
[data-cz-img-bridge]:hover .cz-img-bridge-bar {
  opacity: 1;
}
.cz-bridge-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(22, 23, 27, 0.92) !important;
  color: #d4d4d8 !important;
  font-size: 11px !important;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.cz-bridge-btn:hover { background: #2b2d33 !important; color: #ffffff !important; }
.cz-script-free-trial-btn {
  margin-top: 10px;
  width: 100%;
  height: 36px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #e4e4e7 !important;
  font-size: 12px !important;
  cursor: pointer;
}
.cz-script-free-trial-btn:hover { background: rgba(255, 255, 255, 0.12) !important; }
.cz-task-tray-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1e1f24;
  color: #e4e4e7;
  font-size: 11.5px;
  white-space: nowrap;
}
.cz-job-done-toast {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 21, 25, 0.96);
  color: #f4f4f5;
  font-size: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}
.cz-job-done-toast a { color: #ffffff; text-decoration: underline; }
.cz-cv-mobile-sheet {
  position: fixed;
  inset: 50px 0 0 0;
  z-index: 95;
  overflow-y: auto;
  background: rgba(14, 14, 16, 0.98);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cz-cv-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
}
.cz-cv-mobile-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: #18191d;
  padding: 10px;
  color: #e4e4e7;
  font-size: 12px;
}
.cz-cv-mc-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.cz-cv-mobile-card img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
html .join-page { padding-top: 98px !important; }
html .join-replay-btn { position: relative; z-index: 5; scroll-margin-top: 110px; }


/* === Master Studio Cohesion v7 === */
html:is([lang="ug"], [data-site-lang="ug"]).cz-route-home :is(.cinematic-hero h1, main .hero h1, main section:first-of-type h1),
html:is([lang="ug"], [data-site-lang="ug"]) .cinematic-hero h1 {
  font-family: "Alkatip Basma Tom",sans-serif!important;
  font-size: clamp(30px, 3.1vw, 42px) !important;
  font-weight: 800 !important;
  line-height: 1.44 !important;
  max-width: min(94vw, 1120px) !important;
  width: auto !important;
  white-space: pre-line !important;
}
html:is([lang="en"], [data-site-lang="en"]) :is(.cinematic-hero h1, .cz-route-home main section:first-of-type h1) {
  font-size: clamp(26px, 3.15vw, 45px) !important;
  line-height: 1.16 !important;
  max-width: min(94vw, 1140px) !important;
  width: auto !important;
  white-space: pre-line !important;
  letter-spacing: -0.025em !important;
}
html:is([lang="zh"], [lang="zh-CN"], [data-site-lang="zh"]) :is(.cinematic-hero h1, .cz-route-home main section:first-of-type h1) {
  font-size: clamp(32px, 3.8vw, 54px) !important;
  line-height: 1.2 !important;
  max-width: min(94vw, 1120px) !important;
  white-space: pre-line !important;
}
@media (max-width: 640px) {
  html:is([lang="ug"], [data-site-lang="ug"]) .cinematic-hero h1 {
    font-size: clamp(23px, 6.2vw, 30px) !important;
    white-space: normal !important;
  }
  html:is([lang="en"], [data-site-lang="en"]) .cinematic-hero h1 {
    font-size: clamp(22px, 6vw, 29px) !important;
    white-space: normal !important;
  }
}

html.cz-workspace header.cz-tool-toolbar,
html.cz-workspace header#cz-tool-toolbar,
html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 0 16px !important;
  background: #131416 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}
html.cz-workspace .cz-tool-toolbar > div {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}
html.cz-workspace .cz-tool-toolbar > div:first-child {
  flex: 0 1 auto !important;
}
html.cz-workspace .cz-tool-toolbar > div:last-child {
  flex: 0 1 auto !important;
  justify-content: flex-end !important;
  margin-inline-start: auto !important;
}
html.cz-workspace .cz-tool-toolbar > div:last-child > div:has(.tool-seg) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
html.cz-workspace .cz-tool-toolbar .tool-seg {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 3px !important;
  border-radius: 12px !important;
  background: #1b1c20 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  flex: 0 1 auto !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
html.cz-workspace .cz-tool-toolbar .tool-seg::-webkit-scrollbar { display: none !important; }
html.cz-workspace .cz-tool-toolbar .tool-seg-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  color: #a1a1aa !important;
  background: transparent !important;
  white-space: nowrap !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}
html.cz-workspace .cz-tool-toolbar .tool-seg-item:hover {
  color: #f4f4f5 !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
html.cz-workspace .cz-tool-toolbar .tool-seg-item.is-active,
html.cz-workspace .cz-tool-toolbar .tool-seg-item[data-cz-selected="true"] {
  background: #2e3036 !important;
  color: #ffffff !important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 11px !important;
  border-radius: 10px !important;
  background: #1e1f23 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #d4d4d8 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-back:hover {
  background: #282a30 !important;
  color: #ffffff !important;
}
html[dir="rtl"].cz-workspace .cz-tool-toolbar .cz-toolbar-back svg {
  transform: scaleX(-1);
}

html.cz-route-image #cz-tpl-trigger,
html.cz-route-video #cz-tpl-trigger {
  display: none !important;
}
html.cz-route-image main div[class*="rounded-[24px]"],
html.cz-route-video main div[class*="rounded-[24px]"] {
  border-radius: 24px !important;
  background: #1e1f20 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42) !important;
  padding: 14px 16px 12px !important;
}


html:is([lang="ug"], [data-site-lang="ug"]) main .hero-copy h1,
html:is([lang="ug"], [data-site-lang="ug"]) .hero-copy h1 {
  font-family: "Alkatip Basma Tom",sans-serif!important;
  font-size: clamp(32px, 3.2vw, 42px) !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  max-width: min(94vw, 1140px) !important;
  width: auto !important;
  white-space: pre-line !important;
}
html:is([lang="en"], [data-site-lang="en"]) main .hero-copy h1,
html:is([lang="en"], [data-site-lang="en"]) .hero-copy h1 {
  font-size: clamp(26px, 3.1vw, 44px) !important;
  line-height: 1.16 !important;
  max-width: min(94vw, 1140px) !important;
  width: auto !important;
  white-space: pre-line !important;
}
@media (max-width: 640px) {
  html:is([lang="ug"], [data-site-lang="ug"]) main .hero-copy h1 {
    font-size: clamp(24px, 6.4vw, 31px) !important;
    white-space: normal !important;
  }
  html:is([lang="en"], [data-site-lang="en"]) main .hero-copy h1 {
    font-size: clamp(22px, 6vw, 29px) !important;
    white-space: normal !important;
  }
}

html:is([lang="ug"], [data-site-lang="ug"]) body #app main .hero-copy h1 {
  font-family: "Alkatip Basma Tom",sans-serif!important;
  font-size: clamp(32px, 2.7vw, 39px) !important;
  font-weight: 800 !important;
  line-height: 1.46 !important;
  max-width: min(94vw, 1160px) !important;
  white-space: pre-line !important;
}
@media (max-width: 640px) {
  html:is([lang="ug"], [data-site-lang="ug"]) body #app main .hero-copy h1 {
    font-size: clamp(24px, 6.2vw, 30px) !important;
    white-space: normal !important;
  }
}


/* === Master Trilingual Precision v8 === */
html.cz-workspace header.cz-tool-toolbar,
html.cz-workspace header#cz-tool-toolbar,
html.cz-workspace .cz-tool-toolbar > div,
html.cz-workspace .cz-tool-toolbar > div > div,
html.cz-workspace .cz-tool-toolbar > div:last-child > div {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}
html.cz-workspace header#cz-tool-toolbar {
  direction: inherit !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}
html.cz-workspace header#cz-tool-toolbar::-webkit-scrollbar { display: none !important; }

html.cz-workspace header#cz-tool-toolbar [data-no-i18n="true"] > span:has(.lucide-sparkles),
html.cz-workspace header#cz-tool-toolbar div:has(> .cz-balance-pill) > span:first-child:not(.cz-balance-pill) {
  display: none !important;
}

@media (min-width: 768px) {
  html.cz-route-image header#cz-tool-toolbar,
  html.cz-route-video header#cz-tool-toolbar {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
  }
  html.cz-route-image aside,
  html.cz-route-video aside {
    margin-top: 52px !important;
    height: calc(100dvh - 52px) !important;
  }
  html.cz-route-image aside + div,
  html.cz-route-video aside + div {
    padding-top: 52px !important;
  }
}
html.cz-route-chat .gemini-sidebar > div:first-child {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
}

html.cz-workspace aside .cz-retention-control,
html.cz-workspace aside div:has(> span + div > button[role="switch"]),
html.cz-workspace aside div:has(> div > span):has(button[role="switch"]) {
  flex-wrap: wrap !important;
  row-gap: 4px !important;
}
html.cz-workspace aside span {
  max-width: 100% !important;
}
html:is(.cz-route-image, .cz-route-video) aside .truncate {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

html.cz-route-video button.rounded-2xl,
html.cz-route-video button.rounded-2xl * {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

html.cz-route-canvas .react-flow__node div:has(> button[aria-label*="婵犮垼娉涚粔鎾春?], > button[title*="Ctrl+D"], > button[aria-label*="Duplicate"], > button[aria-label*="閻犫晜濯界粻顔炬惥閳哄嫮顔囧☉鏂挎穿缁犱即宕?]) {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
  white-space: nowrap !important;
}
html.cz-route-canvas div.bottom-20:has(fieldset) {
  bottom: 58px !important;
}
html.cz-route-canvas div.bottom-20:has(fieldset) fieldset {
  max-width: 720px !important;
}
html.cz-route-canvas div.bottom-16 {
  bottom: 10px !important;
  left: 12px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: max-content !important;
}
html.cz-route-canvas div:has(> div.bottom-20 fieldset) > div.bottom-3 {
  display: none !important;
}
html.cz-route-canvas main span.truncate {
  white-space: normal !important;
}

.cz-design-stage-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 12px 2px !important;
  width: 100% !important;
  flex-shrink: 0 !important;
}
.cz-design-stage-bar .cz-design-undo-grp {
  display: inline-flex !important;
}
.cz-design-stage-bar .cz-design-page-grp,
.cz-design-stage-bar .cz-design-page-grp > * {
  flex-wrap: nowrap !important;
  align-items: center !important;
}
html.cz-route-design .cz-design-hdr-title {
  max-width: none !important;
  overflow: visible !important;
}
html.cz-route-design aside button.rounded-full {
  border-radius: 10px !important;
  white-space: normal !important;
  text-align: start !important;
}

html.cz-route-script #cz-script-workflow {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}
html.cz-route-script #czsw-trigger {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

html.cz-route-music .cz-music-studio-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
html.cz-route-music .cz-music-studio-tabs::-webkit-scrollbar { display: none !important; }
html.cz-route-music .cz-music-studio-tabs > button {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding-inline: 9px !important;
  font-size: 11.5px !important;
}
html.cz-route-music aside div.sm\:grid-cols-4 > button {
  padding-inline: 6px !important;
  font-size: 11.5px !important;
  overflow: visible !important;
}
html.cz-route-music footer,
html.cz-route-music div:has(> span.font-mono) {
  align-items: center !important;
}


/* === Micro-Polish v8.1: 100% Zero-Defect Across All 27 Trilingual States === */
html[dir="rtl"].cz-workspace header#cz-tool-toolbar,
html[dir="rtl"].cz-route-chat .gemini-shell header#cz-tool-toolbar {
  direction: rtl !important;
}
html:not([dir="rtl"]).cz-workspace header#cz-tool-toolbar {
  direction: ltr !important;
}
/* Hide duplicate injected #cz-fit-btn when native Fit button is already in the zoom bar */
html.cz-route-canvas div.bottom-16:has(button:not(#cz-fit-btn)[title*="闂備緡鍋勯崐鍝ヨ姳?], button:not(#cz-fit-btn)[title*="Fit"], button:not(#cz-fit-btn)[title*="閻犫晞寮撶粭妤呮偉閺勫繑鐤嗗☉鎾存礀瀹撲焦顨㈤懠鍓侇唵濞?]) #cz-fit-btn {
  display: none !important;
}
/* Lift Canvas selected-node composer cleanly above bottom zoom bar in both LTR & RTL */
html.cz-route-canvas div.bottom-20:has(fieldset) {
  bottom: 66px !important;
}
html.cz-route-canvas div.bottom-20:has(fieldset) fieldset {
  max-width: 650px !important;
}
html.cz-route-canvas :is(.truncate, [class*="truncate"]):not(.cz-node-prompt):not(.cz-node-title) {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
/* Force Music 8 studio tabs onto 1 clean horizontal row in all 3 languages */
html.cz-route-music div:has(> button + button + button + button + button + button + button) {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
html.cz-route-music div:has(> button + button + button + button + button + button + button) > button {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}


html.cz-route-canvas body [class*="bottom-16"] {
  bottom: 10px !important;
  top: auto !important;
}
html.cz-route-canvas body [class*="bottom-20"] {
  bottom: 62px !important;
  top: auto !important;
}
html.cz-route-canvas body span {
  text-overflow: clip !important;
}
html.cz-route-music body .cz-music-studio-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  gap: 5px !important;
}
html.cz-route-music body .cz-music-studio-tabs > button {
  flex: 0 0 auto !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}


/* === TapNow Pro Infinite Canvas Suite Styles (Neutral Studio Dark) === */
html.cz-cv-hand-mode .react-flow__pane { cursor: grab !important; }
html.cz-cv-hand-mode .react-flow__pane:active { cursor: grabbing !important; }

.cz-tap-mode-grp {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-inline-end: 6px;
  margin-inline-end: 4px;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.10);
}
.cz-tap-mode-grp button {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

.cz-tap-pill {
  display: inline-flex !important;
  align-items: center !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: #1e1f24 !important;
  color: #e4e4e7 !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
  cursor: pointer;
}
.cz-tap-pill:hover { background: #2a2c33 !important; color: #fff !important; }

.cz-tap-multiselect-bar {
  position: fixed;
  top: 98px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 21, 25, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
}
.cz-tap-ms-count {
  padding: 0 8px;
  font-size: 11.5px;
  color: #a1a1aa;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.10);
}
.cz-tap-multiselect-bar button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

.cz-tap-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 5, 7, 0.84);
  backdrop-filter: blur(12px);
}
.cz-tap-modal {
  width: min(860px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #16171b;
  color: #f4f4f5;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.88);
}
.cz-tap-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}
.cz-tap-close {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 8px !important;
  padding: 0 !important;
}
.cz-tap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cz-tap-toolbar button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
}
.cz-tap-toolbar button.is-on {
  background: #3f4149 !important;
  color: #ffffff !important;
}
.cz-tap-canvas-stage {
  flex: 1;
  min-height: 260px;
  max-height: 62vh;
  overflow: auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0d0e11;
  padding: 10px;
}
.cz-tap-canvas-stage canvas {
  max-width: 100%;
  max-height: 58vh;
  border-radius: 8px;
  cursor: crosshair;
}
.cz-tap-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.cz-tap-modal-foot button {
  height: 34px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
}

.cz-tap-asset-drawer {
  position: fixed;
  top: 52px;
  bottom: 0;
  inset-inline-end: 0;
  width: min(340px, 92vw);
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(19, 20, 24, 0.98);
  border-inline-start: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: -18px 0 44px rgba(0, 0, 0, 0.75);
}
.cz-tap-asset-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}
.cz-tap-asset-item {
  position: relative;
  aspect-ratio: 9 / 12;
  padding: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  background: #111216 !important;
  cursor: pointer;
}
.cz-tap-asset-item img,
.cz-tap-asset-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cz-tap-asset-item span {
  position: absolute;
  bottom: 5px;
  left: 5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.72);
  color: #e4e4e7;
  font-size: 10px;
}


/* ==========================================================================
   Master Physical & Logical Perfection v11 (Zero Wrapping/Clipping/Offscreen)
   ========================================================================== */

/* 1. Override surface-system.css aggressive white-space:normal on standard inline buttons! */
html.cz-workspace :is(button, a[role="button"], .tool-seg-item):not([class*="rounded-2xl"]):not([class*="rounded-[16px]"]):not(.cz-cv-mobile-card) {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
}

/* 2. Course Detail Pages (/course/<id>/): unclip lesson chapter titles */
html.cz-retained main button.group span.truncate,
main button[class*="rounded-[14px]"] span {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.45 !important;
}
main button[class*="rounded-[14px]"] {
  height: auto !important;
  min-height: 50px !important;
  align-items: center !important;
}

/* 3. Materials Page (/material/): allow 2-line card titles without mid-word clipping */
html.cz-route-material main h2,
main a[href*="/material"] h2,
main div[class*="rounded-"] > div > h2 {
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  line-height: 1.45 !important;
}

/* 4. Technical Alliance (/group/): symmetrical 2x3 grid for the 6 domain pills */
html .join-domain-pills {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}
html .join-domain-pills > button {
  width: 100% !important;
  min-height: 38px !important;
  height: 38px !important;
  justify-content: center !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
@media (max-width: 520px) {
  html .join-domain-pills {
    grid-template-columns: 1fr !important;
  }
}

/* 5. Mobile Public Header (<=768px): uniform 34px height across all header action controls */
@media (max-width: 768px) {
  html .site-header .header-actions > :is(a, button),
  html .site-header .header-actions .language-trigger {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
}

/* 6. Chat Expanded Left Sidebar: prevent clipping on nav links & bottom Token card */
html.cz-route-chat .gemini-sidebar a span,
html.cz-route-chat .gemini-sidebar button span {
  overflow: visible !important;
  text-overflow: clip !important;
}
html.cz-route-chat .gemini-sidebar button:has(.lucide-coins),
html.cz-route-chat .gemini-sidebar > div:last-child button {
  white-space: normal !important;
  height: auto !important;
  padding: 8px 10px !important;
}

/* 7. Video Composer: prevent RTL left-edge offscreen overflow on desktop & clean wrap on mobile */
html.cz-route-video main div.xl\:flex-nowrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
html.cz-route-video main div.xl\:flex-nowrap::-webkit-scrollbar { display: none !important; }
@media (max-width: 768px) {
  html.cz-route-video main div.xl\:flex-nowrap,
  html.cz-route-image main div.lg\:flex-nowrap {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  /* Video mode switcher tabs fit inside 390px phone */
  html.cz-route-video div:has(> button + button):not(#cz-tool-toolbar *) {
    max-width: calc(100vw - 24px) !important;
  }
  html.cz-route-video div:has(> button + button):not(#cz-tool-toolbar *) > button {
    padding-inline: 10px !important;
    font-size: 11.5px !important;
  }
}

/* 8. Canvas Selected-Node Composer Top Strip: prevent x=-42 offscreen overflow */
html.cz-route-canvas fieldset > div:first-child {
  max-width: 100% !important;
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none !important;
}
html.cz-route-canvas fieldset > div:first-child::-webkit-scrollbar { display: none !important; }

/* 9. Music Left Sidebar Exclude-Style Header & Mobile Header/Studio Tabs */
html.cz-route-music aside div:has(> button .lucide-dice-5),
html.cz-route-music aside div:has(> span + button) {
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
}
html.cz-route-music aside div.mb-2.flex.flex-wrap > button {
  white-space: nowrap !important;
  font-size: 11.5px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
}

html .join-domain-pills > button {
  font-size: 11px !important;
  padding: 0 6px !important;
}
html.cz-route-music aside {
  overflow-x: hidden !important;
}
html body .join-domain-pills > button {
  height: auto !important;
  min-height: 46px !important;
  padding: 6px 10px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.38 !important;
  text-align: center !important;
}

/* ===== ZERO-OVERLAP ALL-TOOLS FIXES (v20261123) ===== */

/* 1. /tools/chat/: hide duplicate balance pill outside #cz-tool-toolbar & move Doc Editor button below topbar */
html.cz-route-chat .gemini-shell > aside button.cz-balance-pill,
html.cz-route-chat aside button.cz-balance-pill {
  display: none !important;
}
/* 2. /tools/image/ & /tools/video/: allow composer toolbar pills + model slot to wrap cleanly without pushing model off-screen or colliding with submit button */
html.cz-route-image main form .flex.min-w-0.flex-1,
html.cz-route-video main form .flex.min-w-0.flex-1,
html.cz-route-image [class*="border-t"] > .flex.min-w-0.flex-1,
html.cz-route-video [class*="border-t"] > .flex.min-w-0.flex-1 {
  flex-wrap: wrap !important;
  row-gap: 6px !important;
  column-gap: 6px !important;
}
html.cz-route-image .cz-model-slot,
html.cz-route-video .cz-model-slot {
  margin-inline-start: 0 !important;
  max-width: 100% !important;
}

/* 4. /tools/script/: dock floating Templates / History / Storyboard FAB cleanly on bottom-right (away from left sidebar buttons!) */
html.cz-route-script .cz-tpl-trigger {
  left: auto !important;
  right: 20px !important;
  bottom: 16px !important;
  z-index: 78 !important;
}
html.cz-route-script .cz-hist-trigger {
  left: auto !important;
  right: 112px !important;
  bottom: 16px !important;
  z-index: 78 !important;
}
html.cz-route-script .cz-sb-fab {
  left: auto !important;
  right: 196px !important;
  bottom: 14px !important;
  z-index: 78 !important;
}
html.cz-route-script .cz-tpl-panel,
html.cz-route-script .cz-hist-panel {
  left: auto !important;
  right: 20px !important;
  bottom: 62px !important;
}

/* ==========================================================================
   cz-ux-v7 闂?chat surface polish, compact usage receipt, catalog rhythm.
   Appended last on purpose: these rules must win over the older overrides.
   ========================================================================== */

/* 1. Per-reply usage receipt: a quiet single line under the answer, never a
   large block. The detailed breakdown stays available behind the <summary>. */
.cz-chat-receipt.cz-chat-usage,
html[lang^="ug"] .cz-chat-receipt.cz-chat-usage,
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-usage {
  margin: 6px 0 0 !important;
  max-width: 100% !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #7e7e86 !important;
  opacity: 1 !important;
}
.cz-chat-receipt.cz-chat-usage > summary,
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-usage > summary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #8b8b93 !important;
  list-style: none !important;
}
.cz-chat-receipt.cz-chat-usage > summary span,
html[lang^="ug"] .cz-chat-receipt.cz-chat-usage > summary span {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #8b8b93 !important;
}
.cz-chat-receipt.cz-chat-usage > summary:hover { color: #b9b9c2 !important; }

/* 2. Answers ease in instead of popping. Respect reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html.cz-route-chat .msg-in,
  html.cz-route-chat .msg-out {
    animation: cz-msg-in 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    will-change: opacity, transform;
  }
  html.cz-route-chat .msg-in > div > .prose,
  html.cz-route-chat .msg-in > div > [class*="whitespace-pre"] {
    animation: cz-msg-fade 0.42s ease-out both;
  }
}
@keyframes cz-msg-in {
  from { opacity: 0; transform: translateY(10px) scale(0.998); }
  to   { opacity: 1; transform: none; }
}
@keyframes cz-msg-fade {
  from { opacity: 0.35; }
  to   { opacity: 1; }
}

/* 3. Chat workspace keeps only the active tool chip: the cross-tool row was
   noise next to the conversation. Tools stay reachable from /tools/. */
html.cz-route-chat .tool-seg-item:not(.is-active) { display: none !important; }

/* 4. Member hub tiles: icon and label share one line, sized to the card. */
html.cz-route-member main .m-me-tile {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 9px 12px !important;
  text-align: start !important;
}
html.cz-route-member main .m-me-tile .m-me-tile-ico {
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  margin: 0 !important;
  border-radius: 9px !important;
}
html.cz-route-member main .m-me-tile .m-me-tile-ico svg {
  width: 15px !important;
  height: 15px !important;
}
html.cz-route-member main .m-me-tile > span:last-child,
html.cz-route-member main .m-me-tile [class*="text-[10"] {
  font-size: 12px !important;
  line-height: 1.45 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 5. Member hub action buttons: icon then label, never overlapping. */
html.cz-route-member main button > svg,
html.cz-route-member main a[role="button"] > svg {
  flex: 0 0 auto !important;
  margin: 0 !important;
  position: static !important;
}
html.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap {
  gap: 8px !important;
  flex-wrap: wrap !important;
}
html.cz-route-member main section:first-of-type .mt-4.flex.flex-wrap > button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

/* ==========================================================================
   cz-tools-v8 闁?tool workspaces (image / video / music / canvas / script):
   compact footnotes, comfortable composer, neutral chips and cards.
   ========================================================================== */

/* 1. The per-page footnote under the composer was inheriting a bright colour
   and a 12px size; make it a quiet caption again. */
html.cz-workspace main p[class*="text-center"][class*="text-[13px]"] {
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #6b6f7a !important;
  letter-spacing: 0.01em !important;
  margin-top: 8px !important;
}

/* 2. Composer: give the text room so typed lines never collide with the
   control row, and keep the whole card visually even. */
html.cz-workspace main [class*="rounded-[24px]"][class*="border-white"] {
  padding: 12px 16px 10px !important;
}
html.cz-workspace main textarea {
  min-height: 54px !important;
  line-height: 1.6 !important;
  padding: 4px 2px !important;
}
html.cz-workspace main textarea::placeholder { color: #7b808c !important; }

/* 3. Control chips inside the composer share one calm style. */
html.cz-workspace main [class*="rounded-[24px]"] button,
html.cz-workspace main [class*="rounded-2xl"][class*="border-white"] button {
  border-radius: 10px !important;
}
html.cz-workspace main [class*="rounded-[24px]"] button:hover { background: rgba(255, 255, 255, 0.06) !important; }

/* 4. Sidebar cards: neutral surface, no accent tint bleeding in from tones. */
html.cz-workspace aside [class*="rounded-2xl"] {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
html.cz-workspace aside [class*="rounded-2xl"] button[role="switch"] {
  background: rgba(255, 255, 255, 0.14) !important;
}
html.cz-workspace aside [class*="rounded-2xl"] button[role="switch"][aria-checked="true"] {
  background: rgba(96, 165, 250, 0.85) !important;
}

/* 5. Chat usage summary: keep it at caption scale even where an older rule
   forced 13px. */
html.cz-route-chat .cz-chat-usage > summary,
html[lang^="ug"] .cz-route-chat .cz-chat-usage > summary {
  font-size: 11.5px !important;
}
html.cz-route-chat .cz-chat-usage > summary span,
html[lang^="ug"] .cz-route-chat .cz-chat-usage > summary span {
  font-size: 11.5px !important;
  color: #8b8b93 !important;
}

/* ==========================================================================
   cz-tools-v9 閳?script tool chrome cleanup + canvas template card rhythm.
   ========================================================================== */

/* The script workspace does not need the floating "make a frame image" FAB:
   images are produced from step 5/6, not from the editor chrome. */
html.cz-route-script .cz-sb-fab { display: none !important; }

/* Canvas templates: one cover height, one card height, clamped copy. */
html.cz-route-canvas .cz-template-card {
  display: flex !important;
  flex-direction: column !important;
  height: 176px !important;
  min-height: 176px !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}
html.cz-route-canvas .cz-template-cover {
  height: 92px !important;
  min-height: 92px !important;
  overflow: hidden !important;
  border-radius: 12px 12px 0 0 !important;
}
html.cz-route-canvas .cz-template-cover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
html.cz-route-canvas .cz-template-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  padding: 7px 10px 9px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
html.cz-route-canvas .cz-template-body > :first-child,
html.cz-route-canvas .cz-template-body strong {
  font-size: 12px !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
html.cz-route-canvas .cz-template-body small,
html.cz-route-canvas .cz-template-body span {
  font-size: 10.5px !important;
  line-height: 1.4 !important;
  color: #8b8b93 !important;
}
html.cz-route-canvas .cz-template-body button {
  margin-top: auto !important;
  height: 26px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}

/* Quick-start prompt chips on the image tool (injected by runtime.js). */
.cz-starter-chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #c9cbd4;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.cz-starter-chip:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
#cz-image-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px auto 0;
  max-width: 720px;
}

/* Quick-start chips: force the pill surface past the global button reset. */
.cz-starter-chip {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.045) !important;
  color: #c9cbd4 !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.cz-starter-chip:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
}
#cz-image-starters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
  margin: 18px auto 0 !important;
  max-width: 720px !important;
}

/* Balance the empty band: centre the hero block in the free vertical space
   instead of pinning it to the very top. */
html:is(.cz-route-image, .cz-route-video) main div:has(> .max-w-\[760px\]) {
  justify-content: center !important;
}

/* Highest-specificity surface for the quick-start chips (the app's global
   button reset uses !important, so anchor on the row id). */
html body #cz-image-starters > .cz-starter-chip {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #cfd2db !important;
  border-radius: 999px !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  height: auto !important;
  min-height: 0 !important;
  cursor: pointer !important;
}
html body #cz-image-starters > .cz-starter-chip:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
}

/* Prompt helper panel on the image tool (starters + preset palette + counter). */
#cz-image-panel { max-width: 760px; margin: 16px auto 0; display: flex; flex-direction: column; gap: 10px; }
.cz-starter-row, .cz-preset-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cz-preset-palette { display: flex; flex-direction: column; gap: 8px; }
.cz-preset-label {
  min-width: 54px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #7c8290;
}
html body #cz-image-panel .cz-starter-chip {
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: #cfd2db !important;
  border-radius: 999px !important;
  padding: 6px 13px !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  height: auto !important;
  min-height: 0 !important;
  cursor: pointer !important;
}
html body #cz-image-panel .cz-starter-chip:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
}
html body #cz-image-panel .cz-starter-chip.is-preset {
  border-style: dashed !important;
  color: #b9bdc7 !important;
  background: rgba(255, 255, 255, 0.028) !important;
}
.cz-prompt-foot { display: flex; justify-content: flex-end; }
.cz-prompt-counter { font-size: 11px; color: #6f7480; font-variant-numeric: tabular-nums; }

/* AUTHORITATIVE DESKTOP TOOL LAYOUT */
@media (min-width: 1024px) {
  html.cz-route-music main aside {
    flex: 0 0 450px !important;
    width: 450px !important;
    min-width: 450px !important;
    overflow: hidden !important;
  }
  html.cz-route-music main aside > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html.cz-route-music main aside > div:first-child > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html.cz-route-music main {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  html.cz-route-music .cz-music-studio-tabs {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    align-content: center !important;
    min-width: 0 !important;
  }
  html.cz-route-music .cz-music-studio-tabs > button {
    flex: 0 1 auto !important;
    max-width: 100% !important;
  }
  html.cz-workspace #cz-tpl-trigger {
    left: 16px !important;
    right: auto !important;
    bottom: 88px !important;
  }
}

/* cz-unified-chrome (2026-11-24)
   Every workspace bar now uses the chat toolbar's visual language: near-black
   floating strip, 12px gutters, 8px radius, no bottom border, 48px tall with
   the same 34px controls. Fixed bars keep the 52px content offset, in-flow
   bars use a 4px top margin so their footprint stays identical. */
@media (min-width: 768px) {
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar {
    background: rgba(11, 11, 11, 0.96) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    left: 12px !important;
    right: 12px !important;
    top: 4px !important;
    width: auto !important;
  }
  html.cz-route-music.cz-workspace header#cz-tool-toolbar,
  html.cz-route-canvas.cz-workspace header#cz-tool-toolbar,
  html.cz-route-design.cz-workspace header#cz-tool-toolbar {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    margin: 4px 12px 0 !important;
  }
}

/* One back-button recipe for every workspace. */
html.cz-workspace header#cz-tool-toolbar :is(a[href="/tools"], a[href="/tools/"], .cz-toolbar-back) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #1e1f24 !important;
  color: #e4e4e7 !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
  flex: none !important;
}

/* Canvas header badge: neutral grey instead of the stray blue dot. */
html.cz-workspace header#cz-tool-toolbar span[class*="3f8bff"] {
  background: #6c6d73 !important;
}

/* Design header: page/undo icon buttons were collapsing their SVGs to 0.19px. */
html.cz-route-design.cz-workspace header#cz-tool-toolbar :is(.cz-design-page-grp, .cz-design-undo-grp) button > svg {
  width: 13px !important;
  min-width: 13px !important;
  max-width: 13px !important;
  height: 13px !important;
  flex: 0 0 auto !important;
  display: block !important;
  overflow: visible !important;
}
html.cz-route-design.cz-workspace header#cz-tool-toolbar .cz-design-undo-grp button:disabled {
  opacity: 0.55 !important;
}
/* cz-neutral-surfaces (2026-11-25)
   The page's older glass rules paint every panel with rgba(20,23,32,.60) and a
   175% saturation backdrop, which reads blue next to the chat workspace's
   neutral black. Re-point that glass at the chat palette and keep it neutral. */
html.cz-workspace :is(.fig-card, .glass,
  [class*="border-white/"],
  [class*="bg-white/[0.0"],
  [class*="bg-white/[0.1"],
  [class*="bg-[#101218]"]) {
  background-color: rgba(21, 21, 21, 0.72) !important;
  background-image: none !important;
  -webkit-backdrop-filter: blur(24px) saturate(100%) !important;
  backdrop-filter: blur(24px) saturate(100%) !important;
}

/* Same neutral tint for the tailwind ink palette used by the workspace shells. */
html.cz-workspace[data-theme="dark"] {
  --ink-950: 9 9 9;
  --ink-900: 16 16 16;
  --ink-850: 21 21 21;
  --ink-800: 28 28 28;
  --ink-700: 40 40 40;
  --ink-600: 56 56 56;
}
/* cz-neutral-surfaces-2 (2026-11-25)
   Remaining bluish literals in the workspace shells: the canvas empty-state
   card, the tab strip, template covers, the admin modal panel and the template
   trigger. Re-point them at the chat workspace's neutral greys. */
html.cz-workspace [class*="bg-[#141519]"],
html.cz-workspace [class*="bg-[#181a20]"] {
  background-color: #151515 !important;
}

html.cz-workspace .tool-seg {
  background-color: #1a1a1a !important;
}

html.cz-workspace .cz-template-cover {
  background-color: #161616 !important;
}

html.cz-workspace .adm-modal-panel {
  background-color: rgba(24, 24, 24, 0.97) !important;
}

html.cz-workspace .cz-tpl-trigger {
  background-color: #1c1c1c !important;
}

/* The unified back button should stay neutral too. */
html.cz-workspace header#cz-tool-toolbar :is(a[href="/tools"], a[href="/tools/"], .cz-toolbar-back) {
  background: #1e1e1e !important;
}
/* cz-neutral-surfaces-3 (2026-11-25)
   The ambient theme derives its workspace panels from a blue-shifted base
   (#11151f / #1b2331). Re-point every derived surface variable at the chat
   workspace's neutral greys so no page keeps a blue tint. */
html.cz-workspace {
  --ambient-base: #0b0b0b;
  --cz-workspace: #0b0b0b;
  --cz-workspace-panel: #141414;
  --cz-workspace-line: #ffffff12;
  --cz-panel: #141414;
  --cz-panel-raised: #1a1a1a;
  --cz-surface: #151515;
  --cz-raised: #242424;
  --cz-chat-control: #202020;
  --cz-chat-control-hover: #2a2a2a;
  --cz-chat-control-active: #303030;
}
/* cz-neutral-surfaces-4 (2026-11-25) — last bluish spots: tab strip + admin modal */
html.cz-workspace header#cz-tool-toolbar .tool-seg,
html.cz-workspace #cz-tool-toolbar .tool-seg {
  background: #1b1b1b !important;
  background-image: none !important;
}

html.cz-workspace[data-theme] .adm-modal-panel,
html.cz-workspace .adm-modal-panel {
  background: rgba(23, 23, 23, 0.97) !important;
  background-image: none !important;
  border-color: #ffffff14 !important;
}
/* cz-neutral-surfaces-5 (2026-11-25) — force the modal/trigger neutrals */
html.cz-workspace[data-theme="dark"] body .adm-modal-panel {
  background-color: rgba(23, 23, 23, 0.97) !important;
  background-image: none !important;
  border-color: #ffffff14 !important;
}
html.cz-workspace[data-theme="dark"] body .cz-tpl-trigger {
  background-color: #1c1c1c !important;
}
/* cz-design-bar-room (2026-11-25)
   The design header packs undo/redo, page add/copy/delete and the page counter
   into 24px boxes next to 34px controls, which reads cramped at 1366. Give the
   icon controls a comfortable hit box and even spacing. */
html.cz-route-design.cz-workspace header#cz-tool-toolbar :is(.cz-design-undo-grp, .cz-design-page-grp) button {
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
}

html.cz-route-design.cz-workspace header#cz-tool-toolbar .cz-design-undo-grp {
  gap: 4px !important;
  margin-inline-end: 6px !important;
}

html.cz-route-design.cz-workspace header#cz-tool-toolbar .cz-design-page-grp {
  gap: 4px !important;
}

html.cz-route-design.cz-workspace header#cz-tool-toolbar .cz-design-page-grp > span {
  min-width: 42px !important;
  font-variant-numeric: tabular-nums;
}
/* cz-bar-nowrap (2026-11-25)
   At 1366 the design header's groups wrapped onto a second flex line that
   spilled outside the 48px bar. Keep every workspace bar on one line and let
   the tab strip scroll instead. */
html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar > div {
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  flex-shrink: 1 !important;
}

html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg::-webkit-scrollbar {
  display: none !important;
}
/* cz-script-footer (2026-11-25)
   The script wizard's Prev/Next bar sits at the very bottom of a tall step and
   scrolls out of view. Pin it to the bottom of the workspace scroller so the
   primary action is always reachable. */
html.cz-route-script .director-workspace-scroll .space-y-4 > div:last-child {
  position: sticky !important;
  bottom: 10px !important;
  z-index: 35 !important;
  background: #0d0d0d !important;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.55) !important;
}

/* Keep the injected "send to canvas" action aligned with the idea field. */
html.cz-route-script .cz-script-tocanvas {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 6px !important;
}

html.cz-route-script .cz-to-canvas-btn {
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1px solid #ffffff14 !important;
  background: #1c1c1c !important;
  color: #e4e4e7 !important;
  font-size: 12.5px !important;
}

html.cz-route-script .cz-to-canvas-btn:hover {
  background: #242424 !important;
}
/* cz-script-footer-fixed (2026-11-25)
   Sticky did not pin because the workspace grows with the document instead of
   scrolling inside itself. Keep the wizard's Prev/Next bar fixed to the bottom
   of the viewport and reserve room for it. */
html.cz-route-script .director-workspace-scroll .space-y-4 > div:last-child {
  position: fixed !important;
  left: 50% !important;
  bottom: 12px !important;
  transform: translateX(-50%) !important;
  width: min(1696px, calc(100vw - 48px)) !important;
  z-index: 60 !important;
  background: #0d0d0d !important;
  border-color: #ffffff14 !important;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.6) !important;
}

html.cz-route-script .director-workspace-scroll .space-y-4 {
  padding-bottom: 92px !important;
}
/* cz-script-scroll (2026-11-25)
   Fixed positioning resolves against the page-enter transform, so the footer
   ended up off-screen. Make the workspace a real scroller and pin the footer
   inside it. */
html.cz-route-script .director-workspace-scroll {
  overflow-y: auto !important;
  max-height: calc(100dvh - 56px) !important;
}

html.cz-route-script .director-workspace-scroll .space-y-4 {
  padding-bottom: 0 !important;
}

html.cz-route-script .director-workspace-scroll .space-y-4 > div:last-child {
  position: sticky !important;
  bottom: 10px !important;
  left: auto !important;
  transform: none !important;
  width: auto !important;
  z-index: 60 !important;
  background: #0d0d0d !important;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.6) !important;
}
html.cz-route-canvas #cz-canvas-minimap .cz-mm-view {
  fill: rgba(255, 255, 255, 0.05) !important;
  stroke: rgba(255, 255, 255, 0.22) !important;
  stroke-width: 1 !important;
}

html.cz-route-canvas #cz-canvas-minimap rect:not(.cz-mm-view) {
  fill: #242424 !important;
}
/* cz-canvas-polish (2026-11-25)
   Round-2 canvas cleanup: give the workspace bar the same floating card look as
   the main bar and drop the stray empty "—" placeholders inside nodes. */
html.cz-route-canvas .cz-canvas-editor-actions {
  background: rgba(17, 17, 17, 0.96) !important;
  border: 1px solid #ffffff10 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 4px 8px !important;
}

html.cz-route-canvas #cz-canvas-minimap {
  box-shadow: none !important;
}

html.cz-route-canvas .react-flow__node > div > div > span:empty,
html.cz-route-canvas .react-flow__node > div > div > p:empty {
  display: none !important;
}

/* keep the legacy minimap plate out of the dark canvas */
html.cz-route-canvas #cz-canvas-minimap { display: none !important; }/* cz-canvas-empty-fix (2026-11-25)
   The blank-canvas hint wrapped into a 129px column and sat on top of the
   node menu. Stack the hint above the menu. */
html.cz-route-canvas .czn-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
}

html.cz-route-canvas .czn-hint {
  position: static !important;
  width: auto !important;
  max-width: 680px !important;
  height: auto !important;
  display: block !important;
  text-align: center !important;
}

html.cz-route-canvas .czn-hint span {
  display: block !important;
  width: auto !important;
  max-width: 680px !important;
  white-space: normal !important;
  line-height: 1.7 !important;
}

/* The canvas templates trigger leaked onto the script hub; keep script clean. */
html.cz-route-script .cz-tpl-trigger {
  display: none !important;
}
/* cz-canvas-empty-z (2026-11-25)
   Keep the decorative cursor illustration behind the empty-state hint and the
   node menu so it never covers their labels. */
html.cz-route-canvas .czn-empty > svg,
html.cz-route-canvas .czn-empty svg {
  opacity: 0.45 !important;
}

html.cz-route-canvas .czn-hint {
  position: relative !important;
  z-index: 2 !important;
}

html.cz-route-canvas .czn-empty button {
  position: relative !important;
  z-index: 3 !important;
}
/* cz-canvas-empty-clean (2026-11-25)
   Hide the decorative cursor illustration in the blank-canvas overlay; it was
   painted across the menu title. Keep icons inside buttons. */
html.cz-route-canvas .czn-empty > svg,
html.cz-route-canvas .czn-empty > div > svg,
html.cz-route-canvas .czn-empty > img {
  display: none !important;
}

/* blank-canvas quick pills duplicate the node menu and collided with it */
html.cz-route-canvas .czn-pills { display: none !important; }
/* the blank-canvas hint sat behind the node menu; the menu is self-explanatory */
html.cz-route-canvas .czn-empty .czn-hint { display: none !important; }/* cz-restore (2026-11-25)
   Put back the pieces that were hidden instead of fixed, and place them so they
   do not collide with the node menu. */
html.cz-route-canvas #cz-canvas-minimap {
  display: block !important;
  background: #0d0d0d !important;
  border: 1px solid #ffffff14 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55) !important;
  opacity: 0.9 !important;
}

html.cz-route-canvas #cz-canvas-minimap .cz-mm-view {
  fill: rgba(255, 255, 255, 0.06) !important;
  stroke: rgba(255, 255, 255, 0.25) !important;
}

html.cz-route-canvas .czn-empty .czn-hint {
  display: block !important;
  transform: translateY(-120px) !important;
}

html.cz-route-canvas .czn-empty .czn-pills {
  display: flex !important;
  transform: translateY(120px) !important;
}

/* the script templates trigger belongs near the workspace, not floating mid-page */
html.cz-route-script .cz-tpl-trigger {
  display: inline-flex !important;
  position: fixed !important;
  inset: auto auto 18px 18px !important;
  z-index: 55 !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: #1c1c1c !important;
  border: 1px solid #ffffff14 !important;
  color: #e4e4e7 !important;
}
/* cz-tapnow-single-ui (2026-11-25)
   Decision: the TapNow layer owns the canvas UI. Keep its blank state and dock,
   hide the native duplicate node menu, and let the TapNow hint/pills stack
   naturally. */
html.cz-route-canvas .pointer-events-auto.grid.grid-cols-2.gap-3 {
  display: none !important;
}

html.cz-route-canvas .czn-empty .czn-hint {
  transform: none !important;
  margin-bottom: 14px !important;
}

html.cz-route-canvas .czn-empty .czn-pills {
  transform: none !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  max-width: 720px !important;
}

html.cz-route-canvas .czn-dock {
  border: 1px solid #ffffff12 !important;
  border-radius: 12px !important;
  background: rgba(17, 17, 17, 0.96) !important;
}
/* cz-tapnow-single-ui-2 (2026-11-25)
   Style TapNow's blank-state pills as real buttons and drop the native overlay
   container that still painted its own hint/menu label. */
html.cz-route-canvas .pointer-events-none.absolute.inset-0.flex.flex-col {
  display: none !important;
}

html.cz-route-canvas .czn-pills button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  background: #1a1a1a !important;
  border: 1px solid #ffffff14 !important;
  color: #e4e4e7 !important;
  font-size: 12.5px !important;
}

html.cz-route-canvas .czn-pills button:hover {
  background: #232323 !important;
  border-color: #ffffff22 !important;
}

html.cz-route-canvas .czn-pills {
  gap: 10px !important;
}

html.cz-route-canvas .czn-hint {
  font-size: 13px !important;
  color: #b9b9c0 !important;
}
html.cz-route-canvas #czn-empty .czn-pills > * {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  background: #1a1a1a !important;
  border: 1px solid #ffffff14 !important;
  color: #e4e4e7 !important;
  font-size: 12.5px !important;
  box-shadow: none !important;
}
html.cz-route-canvas #czn-empty .czn-pills > *:hover {
  background: #232323 !important;
  border-color: #ffffff24 !important;
}

/* === cz-chat-v2-complete === */
/* 1. Responsive layout fixes: zero 64px mobile gap, zero toolbar 2-row clipping, zero + menu clipping */
@media (max-width: 767px) {
  html.cz-route-chat.cz-workspace .gemini-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 260px !important;
    min-width: 260px !important;
    z-index: 65 !important;
  }
  html.cz-route-chat.cz-workspace .gemini-main {
    width: 100% !important;
    max-width: 100vw !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer {
    padding: 8px 10px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell button[data-chat-model] {
    max-width: 112px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 1023px) {
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar,
  html.cz-route-chat.cz-workspace .gemini-shell header.cz-tool-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar::-webkit-scrollbar {
    display: none !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar > div {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar :is(a, button) {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }
}

/* + attachment menu: always stays inside viewport in both LTR and RTL */
html.cz-route-chat .gemini-shell .cz-chat-attachment-menu {
  left: 0 !important;
  right: auto !important;
  width: min(264px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
}

/* 2. Balanced heading & composer typography (including Uyghur) */
html.cz-route-chat.cz-workspace .gemini-shell h1 {
  font-size: clamp(22px, 2.2vw, 28px) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  margin-bottom: 24px !important;
  color: #d8d8dc !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-composer textarea {
  font-size: 14px !important;
  line-height: 22px !important;
  min-height: 32px !important;
  padding: 5px 4px !important;
  color: #e4e4e7 !important;
}

/* 3. Clean 34px Mode & Capability bar with clear visual grouping and RTL support */
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 12px !important;
  padding: 0 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes {
  direction: ltr !important;
}
html.cz-route-chat .studio-blueprint-bg,
html.cz-route-chat .tool-page-in,
html.cz-route-chat .page-shell,
html.cz-route-chat .page-enter-host {
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
}
html.cz-route-chat .gemini-sidebar .cz-sidebar-settings-btn {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 6px !important;
  margin: 0 0 2px !important;
  border-radius: 99px !important;
  font-size: 12.5px !important;
  line-height: 1.7 !important;
  color: #b4b4ba !important;
  background: transparent !important;
  text-align: start !important;
}
html.cz-route-chat .gemini-sidebar .cz-sidebar-settings-btn:hover {
  background: #262626 !important;
  color: #ececf0 !important;
}
html.cz-route-chat .gemini-sidebar .cz-sidebar-settings-btn.is-active {
  color: #ffffff !important;
}
.cz-sb-set-ico { font-size: 14px; line-height: 1; flex: none; }
.cz-sb-set-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #e4e4e7; margin-inline-start: auto; flex: none;
}
html.cz-route-chat .gemini-sidebar .cz-rail-settings-btn {
  margin-top: 8px !important;
}
html.cz-route-chat .gemini-sidebar .cz-rail-settings-btn.is-active {
  background: #2c2c30 !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  background: #171717 !important;
  color: #b4b4ba !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button:hover {
  background: #232326 !important;
  color: #f0f0f3 !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes button[aria-pressed="true"] {
  background: #2c2c30 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
html.cz-route-chat.cz-workspace .gemini-shell .cz-chat-modes [data-chat-web-search] {
  width: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
}
.cz-mode-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.12);
  flex: none;
}

/* 4. Sidebar polish: compact non-clipping recharge bar, pin dot, load more */
html.cz-route-chat .gemini-sidebar .cz-chat-recharge-compact {
  margin-top: 8px !important;
  display: flex !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  background: #1d1d20 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e4e4e7 !important;
  font-size: 12.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
html.cz-route-chat .gemini-sidebar .cz-chat-recharge-compact:hover {
  background: #27272b !important;
}
.cz-rc-bal {
  font-family: "Alkatip Basma Tom",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: 12px;
  color: #c8c8d0;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 8px;
  border-radius: 999px;
}
.cz-pin-dot { color: #d8d8de; font-size: 11px; }
.cz-history-more {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px !important;
  border-radius: 10px;
  font-size: 12px !important;
  color: #9e9ea6 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  text-align: center;
}
.cz-history-more:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #eee !important;
}

/* 5. Model Picker 4-category tabs & capability badges */
.cz-edition-tabs.cz-cat-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
}
.cz-edition-tabs.cz-cat-tabs button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 7px 4px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}
.cz-edition-tabs.cz-cat-tabs small {
  margin: 0 !important;
  font-size: 10.5px !important;
  opacity: 0.65;
}
.cz-model-badge {
  font-size: 10.5px !important;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #b5b5be;
}
.cz-model-tok {
  font-size: 11px !important;
  color: #9c9ca6;
}

/* 6. Collapsible Thinking Block */
.cz-thinking-block {
  margin-bottom: 8px;
  max-width: 100%;
  border-radius: 14px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 12px;
  font-size: 12.5px;
  color: #a6a6ae;
}
.cz-thinking-block > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: #bdbdc4;
}
.cz-thinking-block > summary::-webkit-details-marker { display: none; }
.cz-thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9c9ca6;
  flex: none;
}
.cz-thinking-block[open] .cz-thinking-dot { background: #e2e2e8; }
.cz-thinking-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  white-space: pre-wrap;
  line-height: 1.7;
  max-height: 260px;
  overflow-y: auto;
  color: #9e9ea7;
  font-size: 12px;
}

/* 7. Rich Markdown: inline code, links, quotes, math, syntax highlight */
.cz-inline-code {
  font-family: "Alkatip Basma Tom",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #e6e6eb;
  margin: 0 2px;
}
.cz-md-link {
  color: #d6d6de !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.cz-md-link:hover { color: #ffffff !important; text-decoration-color: #ffffff; }
.cz-md-quote {
  margin: 6px 0;
  padding: 6px 12px;
  border-inline-start: 3px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
  color: #c2c2ca;
  font-size: 13.5px;
}
.cz-md-hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}
.cz-math-inline {
  font-family: "Alkatip Basma Tom","Cambria Math","Times New Roman",serif;
  padding: 0 4px;
  color: #ececf0;
}
.cz-math-block {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Alkatip Basma Tom","Cambria Math","Times New Roman",serif;
  font-size: 15px;
  text-align: center;
  overflow-x: auto;
  color: #f0f0f4;
}
.cz-tok-kw { color: #c8b6ff; }
.cz-tok-str { color: #a8d8b9; }
.cz-tok-cm { color: #7a7d86; font-style: italic; }
.cz-tok-num { color: #f0c987; }

/* 8. Send-To Tools menu, Settings Modal & Live Preview Modal */
.cz-sendto-wrap { position: relative; display: inline-flex; }
.cz-msg-action-btn {
  display: inline-flex !important;
  align-items: center;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  color: #9e9ea6 !important;
}
.cz-msg-action-btn:hover { background: #1e1f22 !important; color: #fff !important; }
.cz-sendto-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 90;
  min-width: 185px;
  padding: 5px;
  border-radius: 12px;
  background: #1b1b1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75);
  display: grid;
  gap: 2px;
}
.cz-sendto-menu button {
  width: 100%;
  text-align: start;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  color: #d8d8de !important;
}
.cz-sendto-menu button:hover { background: #29292e !important; color: #fff !important; }

.cz-settings-modal { display: grid; gap: 14px; color: #e2e2e8; }
.cz-settings-head, .cz-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cz-settings-head h3 { font-size: 15px; font-weight: 500; margin: 0; }
.cz-settings-head button, .cz-preview-head button {
  width: 30px; height: 30px; border-radius: 8px; font-size: 18px;
  display: grid; place-items: center; color: #b4b4bc !important;
}
.cz-settings-section { display: grid; gap: 7px; }
.cz-settings-section label { font-size: 12.5px; color: #b0b0b8; }
.cz-settings-section textarea {
  width: 100%;
  background: #141416 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  padding: 9px 11px;
  color: #ececf0 !important;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.cz-preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-preset-chips button {
  padding: 6px 11px !important;
  border-radius: 999px !important;
  background: #232327 !important;
  color: #c8c8d0 !important;
  font-size: 12px !important;
}
.cz-preset-chips button[aria-pressed="true"] {
  background: #3a3a42 !important;
  color: #ffffff !important;
}
.cz-settings-row { display: flex; align-items: center; justify-content: space-between; }
.cz-temp-val { font-family: "Alkatip Basma Tom",monospace; font-size: 12.5px; color: #dcdce2; }
.cz-temp-controls { display: flex; align-items: center; gap: 10px; }
.cz-temp-controls input[type="range"] { flex: 1; accent-color: #d4d4dc; }
.cz-temp-controls button {
  padding: 5px 10px !important; border-radius: 8px !important;
  background: #252529 !important; font-size: 12px !important;
}
.cz-settings-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.cz-btn-ghost {
  padding: 8px 14px !important; border-radius: 10px !important;
  background: #232327 !important; color: #c8c8d0 !important; font-size: 13px !important;
}
.cz-btn-primary {
  padding: 8px 16px !important; border-radius: 10px !important;
  background: #e4e4e7 !important; color: #111113 !important; font-size: 13px !important; font-weight: 500 !important;
}
.cz-preview-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: #d4d4dc;
}
.cz-preview-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #111;
}

/* Zero-flash chat guard even during React hydration */
html:has(.gemini-shell),
body:has(.gemini-shell),
.studio-blueprint-bg:has(.gemini-shell),
.tool-page-in:has(.gemini-shell) {
  background: #0b0b0b !important;
  background-color: #0b0b0b !important;
  background-image: none !important;
}

/* === cz-chat-top-capsule === */
/* Option 2: Dead-center borderless-interior floating capsule (ZERO box-inside-box borders) */
@media (min-width: 1024px) {
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    position: fixed !important;
    top: 10px !important;
    left: 64px !important;
    right: 0 !important;
    bottom: auto !important;
    margin-inline: auto !important;
    transform: none !important;
    width: max-content !important;
    max-width: calc(100vw - 100px) !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 4px 6px !important;
    gap: 2px !important;
    border-radius: 999px !important;
    background: rgba(18, 18, 20, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(14px) !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    z-index: 94 !important;
    transition: translate 190ms cubic-bezier(0.22, 1, 0.36, 1), opacity 170ms ease, left 200ms ease !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell:has(.gemini-sidebar.cz-rail-expanded) header#cz-tool-toolbar {
    left: 256px !important;
    right: 0 !important;
    max-width: calc(100vw - 290px) !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar[data-cz-compact="true"]:not(:focus-within) {
    translate: 0 calc(-100% - 18px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
    height: 30px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar > div:first-child {
    padding-inline-end: 4px !important;
    margin-inline-end: 2px !important;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.09) !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar > div:first-child > span,
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .tool-seg {
    display: none !important;
  }
  /* Seamless ghost buttons inside the single outer capsule (no double borders!) */
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar :is(a, button, .cz-toolbar-back, .cz-toolbar-language, .cz-balance-pill) {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    border-radius: 999px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    color: #d4d4dc !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    padding-inline: 10px !important;
    white-space: nowrap !important;
    transition: background-color 140ms ease, color 140ms ease !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar :is(a, button, .cz-toolbar-back, .cz-toolbar-language, .cz-balance-pill):hover {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-toolbar-locale > button:not(.cz-toolbar-language) {
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-balance-pill {
    min-width: auto !important;
    padding-inline: 10px 4px !important;
    gap: 7px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-balance-pill .cz-balance-topup {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 0 !important;
    color: #f0f0f4 !important;
    border-radius: 999px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-balance-pill:hover .cz-balance-topup {
    background: rgba(255, 255, 255, 0.16) !important;
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal {
    position: fixed !important;
    top: 0 !important;
    left: 64px !important;
    right: 0 !important;
    margin-inline: auto !important;
    transform: none !important;
    width: 220px !important;
    height: 18px !important;
    z-index: 95 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: left 200ms ease, opacity 160ms ease !important;
  }
  html.cz-route-chat.cz-workspace:has(.gemini-sidebar.cz-rail-expanded) .cz-toolbar-reveal {
    left: 256px !important;
    right: 0 !important;
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transition: width 160ms ease, background 160ms ease, opacity 160ms ease;
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal:hover::after {
    width: 60px;
    background: rgba(255, 255, 255, 0.45);
  }
  html.cz-route-chat.cz-workspace .cz-toolbar-reveal[data-cz-visible="false"]::after {
    opacity: 0;
  }
}
/* === /cz-chat-top-capsule === */

/* === cz-chat-craft-v3 === */
/* 1. Unified, aligned, rhythmic expanded left sidebar (both RTL Uyghur and LTR zh/en) */
html[lang^="ug"].cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded,
html[data-site-lang="ug"].cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded {
  direction: rtl !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:first-child {
  direction: ltr !important;
  padding: 0 10px 0 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:first-child a.side-nav-sparkle-button {
  background: transparent !important;
  padding: 4px 6px !important;
  text-align: left !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) {
  padding: 10px 10px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) > :is(button, a) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: start !important;
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  gap: 10px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  color: #c8c8d0 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) > button:first-child {
  background: #202024 !important;
  color: #f0f0f4 !important;
  margin-bottom: 4px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) > button:first-child:hover {
  background: #2a2a30 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) > a:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded > div:nth-child(2) > :is(button, a) span {
  flex: 1 1 auto;
  text-align: start !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer {
  padding: 10px 10px 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sidebar-settings-btn,
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-model-details summary {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: start !important;
  width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  margin: 0 !important;
  gap: 10px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  color: #c2c2ca !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-model-details {
  margin: 0 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-storage-setting {
  margin: 4px 0 !important;
  padding: 6px 11px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.025) !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-storage-row {
  align-items: center !important;
  gap: 10px !important;
  min-height: 24px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-storage-row small {
  font-size: 11.5px !important;
  line-height: 1.5 !important;
  color: #9a9aa2 !important;
  text-align: start !important;
}
/* Clean unified 2x2 footer nav grid — consistent start alignment & padding */
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin-top: 2px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid > :is(a, button) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: start !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 9px !important;
  gap: 7px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  color: #b8b8c0 !important;
  overflow: hidden !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid > :is(a, button) span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: start !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-recharge-compact {
  margin-top: 6px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: #1f1f24 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* 2. Refined, properly proportioned 460px Role & Parameters Settings Dialog */
html.cz-route-chat .adm-modal-panel.cz-settings-modal,
html .adm-modal-panel.cz-settings-modal {
  width: min(460px, calc(100vw - 32px)) !important;
  max-width: 460px !important;
  padding: 20px 22px !important;
  border-radius: 18px !important;
  background: #17171a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
html .adm-modal-panel.cz-settings-modal .cz-settings-head h3 {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #f0f0f4 !important;
  margin: 0 !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-head button {
  width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #9e9ea6 !important;
  padding: 0 !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-head button:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-section label {
  font-size: 12.5px !important;
  color: #a6a6b0 !important;
  width: auto !important;
}
html .adm-modal-panel.cz-settings-modal .cz-preset-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-preset-chips button {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: #232328 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #c8c8d0 !important;
  font-size: 12px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-preset-chips button[aria-pressed="true"] {
  background: #383842 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}
html .adm-modal-panel.cz-settings-modal textarea {
  width: 100% !important;
  min-height: 82px !important;
  background: #111114 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: #ececf0 !important;
}
html .adm-modal-panel.cz-settings-modal .cz-temp-controls input[type="range"] {
  height: 4px !important;
  background: #2c2c34 !important;
  border-radius: 999px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-temp-controls button {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: #242429 !important;
  color: #c8c8d0 !important;
  font-size: 12px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-settings-foot {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-btn-ghost {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #c8c8d0 !important;
  font-size: 12.5px !important;
}
html .adm-modal-panel.cz-settings-modal .cz-btn-primary {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  background: #ececf0 !important;
  color: #111114 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}
/* === /cz-chat-craft-v3 === */

/* === cz-unified-capsule-all === */
/* One compact, centered, revealing capsule for EVERY tool workspace (image/video/music/script/design/chat). */
@media (min-width: 1024px) {
  html.cz-workspace header#cz-tool-toolbar.cz-tool-toolbar,
  html.cz-workspace header#cz-tool-toolbar {
    position: fixed !important;
    top: 10px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    margin-inline: auto !important;
    transform: none !important;
    width: max-content !important;
    max-width: min(calc(100vw - 48px), 1040px) !important;
    margin-block: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 5px 8px !important;
    gap: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    background: rgba(18, 18, 20, 0.94) !important;
    backdrop-filter: blur(14px) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.72) !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    z-index: 94 !important;
    transition: translate 190ms cubic-bezier(0.22, 1, 0.36, 1), opacity 170ms ease !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    left: 64px !important;
    right: 0 !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell:has(.gemini-sidebar.cz-rail-expanded) header#cz-tool-toolbar {
    left: 256px !important;
    right: 0 !important;
  }
  html.cz-workspace header#cz-tool-toolbar > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 0 0 auto !important;
    height: 32px !important;
    min-width: 0 !important;
  }
  html.cz-workspace header#cz-tool-toolbar :is(a, button, button[role="tab"], .tool-seg-item) {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 0 !important;
    color: #d4d4dc !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    line-height: 1 !important;
    padding-inline: 10px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
  }
  html.cz-workspace header#cz-tool-toolbar :is(a, button, button[role="tab"], .tool-seg-item):hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg-item:is(.is-active, [aria-selected="true"]) {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    max-width: min(52vw, 620px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg::-webkit-scrollbar,
  html.cz-workspace header#cz-tool-toolbar::-webkit-scrollbar { display: none !important; }
  html.cz-workspace header#cz-tool-toolbar[data-cz-compact="true"]:not(:focus-within) {
    translate: 0 calc(-100% - 18px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  /* unified top-center reveal handle on every tool */
  html.cz-workspace .cz-toolbar-reveal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-inline: auto !important;
    width: 220px !important;
    height: 18px !important;
    z-index: 95 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
  }
  html.cz-workspace .cz-toolbar-reveal::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transition: width 160ms ease, background 160ms ease, opacity 160ms ease;
  }
  html.cz-workspace .cz-toolbar-reveal:hover::after {
    width: 60px;
    background: rgba(255, 255, 255, 0.45);
  }
  html.cz-workspace .cz-toolbar-reveal[data-cz-visible="false"]::after { opacity: 0; }
}
/* === /cz-unified-capsule-all === */

/* === cz-capsule-clip-fix === */
/* Keep every tool capsule to ONE clean row: clip overflow, never ellipsis-garble labels,
   let the tab strip scroll horizontally instead of wrapping to a second row. */
@media (min-width: 1024px) {
  html.cz-workspace header#cz-tool-toolbar {
    max-width: min(calc(100vw - 48px), 960px) !important;
    overflow: hidden !important;
    direction: ltr !important;
  }
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    overflow: visible !important;
  }
  html.cz-workspace header#cz-tool-toolbar > div {
    min-width: 0 !important;
    flex: 0 1 auto !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg {
    display: inline-flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }
  html.cz-workspace header#cz-tool-toolbar :is(a, button) span,
  html.cz-workspace header#cz-tool-toolbar :is(a, button) strong {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    max-width: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg-item {
    flex: 0 0 auto !important;
    max-width: none !important;
  }
}
/* === /cz-capsule-clip-fix === */

/* === cz-capsule-reveal-fix === */
/* A full-width, top-edge invisible strip reveals the capsule on every tool page,
   so page-level floating buttons can never block the reveal. */
@media (min-width: 1024px) {
  html.cz-workspace .cz-toolbar-reveal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: auto !important;
    z-index: 9998 !important;
    cursor: pointer;
  }
  html.cz-workspace .cz-toolbar-reveal::after {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transition: width 160ms ease, background 160ms ease, opacity 160ms ease;
  }
  html.cz-workspace .cz-toolbar-reveal:hover::after {
    width: 60px;
    background: rgba(255, 255, 255, 0.45);
  }
}
/* === /cz-capsule-reveal-fix === */


/* ==========================================================================
   /tools/script — 2026-11-25 audit fixes
   Long Uyghur labels must never be cut mid-word; floating helpers shrink to
   icon-only pills so they stop covering inputs; the mobile toolbar stops
   stacking on top of itself; sequel card joins the neutral palette.
   ========================================================================== */

html.cz-route-script .cz-script-mode-seg button {
  white-space: nowrap !important;
  height: 26px !important;
  min-height: 26px !important;
  line-height: 1.2 !important;
}

/* 1. Un-clip long Uyghur / Chinese labels inside the director workspace. */
html.cz-route-script .director-workspace-scroll button,
html.cz-route-script .director-workspace-scroll [role="button"] {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-overflow: clip !important;
  height: auto !important;
  min-height: 30px !important;
  line-height: 1.45 !important;
}

html.cz-route-script .director-workspace-scroll button :is(span, strong, small) {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.45 !important;
}

/* Keep the 6 step cards readable instead of squeezing one line each. */
html.cz-route-script .director-workspace-scroll .grid > button[aria-current],
html.cz-route-script .director-workspace-scroll .grid > button[aria-disabled] {
  min-height: 72px !important;
  align-items: flex-start !important;
}

/* 2. Floating helpers: icon-only, smaller footprint, out of the content flow. */
html.cz-route-script .cz-tpl-trigger,
html.cz-route-script .cz-hist-trigger {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 999px !important;
  opacity: .92;
  justify-content: center !important;
}

html.cz-route-script .cz-tpl-trigger span,
html.cz-route-script .cz-hist-trigger span {
  display: none !important;
}

html.cz-route-script .cz-tpl-trigger { right: 12px !important; bottom: 12px !important; }
html.cz-route-script .cz-hist-trigger { right: 56px !important; bottom: 12px !important; }
html.cz-route-script .cz-tpl-panel,
html.cz-route-script .cz-hist-panel { right: 12px !important; bottom: 56px !important; }

html.cz-route-script .director-workspace-scroll {
  padding-bottom: 56px;
}

/* 3. Mobile toolbar: stop the back button stacking on language / fullscreen. */
@media (max-width: 640px) {
  html.cz-route-script.cz-workspace header#cz-tool-toolbar {
    height: auto !important;
    min-height: 52px !important;
    padding-block: 6px !important;
  }

  html.cz-route-script.cz-workspace header#cz-tool-toolbar > div,
  html.cz-route-script.cz-workspace header#cz-tool-toolbar > div > div {
    position: static !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  html.cz-route-script.cz-workspace header#cz-tool-toolbar .cz-toolbar-back {
    min-width: 54px !important;
    padding-inline: 8px !important;
  }

  /* The workflow observer chip does not fit; its content lives in Step 5. */
  html.cz-route-script.cz-workspace header#cz-tool-toolbar #cz-script-workflow {
    display: none !important;
  }

  html.cz-route-script .cz-script-mode-seg button {
    font-size: 11.5px !important;
    padding-inline: 8px !important;
  }

  html.cz-route-script .director-workspace-scroll .max-w-\[1720px\] {
    padding-inline: 10px !important;
  }
}

@media (max-width: 420px) {
  html.cz-route-script .cz-script-mode-seg button span { display: none; }
}

/* 4. Sequel card joins the neutral palette instead of the green accent set. */
html.cz-route-script .director-workspace-scroll [class*="border-emerald-400/25"] {
  border-color: #2b2b2b !important;
  background: #101112 !important;
}

html.cz-route-script .director-workspace-scroll [class*="bg-emerald-500/20"] {
  background: #23242a !important;
  border-color: #3a3b42 !important;
  color: #e7e7ea !important;
}

html.cz-route-script .director-workspace-scroll [class*="bg-emerald-500/20"]:hover {
  background: #2b2c33 !important;
}

html.cz-route-script .director-workspace-scroll [class*="text-emerald-100"] {
  color: #e7e7ea !important;
}

/* === cz-capsule-two-row === */
/* Non-chat tools: row 1 = compact action capsule (back / token / language / fullscreen),
   row 2 = its own slim pill for the cross-tool tabs. Never mixes text, never overlaps content. */
@media (min-width: 1024px) {
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar {
    width: max-content !important;
    max-width: calc(100vw - 48px) !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  /* drop the duplicated page-title text that mistranslates inside the capsule */
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar > div:first-child > span,
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar > div:first-child > h1,
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar > div:first-child > b {
    display: none !important;
  }
  /* the tab strip becomes its own slim pill right below the capsule */
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    margin-inline: auto !important;
    width: max-content !important;
    max-width: min(calc(100vw - 48px), 940px) !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 3px 6px !important;
    border-radius: 999px !important;
    background: rgba(18, 18, 20, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    z-index: 93 !important;
    transition: opacity 170ms ease, translate 190ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  }
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg::-webkit-scrollbar { display: none !important; }
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg .tool-seg-item {
    height: 28px !important;
    min-height: 28px !important;
    padding-inline: 9px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 0 !important;
    color: #cfcfd6 !important;
  }
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg .tool-seg-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
  }
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar .tool-seg .tool-seg-item:is(.is-active,[aria-selected="true"]) {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
  }
  /* hide the second pill together with the capsule when compact */
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar[data-cz-compact="true"]:not(:focus-within) .tool-seg {
    opacity: 0 !important;
    translate: 0 -12px !important;
    pointer-events: none !important;
  }
  /* reserve no layout space: previous header was in-flow on some pages */
  html.cz-workspace:not(.cz-route-chat) header#cz-tool-toolbar { margin-bottom: 0 !important; }
}
/* === /cz-capsule-two-row === */

/* === cz-sidebar-footer-fix === */
/* Sidebar footer: two compact utility rows, two items per row, short labels. */
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > .cz-sb-util {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin: 0 0 2px !important;
  min-width: 0 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-sidebar-settings-btn,
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-model-details {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-sidebar-settings-btn,
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-model-details > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  margin: 0 !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  color: #b8b8c0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-sidebar-settings-btn:hover,
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-model-details > summary:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ececf0 !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util > .cz-sidebar-settings-btn > span:not(.cz-sb-set-ico):not(.cz-sb-set-dot),
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util .cz-model-details > summary > span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util .cz-sb-set-ico {
  font-size: 12.5px !important;
  line-height: 1 !important;
  flex: none !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-sb-util .cz-sb-set-dot {
  margin-inline-start: auto !important;
  flex: none !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin-top: 2px !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid > :is(a, button) {
  height: 30px !important;
  min-height: 30px !important;
  min-width: 0 !important;
  padding: 0 9px !important;
  gap: 6px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
  overflow: hidden !important;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid > :is(a, button) svg {
  width: 13px !important;
  height: 13px !important;
  flex: none !important;
  opacity: 0.85;
}
html.cz-route-chat.cz-workspace .gemini-sidebar.cz-rail-expanded .cz-chat-sidebar-footer > div.grid > :is(a, button) span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: none !important;
}
/* === /cz-sidebar-footer-fix === */


/* BROAD WRAP FIX — the Step 3/4 cards render outside .director-workspace-scroll,
   so the earlier scope missed them. Cover the whole script tool page and
   re-assert nowrap only inside the top toolbar. */
html.cz-route-script .tool-page-in button,
html.cz-route-script .tool-page-in [role="button"] {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-overflow: clip !important;
  height: auto !important;
  min-height: 28px !important;
  line-height: 1.45 !important;
}

html.cz-route-script .tool-page-in button :is(span, strong, small, bdi) {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.45 !important;
}

html.cz-route-script header#cz-tool-toolbar button {
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

/* Slightly larger tap targets for the 96px reference-image column buttons. */
html.cz-route-script .tool-page-in .w-\[96px\] button {
  min-height: 32px !important;
  font-size: 12px !important;
  padding-inline: 4px !important;
}


/* Docked triggers inside the script toolbar. */
.cz-header-dock { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 4px; flex: none; }
html.cz-route-script #cz-header-dock #cz-tpl-trigger,
html.cz-route-script #cz-header-dock #cz-hist-btn {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  z-index: auto !important;
}
html.cz-route-script #cz-tpl-panel,
html.cz-route-script #cz-hist-panel {
  top: 58px !important;
  bottom: auto !important;
  right: 12px !important;
  left: auto !important;
  max-height: min(70vh, 560px) !important;
}
@media (max-width: 640px) {
  html.cz-route-script #cz-tpl-panel,
  html.cz-route-script #cz-hist-panel { top: 96px !important; max-height: 64vh !important; }
}


/* FORCE TOOLBAR VISIBLE 鈥?the reveal wrapper collapsed to a 12px strip and pushed
   the toolbar 52px above the viewport on the script route. */
html.cz-route-script .cz-toolbar-reveal {
  height: auto !important;
  min-height: 52px !important;
  overflow: visible !important;
}
html.cz-route-script .cz-toolbar-reveal header#cz-tool-toolbar {
  position: relative !important;
  inset: auto !important;
  top: 0 !important;
  margin: 0 !important;
  transform: none !important;
}

/* The reveal strip used the standalone `translate` property (not transform),
   which moved the toolbar 62px above the viewport. */
html.cz-route-script header#cz-tool-toolbar {
  translate: none !important;
  inset-block-start: 0 !important;
  top: 0 !important;
}
html.cz-route-script .cz-toolbar-reveal {
  translate: none !important;
  inset-block-start: 0 !important;
  position: static !important;
  height: auto !important;
  overflow: visible !important;
}

/* STATIC TOOLBAR FALLBACK 鈥?the toolbar kept resolving to -52px with every
   fixed-position override, so put it back into normal flow at the very top. */
html.cz-route-script header#cz-tool-toolbar {
  position: static !important;
  translate: none !important;
  transform: none !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 0 8px !important;
  width: 100% !important;
}
html.cz-route-script .tool-page-in { padding-top: 0 !important; }

/* MOBILE HEADER WRAP 鈥?the token pill was the last clipped control at 390px. */
@media (max-width: 640px) {
  html.cz-route-script header#cz-tool-toolbar button {
    white-space: normal !important;
    height: auto !important;
    min-height: 30px !important;
    line-height: 1.25 !important;
    padding-inline: 8px !important;
  }
  html.cz-route-script header#cz-tool-toolbar .cz-toolbar-back {
    white-space: nowrap !important;
  }
}

/* BALANCE PILL WRAP 鈥?the token pill was the only clipped control at 390px. */
html.cz-route-script .cz-balance-pill {
  white-space: normal !important;
  height: auto !important;
  min-height: 30px !important;
  max-width: calc(100vw - 190px);
}
html.cz-route-script .cz-balance-pill .cz-balance-num {
  white-space: normal !important;
}

/* ===== Refined Chinese webfont (self-hosted Noto Sans SC, unicode-range sliced) ===== */
html[lang^="zh"] body {
  font-family: "Alkatip Basma Tom",Inter,"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif!important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang^="zh"] :is(main, main p, main span, main li, main h1, main h2, main h3, main h4, main button, main a, main label, main select, main input, main textarea, main div, nav a, nav span, footer, footer p) {
  font-family: "Alkatip Basma Tom",Inter,"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
}
/* keep the monospace + Uyghur stacks intact */
html[lang^="zh"] :is(code, pre, kbd, samp, [dir="ltr"][class*="mono"], .font-mono) {
  font-family: "Alkatip Basma Tom",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

/* ===== Unified slim toolbar — matches the chat tool on every workspace ===== */
#cz-tool-toolbar {
  min-height: 44px !important;
  padding-inline: 12px !important;
  background: rgba(20, 21, 24, 0.92) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  align-items: center !important;
}
#cz-tool-toolbar > div {
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

/* Compact, icon-only back control */
#cz-tool-toolbar .cz-toolbar-back {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #d4d4dc !important;
  transition: background .16s, border-color .16s, color .16s, transform .12s !important;
}
#cz-tool-toolbar .cz-toolbar-back:hover {
  background: rgba(255, 255, 255, 0.11) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
/* keep the word for screen readers only */
#cz-tool-toolbar .cz-toolbar-back > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#cz-tool-toolbar .cz-toolbar-back svg {
  width: 15px !important;
  height: 15px !important;
}

/* Centred pill switcher, identical to the chat chrome */
#cz-tool-toolbar .tool-seg {
  border-radius: 999px !important;
  background: rgba(18, 18, 20, 0.94) !important;
  padding: 4px 6px !important;
  gap: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
#cz-tool-toolbar .tool-seg-item {
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #d4d4dc !important;
  background: transparent !important;
  border: 0 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: background .15s, color .15s !important;
}
#cz-tool-toolbar .tool-seg-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
#cz-tool-toolbar .tool-seg-item.is-active,
#cz-tool-toolbar .tool-seg-item[data-cz-selected="true"] {
  background: #ffffff !important;
  color: #0b0c0e !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.18) !important;
}

/* Right-hand controls: same 32px pill language */
#cz-tool-toolbar .cz-balance-pill,
#cz-tool-toolbar .cz-toolbar-language,
#cz-tool-toolbar button:has(.lucide-maximize2) {
  height: 32px !important;
  border-radius: 999px !important;
}

@media (max-width: 1023px) {
  #cz-tool-toolbar { padding-inline: 8px !important; gap: 6px !important; }
  #cz-tool-toolbar .tool-seg {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
    max-width: 52vw !important;
  }
  #cz-tool-toolbar .tool-seg::-webkit-scrollbar { display: none !important; }
  #cz-tool-toolbar .tool-seg-item { padding: 0 9px !important; font-size: 12px !important; }
}
@media (max-width: 640px) {
  #cz-tool-toolbar .tool-seg { display: none !important; }
}

/* ==========================================================================
   FINAL TOOLBAR UNIFICATION — one slim capsule chrome for every workspace
   (overrides the legacy per-tool rules with equal-or-higher specificity)
   ========================================================================== */
html.cz-workspace header#cz-tool-toolbar,
html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
  --cz-bar-h: 44px;
  min-height: var(--cz-bar-h) !important;
  padding-inline: 12px !important;
  align-items: center !important;
  background: rgba(20, 21, 24, 0.92) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

html.cz-workspace header#cz-tool-toolbar .cz-toolbar-back,
html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-toolbar-back,
html.cz-workspace header#cz-tool-toolbar a[href="/tools"],
html.cz-workspace header#cz-tool-toolbar a[href="/tools/"] {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #d4d4dc !important;
  font-size: 0 !important;
  overflow: hidden !important;
}
html.cz-workspace header#cz-tool-toolbar .cz-toolbar-back:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #fff !important;
}
html.cz-workspace header#cz-tool-toolbar .cz-toolbar-back > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
html.cz-workspace header#cz-tool-toolbar .cz-toolbar-back svg {
  width: 15px !important;
  height: 15px !important;
}

/* centred capsule switcher */
html.cz-workspace header#cz-tool-toolbar .tool-seg,
html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .tool-seg {
  border-radius: 999px !important;
  padding: 4px 6px !important;
  gap: 2px !important;
  background: rgba(18, 18, 20, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
html.cz-workspace header#cz-tool-toolbar .tool-seg-item,
html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .tool-seg-item {
  height: 30px !important;
  min-height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: #d4d4dc !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
html.cz-workspace header#cz-tool-toolbar .tool-seg-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
html.cz-workspace header#cz-tool-toolbar .tool-seg-item:is(.is-active, [data-cz-selected="true"], [aria-selected="true"]) {
  background: #ffffff !important;
  color: #0b0c0e !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.18) !important;
}

/* right-hand pills keep the same language */
html.cz-workspace header#cz-tool-toolbar :is(.cz-balance-pill, .cz-toolbar-language, .mkx-fullscreen, .cz-fullscreen-toggle),
html.cz-workspace header#cz-tool-toolbar button:has(.lucide-maximize2) {
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 999px !important;
}

@media (max-width: 1023px) {
  html.cz-workspace header#cz-tool-toolbar,
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar {
    padding-inline: 8px !important;
    gap: 6px !important;
    min-height: 48px !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    max-width: 54vw !important;
    scrollbar-width: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar .tool-seg::-webkit-scrollbar { display: none !important; }
  html.cz-workspace header#cz-tool-toolbar .tool-seg-item {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
  }
}
@media (max-width: 640px) {
  html.cz-workspace header#cz-tool-toolbar .tool-seg { display: none !important; }
  html.cz-workspace header#cz-tool-toolbar .cz-toolbar-back,
  html.cz-route-chat.cz-workspace .gemini-shell header#cz-tool-toolbar .cz-toolbar-back {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 999px !important;
  }
}

/* ===== Toolbar capsule enforcement (double-ID specificity) ===== */
html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .tool-seg {
  border-radius: 999px !important;
  padding: 4px 6px !important;
  gap: 2px !important;
  background: rgba(18, 18, 20, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}
html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .tool-seg-item {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  color: #d4d4dc !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .tool-seg-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}
html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .tool-seg-item:is(.is-active, [data-cz-selected="true"], [aria-selected="true"]) {
  background: #ffffff !important;
  color: #0b0c0e !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.18) !important;
}
html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-toolbar-back,
html.cz-route-script.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-toolbar-back {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 0 !important;
}

@media (max-width: 1023px) {
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .tool-seg-item {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
  }
  /* keep the phone bar to one clean row: hide decorative labels */
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar > div > span,
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar > div > h1,
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar > div > h2 {
    display: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar {
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar > div {
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    gap: 6px !important;
  }
}

/* ===== Phone toolbar: keep the right cluster inside the screen ===== */
@media (max-width: 640px) {
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-balance-pill {
    padding: 0 8px !important;
    gap: 4px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 11px !important;
    max-width: 46vw !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-balance-pill > span:not(.cz-balance-num) {
    display: none !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-balance-num {
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar .cz-toolbar-language {
    padding: 0 8px !important;
    min-width: 30px !important;
    height: 30px !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar :is(button, a) {
    flex-shrink: 0 !important;
  }
  html.cz-workspace header#cz-tool-toolbar#cz-tool-toolbar > div {
    gap: 5px !important;
    overflow: visible !important;
  }
}


/* MOBILE HEADER SCROLL ROW — one horizontal strip instead of overlapping rows. */
@media (max-width: 480px) {
  html.cz-route-script header#cz-tool-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    height: auto !important;
    min-height: 52px !important;
  }
  html.cz-route-script header#cz-tool-toolbar::-webkit-scrollbar { display: none; }
  html.cz-route-script header#cz-tool-toolbar > * {
    flex: 0 0 auto !important;
  }
  html.cz-route-script header#cz-tool-toolbar #cz-header-dock {
    flex: 0 0 auto !important;
    display: inline-flex !important;
  }
  html.cz-route-script header#cz-tool-toolbar .cz-script-mode-seg {
    flex: 0 0 auto !important;
    order: 0 !important;
    justify-content: flex-start !important;
  }
}

/* HIDE FULLSCREEN ON PHONES — F11/maximize is useless on touch and overlapped the mode switch. */
@media (max-width: 480px) {
  html.cz-route-script header#cz-tool-toolbar :is(button, a)[aria-label*="F11"],
  html.cz-route-script header#cz-tool-toolbar :is(button, a)[title*="F11"] {
    display: none !important;
  }
}

/* SHOT ACTION ROW WRAP — on phones the two shot-action buttons were squeezed to 9px
   because the row refused to wrap. Let them stack full width instead. */
@media (max-width: 480px) {
  html.cz-route-script .director-workspace-scroll .flex.items-center.gap-2.pt-1 {
    flex-wrap: wrap !important;
  }
  html.cz-route-script .director-workspace-scroll .flex.items-center.gap-2.pt-1 > button {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
}

/* ===== CZ unified tool bar (2026-11-25-v2) ===== */
html.cz-workspace .cz-tool-toolbar .cz-toolbar-language{
  height:30px!important;min-height:30px!important;min-width:0!important;
  padding:0 10px!important;font-size:12px!important;gap:5px!important;
  border-radius:999px!important;white-space:nowrap!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale{
  position:relative!important;overflow:visible!important;flex:none!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"],
html.cz-workspace .cz-tool-toolbar .cz-bar-langmenu{
  position:absolute!important;top:calc(100% + 6px)!important;
  left:50%!important;right:auto!important;
  inset-inline-start:50%!important;inset-inline-end:auto!important;
  transform:translateX(-50%)!important;
  display:block!important;width:132px!important;min-width:132px!important;max-width:150px!important;
  overflow:visible!important;padding:4px!important;margin:0!important;
  border-radius:12px!important;border:1px solid rgba(255,255,255,.12)!important;
  background:rgba(23,23,23,.98)!important;box-shadow:0 18px 44px -18px rgba(0,0,0,.95)!important;
  z-index:220!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"]>div:first-child:not(:has(button)){
  display:none!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"]>div:has(button){
  display:flex!important;flex-direction:column!important;gap:2px!important;margin:0!important;width:100%!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"] button,
html.cz-workspace .cz-tool-toolbar .cz-bar-langmenu button{
  display:flex!important;width:100%!important;height:30px!important;min-height:30px!important;
  align-items:center!important;justify-content:space-between!important;gap:6px!important;
  padding:0 10px!important;margin:0!important;font-size:12.5px!important;line-height:1!important;
  white-space:nowrap!important;border-radius:8px!important;text-align:start!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"] button:hover,
html.cz-workspace .cz-tool-toolbar .cz-bar-langmenu button:hover{
  background:rgba(255,255,255,.07)!important;color:#fff!important;
}
html.cz-workspace .cz-tool-toolbar .cz-toolbar-locale [role="dialog"] button[aria-current="true"],
html.cz-workspace .cz-tool-toolbar .cz-bar-langmenu button.is-active{
  background:#2f7bff!important;color:#fff!important;
}

/* === cz-chat-viewport-fit === */
/* body reserves 56px for the fixed #czc-bar; the chat shell must not add 100dvh on top of it,
   otherwise the last footer row (top-up) is clipped off-screen. */
html.cz-route-chat .gemini-shell {
  height: calc(100dvh - 56px) !important;
  min-height: calc(100dvh - 56px) !important;
  max-height: calc(100dvh - 56px) !important;
}
html.cz-route-chat body > main {
  height: calc(100dvh - 56px) !important;
  min-height: 0 !important;
}
html.cz-route-chat .gemini-shell > .gemini-sidebar,
html.cz-route-chat .gemini-shell > .gemini-main {
  min-height: 0 !important;
  max-height: 100% !important;
}
@media (min-width: 768px) {
  html.cz-route-chat body { padding-top: 56px; }
}
/* === /cz-chat-viewport-fit === */

/* CZ_UG_SERVICE_TYPO_V1: Match /service/ crisp, light, two-tier Uyghur typography across all tool pages */
html[data-site-lang="ug"] :is(.cz-workspace, body),
html[lang^="ug"] :is(.cz-workspace, body) {
  font-synthesis: none !important;
  -webkit-font-smoothing: antialiased;
}
html.cz-workspace[data-site-lang="ug"] *:not(code):not(pre):not(svg):not(svg *),
html.cz-workspace[lang^="ug"] *:not(code):not(pre):not(svg):not(svg *) {
  font-weight: 400 !important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
}
html.cz-workspace[data-site-lang="ug"] h1,
html.cz-workspace[lang^="ug"] h1 {
  font-size: clamp(20px, 2vw, 25px) !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}
html.cz-workspace[data-site-lang="ug"] :is(h2, h3),
html.cz-workspace[lang^="ug"] :is(h2, h3) {
  font-size: 16px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}
html.cz-workspace[data-site-lang="ug"] :is(p, li, input, textarea, select),
html.cz-workspace[lang^="ug"] :is(p, li, input, textarea, select) {
  font-size: 13.5px !important;
  line-height: 1.72 !important;
}
html.cz-workspace[data-site-lang="ug"] :is(button, label, summary, small),
html.cz-workspace[lang^="ug"] :is(button, label, summary, small) {
  font-size: 12.5px !important;
}

/* cz-canvas-stability-v1: keep the infinite canvas viewport clean on every screen. */
html.cz-route-canvas,
html.cz-route-canvas body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
html.cz-route-canvas main,
html.cz-route-canvas .react-flow,
html.cz-route-canvas .react-flow__renderer,
html.cz-route-canvas .react-flow__viewport {
  min-width: 0 !important;
  max-width: 100vw !important;
}
html.cz-route-canvas .react-flow {
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
}
html.cz-route-canvas .cz-canvas-editor-actions {
  max-width: calc(100vw - 24px) !important;
  min-width: 0 !important;
  overflow: visible !important;
  scrollbar-width: none !important;
  overscroll-behavior: contain !important;
}
html.cz-route-canvas .cz-canvas-editor-actions::-webkit-scrollbar { display: none !important; }
html.cz-route-canvas .react-flow__node img,
html.cz-route-canvas .react-flow__node video,
html.cz-route-canvas .react-flow__node audio {
  display: block !important;
  max-width: 100% !important;
  object-fit: contain !important;
}
html.cz-route-canvas .react-flow__node img,
html.cz-route-canvas .react-flow__node video {
  background: #0d0d0f !important;
  border-radius: 8px !important;
}
html.cz-route-canvas .react-flow__controls {
  z-index: 25 !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.35) !important;
}
@media (max-width: 700px) {
  html.cz-route-canvas .cz-canvas-editor-actions {
    inset-inline: 8px !important;
    top: 56px !important;
    width: auto !important;
    max-height: 44dvh !important;
    padding: 5px !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
    align-content: flex-start !important;
  }
  html.cz-route-canvas .cz-canvas-editor-actions button,
  html.cz-route-canvas .cz-canvas-editor-actions input,
  html.cz-route-canvas .cz-canvas-editor-actions select {
    min-height: 38px !important;
    max-width: 100% !important;
  }
  html.cz-route-canvas .react-flow__controls {
    bottom: 12px !important;
    inset-inline-start: 12px !important;
  }
}
/* Scoped editorial workspace; neutral palette matches the chat tool. */
.cz-screenplay-editor {
  --se-bg:#131313; --se-panel:#1b1b1b; --se-raised:#252525; --se-line:#ffffff16;
  --se-text:#ededed; --se-muted:#aaa; --se-radius:16px;
  position:relative; min-width:0; color:var(--se-text); background:var(--se-bg);
  border:1px solid var(--se-line); border-radius:var(--se-radius); padding:22px;
  font-family:"Alkatip Basma Tom",inherit; text-align:start; line-height:1.8; font-size:13px;
}
.cz-screenplay-editor * {box-sizing:border-box; min-width:0}
.cz-screenplay-editor .czse-heading {display:flex;align-items:center;justify-content:space-between;gap:20px;background:transparent!important;padding:0 0 18px}
.cz-screenplay-editor h2 {font-family:"Alkatip Basma Tom",inherit;font-weight:600;font-size:20px;line-height:1.5;margin:3px 0 5px}
.cz-screenplay-editor h3 {font-size:14px;font-weight:550;margin:0 0 10px}
.cz-screenplay-editor p {margin:0 0 12px;overflow-wrap:anywhere}
.cz-screenplay-editor .czse-heading p:not(.czse-eyebrow) {color:var(--se-muted);font-size:12px;margin:0}
.cz-screenplay-editor .czse-eyebrow {font:12px/1.6 Alkatip Basma Tom,Alkatip Basma Tom,Inter,sans-serif;letter-spacing:.04em!important;color:#999;margin:0;text-align:start}
.cz-screenplay-editor .czse-heading-actions,.czse-export-actions,.czse-modal header>div {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
html.cz-route-script .cz-screenplay-editor button {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:34px;height:auto!important;padding:5px 12px!important;max-width:100%;
  border:1px solid var(--se-line)!important;border-radius:9px!important;
  color:#d5d5d5!important;background:#252525!important;box-shadow:none!important;
  font:inherit!important;font-size:12px!important;line-height:1.7!important;white-space:nowrap!important;cursor:pointer;
}
html.cz-route-script .cz-screenplay-editor button:hover {background:#333!important;color:#fff!important}
html.cz-route-script .cz-screenplay-editor button[aria-pressed=true] {background:#e1e1e1!important;color:#171717!important}
html.cz-route-script .cz-screenplay-editor button:disabled {opacity:.4;cursor:default}
.cz-screenplay-editor :is(button,input,textarea):focus-visible {outline:2px solid #c9c9c9!important;outline-offset:3px}
.cz-screenplay-editor .czse-tabs {display:flex;flex-wrap:wrap;gap:6px;padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--se-line)}
.cz-screenplay-editor .czse-tabs button {border:0!important;background:transparent!important}
.czse-tabs b {font:12px/1 Alkatip Basma Tom,Inter,sans-serif;padding:4px 6px;border-radius:6px;background:#ffffff1c}
.czse-count {color:#b5b5b5;font-size:12.5px}
.cz-screenplay-editor .czse-tools {display:flex;gap:10px;margin-bottom:16px}
.czse-synopsis {margin-bottom:16px;color:#aaa;font-size:12px}
.czse-synopsis summary {cursor:pointer;padding-block:6px}
.czse-synopsis textarea {margin-top:8px}
html.cz-route-script .cz-screenplay-editor :is(input,textarea) {
  background:#101010!important;border:1px solid #ffffff18!important;border-radius:9px!important;
  padding:10px 12px!important;box-shadow:none!important;color:#e5e5e5!important;
  font-family:"Alkatip Basma Tom",inherit!important;font-size:13px!important;line-height:1.9!important;max-width:100%;width:100%;min-height:36px;
  unicode-bidi:plaintext;letter-spacing:0!important;
}
.cz-screenplay-editor textarea {resize:vertical;min-height:90px;tab-size:2}
.cz-screenplay-editor .czse-tools input {flex:1}
.czse-scene-layout {display:grid;grid-template-columns:200px minmax(0,1fr);gap:20px;align-items:start}
.cz-screenplay-editor .czse-outline {position:sticky;top:20px;max-height:70vh;overflow:auto;display:flex;flex-direction:column;gap:5px;background:transparent!important}
html.cz-route-script .cz-screenplay-editor .czse-outline button {justify-content:flex-start;text-align:start;white-space:normal!important;padding:9px!important}
.czse-outline button>span:first-child {flex:none;font:11px/1.5 Arial,sans-serif;opacity:.6}
.czse-outline button>span:last-child {overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
.czse-scenes {display:flex;flex-direction:column;gap:16px}
.czse-scene {padding:16px;background:#191919;border:1px solid #ffffff0d;border-radius:12px;scroll-margin-block:20px}
.czse-scene-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.czse-scene-heading h3 {margin:0;color:#bfbfbf}
.czse-scene-heading>div {display:flex;gap:5px;flex-wrap:wrap}
.cz-screenplay-editor .czse-scene textarea {background:#131313!important;line-height:2!important}
.cz-screenplay-editor .czse-manuscript {min-height:500px;line-height:2!important}
.czse-empty {padding:55px 20px;text-align:center;color:#aaa}
.cz-screenplay-editor .czse-notice {padding:12px 14px;background:#2b2923;border-radius:10px;color:#ddd5c5;font-size:12px}
.cz-screenplay-editor .czse-feedback {padding:10px 14px;border-radius:10px;background:#ffffff08;color:#d8d8d8;font-size:12px}
.czse-muted {font-size:12px;color:#aaa;line-height:1.9}
.czse-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0 28px}
.czse-field {display:flex;flex-direction:column;gap:6px;text-align:start;font-size:12px}
.czse-field>span {color:#bdbdbd}
.czse-cast {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:14px}
.czse-person {display:flex;flex-direction:column;gap:12px;background:#1a1a1a;border-radius:12px;padding:16px}
.czse-person-top {display:flex;gap:12px;align-items:center}
.czse-person-top img,.czse-avatar {width:58px;height:70px;object-fit:cover;border-radius:10px;flex:none}
.czse-avatar {display:grid;place-items:center;background:#303030;color:#bbb;font-size:28px}
.czse-person-top small {display:block;color:#888;font-size:13px}
.czse-references {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px}
.czse-references figure {margin:0}
.czse-references img {width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px}
.czse-references figcaption {color:#bbb;font-size:12px;margin-top:6px}
.czse-metrics {display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}
.czse-metrics>span {background:#252525;border-radius:8px;padding:8px 12px;font-size:12px}
.czse-review ul {list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.czse-review li {padding:12px 14px;background:#ffffff06;border-inline-start:2px solid #888;border-radius:8px;display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.czse-review li[data-severity=error] {border-inline-start-color:#bf9292}
.czse-review li strong {font-size:12px;font-weight:500}
.czse-review li span,.czse-review li small {font-size:13px;color:#aaa}
.czse-versions>article {padding:16px 0;border-bottom:1px solid var(--se-line);display:flex;justify-content:space-between;gap:16px;align-items:center}
.czse-versions>article>div:last-child {display:flex;gap:8px;flex:none}
.czse-versions strong {font:12px/1.5 Arial,sans-serif}
.czse-versions p {font-size:12px;color:#aaa;margin:6px 0 0;white-space:pre-wrap}
.czse-modal-backdrop {position:fixed;inset:0;z-index:160;display:flex;align-items:center;justify-content:center;padding:24px;background:#000b;backdrop-filter:blur(12px)}
.cz-screenplay-editor .czse-modal {width:min(1100px,100%);max-height:90dvh;overflow:auto;border:1px solid #ffffff1a;border-radius:18px;background:#171717;padding:24px;box-shadow:0 30px 100px #0008}
.cz-screenplay-editor .czse-modal>header {display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;padding:0;background:transparent!important}
.czse-modal>textarea {margin-bottom:10px}
.czse-compare {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}
.czse-compare h4 {font-size:12px;color:#aaa;margin:0 0 8px}
.czse-compare pre {font-family:"Alkatip Basma Tom",inherit;font-size:13px;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere;background:#111;padding:16px;border-radius:12px;margin:0;max-height:60vh;overflow:auto}
.czse-print-document {background:white;color:#171717;padding:40px;line-height:2}
.czse-print-document>div {white-space:pre-wrap;font-size:14px}
.czse-print-document h1 {font-size:24px}
.czse-production-intro {display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:24px;align-items:center;padding:22px;border-radius:18px;background:#161616;margin-bottom:18px;overflow:hidden}
.czse-production-intro img {width:100%;aspect-ratio:16/7;object-fit:cover;object-position:center;border-radius:12px;filter:saturate(.65)}
.czse-production-intro h2 {font-size:21px;line-height:1.6;font-weight:550;margin:0 0 9px}
.czse-production-intro p {font-size:13px;color:#aaa;line-height:1.9;margin:0}
@media(max-width:800px) {
  .cz-screenplay-editor {padding:16px}
  .cz-screenplay-editor .czse-heading {align-items:flex-start;flex-direction:column;gap:10px}
  .czse-scene-layout {grid-template-columns:minmax(0,1fr)}
  .cz-screenplay-editor .czse-outline {position:static;display:flex;flex-direction:row;overflow:auto;max-width:100%;padding-bottom:5px}
  html.cz-route-script .cz-screenplay-editor .czse-outline button {flex:0 0 160px}
  .czse-fields,.czse-compare {grid-template-columns:minmax(0,1fr)}
  .czse-versions>article {flex-direction:column;align-items:stretch}
  .czse-modal-backdrop {padding:10px}
  .cz-screenplay-editor .czse-modal {padding:16px}
  .czse-production-intro {grid-template-columns:1fr;padding:18px;gap:14px}
  .czse-production-intro img {aspect-ratio:16/6}
  .czse-print-document {padding:20px}
}
@media print {
  body * {visibility:hidden!important}
  .czse-print-preview,.czse-print-preview .czse-print-document,.czse-print-preview .czse-print-document * {visibility:visible!important}
  .czse-print-preview {position:absolute!important;inset:0!important;width:100%!important;max-height:none!important;overflow:visible!important;background:#fff!important;color:#111!important;padding:0!important;border:0!important}
  .czse-print-preview>header {display:none!important}
  .czse-print-document {padding:12mm!important}
}
@media(prefers-reduced-motion:no-preference) {
  .cz-screenplay-editor {animation:czse-enter .25s ease-out}
  .czse-modal {animation:czse-enter .2s ease-out}
  @keyframes czse-enter {from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
}

/* Unified version history: cloud (authoritative) + local snapshots. */
.czse-cloud-head {display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.czse-cloud-head .czse-muted {margin:0;max-width:70ch}
.czse-cloud-list {list-style:none;margin:14px 0 6px;padding:0;display:flex;flex-direction:column;gap:8px}
.czse-cloud-list>li {display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px 14px;background:#171717;border:1px solid #ffffff14;border-radius:12px}
.czse-cloud-list strong {font:12px/1.5 Arial,sans-serif;color:#e6e6e6}
.czse-cloud-list p {margin:4px 0 0;font-size:12.5px;color:#a5a5a5;overflow-wrap:anywhere}
.czse-cloud-sub {margin:22px 0 6px;font-size:13px;color:#cfcfcf;border-top:1px solid #ffffff12;padding-top:16px}
