/* Production bridge additions for the approved v99 design. No legacy BeatHelper styles. */
:root{color-scheme:dark}
.live-search{padding:0;overflow:visible}
.live-search>svg{position:absolute;left:16px;top:50%;transform:translateY(-50%);pointer-events:none;z-index:2}
.live-search>input{width:100%;height:48px;padding:0 48px 0 45px;border:0;outline:0;background:transparent;color:var(--text);font:600 13px/1 Manrope,system-ui,sans-serif}
.live-search>input::placeholder{color:#8497B2;opacity:1}
.live-search>button{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:none;width:28px;height:28px;border:0;border-radius:9px;background:rgba(255,255,255,.06);color:#91A2BB;font-size:18px;line-height:1;cursor:pointer}
.live-search.has-value>button{display:grid;place-items:center}
.live-search-results{position:absolute;z-index:40;top:calc(100% + 8px);left:0;right:0;padding:7px;border:1px solid rgba(255,255,255,.11);border-radius:16px;background:rgba(8,13,23,.98);box-shadow:0 24px 60px rgba(0,0,0,.48);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);max-height:330px;overflow:auto}
.live-search-result{width:100%;display:flex;align-items:center;gap:11px;padding:10px;border:0;border-radius:12px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.live-search-result:hover,.live-search-result:focus-visible{background:rgba(255,255,255,.055);outline:none}
.live-search-result-icon{width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.045);color:var(--blue-soft);font-size:9px;font-weight:800;letter-spacing:.06em}
.live-search-result-icon--tool{font-size:7px;letter-spacing:.12em}
.live-search-result-icon--crm{font-size:8px;letter-spacing:.08em}
.live-search-result-copy{min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.live-search-result-title{display:block;width:100%;font-size:11.5px;font-weight:750;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-search-result-meta{display:block;width:100%;margin:0;font-size:8.5px;line-height:1.35;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-search-empty{padding:14px 12px;color:var(--text-2);font-size:10px;text-align:center}
.live-avatar-photo{background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;color:transparent!important}
.v99-toast{position:fixed;z-index:1000;left:50%;bottom:calc(88px + env(safe-area-inset-bottom));width:min(390px,calc(100% - 28px));padding:12px 14px;border:1px solid rgba(255,255,255,.11);border-radius:14px;background:rgba(11,18,31,.96);box-shadow:0 20px 56px rgba(0,0,0,.48);color:#EAF0FF;font:650 11px/1.45 Manrope,system-ui,sans-serif;transform:translate(-50%,18px);opacity:0;pointer-events:none;transition:.2s ease}
.v99-toast.show{transform:translate(-50%,0);opacity:1}
.v99-toast.error{border-color:rgba(248,113,113,.28);color:#FCA5A5}
.v99-toast.success{border-color:rgba(74,222,128,.26);color:#86EFAC}
.v99-boot{position:fixed;z-index:9999;inset:0;display:grid;place-items:center;padding:24px;background:#05070C;transition:opacity .22s ease,visibility .22s ease}
.v99-boot.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
.v99-boot-card{width:min(320px,100%);text-align:center}
.v99-boot-mark{height:34px;display:flex;align-items:center;justify-content:center;gap:4px;color:var(--blue);filter:drop-shadow(0 0 18px rgba(47,107,255,.34))}
.v99-boot-mark i{display:block;width:5px;border-radius:999px;background:currentColor}.v99-boot-mark i:nth-child(1),.v99-boot-mark i:nth-child(5){height:8px}.v99-boot-mark i:nth-child(2),.v99-boot-mark i:nth-child(4){height:20px}.v99-boot-mark i:nth-child(3){height:34px}
.v99-boot-title{margin-top:16px;font-size:18px;font-weight:800}.v99-boot-copy{margin-top:6px;color:var(--text-2);font-size:10px}.v99-boot-line{height:3px;margin-top:18px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.06)}.v99-boot-line i{display:block;width:45%;height:100%;border-radius:inherit;background:var(--blue);animation:v99load 3.8s ease-in-out infinite;will-change:transform}@keyframes v99load{0%{transform:translateX(-110%)}100%{transform:translateX(330%)}}
.profile-plan-progress>span{transition:width .35s ease}
.home-recent-grid .row.is-empty{justify-content:center;color:var(--text-2);min-height:58px}
.home-recent-grid .row.is-empty .row-t{font-weight:600;color:var(--text-2)}
.v99-phase-badge{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:4px 8px;border-radius:999px;border:1px solid rgba(125,165,255,.16);background:rgba(125,165,255,.07);color:var(--blue-soft);font-size:7px;font-weight:800;letter-spacing:.08em;vertical-align:middle}
@media(min-width:768px){.v99-toast{bottom:28px}.live-search-results{max-height:420px}}

/* Phase 2: live tools. Built only from the approved v99 design tokens. */
.v99-tools-toast{position:fixed;z-index:1200;left:50%;bottom:calc(88px + env(safe-area-inset-bottom));width:min(390px,calc(100% - 28px));padding:12px 14px;border:1px solid rgba(255,255,255,.11);border-radius:14px;background:rgba(11,18,31,.97);box-shadow:0 20px 56px rgba(0,0,0,.48);color:#EAF0FF;font:650 11px/1.45 Manrope,system-ui,sans-serif;transform:translate(-50%,18px);opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}
.v99-tools-toast.show{transform:translate(-50%,0);opacity:1}.v99-tools-toast.error{border-color:rgba(248,113,113,.28);color:#FCA5A5}.v99-tools-toast.success{border-color:rgba(74,222,128,.26);color:#86EFAC}
.tool-action.is-live-busy{opacity:.72;cursor:wait}.tool-action:disabled,.live-history-pager button:disabled{cursor:not-allowed;opacity:.45}
.live-result-card{animation:v99ResultIn .22s ease both}@keyframes v99ResultIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.live-result-message,.live-result-meta,.live-error-copy{margin-top:5px;color:var(--text-2);font-size:9.5px;line-height:1.5}.live-result-meta{margin-top:12px}.live-error-copy{color:#FCA5A5;font-size:10.5px}.live-request-id{margin-top:10px;padding:8px 10px;border-radius:10px;border:1px solid rgba(248,113,113,.13);background:rgba(248,113,113,.05);color:#D7A0A0;font:600 8px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.tool-status.processing{color:var(--blue-soft);background:rgba(47,107,255,.12);border-color:rgba(125,165,255,.16)}.tool-status.live-failed{color:#FCA5A5;background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.17)}
.live-job-progress{display:block!important;margin-top:14px}.live-job-progress i{transition:width .28s ease}
.live-download-row{width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer}.live-download-row:hover{border-color:rgba(125,165,255,.2);background:rgba(125,165,255,.055)}
.live-empty-result{padding:18px 12px;border:1px dashed rgba(255,255,255,.09);border-radius:13px;color:var(--text-2);font-size:9.5px;line-height:1.45;text-align:center}
.live-table-scroll{width:100%;margin-top:12px;overflow:auto;border-radius:13px;border:1px solid rgba(255,255,255,.07)}.live-table-scroll .tool-table{margin:0;border:0;min-width:540px}
.live-history-pager{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.055)}.live-history-pager button{min-height:34px;padding:0 12px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.035);color:#C6D2E4;font:700 9px Manrope,system-ui,sans-serif;cursor:pointer}.live-history-pager button:last-child{justify-self:end}.live-history-pager span{color:var(--text-3);font-size:8.5px;font-weight:700;white-space:nowrap}
.live-picker-overlay{position:fixed;z-index:1100;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:0;background:rgba(1,4,9,.74);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease}.live-picker-overlay.show{opacity:1;visibility:visible}.live-picker{width:100%;max-height:88dvh;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.1);border-bottom:0;border-radius:24px 24px 0 0;background:linear-gradient(180deg,#0B1321 0%,#07101B 100%);box-shadow:0 -28px 80px rgba(0,0,0,.52);overflow:hidden}.live-picker-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 16px 13px;border-bottom:1px solid rgba(255,255,255,.055)}.live-picker-kicker{color:var(--blue-soft);font-size:7.5px;font-weight:800;letter-spacing:.16em}.live-picker-title{margin-top:4px;color:var(--text);font-size:17px;font-weight:800;letter-spacing:-.03em}.live-picker-head button{width:32px;height:32px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.04);color:#9AAAC0;font-size:20px;cursor:pointer}.live-picker-search{padding:12px 16px}.live-picker-search input{width:100%;height:42px;padding:0 13px;border:1px solid rgba(255,255,255,.09);border-radius:12px;outline:none;background:rgba(255,255,255,.035);color:var(--text);font:600 10.5px Manrope,system-ui,sans-serif}.live-picker-search input:focus{border-color:rgba(125,165,255,.28);box-shadow:0 0 0 3px rgba(47,107,255,.08)}.live-picker-list{min-height:160px;overflow:auto;padding:0 12px 12px}.live-picker-loading{padding:26px 12px;color:var(--text-2);font-size:10px;text-align:center}.live-picker-item{display:grid;grid-template-columns:auto 36px minmax(0,1fr);align-items:center;gap:10px;padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.045);cursor:pointer}.live-picker-item input{width:16px;height:16px;accent-color:var(--blue)}.live-picker-avatar{width:36px;height:36px;display:grid;place-items:center;border:1px solid rgba(125,165,255,.12);border-radius:50%;background:rgba(125,165,255,.07);color:var(--blue-soft);font-size:9px;font-weight:800}.live-picker-item b{display:block;color:#EAF0FF;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-picker-item small{display:block;margin-top:3px;color:var(--text-2);font-size:8.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-picker-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.06);background:rgba(5,9,16,.92)}.live-picker-count{color:var(--text-2);font-size:9px}.live-picker-foot .tool-action{width:auto;min-width:112px}.live-modal-open{overflow:hidden!important}
@media(min-width:768px){.v99-tools-toast{bottom:28px}.live-picker-overlay{align-items:center;padding:24px}.live-picker{width:min(620px,100%);max-height:min(760px,calc(100dvh - 48px));border-bottom:1px solid rgba(255,255,255,.1);border-radius:24px}.live-picker-head{padding:20px}.live-picker-search{padding:14px 20px}.live-picker-list{padding:0 16px 16px}.live-picker-foot{padding:14px 20px}.live-history-pager{grid-template-columns:120px auto 120px;justify-content:space-between}}

/* v99 phase 3: live CRM and permanent history */
.crm-export-overlay{position:fixed;inset:0;z-index:120;display:none;align-items:flex-end;justify-content:center;padding:16px;background:rgba(1,4,9,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.crm-export-overlay.open{display:flex}
.crm-export-menu{width:min(420px,100%);padding:18px;border:1px solid var(--border-2);border-radius:22px;background:linear-gradient(180deg,#101827,#09111e);box-shadow:0 28px 90px rgba(0,0,0,.52);display:grid;gap:9px}
.crm-export-menu b{font-size:15px;margin-bottom:4px}
.crm-export-menu button{height:44px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:#dce7f8;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.crm-export-menu button[data-live-export]{border-color:rgba(125,165,255,.18);background:rgba(47,107,255,.09);color:#dbe6ff}
.crm-history-empty{padding:14px;border:1px dashed var(--border);border-radius:13px;color:var(--text-2);font-size:9px;line-height:1.5}
.crm-toast[data-type="error"]{border-color:rgba(241,119,138,.25);color:#ffb9c3}
.crm-toast[data-type="success"]{border-color:rgba(74,222,128,.22);color:#a7f3c0}
#workspaceHistoryClear{display:none!important}
@media (min-width:768px){.crm-export-overlay{align-items:center}.crm-export-menu{padding:22px}}


/* V99 hotfixes */
.home-recent-grid .row .icon{
  width:46px;
  height:46px;
  border-radius:15px;
}
.home-recent-icon-text{
  font-size:12px;
  font-weight:800;
  color:var(--blue-soft);
  letter-spacing:.04em;
}
.home-recent-icon-glyph{display:grid;place-items:center;width:20px;height:20px;color:var(--blue-soft)}
.home-recent-icon-glyph svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tool-result-row.live-download-row{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(11, 22, 43, .9);
  color:inherit;
  width:100%;
  text-align:left;
  cursor:pointer;
}
.tool-result-row.live-download-row > div:nth-child(2),
.tool-result-row > div:nth-child(2){
  min-width:0;
}
.tool-result-row-title,
.tool-result-row-meta{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.tool-result-row-side{
  white-space:nowrap;
}
.tool-note{
  align-items:center;
}
.tool-note > div:last-child{
  display:flex;
  align-items:center;
  min-height:32px;
}
.live-job-progress i,
.tool-progress i{
  transition:width .45s cubic-bezier(.22, 1, .36, 1);
}
.live-gmail-history-card{
  margin-top:14px;
}
.live-gmail-history-list{
  display:grid;
  gap:10px;
}
.live-gmail-campaign{
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px;
  background:rgba(255,255,255,.02);
  padding:12px;
}
.live-gmail-campaign-head{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:flex-start;
}
.live-gmail-campaign-subject{
  font-weight:700;
  font-size:13px;
  line-height:1.35;
}
.live-gmail-campaign-meta,
.live-gmail-campaign-recipient-meta{
  margin-top:4px;
  color:#7E90AB;
  font-size:11px;
  line-height:1.45;
}
.live-gmail-campaign-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.live-gmail-chip{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(89,134,255,.09);
  border:1px solid rgba(89,134,255,.16);
  font-size:11px;
  color:#DCE7FF;
}
.live-gmail-campaign-actions{ margin-top:10px; }
.live-gmail-recipient-list{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.live-gmail-recipient{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid rgba(255,255,255,.05);
  padding-top:8px;
}
.live-gmail-recipient b{
  display:block;
  font-size:12px;
  line-height:1.35;
}
.live-gmail-recipient-status{
  white-space:nowrap;
  font-size:11px;
  color:#DCE7FF;
}
.live-gmail-empty,
.live-picker-loading,
.live-empty-result{
  color:#7E90AB;
}

/* Phase 6 interaction polish */
#v99AdminShell select,
.page select,
.profile-sheet select,
.crm-modal select,
.tool-select{
  color-scheme:dark;
}
#v99AdminShell select option,
.page select option,
.profile-sheet select option,
.crm-modal select option,
.tool-select option{
  background:#0d1727;
  color:#e8eef9;
}
.live-processing-card{
  animation:v99ResultIn .18s ease both;
  contain:layout paint;
}
.live-processing-card .live-job-progress i{
  will-change:width;
  transform:translateZ(0);
}
.tool-result-wrap.show{
  min-height:1px;
}
.profile-option-copy,
.profile-item-copy,
.nav-i > span:last-child{
  min-width:0;
}
html[lang="en"] .tool-action,
html[lang="ja"] .tool-action,
html[lang="en"] .profile-sheet-save,
html[lang="ja"] .profile-sheet-save{
  white-space:normal;
  line-height:1.25;
}


/* Phase 7 — stable result/download layout */
.tool-result-list{min-width:0}
.tool-result-row.live-download-row{
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
  padding:12px!important;
  border:1px solid rgba(132,157,196,.14)!important;
  border-radius:15px!important;
  background:rgba(12,24,45,.78)!important;
  color:inherit!important;
  text-align:left!important;
}
.tool-result-row-copy{min-width:0!important;max-width:100%!important}
.tool-result-row-title{
  display:block!important;min-width:0!important;max-width:100%!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  word-break:normal!important;overflow-wrap:normal!important;font-size:12px!important;line-height:1.35!important;
}
.tool-result-row-meta{
  display:block!important;min-width:0!important;margin-top:4px!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  word-break:normal!important;overflow-wrap:normal!important;font-size:10px!important;line-height:1.35!important;
}
.live-download-action{
  appearance:none;-webkit-appearance:none;min-width:84px;height:36px;padding:0 13px;
  border:1px solid rgba(99,143,255,.24);border-radius:11px;background:rgba(47,107,255,.10);
  color:#91b0ff;font:800 10px/1 Manrope,system-ui,sans-serif;white-space:nowrap;cursor:pointer;
}
.live-download-action:hover{background:rgba(47,107,255,.17);border-color:rgba(125,165,255,.36)}
.live-download-action:disabled{opacity:.58;cursor:wait}
.live-download-row.is-preparing-download{opacity:.72}
.live-processing-card{animation:none!important}
.live-processing-card .live-job-progress i{transition:width .5s cubic-bezier(.22,1,.36,1)!important}
@media(max-width:560px){
  .tool-result-row.live-download-row{grid-template-columns:36px minmax(0,1fr)!important;gap:10px!important}
  .live-download-action{grid-column:2;width:100%;min-width:0;margin-top:2px}
  .tool-result-row-title{white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}


/* Phase 8: recognition, immutable downloads and queue UX */
.track-primary-result{margin-top:12px}
.track-result-row{grid-template-columns:40px minmax(0,1fr) auto!important}
.track-result-row.is-primary{border-color:rgba(94,141,255,.30)!important;background:rgba(47,107,255,.075)!important}
.track-result-copy{min-width:0}
.track-result-actions{display:flex;align-items:center;gap:10px;justify-content:flex-end;min-width:116px}
.track-result-actions b{color:#8EAEFF;font-size:12px;white-space:nowrap}
.track-open-action{display:inline-flex;align-items:center;justify-content:center;min-width:74px;height:34px;padding:0 12px;border:1px solid rgba(99,143,255,.25);border-radius:10px;background:rgba(47,107,255,.11);color:#A8BEFF;font-size:10px;font-weight:800;text-decoration:none;white-space:nowrap}
.track-open-action:hover{background:rgba(47,107,255,.19)}
.track-extra-results{margin-top:12px;border:1px solid rgba(255,255,255,.07);border-radius:15px;background:rgba(255,255,255,.015);overflow:hidden}
.track-extra-results summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;color:#C9D5E8;font-size:10px;font-weight:800;cursor:pointer;list-style:none}
.track-extra-results summary::-webkit-details-marker{display:none}
.track-extra-results summary span{display:grid;place-items:center;min-width:25px;height:25px;padding:0 7px;border-radius:9px;background:rgba(89,134,255,.10);color:#8EAEFF}
.track-extra-results>.tool-result-list{padding:0 10px 10px}
.live-download-action.is-preparing-download{position:relative;color:transparent!important;pointer-events:none}
.live-download-action.is-preparing-download::after{content:'';position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border:2px solid rgba(145,176,255,.28);border-top-color:#91B0FF;border-radius:50%;animation:v99DownloadSpin .7s linear infinite}
@keyframes v99DownloadSpin{to{transform:rotate(360deg)}}
@media(max-width:560px){
  .track-result-row{grid-template-columns:34px minmax(0,1fr)!important}
  .track-result-actions{grid-column:2;justify-content:flex-start;min-width:0;margin-top:5px}
}


/* v1.7.4 — Track Finder result rhythm and readable copy. */
.track-summary-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:9px!important;
}
.track-summary-grid .tool-result-stat{min-height:76px;padding:13px 12px!important}
.track-summary-grid .tool-result-stat b{font-size:20px!important;line-height:1!important}
.track-summary-grid .tool-result-stat span{font-size:10.5px!important;line-height:1.35!important;margin-top:6px!important}
.track-result-overview{
  margin:14px 2px 16px!important;
  color:#9BAEC9!important;
  font-size:12px!important;
  line-height:1.6!important;
}
.track-batch-results{display:grid;gap:14px;margin-top:0}
.track-batch-results>.track-extra-results{margin-top:0}
.track-batch-results .track-extra-results summary{
  padding:15px 16px;
  font-size:13px;
  line-height:1.35;
}
.track-batch-results .track-extra-results summary span{
  min-width:30px;height:28px;padding:0 9px;border-radius:9px;
  font-size:11px;white-space:nowrap;
}
.track-file-checks{
  margin:0!important;
  padding:0 16px 11px!important;
  color:#91A4C0!important;
  font-size:12px!important;
  line-height:1.4!important;
}
.track-batch-results .track-extra-results>.tool-result-list{padding:0 12px 12px}
.track-batch-results .tool-result-list{gap:9px}
.track-batch-results .tool-result-row{padding:13px 14px!important;min-height:62px}
.track-batch-results .tool-result-row-title{font-size:13.5px!important;line-height:1.35!important}
.track-batch-results .tool-result-row-meta{font-size:11px!important;line-height:1.5!important;margin-top:5px!important}
.track-batch-results .track-result-actions b{font-size:12.5px}
.track-batch-results .track-open-action{height:36px;min-width:78px;font-size:10.5px}
.track-export-title{margin-top:18px!important;margin-bottom:9px!important;font-size:14px!important}
.track-search-note{padding:15px 16px!important;font-size:12.5px!important;line-height:1.6!important;min-height:58px}
.track-title-search-row{padding:14px 15px!important;min-height:70px!important}
.track-title-search-row .tool-switch-copy b{font-size:14.5px!important;line-height:1.3!important}
.track-title-search-row .tool-switch-copy span{font-size:12.5px!important;line-height:1.5!important;margin-top:5px!important}

.track-export-list .tool-result-row{min-height:66px!important;padding:13px 14px!important}
.track-export-list .tool-result-row-title{font-size:12.5px!important}
.track-export-list .tool-result-row-meta{font-size:10.5px!important}
.track-export-list .live-download-action{height:38px!important;font-size:11px!important}

@media(min-width:768px){
  .track-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
  .track-summary-grid .tool-result-stat{min-height:82px;padding:15px 14px!important}
  .track-summary-grid .tool-result-stat b{font-size:22px!important}
  .track-summary-grid .tool-result-stat span{font-size:11.5px!important}
  .track-result-overview{margin:17px 4px 20px!important;font-size:13px!important;line-height:1.65!important}
  .track-batch-results{gap:16px}
  .track-batch-results .track-extra-results summary{padding:17px 18px;font-size:14.5px}
  .track-batch-results .track-extra-results summary span{font-size:11.5px}
  .track-file-checks{padding:0 18px 14px!important;font-size:12.5px!important}
  .track-batch-results .track-extra-results>.tool-result-list{padding:0 14px 14px}
  .track-batch-results .tool-result-row{padding:14px 15px!important;min-height:66px}
  .track-batch-results .tool-result-row-title{font-size:14.5px!important}
  .track-batch-results .tool-result-row-meta{font-size:12px!important}
  .track-batch-results .track-result-actions b{font-size:13px}
  .track-batch-results .track-open-action{height:38px;min-width:82px;font-size:11px}
  .track-export-title{margin-top:22px!important;margin-bottom:11px!important;font-size:16px!important}
  .track-search-note{padding:16px 17px!important;font-size:13.5px!important;min-height:62px}
  .track-title-search-row{padding:17px 18px!important;min-height:82px!important}
  .track-title-search-row .tool-switch-copy b{font-size:16px!important}
  .track-title-search-row .tool-switch-copy span{font-size:13px!important;max-width:760px}
}

/* ================= Phase 9: form rhythm, contract marks, CRM picker, profile ================= */
.tool-field + .tool-upload-stack,
.tool-textarea + .tool-upload-stack,
.publication-side-stack .tool-field + .tool-upload-stack{
  margin-top:12px;
}
.tool-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.tool-field-mark{
  display:inline-flex;
  align-items:center;
  min-height:19px;
  padding:0 7px;
  border-radius:999px;
  font-size:7px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:none;
  white-space:nowrap;
}
.tool-field-mark.required{
  color:#FDA4AF;
  border:1px solid rgba(251,113,133,.22);
  background:rgba(251,113,133,.07);
}
.tool-field-mark.optional{
  color:#91A4C0;
  border:1px solid rgba(145,164,192,.15);
  background:rgba(145,164,192,.05);
}
.live-translit-note{
  margin-bottom:12px;
  padding:10px 12px;
  border:1px solid rgba(125,165,255,.15);
  border-radius:12px;
  background:rgba(47,107,255,.06);
  color:#AFC2E3;
  font-size:9px;
  line-height:1.5;
}
.live-translit-note b{color:#E1E9F8}

.publication-media-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:12px;
  margin-top:12px;
  align-items:stretch;
}
.publication-media-grid > .tool-upload-stack,
.publication-side-stack{
  min-width:0;
}
.publication-side-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.publication-side-stack .tool-field,
.publication-side-stack .tool-upload-stack{
  margin:0!important;
}
.publication-media-grid > .tool-upload-stack .tool-upload{
  height:100%;
  min-height:100%;
}
.publication-side-stack .tool-upload{
  min-height:122px;
}

.live-picker-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:0 16px 12px;
}
.live-picker-filters select{
  width:100%;
  min-width:0;
  height:38px;
  padding:0 30px 0 10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:11px;
  outline:0;
  background:#101827;
  color:#DCE7F8;
  font:700 9px Manrope,system-ui,sans-serif;
}
.live-picker-filters option{background:#101827;color:#DCE7F8}
.live-picker-item{
  grid-template-columns:auto 36px minmax(0,1fr) auto;
}
.live-picker-status{
  min-height:22px;
  display:inline-flex;
  align-items:center;
  padding:0 8px;
  border:1px solid rgba(125,165,255,.14);
  border-radius:8px;
  background:rgba(47,107,255,.06);
  color:#9BB5ED;
  font-size:7.5px;
  font-weight:800;
  white-space:nowrap;
}
.live-gmail-pager{margin-top:12px}

/* CRM modal never resizes the page when the sale field appears. */
@media (min-width:768px){
  .crm-overlay{
    align-items:center!important;
    justify-content:center!important;
    padding:24px!important;
    overflow:hidden!important;
  }
  .crm-modal{
    width:min(720px,calc(100vw - 48px))!important;
    height:auto!important;
    min-height:0!important;
    max-height:min(860px,calc(100dvh - 48px))!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:24px!important;
  }
  .crm-modal .crm-form{
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  .crm-modal-head,.crm-modal-actions{flex:0 0 auto}
  .crm-sale-field.visible{display:grid}
}

/* Desktop profile composition requested by the owner. */
.profile-summary-grid{display:grid;gap:12px}
.profile-dashboard-grid{display:grid;gap:20px}
.profile-dashboard-grid .profile-section{margin-top:0}
@media (min-width:768px){
  .profile-summary-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:stretch;
    gap:14px;
  }
  .profile-summary-grid .profile-hero,
  .profile-summary-grid .profile-plan{
    min-height:142px;
    margin-top:0;
  }
  .profile-dashboard-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:start;
    gap:14px;
    margin-top:22px;
  }
  .profile-dashboard-grid .profile-list{grid-template-rows:repeat(3,minmax(72px,auto))}
  .profile-dashboard-grid .profile-item{min-height:72px}
}
@media (max-width:767px){
  .publication-media-grid{grid-template-columns:1fr}
  .publication-side-stack{gap:12px}
  .live-picker-filters{grid-template-columns:1fr;padding:0 12px 10px}
  .live-picker-item{grid-template-columns:auto 36px minmax(0,1fr)}
  .live-picker-status{grid-column:3;margin-top:4px;justify-self:start}
}


/* ================= Phase 10: compact recent, publication flow, settings ================= */
.home-recent-grid .row{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  align-items:center;
}
.home-recent-copy{min-width:0}
.home-recent-grid .row-t{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.home-recent-grid .row-d{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tool-list-foot[data-catalog-stat]{
  color:#6F82A0;
  font-weight:650;
}
.audio-video-settings-grid{
  margin-top:14px;
}
.publication-media-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
}
.publication-media-grid>.tool-upload-stack{
  margin:0!important;
  min-width:0;
}
.publication-media-grid .tool-upload{
  min-height:178px;
  height:100%;
}
.publication-text-grid,
.publication-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
  align-items:start;
}
.publication-text-grid>.tool-field,
.publication-meta-grid>.tool-field{
  margin:0!important;
  min-width:0;
}
.publication-text-grid textarea{
  min-height:112px;
}
.publication-settings-trigger{
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  text-align:left;
  font:inherit;
  color:inherit;
  cursor:pointer;
}
.tool-file-line.is-server-draft{
  border-color:rgba(74,222,128,.19);
  background:rgba(74,222,128,.035);
}
.live-settings-overlay{z-index:1250}
.live-settings-modal{max-width:720px}
.live-settings-body{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:14px 16px 18px;
  overflow:auto;
}
.live-settings-body section{
  min-width:0;
  padding:14px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:16px;
  background:rgba(255,255,255,.025);
}
.live-settings-body section>b{
  display:block;
  margin-bottom:10px;
  color:#E8EEFA;
  font-size:12px;
}
.live-settings-body section>p{
  margin:0 0 12px;
  color:#7E90AB;
  font-size:9px;
  line-height:1.5;
}
.live-settings-body label{
  display:grid;
  gap:6px;
  margin-top:10px;
  color:#8EA0BC;
  font-size:8.5px;
  font-weight:750;
}
.live-settings-body input:not([type="checkbox"]),
.live-settings-body textarea,
.live-settings-body select{
  width:100%;
  min-height:40px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:11px;
  outline:0;
  background:#0E1727;
  color:#E7EDF8;
  font:650 10px Manrope,system-ui,sans-serif;
}
.live-settings-body textarea{min-height:72px;resize:vertical}
.live-settings-body .live-check{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:11px;
  background:rgba(255,255,255,.02);
  color:#C2CEE0;
}
.live-check input{width:16px;height:16px;accent-color:#4E7CFF}
.social-connect-modal .live-settings-body{grid-template-columns:repeat(3,minmax(0,1fr))}
.social-connect-modal .tool-action{margin-top:12px;width:100%}
@media(max-width:767px){
  .publication-media-grid,
  .publication-text-grid,
  .publication-meta-grid,
  .live-settings-body,
  .social-connect-modal .live-settings-body{grid-template-columns:1fr}
  .publication-media-grid .tool-upload{min-height:150px}
}


/* ================= Phase 11: profile rows, stable CRM sheets, compact media controls ================= */
@media (min-width:768px){
  .profile-dashboard-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    align-items:start!important;
  }
  .profile-dashboard-grid .profile-list{
    grid-template-columns:1fr!important;
    grid-template-rows:repeat(3,minmax(72px,auto))!important;
    grid-auto-flow:row!important;
  }
  .profile-dashboard-grid .profile-item{
    width:100%!important;
    min-height:72px!important;
  }
}

.audio-video-settings-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:end!important;
  gap:10px!important;
}
.audio-video-settings-grid>.tool-field{
  min-width:0!important;
  width:100%!important;
}
.audio-video-settings-grid .tool-select{
  width:100%!important;
  max-width:none!important;
}

/* CRM create/edit windows behave like the profile language sheet: fixed bottom sheet, no sideways drift. */
.crm-overlay{
  position:fixed!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
  display:none!important;
  align-items:flex-end!important;
  justify-content:center!important;
  padding:14px 10px calc(10px + env(safe-area-inset-bottom))!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
}
.crm-overlay.open{display:flex!important}
.crm-modal,
.crm-folder-modal{
  display:flex!important;
  flex-direction:column!important;
  width:min(100%,720px)!important;
  max-width:720px!important;
  height:auto!important;
  min-height:0!important;
  max-height:88dvh!important;
  margin:0!important;
  border-radius:22px!important;
  overflow:hidden!important;
  transform:none!important;
}
.crm-folder-modal{
  width:min(100%,520px)!important;
  max-width:520px!important;
}
.crm-modal-head{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto!important;
}
.crm-modal .crm-form{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.crm-folder-modal .crm-form{
  flex:0 1 auto!important;
  overflow-y:auto!important;
}
.crm-modal-actions{
  position:relative!important;
  bottom:auto!important;
  flex:0 0 auto!important;
}
@media (max-width:767px){
  .crm-overlay{
    align-items:flex-end!important;
    justify-content:center!important;
    padding:10px 8px calc(8px + env(safe-area-inset-bottom))!important;
  }
  .crm-modal,
  .crm-folder-modal{
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    height:auto!important;
    max-height:88dvh!important;
    border-radius:22px!important;
  }
  .crm-modal-head,
  .crm-modal-actions{
    padding-left:16px!important;
    padding-right:16px!important;
  }
}

.tool-list-foot[data-catalog-stat="1"]{
  color:#7185A5!important;
  font-weight:700!important;
}

/* ================= Phase 12: platform sheets and cookie-file connect flow ================= */
.live-settings-overlay{
  z-index:1250!important;
  align-items:flex-end!important;
  justify-content:center!important;
  padding:0!important;
}
.live-settings-overlay .live-picker{
  width:min(100%,720px)!important;
  max-height:min(88dvh,820px)!important;
  border-radius:24px 24px 0 0!important;
  border-bottom:0!important;
}
.live-settings-sheet{
  display:flex!important;
  flex-direction:column!important;
}
.live-sheet-body{
  display:grid;
  gap:10px;
  padding:12px 12px 0;
  overflow:auto;
}
.live-sheet-card{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:18px;
  background:rgba(255,255,255,.024);
}
.live-sheet-section-head{
  display:grid;
  gap:4px;
}
.live-sheet-section-head b{
  color:#EAF0FF;
  font-size:13px;
}
.live-sheet-section-head small{
  color:#8798B3;
  font-size:9px;
  line-height:1.45;
}
.live-sheet-card label{
  display:grid;
  gap:6px;
  color:#8EA0BC;
  font-size:8.5px;
  font-weight:750;
}
.live-sheet-card input:not([type="checkbox"]),
.live-sheet-card select,
.live-sheet-card textarea{
  width:100%;
  min-height:42px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  outline:0;
  background:#0E1727;
  color:#E7EDF8;
  font:650 10px Manrope,system-ui,sans-serif;
}
.live-sheet-card textarea{min-height:82px;resize:vertical}
.live-sheet-card .live-check{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:12px;
  background:rgba(255,255,255,.02);
  color:#C2CEE0;
}
.social-connect-sheet .live-sheet-card .tool-action,
.social-connect-sheet .live-sheet-card .live-cookie-pick{
  width:100%;
}
.live-cookie-upload{
  display:grid;
  gap:10px;
}
.live-cookie-upload-meta{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.018);
}
.live-cookie-upload-meta span{
  color:#EAF0FF;
  font-size:10px;
  font-weight:700;
  word-break:break-word;
}
.live-cookie-upload-meta small{
  color:#7F91AD;
  font-size:8.5px;
  line-height:1.45;
}
.social-platform-card .tool-action.secondary{
  min-height:46px;
}
@media(min-width:768px){
  .live-settings-overlay{padding:0!important}
  .live-settings-overlay .live-picker{width:min(720px,100%)!important;max-height:min(86dvh,920px)!important}
  .live-sheet-body{padding:14px 16px 0}
}

/* ================= Phase 13: neutral desktop rail, lower profile footer, admin access ================= */
@media (min-width:768px){
  .screen .nav{
    background:var(--surface)!important;
    border-color:var(--border)!important;
    box-shadow:0 18px 46px rgba(0,0,0,.26),inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  .screen .nav .nav-i.on,
  .screen .nav .nav-i.on svg{
    color:#fff!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .screen[data-page="profile"] .wrap{
    display:flex!important;
    flex-direction:column!important;
    min-height:calc(100dvh - 104px)!important;
  }
}
.v99-access-denied{
  position:fixed;
  z-index:2000;
  inset:0;
  display:grid;
  place-items:center;
  padding:18px;
  background:radial-gradient(680px 420px at 16% -10%,rgba(47,107,255,.18),transparent 70%),#050914;
}
.v99-access-denied-card{
  width:min(460px,100%);
  padding:26px;
  border:1px solid rgba(132,157,196,.18);
  border-radius:24px;
  background:var(--surface);
  box-shadow:0 28px 80px rgba(0,0,0,.38);
}
.v99-access-denied-kicker{color:var(--blue-soft);font-size:8px;font-weight:850;letter-spacing:.15em}
.v99-access-denied-card h1{margin:8px 0 0;font-size:30px;letter-spacing:-.045em}
.v99-access-denied-card p{margin:10px 0 20px;color:var(--text-2);font-size:12px;line-height:1.55}
.v99-access-denied-card button{width:100%;min-height:48px;border:0;border-radius:14px;background:var(--grad);color:#fff;font:800 12px Manrope,system-ui,sans-serif;cursor:pointer}

/* ================= Phase 14: stable analytics + reliable admin entry ================= */
.user-stats{position:relative}
.user-stats::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(100deg,transparent 0%,rgba(125,165,255,.045) 45%,transparent 80%);
  background-size:220% 100%;
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease;
}
.user-stats.is-refreshing::after{
  opacity:1;
  animation:v99-stats-refresh 1.15s linear infinite;
}
.user-stats.is-refreshing .user-stat-progress i{
  filter:saturate(.88) brightness(.96);
}
.user-stat-value b,
.user-summary-cell b,
.user-stat-progress i{
  transition:width .32s cubic-bezier(.2,.8,.2,1),color .16s ease,opacity .16s ease!important;
}
@keyframes v99-stats-refresh{from{background-position:180% 0}to{background-position:-60% 0}}
#liveAdminButton[data-admin-allowed="1"]{
  pointer-events:auto!important;
  cursor:pointer!important;
  opacity:1!important;
}
#liveAdminButton[data-admin-allowed="0"]{display:none!important}


/* ================= Phase 17: stable analytics layout for production ================= */
.analytics-section-head,
.user-stats{
  overflow-anchor:none!important;
}
.user-stats{
  min-height:var(--analytics-stable-height,auto);
  contain:layout paint;
}
.user-stats[data-analytics-loading="1"]{
  cursor:progress;
}
.user-stats[data-analytics-loading="1"]::after{
  opacity:.42!important;
  animation:v99-stats-refresh 1.15s linear infinite;
}
.analytics-context,
.user-stat-group-head span,
.user-stat-value span{
  white-space:nowrap!important;
}
.user-summary-cell b,
.user-stat-value b,
.user-stat-group-head span{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}
.user-summary-cell b{
  min-height:1em;
  line-height:1!important;
}
.user-stat-value b{
  min-width:3ch;
  min-height:1em;
  line-height:1!important;
}
.user-stat-group-head{
  min-height:34px;
}
.user-stat-row{
  contain:layout paint;
}
.user-stat-progress i{
  will-change:width;
  transition:width .34s cubic-bezier(.22,.8,.22,1)!important;
}
@media(max-width:619px){
  .analytics-section-head{align-items:center!important;min-height:18px}
  .analytics-context{max-width:48%;overflow:hidden;text-overflow:ellipsis}
}


/* ================= v1.0.3: inactive subscription gate ================= */
.v99-subscription-inactive{
  position:fixed;
  z-index:10000;
  inset:0;
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:22px;
  background:
    radial-gradient(680px 420px at 12% -15%,rgba(47,107,255,.18),transparent 72%),
    radial-gradient(620px 420px at 105% 110%,rgba(47,107,255,.12),transparent 72%),
    #05070C;
  color:#fff;
}
.v99-subscription-inactive-card{
  width:min(430px,100%);
  padding:12px 8px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  text-align:center;
}
.v99-subscription-inactive-mark{
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  color:var(--blue);
  filter:drop-shadow(0 0 10px rgba(47,107,255,.22));
}
.v99-subscription-inactive-mark i{display:block;width:4px;border-radius:999px;background:currentColor}
.v99-subscription-inactive-mark i:nth-child(1),.v99-subscription-inactive-mark i:nth-child(5){height:6px}
.v99-subscription-inactive-mark i:nth-child(2),.v99-subscription-inactive-mark i:nth-child(4){height:14px}
.v99-subscription-inactive-mark i:nth-child(3){height:24px}
.v99-subscription-inactive-brand{margin-top:13px;color:#dfe7f5;font-size:13px;font-weight:800;letter-spacing:.01em}
.v99-subscription-inactive-card h1{margin:24px 0 0;font-size:28px;line-height:1.08;letter-spacing:-.045em}
.v99-subscription-inactive-card p{margin:11px auto 0;max-width:280px;color:#93a4bd;font-size:12px;line-height:1.6}
.v99-subscription-inactive-card code{display:none}

/* Phase 8B: boot/auth gate + browser session controls. */
.v99-boot-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.v99-boot-actions[hidden]{display:none!important}
.v99-boot-actions button,.v99-boot-actions a{min-height:42px;display:flex;align-items:center;justify-content:center;padding:0 14px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.045);color:#DDE7F7;font:800 10px/1 Manrope,system-ui,sans-serif;text-decoration:none;cursor:pointer}
.v99-boot-actions button{border-color:rgba(125,165,255,.22);background:rgba(47,107,255,.13);color:#CFE0FF}
.v99-boot.is-error .v99-boot-mark{color:#F87171;filter:drop-shadow(0 0 18px rgba(248,113,113,.25))}
.v99-boot.is-error .v99-boot-copy{color:#FCA5A5}
.profile-item.profile-logout .profile-item-icon{color:#FCA5A5;background:rgba(248,113,113,.055);border-color:rgba(248,113,113,.12)}
.profile-item.profile-logout .profile-item-title{color:#F2C7C7}
.profile-item.profile-logout:active{background:rgba(248,113,113,.055);border-color:rgba(248,113,113,.16)}
.v99-subscription-logout{min-height:42px;margin-top:16px;padding:0 16px;border:1px solid rgba(248,113,113,.18);border-radius:12px;background:rgba(248,113,113,.07);color:#FCA5A5;font:800 10px Manrope,system-ui,sans-serif;cursor:pointer}


/* Phase 9A — shared grid, footer versions and boot polish. */
.screen .app{isolation:isolate}
.screen .app::before{content:"";position:absolute;z-index:0;inset:0;pointer-events:none;background-image:linear-gradient(rgba(125,165,255,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(125,165,255,.075) 1px,transparent 1px);background-size:72px 72px;opacity:.76;mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46));-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46))}
.screen .app>.wrap{position:relative;z-index:1}

/* Phase 9A.3 — consolidated 9A.1 + 9A.2 corrections. */
/* Landing-matched base stays neutral. */
html,body{background:#05070C!important}

/* Footer appearance comes only from the Landing footer master. */

/* Mobile / Telegram: grid belongs to the app surface itself so it cannot hide behind the opaque app background. */
@media(max-width:767px){
  .screen .app{position:relative;isolation:isolate;background:#05070C!important}
  .screen .app::before{display:block!important;content:""!important;position:absolute!important;z-index:0!important;inset:0!important;pointer-events:none!important;background-image:linear-gradient(rgba(125,165,255,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(125,165,255,.075) 1px,transparent 1px)!important;background-size:72px 72px!important;opacity:.76!important;mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46))!important;-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46))!important}
  .screen .app>.wrap{position:relative;z-index:1}
}

/* Desktop / browser: grid is viewport-fixed, not limited by the centered 1500px Mini App shell. */
@media(min-width:768px){
  body{position:relative;background:#05070C!important;background-image:none!important}
  body::before{display:none!important;content:none!important}
  body::after{content:"";position:fixed;z-index:0;inset:0;pointer-events:none;background-image:linear-gradient(rgba(125,165,255,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(125,165,255,.075) 1px,transparent 1px);background-size:72px 72px;opacity:.76;mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46));-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46))}
  .mobile-shell{position:relative!important;z-index:1!important;background:transparent!important}
  .screen,.screen .app{background:transparent!important}
  .screen .app::before{display:none!important;content:none!important}
}

/* Phase 9A.4 — hero restored to the original pre-no-grid styling. */


/* Phase 9A.5 — profile service ordering + lighter action titles. */
#profileLanguageButton .profile-item-title,
#profileThemeButton .profile-item-title,
#profileDownloaderButton .profile-item-title,
#liveAdminButton .profile-item-title,
#profileLogoutButton .profile-item-title{font-weight:650!important}


/* Phase 9C v4 — unified graphite instrument surfaces. */
.tool-workspace-head,
.tool-form-card,
.tool-result-card,
.tool-history-card{
  background:var(--surface)!important;
  border-color:var(--border)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important
}
.tool-workspace-head::after{opacity:.55}
.tool-upload{background:rgba(255,255,255,.018)!important}
.tool-upload:hover,.tool-upload.has-file{background:rgba(255,255,255,.035)!important}


/* Phase 9C v5 — complete graphite surfaces pass for tools. */
.tool-input,.tool-textarea,.tool-select,.tool-date,
.tool-segment,
.tool-result-stat,.tool-result-row,
.tool-note,.tool-settings-row,.tool-switch-row,
.tool-file-line,.tool-result-link,
.live-table-scroll,.tool-progress{
  background:var(--surface)!important;
  border-color:var(--border)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important
}
.tool-input:focus,.tool-textarea:focus,.tool-select:focus,.tool-date:focus{
  background:rgba(255,255,255,.03)!important;
  border-color:rgba(89,134,255,.30)!important;
  box-shadow:0 0 0 3px rgba(47,107,255,.06)!important
}
.tool-input::placeholder,.tool-textarea::placeholder{color:#6E819E!important}
.tool-segment button{color:#8EA1BE!important}
.tool-segment button.on{
  background:rgba(255,255,255,.05)!important;
  border-color:rgba(255,255,255,.09)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
  color:#F2F6FD!important
}
.tool-result-link,.tool-action.secondary{
  background:rgba(255,255,255,.028)!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#C3D6F6!important;
  box-shadow:none!important
}
.tool-progress{overflow:hidden!important}
.tool-progress i{background:linear-gradient(90deg,#3C70EF,#6558E8)!important}

/* Phase 9C v5.1 — flat BeatHelper tool actions, no purple gradients. */
.tool-action:not(.secondary){
  background:#2F6BFF!important;
  border-color:rgba(125,165,255,.24)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 22px rgba(16,34,78,.18)!important
}
.tool-action:not(.secondary):hover{background:#376FFF!important}
.tool-action.secondary,.tool-result-link{
  background:rgba(255,255,255,.03)!important;
  border-color:rgba(255,255,255,.09)!important;
  box-shadow:none!important;
  color:#B9CBE8!important
}
.tool-progress i{background:#2F6BFF!important}


/* Phase 9C v5.2 v2 — uploader-save button style + CRM chart interaction cleanup. */
.tool-action:not(.secondary),
button.tool-action:not(.secondary),
.btn:not(.ghost){
  background:rgba(47,107,255,.13)!important;
  border-color:rgba(125,165,255,.22)!important;
  color:#DCE7FF!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.tool-action:not(.secondary):hover,
button.tool-action:not(.secondary):hover,
.btn:not(.ghost):hover{
  background:rgba(47,107,255,.17)!important;
  border-color:rgba(125,165,255,.28)!important;
}
.tool-action:not(.secondary):active,
button.tool-action:not(.secondary):active,
.btn:not(.ghost):active{
  background:rgba(47,107,255,.21)!important;
}
.crm-chart-hotspot:focus-visible{outline:none!important;box-shadow:none!important}
.crm-chart-plot svg{overflow:visible}

/* Phase 12B — document-level landing glows; no clipped Mini App glow rectangle.
   Landing master centers: top (170px, 60px), bottom (right - 110px, bottom - 100px). */
html,body{background:#05070C!important}
body{
  background:
    radial-gradient(ellipse 390px 340px at 170px 60px,rgba(47,107,255,.24) 0%,rgba(47,107,255,.105) 44%,rgba(47,107,255,.035) 62%,transparent 78%),
    radial-gradient(ellipse 370px 340px at calc(100% - 110px) calc(100% - 100px),rgba(47,107,255,.19) 0%,rgba(47,107,255,.08) 46%,rgba(47,107,255,.028) 64%,transparent 79%),
    #05070C!important;
  background-repeat:no-repeat!important;
  background-attachment:scroll!important;
}
.mobile-shell,.screen,.screen .app{background:transparent!important}
.screen .glow-a,.screen .glow-b{display:none!important}
/* Keep the existing shared grid above the document glows and below the UI. */
@media(min-width:768px){
  body::before{display:none!important;content:none!important}
  body::after{z-index:0!important}
  .mobile-shell{position:relative!important;z-index:1!important}
}

/* Phase 12C — exact landing backdrop for Mini App.
   Brand keeps the Mini App's own x/y placement; only visual brand CSS is shared. */
html,body{background:#05070C!important}
body{position:relative!important;background:#05070C!important;background-image:none!important}
body::before,body::after{display:none!important;content:none!important}

/* One document-sized landing surface. This avoids clipping the glow inside the desktop app shell. */
.bh-landing-backdrop{
  position:absolute;
  z-index:0;
  inset:0;
  min-height:100dvh;
  overflow:hidden;
  pointer-events:none;
  background:#05070C;
  isolation:isolate;
}
.bh-landing-backdrop::before{
  content:"";
  position:absolute;
  z-index:0;
  inset:0;
  pointer-events:none;
  background-image:linear-gradient(rgba(125,165,255,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(125,165,255,.075) 1px,transparent 1px);
  background-size:72px 72px;
  opacity:.76;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46));
  -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.96),rgba(0,0,0,.46));
}
.bh-landing-backdrop>.glow-a{
  display:block!important;
  position:absolute!important;
  z-index:0!important;
  top:-220px!important;
  left:-150px!important;
  width:640px!important;
  height:560px!important;
  background:radial-gradient(circle,rgba(47,107,255,.26),transparent 70%)!important;
  filter:blur(60px)!important;
  pointer-events:none!important;
}
.bh-landing-backdrop>.glow-b{
  display:block!important;
  position:absolute!important;
  z-index:0!important;
  bottom:-180px!important;
  right:-190px!important;
  width:600px!important;
  height:560px!important;
  background:radial-gradient(circle,rgba(47,107,255,.20),transparent 70%)!important;
  filter:blur(70px)!important;
  pointer-events:none!important;
}
.mobile-shell{position:relative!important;z-index:1!important;background:transparent!important}
.screen,.screen .app{background:transparent!important}
.screen .app::before{display:none!important;content:none!important}
.screen .glow-a,.screen .glow-b{display:none!important}

/* Exact landing visual lockup; Mini App keeps its existing .wrap/nav placement. */
.topbar{gap:10px!important;margin-bottom:18px!important}
.mark{height:24px!important;gap:3px!important}
.brand{font-size:15px!important;font-weight:700!important;line-height:1.05!important;letter-spacing:-.2px!important}
.brand-sub{display:block!important;font-size:8px!important;font-weight:700!important;line-height:1.1!important;letter-spacing:.16em!important;color:#6B7A93!important;margin-top:2px!important}

@media(min-width:768px){
  .bh-landing-backdrop::before{
    background-image:linear-gradient(rgba(125,165,255,.085) 1px,transparent 1px),linear-gradient(90deg,rgba(125,165,255,.085) 1px,transparent 1px);
    opacity:.78;
  }
  .topbar{gap:12px!important;margin-bottom:28px!important}
  .mark{height:28px!important;gap:3px!important}
  .brand{font-size:18px!important;font-weight:700!important;line-height:1.05!important;letter-spacing:-.3px!important}
  .brand-sub{font-size:9px!important;font-weight:700!important;line-height:1.1!important;letter-spacing:.16em!important;margin-top:3px!important}
}


/* Phase 17.8.2 — canonical graphite overlays + neutral tool glyphs.
 * Removes legacy blue-tinted sheet backgrounds while preserving blue only for
 * semantic selection/status accents (checks, active toggles, progress). */
.tool-note-icon,
.tool-account-logo{
  background:#17191F!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#92A4BE!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.tool-note-icon.imessage-device-icon svg{width:18px!important;height:18px!important;stroke-width:1.75!important}

.live-picker,
.live-settings-overlay .live-picker,
.crm-export-menu{
  background:#121318!important;
  border-color:rgba(255,255,255,.09)!important;
  box-shadow:0 28px 90px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.025)!important;
}
.live-picker-head,
.live-picker-foot{
  background:#121318!important;
  border-color:rgba(255,255,255,.065)!important;
}
.live-picker-kicker{color:#71839E!important}
.live-picker-title{color:#EEF3FC!important}
.live-picker-head button{
  background:#17191F!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#9AAAC0!important;
}
.live-picker-search input,
.live-picker-filters select,
.live-sheet-card input:not([type="checkbox"]),
.live-sheet-card select,
.live-sheet-card textarea,
.live-settings-body input:not([type="checkbox"]),
.live-settings-body select,
.live-settings-body textarea{
  background:#17191F!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#E7EDF8!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
}
.live-picker-filters option,
.live-sheet-card option{background:#17191F!important;color:#DCE7F8!important}
.live-sheet-card,
.live-settings-body section,
.live-cookie-upload-meta{
  background:#17191F!important;
  border-color:rgba(255,255,255,.085)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
}
.live-sheet-card .live-check,
.live-settings-body .live-check{
  background:#121318!important;
  border-color:rgba(255,255,255,.075)!important;
}
.live-picker-item{
  background:transparent!important;
  border-color:rgba(255,255,255,.055)!important;
}
.live-picker-item:hover{background:#17191F!important}
.live-picker-avatar{
  background:#17191F!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#92A4BE!important;
}
.crm-export-menu button,
.crm-export-menu button[data-live-export]{
  background:#17191F!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#D5E1F2!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
}
@media(hover:hover){
  .crm-export-menu button:hover,
  .crm-export-menu button[data-live-export]:hover{background:#1B1D23!important;border-color:rgba(255,255,255,.13)!important}
}
