#main:has(.tj-page) { background: #f3f7f7; color: #172f34; padding-block: 0 56px; }
.tj-page { --tj-ink:#172f34; --tj-muted:#4c6369; --tj-accent:#006f83; --tj-deep:#10383e; --tj-line:#d3e1e3; --tj-paper:#fff; --tj-pale:#eaf5f4; max-width: 1200px; }
.tj-page *, .tj-page *::before, .tj-page *::after { box-sizing: border-box; }
.tj-page [hidden] { display:none !important; }
.tj-page :is(button,a,input,textarea,summary,select):focus-visible { outline:3px solid #00899b; outline-offset:3px; }
.tj-page a { color:var(--tj-accent); }
.tj-intro { display:flex; align-items:end; justify-content:space-between; gap:24px; padding:35px 0 27px; }
.tj-page .breadcrumb { margin: 0 0 12px; }
.tj-page .page-title { margin:0; border:0; padding:0; font-size:clamp(2rem,5vw,3.4rem); line-height:1.2; letter-spacing:-.07em; }
.tj-page .page-lead { margin:12px 0 0; color:var(--tj-muted); font-size:1rem; }
.tj-intro-actions { display:flex; flex-wrap:wrap; gap:8px; }
.tj-status { color:var(--tj-muted); font-size:.875rem; overflow-wrap:anywhere; }
.tj-status p, .tj-status .notice { margin:0 0 14px; padding:0; background:transparent; border:0; }
.tj-cols { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0, 1.1fr); align-items:start; gap:22px; }
.tj-page :is(.tj-form,.tj-sheet) { min-width:0; margin:0; padding:0; border:1px solid var(--tj-line); border-radius:18px; background:var(--tj-paper); box-shadow:0 7px 24px #12383e0a; overflow-wrap:anywhere; }
.tj-panel-head, .tj-sheet-tools { min-height:72px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; padding:16px 22px; border-bottom:1px solid var(--tj-line); }
.tj-sheet-tools { background:var(--tj-deep); color:#fff; border-radius:17px 17px 0 0; border:0; }
.tj-page :is(.tj-h2,.tj-sheet-label) { color:inherit; font-size:1.125rem; line-height:1.35; letter-spacing:-.025em; margin:0; padding:0; border:0; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.tj-panel-body { padding:22px; }
.tj-page .field { margin:0 0 17px; }
.tj-page .field label { color:var(--tj-ink); font-weight:700; }
.tj-page :is(input[type=text],textarea,select) { background:#fcfefe; color:var(--tj-ink); width:100%; border:1px solid #adc2c7; border-radius:9px; font:inherit; min-height:44px; padding:10px 12px; }
.tj-page textarea { resize:vertical; }
.tj-page .field-note, .tj-partial { color:var(--tj-muted); margin:4px 0 0; font-size:.8125rem; }
.tj-notes-bar, .tj-notes-meta { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px; }
.tj-notes-bar { margin-bottom:5px; }
.tj-notes-meta .field-note { margin:0 0 0 auto; }
.tj-optional, .tj-help, .tj-usage { border-top:1px solid var(--tj-line); margin:14px 0 0; }
.tj-page summary { color:var(--tj-accent); font-weight:700; line-height:1.4; padding:11px 0; cursor:pointer; }
.tj-row2 { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.tj-optional .field:first-child { margin-top:3px; }
.tj-prompts { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:10px; }
.tj-page :is(.button,.tj-prompts button) { min-height:42px; border:1px solid var(--tj-accent); border-radius:8px; background:var(--tj-accent); color:#fff; padding:7px 12px; font:inherit; font-size:.875rem; font-weight:700; line-height:1.4; text-decoration:none; cursor:pointer; }
.tj-page :is(.button-outline,.tj-prompts button) { background:#fff; color:var(--tj-accent); }
.tj-page :is(.button-outline,.tj-prompts button):hover { background:var(--tj-pale); }
.tj-page .button:not(.button-outline):hover { background:#005566; }
.tj-page .button:disabled { opacity:.62; cursor:not-allowed; }
.tj-page .tj-mic-on { background:var(--tj-pale); }
.tj-page .tj-caution { margin:14px 0; padding:0; color:var(--tj-muted); font-size:.8125rem; }
.tj-page .consent { margin:0; padding:11px 0 0; border-top:1px solid var(--tj-line); font-size:.8125rem; color:var(--tj-muted); }
.tj-page .consent-item { display:grid; grid-template-columns:auto 1fr; gap:8px; align-items:start; margin-bottom:8px; }
.tj-page input[type=checkbox] { accent-color:var(--tj-accent); margin-top:.25em; width:17px; height:17px; }
.tj-actions { display:flex; margin-top:14px; gap:8px; }
.tj-actions #tj-gen { flex:1; min-height:48px; }
.tj-page .login-message { margin:10px 0 0; color:var(--tj-accent); font-size:.875rem; }
.tj-page .login-message.is-error, .tj-partial.is-error { color:#a02332; }
.tj-sheet-buttons { display:flex; flex-wrap:wrap; gap:6px; }
.tj-page .tj-sheet-tools .button { color:#fff; background:transparent; border-color:#8eb3b8; min-height:36px; font-size:.8125rem; }
.tj-page .tj-sheet-tools .button:hover { background:#22535a; }
.tj-badge { background:#ccece6; color:#12383e; border-radius:100px; padding:2px 9px; font-size:.75rem; }
#tj-doc { outline-offset:3px; }
.tj-empty, .tj-thinking { min-height:350px; padding:40px 25px; display:grid; justify-items:center; align-content:center; gap:13px; text-align:center; color:var(--tj-muted); }
.tj-empty-mark { position:relative; width:52px; height:60px; border-radius:8px; border:1px solid #a6c6c7; background:var(--tj-pale); }
.tj-empty-mark::after { content:""; position:absolute; inset:21px 12px; height:2px; background:#699da1; box-shadow:0 8px #699da1,0 16px #699da1; }
.tj-empty strong { color:var(--tj-ink); font-size:1.0625rem; }
.tj-dots { display:flex; gap:6px; }
.tj-dots i { width:8px; height:8px; border-radius:50%; background:var(--tj-accent); animation:tj-blink 1.2s infinite ease-in-out; }
.tj-dots i:nth-child(2) { animation-delay:.2s; }
.tj-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes tj-blink { 0%, 80%, 100% { opacity:.25; } 40% { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .tj-dots i { animation:none; opacity:.7; } }
.tj-empty p, .tj-thinking p { margin:0; max-width:28ch; }
.tj-doc { padding:24px 25px 28px; }
.tj-title { margin:0; font-size:clamp(1.5rem,3vw,2.1rem); letter-spacing:-.055em; line-height:1.35; }
.tj-summary { margin:7px 0 12px; color:var(--tj-muted); }
.tj-meta { width:100%; border-collapse:collapse; font-size:.875rem; }
.tj-meta th, .tj-meta td { text-align:left; padding:7px 0; vertical-align:top; border-bottom:1px solid var(--tj-line); }
.tj-meta th { width:8em; padding-right:8px; color:var(--tj-muted); }
.tj-gap-jump { display:inline-flex; margin-top:13px; padding:5px 10px; border-radius:6px; background:var(--tj-pale); font-size:.875rem; font-weight:700; }
.tj-sec { margin-top:21px; }
.tj-sec h4 { font-size:1.0625rem; margin:0 0 8px; padding-bottom:6px; border-bottom:1px solid var(--tj-line); }
.tj-doc ul { padding-left:1.375rem; margin:0; }
.tj-steps { list-style:none; margin:0; padding:0; counter-reset:tj-step; }
.tj-step { display:grid; grid-template-columns:32px minmax(0,1fr); column-gap:10px; padding:12px 0; border-bottom:1px solid var(--tj-line); counter-increment:tj-step; }
.tj-step::before { content:counter(tj-step); grid-row:1 / span 4; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--tj-pale); color:#125865; font-size:.8125rem; font-weight:700; }
.tj-step > * { grid-column:2; }
.tj-step-t { font-weight:700; margin:3px 0; }
.tj-step-d, .tj-step-c { margin:2px 0 4px; font-size:.9375rem; }
.tj-step-c, .tj-warns { color:#775020; }
.tj-step-check { display:flex; gap:7px; align-items:center; font-size:.8125rem; color:var(--tj-muted); }
.tj-step-foot { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:4px 12px; margin-top:2px; }
.tj-page :is(.tj-shot-add,.tj-shot-link) { background:none; border:0; padding:6px 2px; min-height:32px; color:var(--tj-accent); font:inherit; font-size:.8125rem; font-weight:700; cursor:pointer; }
.tj-page :is(.tj-shot-add,.tj-shot-link):hover { text-decoration:underline; }
.tj-step.tj-drop-on { background:var(--tj-pale); outline:2px dashed var(--tj-accent); outline-offset:-2px; border-radius:8px; }
.tj-drop { margin:8px 0 4px; padding:14px; border:2px dashed #7fb0b7; border-radius:10px; background:var(--tj-pale); text-align:center; }
.tj-drop:focus-visible { outline:3px solid #00899b; outline-offset:2px; }
.tj-drop-main { margin:0 0 8px; font-size:.875rem; font-weight:700; color:#125865; }
.tj-paste { display:grid; place-items:center; max-width:440px; min-height:60px; margin:0 auto 10px; padding:10px 12px; border:1px solid #adc2c7; border-radius:9px; background:#fff; color:transparent; caret-color:transparent; cursor:text; font-size:.875rem; overflow:hidden; white-space:nowrap; }
.tj-paste:empty::before { content:attr(data-placeholder); color:var(--tj-muted); white-space:normal; }
.tj-paste:focus { outline:3px solid #00899b; outline-offset:2px; border-color:var(--tj-accent); }
.tj-paste:focus:empty::before { color:#125865; font-weight:700; }
.tj-paste img { max-height:48px; }
.tj-drop-row { display:flex; justify-content:center; align-items:center; gap:8px 14px; flex-wrap:wrap; }
.tj-drop-note { margin:8px 0 0; font-size:.75rem; color:var(--tj-muted); }
.tj-drop-err, .tj-shot-warn { margin:8px 0 0; font-size:.8125rem; color:#a02332; }
.tj-shot { margin:8px 0 4px; }
.tj-shot-open { display:block; width:100%; padding:0; border:1px solid var(--tj-line); border-radius:8px; background:#fff; overflow:hidden; cursor:zoom-in; }
.tj-shot-open img { display:block; width:100%; height:auto; max-height:520px; object-fit:contain; background:#fff; }
.tj-shot-open:not(:has(img[src])) { min-height:80px; background:var(--tj-pale); }
.tj-shot-missing { display:block; padding:14px; font-size:.8125rem; color:var(--tj-muted); }
.tj-shot-bar { display:flex; align-items:center; gap:4px 10px; flex-wrap:wrap; margin-top:4px; }
.tj-page input.tj-shot-cap { flex:1 1 200px; width:auto; min-height:34px; padding:5px 9px; font-size:.8125rem; }
.tj-shot-ops { display:flex; align-items:center; gap:10px; }
.tj-page select.tj-shot-move { width:auto; max-width:16em; min-height:34px; padding:4px 8px; font-size:.8125rem; }
.tj-shot-cap-print { display:none; }
.tj-loose { background:#fbf6ec; padding:14px; border-radius:12px; }
.tj-lightbox { max-width:min(1200px, 94vw); max-height:92vh; padding:12px; border:0; border-radius:12px; }
.tj-lightbox::backdrop { background:#0b1f22b3; }
.tj-lightbox img { display:block; max-width:100%; max-height:calc(92vh - 110px); margin:8px auto 0; }
.tj-lightbox-close { float:right; }
.tj-lightbox-cap { clear:both; margin:8px 0 0; font-size:.875rem; color:var(--tj-muted); }
.tj-pair { display:grid; gap:2px; padding:7px 0; font-size:.9375rem; }
.tj-gaps { background:#f0f7f7; padding:14px; border-radius:12px; }
.tj-gap { margin:10px 0; }
.tj-gap-q { display:block; font-size:.9375rem; font-weight:700; margin-bottom:4px; }
.tj-gap-why, .tj-ai-note, .tj-ready-reason { color:var(--tj-muted); font-size:.8125rem; margin:5px 0 9px; }
.tj-ai-note { margin:16px 0 0; }
.tj-ready-top { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; font-size:.8125rem; font-weight:700; }
.tj-meter { display:inline-flex; gap:3px; }
.tj-meter span { width:12px; height:5px; border-radius:2px; background:#d3e1e3; }
.tj-meter .on { background:var(--tj-accent); }
.tj-meter.low .on { background:#a46a1d; }
.tj-usage { margin-top:23px; color:var(--tj-muted); font-size:.875rem; }
.tj-usage ul { margin-top:0; }
@media (max-width:850px) { .tj-cols { grid-template-columns:1fr; } .tj-empty,.tj-thinking { min-height:235px; } }
@media (max-width:540px) { .tj-intro { align-items:start; flex-direction:column; gap:15px; padding-top:24px; } .tj-panel-head,.tj-panel-body,.tj-sheet-tools,.tj-doc { padding:15px; } .tj-row2 { grid-template-columns:1fr; gap:0; } }
@media print {
  .tj-page .tj-cols { display:block; }
  .tj-page :is(.tj-form,.tj-sheet-tools,.tj-gap-jump,.tj-intro,.tj-status,.tj-usage,.tj-gaps,.tj-loose,.tj-shot-add,.tj-drop,.tj-shot-bar,.tj-shot-warn) { display:none; }
  .tj-page .tj-sheet { box-shadow:none; border:0; }
  .tj-shot { break-inside:avoid; }
  .tj-shot-open { border-color:#999; }
  .tj-shot-open img { max-height:120mm; }
  .tj-shot-cap-print:not([hidden]) { display:block; margin:3px 0 0; font-size:.8125rem; color:var(--tj-muted); }
  .tj-shot.is-missing { display:none; }
}
