/* Novira Translate, T3: the editing workspace.
   Four zones: application header, job bar, [rail | navigator | artwork | inspector].
   Colours are the neutral Novira editor palette; the artwork itself is never tinted.
   Everything is scoped to #reviewSection.t3 (and the body while it is showing) so the opening and
   processing screens (T1, T2) are untouched. Motion is limited to hover, tool and panel changes. */

body:has(#reviewSection.t3:not(.hidden)) {
  --bg: #101010; --bg-elevated: #151515; --surface: #171717; --surface-2: #1D1D1D;
  --border: #303030; --border-focus: #E7D5BA;
  --accent: #E7D5BA; --accent-hover: #F3E8D6; --accent-soft: #BAA991; --accent-dim: rgba(231, 213, 186, .14);
  --accent-ink: #171717; --green: #E7D5BA; --green-dim: rgba(231, 213, 186, .12);
  --amber: #E0B67B;
  --text: #F2F2F2; --text-2: #A4A4A4; --text-3: #A4A4A4;
  --t3-ease: cubic-bezier(.2, .8, .2, 1);
  --t3-sel: #353029; --t3-input: #414141; --t3-icon: #B5B5B5; --t3-off: #686868;
  background: #101010;
  overflow: hidden;
  height: 100vh; height: 100dvh;
}

/* ── Shell ─────────────────────────────────────────────────────────────────── */
#reviewSection.t3 {
  --t3-rail: 48px; --t3-nav: 248px; --t3-insp: 352px; --t3-nav-eff: var(--t3-nav);
  position: relative; background: #101010;
  display: grid; overflow: hidden; min-height: 0;
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
  grid-template-columns: var(--t3-rail) var(--t3-nav-eff) 0 minmax(0, 1fr) 0 var(--t3-insp);
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  grid-template-areas:
    "top  top  top  top  top  top"
    "sfx  sfx  sfx  sfx  sfx  sfx"
    "bill bill bill bill bill bill"
    "note note note note note note"
    "rail nav  nr   body ir   insp";
  transition: grid-template-columns 200ms var(--t3-ease);
}
#reviewSection.t3[data-nav-open="0"] { --t3-nav-eff: 0px; }
#reviewSection.t3.t3-dragging { transition: none; }
#reviewSection.t3 .review-topbar { grid-area: top; }
#reviewSection.t3 .sfx-banner { grid-area: sfx; margin: 0; border-radius: 0; }
#reviewSection.t3 .review-receipt { grid-area: bill; margin: 0; border-radius: 0; }
#reviewSection.t3 .structure-notice { grid-area: note; margin: 0; border-radius: 0; }
#reviewSection.t3 .t3-rail { grid-area: rail; }
#reviewSection.t3 .t3-nav { grid-area: nav; }
#reviewSection.t3 #t3NavResize { grid-area: nr; }
#reviewSection.t3 .t3-stage { grid-area: body; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #101010; }
#reviewSection.t3 .review-body { flex: 1; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr); background: #101010; }
#reviewSection.t3 #t3InspResize { grid-area: ir; }
#reviewSection.t3 .review-bubbles { grid-area: insp; }

