:root{
  --bg:#0e0f12;
  --panel:#15171c;
  --panel2:#1b1e24;
  --panel3:#101217;
  --stroke:#2a2e36;
  --stroke2:#3a3f49;
  --text:#f0f1f3;
  --muted:#a7adb8;
  --accent:#bfc6d2;
  --primary:#eceff4;
  --primaryText:#111318;
  --radius:14px;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:13px/1.35 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
button,input,select,textarea{font:inherit}
button,select,input[type="text"],input[type="number"],textarea{color:var(--text)}
.appShell{height:100vh;display:grid;grid-template-rows:auto auto 1fr;min-width:0}
.topbar,.fontbar{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--stroke);background:#111318}
.topbar{justify-content:space-between;min-height:58px}
.brandBlock{display:flex;align-items:center;gap:10px;min-width:0}
.brandMark{width:38px;height:38px;border-radius:9px;border:1px solid #7f8794;background:linear-gradient(135deg,#f4f6f9 0%,#717986 26%,#15181d 48%,#eef1f5 72%,#59616d 100%);display:grid;place-items:center;color:#0c0d10;text-decoration:none;font-weight:900;letter-spacing:-1px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
.brandTitleRow{display:flex;align-items:center;gap:9px;min-width:0}
.brandName{font-weight:850;letter-spacing:.13em;font-size:16px;white-space:nowrap}
.mobileReadyBadge{display:inline-flex;align-items:center;justify-content:center;border:1px solid #4b535f;background:#1b1f25;border-radius:999px;padding:3px 7px;color:#d8dde5;font-size:8px;font-weight:850;line-height:1;letter-spacing:.08em;white-space:nowrap}
.brandSub{color:var(--muted);font-size:11px;margin-top:2px}
.statusGroup{display:flex;gap:8px;min-width:0;justify-content:flex-end;flex-wrap:wrap}
.statusChip{border:1px solid var(--stroke);background:var(--panel3);border-radius:999px;padding:6px 9px;color:#cfd3da;white-space:nowrap;max-width:360px;overflow:hidden;text-overflow:ellipsis}
.fontbar{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 314px}
.previewPanel{min-width:0;min-height:0;display:grid;grid-template-rows:auto auto 1fr;border-right:1px solid var(--stroke)}
.typebar,.viewbar{display:flex;gap:20px;align-items:flex-end;padding:10px 12px;background:var(--panel);border-bottom:1px solid var(--stroke);flex-wrap:wrap}
.viewbar{align-items:center;padding-top:7px;padding-bottom:7px;background:#121419}
.sidebar{min-height:0;overflow:auto;padding:10px;background:#0f1115;display:flex;flex-direction:column;gap:9px}
.card{border:1px solid var(--stroke);background:var(--panel);border-radius:var(--radius);padding:11px;display:flex;flex-direction:column;gap:10px}
.cardTitle{font-size:12px;text-transform:uppercase;letter-spacing:.11em;color:#d8dce3;font-weight:800}
.control{display:flex;flex-direction:column;gap:5px;min-width:118px}
.control>span{display:flex;justify-content:space-between;gap:8px;color:#c4c9d1;font-size:11px;font-weight:650;letter-spacing:.01em}
.control.compact{min-width:130px}
.control.compact>span{margin-bottom:0}
.control.grow{flex:1 1 180px;max-width:300px}
.control.grow2{flex:2 1 260px;max-width:520px}
.googleFontControl{flex:1 1 260px;min-width:220px;max-width:390px}
/* 01A.50 — make Google Font categories unmistakable in the native dropdown. */
#googleFont optgroup{
  background:#343b48;
  color:#ffffff;
  font-size:16px;
  font-weight:900;
  font-style:normal;
  letter-spacing:.07em;
}
#googleFont option{
  background:#0e1014;
  color:#f0f1f3;
  font-size:13px;
  font-weight:500;
  font-style:normal;
  letter-spacing:0;
}
.fontVariantControl{flex:0 0 112px;min-width:100px}
.fontVariantControl select{min-width:100px}
.textControl{flex:1 1 260px;min-width:240px}
textarea,input[type="text"],input[type="number"],select{border:1px solid var(--stroke2);background:#0e1014;border-radius:9px;padding:7px 9px;outline:none}
textarea:focus,input[type="text"]:focus,input[type="number"]:focus,select:focus{border-color:#747d89;box-shadow:0 0 0 2px rgba(180,190,205,.08)}
textarea{resize:vertical;min-height:52px;max-height:120px}
input[type="range"]{width:100%;accent-color:#c5cbd5;margin:0}
.precisionControl{min-width:180px;flex:1 1 180px;max-width:250px}
.sliderNumberRow{display:grid!important;grid-template-columns:minmax(90px,1fr) 68px;align-items:center;gap:7px}
.precisionNumber{width:68px;min-width:0;padding:5px 6px!important;text-align:left;font-variant-numeric:tabular-nums}
input[type="color"]{width:46px;height:30px;border:1px solid var(--stroke2);background:#0e1014;border-radius:8px;padding:2px}
.tintControl{display:grid;grid-template-columns:1fr 50px 92px;align-items:center}
.tintControl>span{grid-column:1/-1}
.btn{border:1px solid var(--stroke2);background:#20232a;color:#e9ebef;border-radius:9px;padding:8px 11px;cursor:pointer;white-space:nowrap;transition:background .12s,border-color .12s,transform .05s}
.btn:hover{background:#292d35;border-color:#4a505c}
.btn:active{transform:translateY(1px)}
.btn.small{padding:7px 9px}
.btn.primary{background:var(--primary);color:var(--primaryText);border-color:#fff;font-weight:800;width:100%}
.btn.primary:hover{background:#fff}
.uploadBtn{display:inline-flex;align-items:center;justify-content:center}
.buttonRow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.zoomControl{display:grid;grid-template-columns:auto minmax(110px,180px) 42px;align-items:center;gap:7px;color:#c4c9d1;font-size:11px}
.zoomNumber{width:64px;min-width:64px;padding:6px 7px!important;text-align:left;font-variant-numeric:tabular-nums}
.privacyNote{color:#9299a5;font-size:11px;margin-left:auto}
.fontPrivacyNote{color:#9299a5;font-size:10.5px;line-height:1.3;white-space:nowrap;align-self:center}
.stageViewport{min-height:0;overflow:auto;position:relative;display:block;padding:28px;background-color:#444;cursor:auto;touch-action:auto;overscroll-behavior:contain}
.stageViewport.checker{background-color:#f3f3f3;background-image:linear-gradient(45deg,#d8d8d8 25%,transparent 25%),linear-gradient(-45deg,#d8d8d8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d8d8d8 75%),linear-gradient(-45deg,transparent 75%,#d8d8d8 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
.stageViewport.white{background:#fff}.stageViewport.black{background:#090909}.stageViewport.gray{background:#777}
.canvasHolder{display:grid;place-items:center;width:max-content;height:max-content;min-width:100%;min-height:100%;cursor:grab;touch-action:none}
#previewCanvas{display:block;image-rendering:auto;filter:none}
.emptyHint{position:absolute;inset:0;display:grid;place-items:center;color:#5c626c;font-weight:700;pointer-events:none}
.microcopy{color:var(--muted);font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.exportDims{border:1px solid var(--stroke);background:#101217;border-radius:9px;padding:8px 9px;color:#cdd1d8;font-variant-numeric:tabular-nums}

.checkRow{display:flex;align-items:center;gap:8px;min-height:34px;color:#d8dde4;font-size:12px;line-height:1.35;padding:2px 1px}
.checkRow input[type="checkbox"]{width:16px;height:16px;margin:0;accent-color:#c5cbd5;flex:0 0 auto}
.checkRow span{color:#d8dde4}
/* 01A.110 — footer removed; legal/licensing information now lives at the end of the scrolling sidebar. */
.sidebarLegal{margin-top:2px;padding:12px 4px 5px;border-top:1px solid var(--stroke);color:#7f8793;font-size:10px;line-height:1.45;letter-spacing:.03em}
.sidebarLegalTagline{margin-top:1px}
.sidebarLegalCopyright{margin-top:7px;font-size:9px;opacity:.8}
.sidebarLegalFonts{margin-top:4px;font-size:8.2px;line-height:1.5;opacity:.68}
output{font-variant-numeric:tabular-nums;color:#e5e8ed}
@media (max-width:960px){
  body{overflow:auto}
  .appShell{height:auto;min-height:100vh;display:block}
  .workspace{grid-template-columns:1fr}
  .previewPanel{min-height:70vh;border-right:0}
  .sidebar{overflow:visible;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
  .sidebarLegal{grid-column:1/-1}
  .stageViewport{min-height:430px}
  .privacyNote{width:100%;margin-left:0}
  .fontPrivacyNote{white-space:normal;text-align:left}
}
@media (max-width:560px){
  .topbar{align-items:flex-start;flex-direction:column}
  .brandTitleRow{gap:7px}
  .mobileReadyBadge{font-size:7.5px;padding:3px 6px}
  .statusGroup{justify-content:flex-start}
  .fontbar,.typebar,.viewbar{align-items:stretch}
  .control.grow,.control.grow2,.googleFontControl,.textControl{max-width:none;width:100%}
  .fontVariantControl{flex:1 1 120px}
  .zoomControl{grid-template-columns:auto 1fr 42px}
}
.tintControl input[type="color"]{grid-column:2}
.tintControl #metalTintHex{grid-column:3;width:92px}
.btn:disabled{opacity:.55;cursor:wait;transform:none}

.presetButtonRow .captureSettingsBtn{grid-column:1/-1;font-weight:700}

/* 01A.51 — occurrence-specific manual pair kerning. */
.pairKerningControl{min-width:210px;max-width:280px}
.pairKerningControl output{white-space:nowrap;color:#f1d88a;font-weight:800}
.pairKerningHelp{position:relative;display:inline-flex;align-items:center;cursor:help;border-bottom:1px dotted #77808d;outline:none}
.pairKerningTooltip{position:absolute;left:0;bottom:calc(100% + 8px);z-index:40;width:210px;padding:8px 10px;border:1px solid #4a5260;border-radius:8px;background:#252a33;color:#eef1f5;font-size:10px;font-weight:600;line-height:1.35;letter-spacing:0;box-shadow:0 8px 24px rgba(0,0,0,.35);opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .12s ease,transform .12s ease,visibility .12s;pointer-events:none}
.pairKerningTooltip::after{content:"";position:absolute;left:18px;top:100%;border:6px solid transparent;border-top-color:#4a5260}
.pairKerningHelp:hover .pairKerningTooltip,.pairKerningHelp:focus .pairKerningTooltip,.pairKerningHelp:focus-visible .pairKerningTooltip{opacity:1;visibility:visible;transform:translateY(0)}
.pairKerningControl input:disabled{opacity:.38;cursor:not-allowed}

/* 01A.52 — reclaim typebar space for Pair Kerning. */
.alignControl{flex:0 0 92px;min-width:92px;max-width:92px}
.alignControl select{width:92px;min-width:0}


/* 01A.53 — compact top typography controls: numeric entry only. */
/* 01A.138 — responsive desktop typography widths. Keep the comfortable
   92px / 205px sizes when space is available, but allow these controls to
   shrink before Flexbox wraps Align onto a second row. */
.typebar .topNumberControl{flex:0 1 92px;min-width:70px;max-width:92px}
.typebar .topNumberControl .sliderNumberRow{display:block!important}
.typebar .topNumberControl .precisionNumber{width:100%;min-width:0;padding:6px 7px!important}
.typebar .pairKerningControl{flex:0 1 205px;min-width:160px;max-width:205px}
.typebar .pairKerningControl .precisionNumber{width:78px}
.typebar .pairKerningControl .sliderNumberRow{display:flex!important;justify-content:flex-start}
.typebar .topNumberControl input[type="hidden"]{display:none!important}

/* 01A.140 — keep desktop/laptop typography controls on one row. Let the
   typebar gap compress fluidly before any control wraps; tablet/mobile keeps
   the existing wrapped layout below 961px. */
@media (min-width:961px){
  .typebar{
    flex-wrap:nowrap;
    gap:clamp(12px,1vw,20px);
  }
}

/* Put the Preview Background label beside its select to reduce viewbar height. */
.viewbar .bgSelect{display:flex;flex-direction:row;align-items:center;gap:7px;min-width:0}
.viewbar .bgSelect>span{display:block;white-space:nowrap;margin:0}
.viewbar .bgSelect select{min-width:132px}

/* 01A.54 — compact typography row: 20px gaps, Pair Kerning hover help, redundant title readouts removed. */

/* 01A.55 — Pair Kerning label/status combined and its numeric control left-aligned. */
.pairKerningLabelRow{display:flex;align-items:center;white-space:nowrap}
.pairKerningSeparator{color:var(--muted);font-weight:700}

/* 01A.56 — keep the Pair Kerning label/status together and let its tooltip wrap normally. */
.control>.pairKerningLabelRow{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  width:max-content;
  max-width:100%;
  align-self:flex-start;
  white-space:nowrap;
}
.pairKerningSeparator{margin:0;flex:0 0 auto}
.pairKerningLabelRow output{flex:0 0 auto}
.pairKerningTooltip{
  white-space:normal;
  width:220px;
  max-width:220px;
  overflow-wrap:normal;
}

/* 01A.58 — scalable material-family controls. */
[hidden]{display:none!important}
.materialPickerCard{background:#171a20}
.materialPickerCard select{font-weight:750}
body[data-material-family="gold"] .materialPickerCard{border-color:#695a30}
body[data-material-family="stone"] .materialPickerCard{border-color:#55585d}

/* 01A.60 — uploaded Gold/Stone textures get blend, mapping, rotation, and color controls. */


.patternsmithNote{margin-top:2px}
.patternsmithNote a{color:#d7e6ff;text-decoration:underline}
.patternsmithNote a:hover{color:#ffffff}


/* 01A.64 — custom preview/JPG background color control. */
.previewColorControl{display:grid;grid-template-columns:auto 40px 86px;align-items:center;gap:6px;min-width:215px}
.previewColorControl>span{grid-column:1/-1;margin:0}
.previewColorControl input[type="color"]{grid-column:2;width:40px;height:30px}
.previewColorControl input[type="text"]{grid-column:3;width:86px;min-width:0;padding:6px 7px}
.exportCard .btn.primary + .btn.primary{margin-top:-2px}


/* 01A.95: branded top-bar logo */
.brandMark{background:none;border:0;box-shadow:none;overflow:hidden}
.brandMark img{display:block;width:38px;height:38px;object-fit:contain}


/* 01A.97 — Texture & Image Library, image edge-lighting mode, and stronger export button feedback. */
body[data-material-family="stone"] #textureStyleControl,
body[data-material-family="image"] #textureStyleControl{display:none!important}
.textureLibraryControl{display:flex;flex-direction:column;gap:7px}
.textureLibraryBtn{width:100%;font-weight:800;text-align:center}
.textureLibrarySelection{border:1px solid var(--stroke);background:#101217;border-radius:9px;padding:8px 9px;color:#cdd1d8;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.exportCard .btn.primary{transition:background .12s,border-color .12s,box-shadow .12s,transform .06s,filter .12s}
.exportCard .btn.primary:hover{background:#fff;border-color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.13);filter:brightness(1.04)}
.exportCard .btn.primary:active{transform:translateY(1px) scale(.992);background:#d9dde4;border-color:#d9dde4;box-shadow:inset 0 2px 5px rgba(0,0,0,.18)}
.exportCard .btn.primary:disabled{cursor:progress;opacity:.72;filter:saturate(.65)}

.textureLibOverlay{position:fixed;inset:0;background:rgba(0,0,0,.64);z-index:9999;display:none;align-items:center;justify-content:center;padding:18px}
.textureLibOverlay.on{display:flex}
.textureLibOpen{overflow:hidden}
.textureLibModal{width:min(980px,calc(100vw - 24px));height:min(820px,calc(100dvh - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);background:var(--panel);border:1px solid var(--stroke2);border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.5);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.textureLibTop{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:#0c0e12;border-bottom:1px solid var(--stroke);min-width:0}
.textureLibTitle{font-weight:850;letter-spacing:.08em;text-transform:uppercase;font-size:12px;flex:0 0 auto}
.textureLibTools{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto;justify-content:flex-end}
.textureLibSearch{width:min(360px,48vw);max-width:100%;min-width:0;background:var(--panel2);border:1px solid var(--stroke2);color:var(--text);border-radius:10px;padding:8px 10px;outline:none}
.textureLibSearch:focus{border-color:#747d89;box-shadow:0 0 0 3px rgba(180,190,205,.12)}
.textureLibBody{display:grid;grid-template-columns:200px 1fr;min-height:0;flex:1 1 auto}
.textureLibCats{border-right:1px solid var(--stroke);background:rgba(255,255,255,.02);padding:10px;overflow:auto;min-width:0}
.textureLibCatBtn{width:100%;text-align:left;background:transparent;color:var(--text);border:1px solid transparent;border-radius:10px;padding:10px;cursor:pointer;margin-bottom:8px}
.textureLibCatBtn:hover{background:rgba(255,255,255,.05);border-color:var(--stroke2)}
.textureLibCatBtn.on{background:rgba(255,255,255,.11);border-color:#666e7a}
.textureLibGrid{padding:12px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px;min-width:0;align-content:start}
.textureLibTile{appearance:none;color:var(--text);font:inherit;background:var(--panel2);border:1px solid var(--stroke);border-radius:14px;cursor:pointer;padding:10px;display:flex;flex-direction:column;gap:9px;min-height:160px;text-align:center;transition:border-color .12s,box-shadow .12s,transform .06s}
.textureLibTile:hover{border-color:#69727f;box-shadow:0 0 0 3px rgba(255,255,255,.07)}
.textureLibTile:active{transform:translateY(1px)}
.textureLibThumb{height:112px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#0b0d10;border:1px solid rgba(255,255,255,.06);overflow:hidden}
.textureLibThumb img{width:100%;height:100%;display:block;object-fit:cover}
.textureLibLabel{font-size:12px;color:var(--text);line-height:1.2}
.textureLibMeta{font-size:10px;color:var(--muted);line-height:1.15}
.textureLibEmpty{grid-column:1/-1;padding:18px;border:1px dashed rgba(255,255,255,.16);border-radius:14px;color:var(--muted);text-align:center}
@media (max-width:720px){
  .textureLibOverlay{padding:0;align-items:stretch;justify-content:stretch}
  .textureLibModal{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0}
  .textureLibTop{flex-direction:column;align-items:stretch;gap:10px;padding:calc(env(safe-area-inset-top,0px) + 12px) 12px 12px}
  .textureLibTools{width:100%}.textureLibSearch{width:100%}
  .textureLibBody{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .textureLibCats{display:flex;gap:7px;border-right:0;border-bottom:1px solid var(--stroke);padding:8px;overflow:auto;white-space:nowrap}
  .textureLibCatBtn{width:auto;flex:0 0 auto;margin:0;padding:8px 10px}
  .textureLibGrid{grid-template-columns:repeat(2,minmax(0,1fr));padding:9px;gap:8px}
}

/* 01A.107 — visual Google Font Browser with draggable/resizable panel + optional real pop-out window. */
#googleFont[hidden]{display:none!important}
.googleFontControl{position:relative}
.googleFontNative{display:none!important;position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;padding:0!important;border:0!important}
.fontBrowserTrigger{width:100%;min-width:0;min-height:34px;border:1px solid var(--stroke2);background:#0e1014;color:var(--text);border-radius:9px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;text-align:left;outline:none}
.fontBrowserTrigger:hover{border-color:#59616d;background:#12151a}
.fontBrowserTrigger:focus-visible{border-color:#747d89;box-shadow:0 0 0 2px rgba(180,190,205,.10)}
#googleFontBrowserLabel{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.fontBrowserTriggerAction{color:#9fa7b3;font-size:10px;text-transform:uppercase;letter-spacing:.08em;white-space:nowrap}
body.fontBrowserOpen{overflow:hidden}
.fontBrowserOverlay{position:fixed;inset:0;z-index:10020;background:rgba(0,0,0,.72);display:none;padding:0}
.fontBrowserOverlay.on{display:block}
.fontBrowserModal{position:absolute;left:14px;top:14px;width:min(1180px,calc(100vw - 28px));height:min(850px,calc(100dvh - 28px));min-width:min(560px,calc(100vw - 28px));min-height:min(420px,calc(100dvh - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 28px);background:#111318;border:1px solid #414854;border-radius:16px;box-shadow:0 26px 80px rgba(0,0,0,.58);overflow:hidden;display:flex;flex-direction:column}
.fontBrowserTop{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;background:#0c0e12;border-bottom:1px solid var(--stroke);cursor:grab;user-select:none;touch-action:none}
.fontBrowserModal.dragging .fontBrowserTop{cursor:grabbing}
.fontBrowserTop button,.fontBrowserTop input,.fontBrowserTop select{cursor:pointer}
.fontBrowserTopActions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.fontBrowserResizeGrip{position:absolute;right:2px;bottom:2px;width:24px;height:24px;cursor:nwse-resize;touch-action:none;z-index:4;border-radius:0 0 13px 0}
.fontBrowserResizeGrip::before,.fontBrowserResizeGrip::after{content:"";position:absolute;right:5px;bottom:5px;border-right:2px solid #777f8b;border-bottom:2px solid #777f8b;opacity:.8}
.fontBrowserResizeGrip::before{width:12px;height:12px}
.fontBrowserResizeGrip::after{width:6px;height:6px;right:10px;bottom:10px;opacity:.45}
.fontBrowserResizeGrip:hover::before,.fontBrowserResizeGrip:hover::after,.fontBrowserModal.resizing .fontBrowserResizeGrip::before,.fontBrowserModal.resizing .fontBrowserResizeGrip::after{border-color:#eef1f5;opacity:1}
.fontBrowserTitle{font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.11em;color:#f2f4f7}
.fontBrowserSubtitle{font-size:10px;color:#8f98a5;margin-top:3px}
.fontBrowserControls{padding:12px 14px 10px;border-bottom:1px solid var(--stroke);background:#14171c;display:flex;flex-direction:column;gap:9px}
.fontBrowserSearch{width:100%;border:1px solid #414854;background:#0b0d11;color:#f4f5f7;border-radius:10px;padding:9px 11px;outline:none;font-size:13px}
.fontBrowserSearch:focus{border-color:#7a8492;box-shadow:0 0 0 3px rgba(190,198,210,.10)}
.fontBrowserTabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.fontBrowserViewTabs{padding-bottom:1px}
.fontBrowserTab{border:1px solid #343a44;background:#1b1f26;color:#b9c0ca;border-radius:999px;padding:5px 9px;cursor:pointer;font-size:10px;font-weight:750;white-space:nowrap}
.fontBrowserTab:hover{background:#252a33;border-color:#4d5562;color:#eef1f5}
.fontBrowserTab.active{background:#eceff4;color:#121418;border-color:#fff}
.fontBrowserFilterRow{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:8px}
.fontBrowserFilter{display:flex;flex-direction:column;gap:4px;min-width:0}
.fontBrowserFilter>span{font-size:9px;color:#8f98a5;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.fontBrowserFilter select{width:100%;min-width:0;padding:6px 8px;font-size:11px}
.fontBrowserResultsHead{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;background:#101217;border-bottom:1px solid var(--stroke);font-size:10px;color:#a7afbb}
#fontBrowserSummary{font-weight:800;color:#d9dde4}
.fontBrowserLegend{color:#7f8895;text-align:right}
.fontBrowserScroll{min-height:0;overflow:auto;flex:1 1 auto;padding:12px 14px 18px;background:#0e1014}
.fontBrowserGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fontCard{border:1px solid #2e333c;background:#16191f;border-radius:12px;padding:10px;min-width:0;cursor:pointer;transition:border-color .12s,background .12s,transform .06s,box-shadow .12s;outline:none}
.fontCard:hover{border-color:#626c79;background:#1d2129;box-shadow:0 7px 18px rgba(0,0,0,.18)}
.fontCard:active{transform:translateY(1px)}
.fontCard:focus-visible{border-color:#7c8795;box-shadow:0 0 0 3px rgba(190,198,210,.10)}
.fontCard.selected{border-color:#e8ebef;box-shadow:inset 0 0 0 1px #e8ebef}
.fontCardTop{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fontCardName{font-size:11px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e6e9ee}
.fontFavoriteBtn{width:26px;height:24px;border:0;background:transparent;color:#727b88;border-radius:7px;cursor:pointer;font-size:17px;line-height:1;padding:0;display:grid;place-items:center}
.fontFavoriteBtn:hover{background:#2a3039;color:#e7ebf1}
.fontFavoriteBtn.active{color:#f1d071}
.fontCardPreview{height:54px;display:flex;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:28px;line-height:1;margin:6px 0 5px;color:#f3f4f6;letter-spacing:0}
.fontCardMeta{display:flex;justify-content:space-between;gap:8px;color:#7f8895;font-size:9px;line-height:1.2;margin-bottom:7px}
.fontCardMeta span:last-child{text-align:right}
.fontWeightChips{display:flex;gap:4px;flex-wrap:wrap;min-height:20px}
.fontWeightChip{border:1px solid #303641;background:#0e1014;color:#aeb5bf;border-radius:6px;padding:3px 5px;min-width:28px;cursor:pointer;font:750 9px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.fontWeightChip:hover{background:#eceff4;color:#111318;border-color:#fff}
.fontBrowserMore{display:block;margin:14px auto 0;min-width:190px}
.fontBrowserEmpty{text-align:center;color:#8d95a1;padding:48px 16px;font-weight:700}
@media (max-width:900px){
  .fontBrowserGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:620px){
  .fontBrowserOverlay{padding:0}
  .fontBrowserModal{left:0!important;top:0!important;width:100vw!important;height:100dvh!important;min-width:0;min-height:0;max-width:none;max-height:none;border:0;border-radius:0}
  .fontBrowserTop{align-items:flex-start;cursor:default;touch-action:auto}
  .fontBrowserResizeGrip{display:none}
  #fontBrowserPopOut{display:none}
  .fontBrowserSubtitle{max-width:260px}
  .fontBrowserDragHint{display:none}
  .fontBrowserFilterRow{grid-template-columns:1fr}
  .fontBrowserResultsHead{align-items:flex-start;flex-direction:column;gap:3px}
  .fontBrowserLegend{text-align:left}
  .fontBrowserGrid{grid-template-columns:1fr}
  .fontCardPreview{height:48px;font-size:26px}
}

/* 01A.111–113 — compact typography and view bars; retain the user's roomier 10px viewbar padding. */
.typebar{padding-top:7px;padding-bottom:7px}
.typebar .textControl{display:flex;flex-direction:row;align-items:center;gap:7px;min-width:240px}
.typebar .textControl>span{display:block;flex:0 0 auto;white-space:nowrap;margin:0}
.typebar .textControl textarea{flex:1 1 auto;width:100%;min-width:0;min-height:44px;max-height:110px;padding-top:6px;padding-bottom:6px}

.viewbar{padding-top:10px;padding-bottom:10px}
.viewbar .previewColorControl{display:grid;grid-template-columns:auto 40px 86px;align-items:center;gap:6px;min-width:0}
.viewbar .previewColorControl>span{grid-column:1;grid-row:1;display:block;white-space:nowrap;margin:0}
.viewbar .previewColorControl input[type="color"]{grid-column:2;grid-row:1;width:40px;height:30px}
.viewbar .previewColorControl input[type="text"]{grid-column:3;grid-row:1;width:86px;min-width:0;padding:6px 7px}
.viewbar .privacyNote{flex:1 1 180px;min-width:160px;max-width:360px;margin-left:auto;line-height:1.2;white-space:normal}

@media (max-width:960px){
  .viewbar .privacyNote{width:auto;max-width:none;margin-left:0}
}
@media (max-width:560px){
  .typebar .textControl{flex-direction:row;align-items:center}
  .viewbar .previewColorControl{width:100%;grid-template-columns:auto 40px minmax(78px,86px);justify-content:start}
}

/* 01A.117 — library refresh + lightweight thumbnail loading. */
.textureLibRefresh{flex:0 0 auto;white-space:nowrap;padding-inline:12px}
.textureLibRefresh:disabled{opacity:.62;cursor:wait}
.textureLibThumb{position:relative}
.textureLibThumbStatus{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:10px;letter-spacing:.02em;pointer-events:none}
.textureLibThumb img{position:relative;z-index:1;opacity:0;transition:opacity .12s ease}
.textureLibThumb.loaded img{opacity:1}
.textureLibThumb.loaded .textureLibThumbStatus{display:none}
.textureLibThumb.failed .textureLibThumbStatus{display:grid;color:#c98d8d}
@media(max-width:720px){
  .textureLibTools{display:grid;grid-template-columns:1fr auto auto}
  .textureLibSearch{grid-column:1;width:100%}
  .textureLibRefresh{grid-column:2}
  .textureLibClose{grid-column:3}
}

/* 01A.118 — explain preview-vs-export resolution directly in the Export card. */
.exportQualityNote{
  border:1px solid var(--stroke2);
  background:#101217;
  border-radius:9px;
  padding:9px 10px;
  color:#b8bec8;
  font-size:10.5px;
  line-height:1.45;
}
.exportQualityNote strong{color:#eef1f5;font-weight:800}


/* 01A.130 — text case shortcuts + preview hand tool. */
.textEditGroup{
  display:flex;
  align-items:flex-end;
  gap:8px;
  flex:1 1 360px;
  min-width:300px;
  max-width:430px;
}
.typebar .textEditGroup .textControl{
  flex:1 1 auto;
  min-width:0;
}
.textCaseControl{
  flex:0 0 96px;
  min-width:96px;
}
.textCaseControl select{
  width:96px;
  min-width:0;
  padding-left:8px;
  padding-right:24px;
}
.stageViewport.previewPanning{
  cursor:auto;
  user-select:none;
  -webkit-user-select:none;
}
.stageViewport.previewPanning .canvasHolder,.stageViewport.previewPanning #previewCanvas{cursor:grabbing}
#previewCanvas{cursor:inherit}

@media (max-width:560px){
  .textEditGroup{
    width:100%;
    max-width:none;
    min-width:0;
    flex:1 1 100%;
  }
  .typebar .textEditGroup .textControl{min-width:0}
  .textCaseControl{flex:0 0 94px;min-width:94px}
  .textCaseControl select{width:94px}
}

/* 01A.139 — compact Case dropdown replaces the three case buttons and returns horizontal room to the typography bar. */

/* 01A.140 — responsive desktop typebar: nowrap with fluid 12–20px gap. */