/* ── Job bar ───────────────────────────────────────────────────────────────── */
#reviewSection.t3 .review-topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 16px; row-gap: 6px;
  padding: 6px 12px; min-height: 48px; height: auto; background: #141414; border-bottom: 1px solid #303030;
}
.t3-grp-left, .t3-grp-centre, .t3-grp-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.t3-grp-left { gap: 8px; flex: 1 1 auto; }
.t3-grp-centre { flex: none; }
.t3-grp-right { flex: 0 0 auto; justify-content: flex-end; flex-wrap: nowrap; margin-left: auto; }
.t3-count { font-size: 12.5px; color: #A4A4A4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t3-count #bubbleCount { color: #F2F2F2; font-weight: 600; }
.t3-count .nt-region-detail { color: #A4A4A4; }
.t3-sep { width: 1px; height: 18px; background: #303030; margin: 0 4px; flex: none; }
#reviewSection.t3 .page-nav { gap: 2px; }
#reviewSection.t3 .page-nav-label { font-size: 12.5px; color: #F2F2F2; min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
#reviewSection.t3 .page-nav-btn {
  width: 32px; height: 32px; border: 0; background: transparent; color: #B5B5B5; border-radius: 6px;
  display: inline-grid; place-items: center; transition: background 120ms, color 120ms;
}
#reviewSection.t3 .page-nav-btn:hover:not(:disabled) { background: #1D1D1D; color: #F2F2F2; border: 0; }
#reviewSection.t3 .page-nav-btn:disabled { color: #686868; opacity: 1; }

/* one icon system: Lucide on a 24 grid, 1.75 stroke, sized by the surface it sits on */
#reviewSection.t3 svg.lucide, #t3Nav svg.lucide { stroke-width: 1.75; flex: none; }
.t3-ibtn svg, .t3-rail-btn svg, .tool-btn svg { width: 20px; height: 20px; }

.t3-ibtn {
  position: relative; width: 36px; height: 36px; padding: 0; flex: none; border: 0; border-radius: 6px; background: transparent;
  color: #B5B5B5; display: inline-grid; place-items: center; cursor: pointer; transition: background 120ms, color 120ms;
}
.t3-ibtn:hover:not(:disabled) { background: #1D1D1D; color: #F2F2F2; }
.t3-ibtn:disabled { color: #686868; cursor: default; }
.t3-ibtn.active, .t3-ibtn[aria-pressed="true"] { color: #E7D5BA; background: #353029; }
.t3-ibtn:focus-visible, .t3-rail-btn:focus-visible, .cmp-mode:focus-visible, .t3-row-item:focus-visible {
  outline: 2px solid #E7D5BA; outline-offset: -2px;
}
#reviewSection.t3 .t3-grp-right .btn, #reviewSection.t3 .t3-grp-right .ai-fix-btn {
  height: 32px; min-height: 0; padding: 0 10px; gap: 6px; border-radius: 6px; font: 500 13px/1 var(--font);
  display: inline-flex; align-items: center; white-space: nowrap; transition: background 120ms, border-color 120ms, color 120ms;
}
#reviewSection.t3 .t3-grp-right svg { width: 16px; height: 16px; }
#reviewSection.t3 .btn-outline, #reviewSection.t3 .ai-fix-btn.t3-quiet {
  background: transparent; border: 1px solid #414141; color: #F2F2F2; box-shadow: none; transform: none;
}
#reviewSection.t3 .btn-outline:hover, #reviewSection.t3 .ai-fix-btn.t3-quiet:hover:not(:disabled) { background: #1D1D1D; border-color: #686868; opacity: 1; transform: none; }
#reviewSection.t3 .ai-fix-btn.t3-quiet { background: transparent; }
#reviewSection.t3 .btn-primary { background: #E7D5BA; color: #171717; border: 1px solid #E7D5BA; font-weight: 600; }
#reviewSection.t3 .btn-primary:hover { background: #F3E8D6; border-color: #F3E8D6; }
#reviewSection.t3 .btn:focus-visible, #reviewSection.t3 .ai-fix-btn:focus-visible, #reviewSection.t3 .quality-badge:focus-visible { outline: 2px solid #E7D5BA; outline-offset: 2px; }

#reviewSection.t3 .quality-badge {
  height: 32px; padding: 0 10px; gap: 6px; border-radius: 6px; font: 500 13px/1 var(--font); display: inline-flex; align-items: center;
  background: transparent; border: 1px solid #414141; color: #F2F2F2;
}
#reviewSection.t3 .quality-badge svg { width: 16px; height: 16px; color: #B5B5B5; }
#reviewSection.t3 .quality-badge:hover { background: #1D1D1D; }
#reviewSection.t3 .quality-badge.warn, #reviewSection.t3 .quality-badge.bad { border-color: rgba(224, 182, 123, .55); background: transparent; color: #E0B67B; }
#reviewSection.t3 .quality-badge.warn svg, #reviewSection.t3 .quality-badge.bad svg { color: #E0B67B; }
#reviewSection.t3 .quality-badge.good { background: transparent; border-color: #414141; color: #F2F2F2; }
#qualityScore { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

#reviewSection.t3 .cmp-modes { background: #101010; border: 1px solid #303030; border-radius: 8px; padding: 2px; gap: 2px; }
#reviewSection.t3 .cmp-mode { height: 28px; padding: 0 14px; border-radius: 6px; font: 500 13px/1 var(--font); color: #A4A4A4; transition: background 100ms, color 100ms; }
#reviewSection.t3 .cmp-mode:hover { color: #F2F2F2; }
#reviewSection.t3 .cmp-mode.active { background: #353029; color: #E7D5BA; }
#reviewSection.t3 .cmp-range { width: 120px; accent-color: #E7D5BA; }
.pro-share-mode-badge { font-size: 12px; color: #E0B67B; white-space: nowrap; }

/* tooltips for the icon-only actions: name and shortcut, after a short rest */
[data-tip] { position: relative; }
.t3-ibtn[data-tip]::after, .t3-rail-btn[data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 90; pointer-events: none; white-space: nowrap;
  padding: 5px 8px; border-radius: 6px; background: #1D1D1D; border: 1px solid #414141; color: #F2F2F2; font: 500 12px/1.2 var(--font);
  opacity: 0; transition: opacity 120ms; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
}
.t3-grp-right .t3-ibtn[data-tip]::after { left: auto; right: 0; transform: none; }
.t3-ibtn:hover::after, .t3-ibtn:focus-visible::after, .t3-rail-btn:hover::after, .t3-rail-btn:focus-visible::after { opacity: 1; transition-delay: .35s; }
.t3-rail-btn[data-tip]::after { top: 50%; left: calc(100% + 8px); transform: translateY(-50%); }
.t3-ibtn:active::after { opacity: 0; }

/* ── Rail ──────────────────────────────────────────────────────────────────── */
.t3-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; background: #141414; border-right: 1px solid #303030; z-index: 31; }
.t3-rail-btn {
  position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #B5B5B5;
  display: grid; place-items: center; cursor: pointer; transition: background 120ms, color 120ms;
}
.t3-rail-btn:hover { background: #1D1D1D; color: #F2F2F2; }
.t3-rail-btn[aria-pressed="true"] { background: #353029; color: #E7D5BA; }
.t3-rail-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #E0B67B; box-shadow: 0 0 0 2px #141414; }
.t3-rail-btn[aria-pressed="true"] .t3-rail-dot { box-shadow: 0 0 0 2px #353029; }

/* ── Navigator ─────────────────────────────────────────────────────────────── */
.t3-nav { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #151515; border-right: 1px solid #303030; transition: visibility 0s; }
#reviewSection.t3[data-nav-open="0"] .t3-nav { visibility: hidden; transition: visibility 0s 200ms; border-right-color: transparent; }
.t3-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.t3-pane[hidden] { display: none; }
.t3-pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; flex: none; }
.t3-pane-head h2 { margin: 0; font: 600 13px/1.2 var(--font); color: #F2F2F2; letter-spacing: 0; }
.t3-pane-meta { font-size: 12px; color: #A4A4A4; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* pages: real thumbnails at the page's own proportions, nothing cropped */
#reviewSection.t3 #pageStrip {
  flex: 1; min-height: 0; width: auto; height: auto; padding: 4px 12px 16px; gap: 10px; overflow-y: auto; overflow-x: hidden;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); align-content: start; border: 0; -webkit-mask-image: none; mask-image: none; background: transparent;
}
#reviewSection.t3 #pageStrip .page-thumb {
  position: relative; width: 100% !important; height: auto !important; max-height: 260px; background: #101010; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; transform: none; transition: border-color 120ms, box-shadow 120ms;
}
#reviewSection.t3 #pageStrip .page-thumb img { width: 100%; height: auto; max-height: 260px; object-fit: contain; display: block; }
#reviewSection.t3 #pageStrip .page-thumb:hover { transform: none; border-color: #686868 !important; }
#reviewSection.t3 #pageStrip .page-thumb[style*="var(--accent)"] { border-color: #E7D5BA !important; box-shadow: 0 0 0 1px #E7D5BA; }
#reviewSection.t3 #pageStrip .page-num { position: absolute; left: 4px; right: auto; bottom: 4px; transform: none; width: auto; padding: 1px 6px; border-radius: 4px; background: rgba(16, 16, 16, .82); color: #F2F2F2; font: 500 11px/1.4 var(--font); }

/* text regions */
.t3-filter { padding: 0 12px 8px; flex: none; }
.t3-filter .pro-filter-bar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.t3-filter .pro-filter-search { width: 100%; min-width: 0; box-sizing: border-box; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid #414141; background: #101010; color: #F2F2F2; font: 13px var(--font); }
.t3-filter .pro-filter-search:focus { border-color: #E7D5BA; outline: none; }
.t3-filter .pro-filter-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.t3-filter .pro-filter-pill { height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: #A4A4A4; font: 500 12px/1 var(--font); transition: background 100ms, color 100ms; }
.t3-filter .pro-filter-pill:hover { color: #F2F2F2; background: #1D1D1D; border-color: transparent; }
.t3-filter .pro-filter-pill.active { background: #353029; color: #E7D5BA; border-color: transparent; }
.t3-filter .pro-filter-count { font: 500 11px var(--font); }
.t3-rows { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 12px; display: flex; flex-direction: column; gap: 1px; }
.t3-row-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; align-items: start; text-align: left;
  width: 100%; padding: 8px 8px; border: 0; border-radius: 6px; background: transparent; color: #F2F2F2; cursor: pointer; font: inherit;
  transition: background 100ms;
}
.t3-row-item:hover { background: #1D1D1D; }
.t3-row-item[aria-selected="true"] { background: #353029; box-shadow: inset 2px 0 0 #E7D5BA; }
.t3-row-item[hidden] { display: none; }
.t3-row-num { font: 500 12px/18px var(--font); color: #A4A4A4; font-variant-numeric: tabular-nums; }
.t3-row-text { min-width: 0; font-size: 13px; line-height: 18px; color: #F2F2F2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.t3-row-text.is-empty { color: #686868; font-style: italic; }
.t3-row-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 11.5px; color: #A4A4A4; }
.t3-row-meta .t3-tag { text-transform: capitalize; }
.t3-row-meta .t3-st::before { content: '\00b7'; margin-right: 8px; color: #686868; }
.t3-row-meta .t3-st.is-review { color: #E0B67B; }
.t3-row-meta .t3-st.is-review::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 5px 0 0; border-radius: 50%; background: #E0B67B; vertical-align: 1px; }
.t3-empty-note { padding: 18px 14px; font-size: 13px; color: #A4A4A4; }

/* Quality Check lives here; the old full-width panel above the canvas is gone */
.t3-qc-empty { display: none; margin: 0; padding: 4px 14px 14px; font-size: 13px; color: #A4A4A4; }
.t3-pane:has(#findingsPanel[hidden]) .t3-qc-empty { display: block; }
#t3PaneQc .findings-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
#t3PaneQc .findings-panel[hidden] { display: none; }
#t3PaneQc .findings-panel-header { padding: 0 14px 8px; border: 0; cursor: default; pointer-events: none; justify-content: flex-end; }
#t3PaneQc .findings-panel-title, #t3PaneQc #findingsChevron { display: none; }
#t3PaneQc .qc-dev-toggle { pointer-events: auto; font: 500 12px var(--font); height: 26px; border-radius: 6px; padding: 0 9px; }
#t3PaneQc .findings-panel.collapsed .findings-list, #t3PaneQc .findings-list { display: flex !important; flex: 1; min-height: 0; max-height: none !important; overflow-y: auto; padding: 0 14px 16px; gap: 14px; }
#t3PaneQc .qc-summary-bar { font-size: 12px; padding-bottom: 10px; border-bottom: 1px solid #303030; flex-direction: column; align-items: flex-start; }
#t3PaneQc .qc-pill { border-radius: 6px; background: transparent; border-color: #303030; color: #A4A4A4; font-size: 12px; }
#t3PaneQc .qc-pill.is-critical { border-color: rgba(240, 135, 122, .45); color: #F0A89F; }
#t3PaneQc .qc-pill.is-attention { border-color: rgba(224, 182, 123, .5); color: #E0B67B; }
#t3PaneQc .qc-pill.is-preserved { border-color: #414141; color: #BAA991; }
#t3PaneQc .qc-section-head { font-size: 11px; letter-spacing: .06em; }
#t3PaneQc .qc-card { grid-template-columns: auto minmax(0, 1fr); align-items: start; background: transparent; border: 0; border-left: 2px solid #303030; border-radius: 0; padding: 6px 4px 6px 10px; }
#t3PaneQc .qc-card:hover { background: #1D1D1D; border-color: #303030; border-left-color: #686868; }
#t3PaneQc .qc-card:has(.qc-sev-dot.critical) { border-left-color: #F0877A; }
#t3PaneQc .qc-card:has(.qc-sev-dot.attention) { border-left-color: #E0B67B; }
#t3PaneQc .qc-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
#t3PaneQc .qc-sev-dot { display: none; }
#t3PaneQc .qc-card-title { font-size: 13px; font-weight: 600; }
#t3PaneQc .qc-card-where { font-family: var(--font); font-size: 11.5px; }
#t3PaneQc .qc-card-msg { font-size: 12.5px; }
#t3PaneQc .qc-btn { height: 26px; padding: 0 9px; border-radius: 6px; font: 500 12px/1 var(--font); background: transparent; border-color: #414141; color: #F2F2F2; }
#t3PaneQc .qc-btn:hover { background: #1D1D1D; border-color: #686868; }
#t3PaneQc .qc-btn.is-primary { background: #353029; border-color: transparent; color: #E7D5BA; }
#t3PaneQc .qc-group { border-radius: 6px; border-color: #303030; background: transparent; }
#t3PaneQc .qc-group summary { font-size: 12.5px; }

/* ── Resizers ──────────────────────────────────────────────────────────────── */
.t3-resizer { position: relative; z-index: 35; width: 9px; margin-left: -4px; cursor: col-resize; touch-action: none; justify-self: start; }
.t3-resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: transparent; transition: background 120ms; }
.t3-resizer:hover::after, .t3-resizer:focus-visible::after, .t3-resizer.is-active::after { background: #E7D5BA; width: 2px; left: 3px; }
.t3-resizer:focus-visible { outline: none; }
#reviewSection.t3[data-nav-open="0"] #t3NavResize { display: none; }

/* ── Artwork ───────────────────────────────────────────────────────────────── */
#reviewSection.t3 .review-panel { background: #101010; }
#reviewSection.t3 .review-panel + .review-panel { border-left: 1px solid #303030; }
#reviewSection.t3 .review-panel-header { padding: 0 12px; min-height: 36px; box-sizing: border-box; align-content: center; background: #141414; border-bottom: 1px solid #303030; gap: 8px; }
.t3-canvasbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; height: 40px; padding: 0 8px; background: #141414; border-bottom: 1px solid #303030; overflow-x: auto; scrollbar-width: none; }
.t3-canvasbar::-webkit-scrollbar { display: none; }
.t3-cb-group { display: flex; align-items: center; gap: 2px; flex: none; }
.t3-canvasbar .t3-ibtn { width: 32px; height: 32px; }
.t3-canvasbar .t3-ibtn svg { width: 18px; height: 18px; }
.t3-canvasbar .edit-applying { margin-left: 8px; font-size: 12px; color: #A4A4A4; }
.t3-canvasbar .pro-hdr-sep { width: 1px; height: 18px; background: #303030; margin: 0 4px; }
#reviewSection.t3 .review-leftover-note { padding: 0 0 6px; font: 600 12px/1.4 var(--font); }
#reviewSection.t3 .review-panel-label { font: 600 12px/1 var(--font); letter-spacing: 0; text-transform: none; color: #A4A4A4; }
#reviewSection.t3 .review-panel-label.accent { color: #F2F2F2; opacity: 1; }
#reviewSection.t3 .pro-hdr-sep { width: 1px; height: 18px; background: #303030; margin: 0 2px; }
.t3-zoom { min-width: 40px; text-align: center; font: 500 12px var(--font); color: #A4A4A4; font-variant-numeric: tabular-nums; }
#reviewSection.t3 .image-viewer { background: #101010; }
/* the page is shown as it is: no tint, no filter, no resampling by presentation */
#reviewSection.t3 .image-viewer img { filter: none; }

/* contextual toolbar: a docked column beside the translated page, so it never covers the art */
#reviewSection.t3 .review-panel-work { grid-template-columns: 44px minmax(0, 1fr); }
#reviewSection.t3 .tool-rail { width: 44px; box-sizing: border-box; padding: 8px 0; gap: 2px; background: #141414; border-right: 1px solid #303030; }
#reviewSection.t3 .tool-btn { width: 36px; height: 36px; border-radius: 6px; color: #B5B5B5; background: transparent; transition: background 100ms, color 100ms; transform: none; }
#reviewSection.t3 .tool-btn:not(.active):hover { background: #1D1D1D; color: #F2F2F2; }
#reviewSection.t3 .tool-btn.active { background: #353029; color: #E7D5BA; }
#reviewSection.t3 .tool-btn:active { transform: none; }
#reviewSection.t3 .tool-btn::after { background: #1D1D1D; border: 1px solid #414141; color: #F2F2F2; border-radius: 6px; font: 500 12px/1.2 var(--font); }
#reviewSection.t3 .tool-rail-sep { width: 20px; background: #303030; }
#reviewSection.t3:not([data-cmp="slide"]):not([data-cmp="translated"]) .review-body > .review-panel:first-child .image-viewer { padding: 0 22px; }
#reviewSection.t3 .tool-bar { background: #141414; border-bottom: 1px solid #303030; }
#reviewSection.t3 .tool-seg button { border-radius: 6px; font: 500 12.5px var(--font); }
#reviewSection.t3 .tool-seg button[aria-pressed="true"], #reviewSection.t3 .tool-seg button.active { background: #353029; color: #E7D5BA; }
#reviewSection.t3 .tool-done { border-radius: 6px; height: 28px; font: 500 12.5px var(--font); }

/* ── Inspector ─────────────────────────────────────────────────────────────── */
.t3-insp { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #151515; border-left: 1px solid #303030; }
.t3-insp-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 8px; flex: none; border-bottom: 1px solid #303030; }
.t3-insp .bubbles-title { margin: 0; font: 600 13px/1.2 var(--font); color: #F2F2F2; letter-spacing: 0; text-transform: none; }
.t3-insp-who { display: none; }
.t3-insp-empty { display: none; padding: 28px 24px; text-align: center; color: #A4A4A4; font-size: 13px; line-height: 1.5; }
.t3-insp-empty svg { width: 24px; height: 24px; margin-bottom: 8px; color: #686868; }
.t3-insp-empty p { margin: 0; }
.t3-insp:not(:has(.bubble-edit-item.selected)) .t3-insp-empty { display: block; }
.t3-insp-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 28px; display: block; background: transparent; }
.t3-insp .empty-bubbles { padding: 20px 4px; color: #A4A4A4; font-size: 13px; text-align: center; }

#bubblesEditor .bubble-edit-item { display: none; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; }
#bubblesEditor .bubble-edit-item.selected { display: block; background: transparent; border: 0; }
#bubblesEditor .bubble-edit-item:hover { border: 0; }
#bubblesEditor .bubble-edit-header { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 0 10px; flex-wrap: wrap; }
#bubblesEditor .bubble-num { font: 600 13px var(--font); color: #F2F2F2; }
#bubblesEditor .bubble-type-badge { background: transparent !important; padding: 0; font: 500 12px var(--font); color: #A4A4A4 !important; text-transform: capitalize; }
#bubblesEditor .bubble-type-badge::before { content: '\00b7'; margin-right: 8px; color: #686868; }
#bubblesEditor .bubble-state { font: 500 12px var(--font); color: #E7D5BA; background: transparent; border: 0; padding: 0; }
#bubblesEditor .bubble-state.is-preserved { color: #BAA991; }
#bubblesEditor .item-history { margin-left: auto; display: inline-flex; gap: 2px; }
#bubblesEditor .item-step { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #B5B5B5; display: inline-grid; place-items: center; }
#bubblesEditor .item-step:hover:not(:disabled) { background: #1D1D1D; color: #F2F2F2; }
#bubblesEditor .item-step:disabled { color: #686868; }
#bubblesEditor .item-step svg { width: 16px; height: 16px; }

.t3-sec { padding: 14px 0 16px; border-top: 1px solid #303030; }
.t3-sec:first-of-type { border-top: 0; }
.t3-sec-h { margin: 0 0 10px; font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #A4A4A4; }
.t3-lbl { font: 500 12px/1.2 var(--font); color: #A4A4A4; }
.t3-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: #A4A4A4; }
.t3-unit, .t3-num em { font: 400 12px var(--font); font-style: normal; color: #A4A4A4; }

#bubblesEditor .t3-orig { margin: 0 0 8px; }
#bubblesEditor .t3-orig > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--font); color: #A4A4A4; padding: 2px 0; }
#bubblesEditor .t3-orig > summary::-webkit-details-marker { display: none; }
#bubblesEditor .t3-orig > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 120ms; margin-right: 4px; }
#bubblesEditor .t3-orig[open] > summary::before { transform: rotate(45deg); }
#bubblesEditor .t3-orig > summary:hover { color: #F2F2F2; }
#bubblesEditor .t3-orig > summary:focus-visible { outline: 2px solid #E7D5BA; outline-offset: 2px; border-radius: 4px; }
#bubblesEditor .bubble-original { margin: 4px 0 0; padding: 8px 10px; border-radius: 6px; background: #101010; color: #A4A4A4; font: 13px/1.5 var(--font); max-height: 120px; overflow-y: auto; }
#bubblesEditor .bubble-edit-input {
  display: block; width: 100%; box-sizing: border-box; min-height: 76px; margin: 6px 0 0; padding: 9px 10px; resize: vertical;
  border: 1px solid #414141; border-radius: 6px; background: #101010; color: #F2F2F2; font: 14px/1.5 var(--font); transition: border-color 100ms;
}
#bubblesEditor .bubble-edit-input:focus { outline: none; border-color: #E7D5BA; }
#bubblesEditor .bubble-edit-input:disabled { color: #686868; }
#bubblesEditor .bubble-edit-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; margin-top: 8px; }
#bubblesEditor .bubble-action-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid #303030; background: transparent;
  color: #F2F2F2; font: 500 12px/1 var(--font); transition: background 100ms, border-color 100ms, color 100ms;
}
#bubblesEditor .bubble-action-btn svg { width: 14px; height: 14px; }
#bubblesEditor .bubble-action-btn:hover:not(:disabled) { background: #1D1D1D; border-color: #686868; color: #F2F2F2; }
#bubblesEditor .bubble-action-btn:disabled { color: #686868; border-color: #303030; }
#bubblesEditor .bubble-action-btn.bubble-del-btn:hover:not(:disabled) { color: #F0877A; border-color: rgba(240, 135, 122, .5); background: transparent; }
#bubblesEditor .bubble-action-btn.ai-edit-btn { color: #E7D5BA; background: transparent; border-color: #303030; }
#bubblesEditor .bubble-action-btn:focus-visible, #bubblesEditor .ctrl-chip:focus-visible, #bubblesEditor .pro-role-chip:focus-visible, #bubblesEditor .item-step:focus-visible { outline: 2px solid #E7D5BA; outline-offset: 2px; }

/* lettering: label left, control right, one aligned column of controls */
#bubblesEditor .bubble-ctrl-row { display: flex; flex-direction: column; gap: 8px; margin: 0; }
#bubblesEditor .t3-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; column-gap: 8px; }
#bubblesEditor .t3-row .t3-unit { margin-left: 6px; }
#bubblesEditor .t3-row:has(.t3-stepper) { grid-template-columns: 84px auto 1fr; }
#bubblesEditor .t3-stepper { display: inline-flex; align-items: center; gap: 2px; width: fit-content; }
#bubblesEditor .t3-seg { display: inline-flex; gap: 2px; width: fit-content; padding: 2px; border-radius: 6px; background: #101010; border: 1px solid #303030; }
#bubblesEditor .ctrl-chip {
  min-width: 30px; height: 28px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: #B5B5B5; display: inline-grid; place-items: center; font: 500 12px var(--font);
  transition: background 100ms, color 100ms; transform: none;
}
#bubblesEditor .ctrl-chip:hover:not(:disabled) { background: #1D1D1D; color: #F2F2F2; border: 0; }
#bubblesEditor .ctrl-chip:active { transform: none; background: #353029; color: #E7D5BA; }
#bubblesEditor .ctrl-chip svg { width: 16px; height: 16px; }
#bubblesEditor .t3-tc { width: 30px; }
#bubblesEditor .t3-tc::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #686868; }
#bubblesEditor .t3-tc-white::before { background: #FFFFFF; }
#bubblesEditor .t3-tc-black::before { background: #000000; }
#bubblesEditor .ctrl-size {
  width: 56px; height: 28px; box-sizing: border-box; text-align: center; border: 1px solid #414141; border-radius: 6px; background: #101010; color: #F2F2F2; font: 500 13px var(--font);
  font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
#bubblesEditor .ctrl-size:focus { outline: none; border-color: #E7D5BA; }
#bubblesEditor .ctrl-shape {
  height: 30px; width: 100%; max-width: 180px; box-sizing: border-box; padding: 0 8px; border: 1px solid #414141; border-radius: 6px; background: #101010; color: #F2F2F2; font: 13px var(--font);
}
#bubblesEditor .ctrl-shape:focus { outline: none; border-color: #E7D5BA; }
#bubblesEditor .nt-dd { max-width: 180px; }
#bubblesEditor .pro-role-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 0; }
#bubblesEditor .pro-role-chip {
  height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid #303030; background: transparent; color: #F2F2F2; font: 500 12px/1 var(--font); transition: background 100ms, border-color 100ms;
}
#bubblesEditor .pro-role-chip:hover { background: #1D1D1D; border-color: #686868; color: #F2F2F2; }
#bubblesEditor .pro-role-chip.is-balance { color: #E7D5BA; }

/* appearance: the existing Look panel, always open, without its own card */
#bubblesEditor .t3-sec-appearance { padding-top: 6px; }
#bubblesEditor .bubble-look { margin: 0; border-radius: 0; background: transparent; box-shadow: none; --look-pill: #1D1D1D; --look-pill-hover: #242424; --look-amount: rgba(231, 213, 186, .22); }
#bubblesEditor .bubble-look > summary { height: 36px; padding: 0; cursor: default; pointer-events: none; color: #A4A4A4; }
#bubblesEditor .bubble-look > summary .look-chevron { display: none; }
#bubblesEditor .bubble-look > summary .look-title { font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
#bubblesEditor .look-edited { background: transparent; color: #E7D5BA; font: 500 12px var(--font); padding: 0; height: auto; }
#bubblesEditor .look-body { padding: 0; animation: none; gap: 8px; }
#bubblesEditor .look-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#bubblesEditor .look-parts .t3-lbl { width: 100%; }
#bubblesEditor .look-part { border-radius: 6px; font: 500 12px var(--font); }
#bubblesEditor .look-part[aria-pressed="true"] { background: #353029; color: #E7D5BA; }
#bubblesEditor .look-foot { gap: 4px; }
#bubblesEditor .look-foot .look-reset { height: 28px; border-radius: 6px; font: 500 12px var(--font); }
#bubblesEditor .look-slider { border-radius: 6px; }

/* geometry */
.t3-geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.t3-num { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 6px; font: 500 12px var(--font); color: #A4A4A4; }
.t3-num input {
  width: 100%; min-width: 0; height: 30px; box-sizing: border-box; padding: 0 8px; border: 1px solid #414141; border-radius: 6px; background: #101010; color: #F2F2F2;
  font: 500 13px var(--mono); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.t3-num input:focus { outline: none; border-color: #E7D5BA; }
.t3-num input:disabled { color: #686868; }
.t3-num input::-webkit-outer-spin-button, .t3-num input::-webkit-inner-spin-button, #bubblesEditor .ctrl-size::-webkit-outer-spin-button, #bubblesEditor .ctrl-size::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* the filtered-out or hidden state never hides the selection from the inspector */
#bubblesEditor .bubble-edit-item.selected[hidden] { display: block; }

/* a busy button shows what it is doing, whatever the width */
#reviewSection.t3 .t3-quiet[aria-busy="true"] span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; }
#reviewSection.t3 .t3-grp-right .t3-quiet[aria-busy="true"] { width: auto; padding: 0 10px; }

/* the credit balance in the editor is plain text, as on the opening screen */
body:has(#reviewSection.t3:not(.hidden)) .nt-quota-chip { background: none; border: 0; padding: 0 4px; font-family: var(--font); font-size: 14px; color: #A4A4A4; }
body:has(#reviewSection.t3:not(.hidden)) .nt-quota-dot, body:has(#reviewSection.t3:not(.hidden)) .nt-quota-dot.warn { width: 8px; height: 8px; background: #BAA991; box-shadow: none; }
body:has(#reviewSection.t3:not(.hidden)) .nt-quota-dot.empty { background: transparent; border: 1px solid #A4A4A4; box-shadow: none; }

/* ── Narrower desktop: the navigator floats over the artwork instead of moving it ─────────────── */
@media (max-width: 1599px) {
  .t3-qb-label, #reviewSection.t3 .t3-quiet span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #reviewSection.t3 .t3-grp-right .t3-quiet { width: 36px; padding: 0; justify-content: center; }
  #reviewSection.t3 .quality-badge { padding: 0 8px; }
}
@media (max-width: 1280px) {
  #proExportBtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #proExportBtn { width: 36px; padding: 0; justify-content: center; }
}
@media (max-width: 1180px) and (min-width: 1024px) {
  #reviewSection.t3 { --t3-nav-eff: 0px; --t3-insp: 320px; }
  #reviewSection.t3 .t3-nav { width: var(--t3-nav); justify-self: start; z-index: 30; box-shadow: 8px 0 24px rgba(0, 0, 0, .45); }
  #reviewSection.t3[data-nav-open="0"] .t3-nav { display: none; }
  #reviewSection.t3 #t3NavResize { display: none; }
}

/* ── Tablet and phone: panels are sheets over the artwork, a bottom bar switches them ─────────── */
.t3-rail-edit { display: none; }
@media (max-width: 1023px) {
  #reviewSection.t3 {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top" "sfx" "bill" "note" "body" "rail";
    --t3-nav-eff: 0px; transition: none;
  }
  #reviewSection.t3 .review-topbar { row-gap: 4px; padding: 6px 8px; }
  .t3-grp-left, .t3-grp-centre, .t3-grp-right { flex: 1 1 100%; }
  .t3-grp-centre { justify-content: center; }
  .t3-grp-right { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; padding-bottom: 2px; }
  .t3-grp-right::-webkit-scrollbar { display: none; }
  .t3-grp-right .t3-ibtn[data-tip]::after { display: none; }
  .t3-rail { flex-direction: row; justify-content: space-around; padding: 4px 8px; border-right: 0; border-top: 1px solid #303030; z-index: 72; }
  .t3-rail-btn { width: 56px; height: 44px; }
  .t3-rail-btn[data-tip]::after { display: none; }
  .t3-rail-edit { display: grid; }
  #reviewSection.t3 .review-body { min-height: 0; }
  #reviewSection.t3 .review-body, #reviewSection.t3 .review-panel { overflow: hidden; }
  .t3-canvasbar { padding: 0 4px; }
  #reviewSection.t3 .t3-nav, #reviewSection.t3 .t3-insp {
    position: fixed; left: 0; right: 0; bottom: 53px; width: auto; height: min(62dvh, 540px); z-index: 70; box-shadow: 0 -12px 32px rgba(0, 0, 0, .55);
    border: 0; border-top: 1px solid #303030; border-radius: 12px 12px 0 0;
  }
  #reviewSection.t3 .t3-nav { display: flex; }
  #reviewSection.t3[data-nav-open="0"] .t3-nav { display: none; }
  #reviewSection.t3:not([data-insp-open="1"]) .t3-insp { display: none; }
  #reviewSection.t3 .t3-resizer { display: none; }
  #reviewSection.t3 .review-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  #reviewSection.t3[data-cmp="slide"] .review-body, #reviewSection.t3[data-cmp="translated"] .review-body { grid-template-rows: minmax(0, 1fr); }
  #reviewSection.t3 .review-panel + .review-panel { border-left: 0; border-top: 1px solid #303030; }
  #reviewSection.t3 .review-panel-header { overflow-x: auto; scrollbar-width: none; }
  .t3-insp-close { display: inline-grid; }
}
@media (max-width: 480px) {
  #reviewSection.t3 .review-panel-work { grid-template-columns: 40px minmax(0, 1fr); }
  #reviewSection.t3 .tool-rail { width: 40px; }
  #reviewSection.t3 .tool-btn { width: 32px; height: 32px; }
}
@media (min-width: 1024px) { .t3-insp-close { display: none; } }
.t3-insp-close { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #B5B5B5; place-items: center; cursor: pointer; }
.t3-insp-close:hover { background: #1D1D1D; color: #F2F2F2; }

@media (prefers-reduced-motion: reduce) {
  #reviewSection.t3, #reviewSection.t3 *, .t3-nav, .t3-resizer::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Application header while editing: the same neutral surface, and it stays inside a phone's width ── */
body:has(#reviewSection.t3:not(.hidden)) .nt-header { background: #101010; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 1px solid #303030; }
body:has(#reviewSection.t3:not(.hidden)) .nt-user-pill { background: none; border: 0; }
@media (max-width: 480px) {
  body:has(#reviewSection.t3:not(.hidden)) .nt-header { padding: 0 12px; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-beta { display: none; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-header-right { gap: 8px; margin-left: 8px; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-quota-chip { font-size: 13px; padding: 0 4px; background: none; border: 0; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-user-name { display: none; }
}
@media (max-width: 360px) {
  body:has(#reviewSection.t3:not(.hidden)) .nt-logo { gap: 8px; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-logo-divider { display: none; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-logo img { height: 20px; }
  body:has(#reviewSection.t3:not(.hidden)) .nt-logo-product { font-size: .8rem; }
}
