/* Tool panel v1. Opt-in only: extraction sample + new cutout controls. */
.tp-panel {
  --tp-paper:#fff; --tp-surface:#f6f7f9; --tp-ink:#22252e;
  --tp-muted:#687080; --tp-line:#dfe2e8; --tp-accent:#7057d9;
  --tp-danger:#b42338;
  background:var(--tp-paper); border:1px solid var(--tp-line); border-radius:14px;
  box-shadow:none; color:var(--tp-ink);
  font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC",sans-serif;
  container-type:inline-size;
}
/* Boundary adapter for legacy workspace sizing. No fixed-height form children. */
.workspace.tool-panel-pilot {height:auto; min-height:calc(100vh - 150px); align-items:start}
.workspace.tool-panel-pilot .tp-panel {height:auto; min-height:0; overflow:visible}
.tp-panel .control-title {display:none}
.tp-panel .control-body {display:block; min-height:0; padding:0; overflow:visible}
.tp-panel .tool-section {margin:0; padding:18px 20px; border:0; border-bottom:1px solid var(--tp-line); background:none; box-shadow:none}
.tp-panel .selected-tool-bar {display:flex; gap:12px; margin:0; padding:0; min-height:36px; border:0; border-radius:0; background:none; box-shadow:none}
.tp-panel .selected-tool-state,.tp-panel .selected-tool-summary,.tp-panel .selected-tool-copy small {display:none}
.tp-panel .selected-tool-copy {min-width:0; flex:1}
.tp-panel #selected-tool-name {font-size:20px; font-weight:700; line-height:1.4; color:var(--tp-ink)!important; white-space:normal}
.tp-panel #selected-tool-name::before {display:none}
.tp-panel #change-tool-button,.tp-panel .tp-tutorial {
  min-height:36px; height:auto; flex:none; padding:7px 10px; border:1px solid var(--tp-line);
  border-radius:6px; background:white; box-shadow:none; color:var(--tp-accent); font:inherit; font-size:13px; font-weight:600;
}
.tp-panel .tp-tutorial {order:3; border-color:transparent; padding-inline:2px}
.tp-panel .setting-card-slot {display:block; height:auto; min-height:0; overflow:visible; flex:none}
.tp-panel #setting-card {width:100%; box-sizing:border-box; height:auto!important; max-height:none!important; min-height:0; margin:0; padding:18px 20px 20px; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; flex:none}
.tp-panel #setting-card::before,.tp-panel #setting-card::after {display:none}
.tp-panel .setting-head {display:none}
.tp-panel #setting-description {margin:0 0 16px; color:var(--tp-muted); font-size:13px; line-height:1.7}
.tp-panel #setting-options {display:block; height:auto; min-height:0; max-height:none; overflow:visible; padding:0}
.tp-panel .tp-form {display:flex; flex-direction:column; gap:20px; min-width:0; text-align:left; font-size:14px; line-height:1.6}
.tp-form * {box-sizing:border-box}
.tp-form .tp-field {display:block; min-width:0; width:100%; margin:0; padding:0; border:0; background:none}
.tp-form .tp-label {display:block; margin:0 0 8px; padding:0; color:var(--tp-ink); font-size:14px; font-weight:600; line-height:1.5}
.tp-form .tp-help {display:block; margin:0; color:var(--tp-muted); font-size:12px; font-weight:400; line-height:1.6; overflow-wrap:anywhere}
.tp-field>p.tp-help {margin:-2px 0 10px}
.tp-form .tp-choices {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%}
.tp-form .tp-three-columns {grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-form .tp-choice {display:flex; gap:7px; align-items:center; width:auto; min-width:0; min-height:40px; margin:0; padding:8px 10px; border:1px solid var(--tp-line); border-radius:6px; background:white; color:var(--tp-ink); cursor:pointer; line-height:1.5}
.tp-form .tp-choice:hover {border-color:#a394df}
.tp-form .tp-choice:has(input:checked) {border-color:var(--tp-accent); background:#f4f1fd; box-shadow:inset 0 0 0 1px var(--tp-accent)}
.tp-form input[type=radio],.tp-form input[type=checkbox] {appearance:auto; width:15px; height:15px; min-width:15px; margin:0; padding:0; flex:none; accent-color:var(--tp-accent); box-shadow:none}
.tp-choice-copy {min-width:0; overflow-wrap:anywhere}
.tp-choice-title {font-size:13px; font-weight:500}
.tp-form .tp-models {grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-form .tp-models .tp-choice {align-items:flex-start; padding:9px 8px}
.tp-models input {margin-top:3px!important}
.tp-models small {font-size:11px}
.tp-form .tp-ratios {margin-top:12px}
.tp-form .tp-ratio-choices {grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-form .tp-ratio-choices .tp-choice {padding:6px; min-height:36px}
.tp-form .tp-two-columns {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px}
.tp-form .tp-number-field {display:block; min-width:0}
.tp-form input[type=number],.tp-form textarea {display:block; width:100%; min-width:0; max-width:100%; padding:10px 12px; border:1px solid #cbd0d9; border-radius:6px; background:#fff; color:var(--tp-ink); font:inherit; font-size:14px; line-height:1.6; box-shadow:none}
.tp-form input[type=number] {height:42px; margin:0 0 5px}
.tp-form textarea {min-height:116px; height:auto; resize:vertical}
.tp-form textarea::placeholder {color:#777e8d; opacity:1}
.tp-form input[aria-invalid=true] {border-color:var(--tp-danger); background:#fff7f7}
.tp-panel :is(button,input,textarea,summary):focus-visible {outline:2px solid var(--tp-accent); outline-offset:3px}
.tp-form .tp-toggle {display:flex; align-items:flex-start; gap:10px; margin:16px 0 0; cursor:pointer}
.tp-toggle input {margin-top:4px!important}
.tp-form .tp-toggle .tp-label {margin-bottom:2px}
.tp-form .tp-color {display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:14px}
.tp-form .tp-color .tp-label {margin:0}
.tp-form input[type=color] {width:42px; min-width:42px; height:32px; padding:2px; border:1px solid var(--tp-line); border-radius:4px; background:white}
.tp-form input:disabled,.tp-form textarea:disabled {opacity:.55; cursor:not-allowed}
.tp-form .tp-required {margin:10px 0 0; color:var(--tp-danger); font-size:12px}
.tp-form .tp-original-ratio {margin:12px 0 4px; padding:10px 12px; background:var(--tp-surface); border-radius:6px}
.tp-panel .run-area {padding:16px 20px 18px; border-top:1px solid var(--tp-line); background:white}
.tp-panel .run-command-row {display:flex; flex-direction:column; gap:10px}
.tp-panel .run-button {width:100%; min-height:46px; height:auto; margin:0; padding:11px 12px; border:0; border-radius:7px; box-shadow:none; background:var(--tp-accent); color:white; font-size:15px; font-weight:600; line-height:1.5; white-space:normal}
.tp-panel .run-button:disabled {background:#e6e8ee; color:#606979; opacity:1}
.tp-panel .result-feedback-actions {display:flex; width:auto; justify-content:flex-end; gap:14px}
.tp-panel .result-feedback-actions button {height:auto; padding:0; border:0; border-radius:0; background:transparent; color:var(--tp-muted); font-size:12px; box-shadow:none}
.tp-panel #batch-note {display:none}
.tp-panel .tp-footer-copy {margin-top:12px}
.tp-panel .tp-billing {color:var(--tp-muted); font-size:12px; line-height:1.7}
.tp-panel .tp-billing summary {cursor:pointer; padding:3px 0; color:#50596a}
.tp-panel .tp-billing-details {margin:8px 0 0; text-align:left; line-height:1.8}
.tp-panel .tp-form-error {margin:0 0 8px; color:var(--tp-danger); font-size:12px}
@container (max-width:360px) {
  .tp-form .tp-models,.tp-form .tp-ratio-choices {grid-template-columns:repeat(2,minmax(0,1fr))}
  .tp-form .tp-three-columns {grid-template-columns:1fr}
  .tp-panel .selected-tool-bar {gap:8px}
}
@media(max-width:600px) {
  .tp-panel .tool-section {padding:14px}
  .tp-panel #setting-card {padding:16px 14px}
  .tp-panel .run-area {padding:14px}
}

/* Jade workbench adapter. Keeps existing actions, field values and validation. */
.workspace.tool-panel-jade{height:var(--tp-workspace-height,calc(100dvh - 120px));min-height:0;align-items:stretch}
.workspace.tool-panel-jade .tp-jade{height:100%;min-height:0;overflow:visible}
.tp-panel.tp-jade{--tp-ink:#293d38;--tp-muted:#667970;--tp-line:#dfe9e3;--tp-accent:#287965;--tp-surface:#f3f7f5;border-radius:12px;background:#fff;box-shadow:none;display:flex;flex-direction:column}
.tp-jade .control-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:visible}
.tp-jade .tool-section{padding:16px 20px 0;border:0;flex:none}
.tp-jade .selected-tool-bar{min-height:44px;gap:12px;align-items:center}
.tp-jade #selected-tool-name{font-size:22px;font-weight:700;padding-left:13px;position:relative;line-height:1.4}
.tp-jade #selected-tool-name::before{display:block;content:'';position:absolute;left:0;top:4px;bottom:3px;width:4px;background:#54a58e;border-radius:2px}
.tp-jade #change-tool-button{color:#fff;background:linear-gradient(180deg,#19836e,#116e5c);border:1px solid #126c5a;border-top-color:#419c89;border-radius:9px;padding:10px 14px;min-height:44px;font-size:15px;font-weight:700;line-height:1.3;box-shadow:0 4px 0 #084c40,0 7px 13px #135e4525,inset 0 1px 0 #ffffff35;white-space:nowrap}
.tp-jade #change-tool-button::after{content:'⇄';margin-left:9px;font-size:18px}
.tp-jade #change-tool-button:hover{background:linear-gradient(180deg,#218d77,#147763)}
.tp-jade #change-tool-button:active{transform:translateY(3px);box-shadow:0 1px 0 #084c40}
.tp-jade .setting-card-slot{height:auto;min-height:0;flex:none;overflow:visible}
.tp-jade #setting-card{padding:12px 20px 16px;border:0;height:auto!important;max-height:none!important;overflow:visible;background:none}
.tp-jade .tp-intro{display:flex;gap:12px;align-items:center;margin:0 0 18px;padding-bottom:16px;border-bottom:1px solid var(--tp-line)}
.tp-jade #setting-description{flex:1;min-width:0;margin:0;font-size:12px;line-height:1.65;color:var(--tp-muted)}
.tp-jade .tp-tutorial{position:relative;order:0;min-width:74px;min-height:34px;align-self:center;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 10px;border:1px solid #c61e3c;border-top-color:#ee637a;border-radius:7px;background:linear-gradient(180deg,#e13652,#cf2342);color:#fff;font-size:14px;font-weight:700;line-height:1.25;box-shadow:0 2px 0 #a81631}
.tp-jade .tp-tutorial::before{content:'';width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:7px solid white}
.tp-jade .tp-tutorial:hover{background:#bd1b38;color:#fff}
@keyframes tp-tutorial-breathe{0%,100%{box-shadow:0 2px 0 #a81631,0 0 0 2px #d927410d}50%{box-shadow:0 2px 0 #a81631,0 0 0 5px #d9274120}}
@media(prefers-reduced-motion:no-preference){.tp-jade .tp-tutorial{animation:tp-tutorial-breathe 3s ease-in-out infinite}.tp-jade .tp-tutorial:is(:hover,:focus-visible){animation-play-state:paused}}
.tp-jade #setting-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;height:auto;max-height:none;overflow:visible;padding:0;align-items:start}
.tp-jade #setting-options>.tp-form{grid-column:1/-1}
.tp-jade .tp-form{gap:20px}
.tp-jade .tp-label{font-size:16px;font-weight:700;margin-bottom:10px}
.tp-jade .tp-choice{border-color:var(--tp-line);border-radius:5px;min-height:38px;padding:8px;justify-content:center}
.tp-jade .tp-choice:has(input:checked){background:#edf5f1;border-color:#7fb5a6;box-shadow:none;color:#246d59}
.tp-jade .tp-choice input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;min-width:0}
.tp-jade .tp-choice:has(input:focus-visible){outline:2px solid var(--tp-accent);outline-offset:2px}
.tp-jade .tp-ratios{padding:10px;background:#f1f6f3;border-radius:7px}
.tp-jade .tp-ratio-row{display:flex;align-items:center;gap:8px;margin:3px 0}
.tp-jade .tp-row-label{font-size:11px;color:var(--tp-muted);flex:0 0 24px}
.tp-jade .tp-ratio-choices{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;flex:1;min-width:0}
.tp-jade .tp-ratio-choices .tp-choice{border:0;background:none;padding:3px 0;min-height:31px;border-radius:4px}
.tp-jade .tp-ratio-choices .tp-choice-title{font-size:11px;white-space:nowrap}
.tp-jade .tp-ratio-choices .tp-choice:has(input:checked){background:var(--tp-accent);color:#fff}
.tp-jade .tp-form textarea{min-height:88px;height:96px;resize:none;background:var(--tp-surface);border-color:var(--tp-line);font-size:13px}
.tp-jade .tp-form .tp-number-field>.tp-label{font-size:13px;font-weight:500;color:var(--tp-muted)}
.tp-jade .tp-form input[type=number]{height:40px;border-color:var(--tp-line);font-size:14px}
.tp-jade .tp-three-columns{grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-jade .setting-option{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;min-height:0}
.tp-jade .setting-option>span{font-size:13px;font-weight:600;color:var(--tp-ink);line-height:1.5}
.tp-jade .setting-option :is(select,input,textarea){width:100%;min-width:0;max-width:100%;margin:0;border:1px solid var(--tp-line);border-radius:5px;background:var(--tp-surface);color:var(--tp-ink);padding:8px 10px;font:inherit;font-size:13px;box-shadow:none;line-height:1.5}
.tp-jade .setting-option :is(select,input){height:38px}
.tp-jade .setting-option:has(textarea){grid-column:1/-1}
.tp-jade .setting-option textarea{min-height:86px;height:94px;resize:none}
.tp-jade .setting-option.required-missing{padding:8px;border:1px solid #df3346;border-radius:6px;background:#fff3f4;box-shadow:none}
.tp-jade :is(.poster-output-control,.flat-fidelity-choice,.processing-mask-field,.setting-group-tabs,.setting-group-panel,.upscale-engine-section,.upscale-913-overview,.upscale-warning){grid-column:1/-1;min-width:0}
.tp-jade :is(.poster-output-control,.flat-fidelity-choice){margin:0;padding:0;border:0;background:none;box-shadow:none}
.tp-jade :is(.poster-output-control,.flat-fidelity-choice)>strong{font-size:16px;font-weight:700;color:var(--tp-ink);margin-bottom:10px}
.tp-jade .poster-output-grid{gap:7px}
.tp-jade .poster-output-mode{background:#fff;border:1px solid var(--tp-line);border-radius:6px;padding:8px;box-shadow:none}
.tp-jade .poster-output-mode.active{background:#edf5f1;border-color:#7fb5a6;box-shadow:none}
.tp-jade .poster-output-mode :is(b,strong){color:var(--tp-ink);font-size:12px}
.tp-jade .poster-setting-facts{display:none}
.tp-jade .flat-fidelity-option{min-height:0;margin:6px 0 0;padding:9px 10px;border:1px solid var(--tp-line);border-radius:6px;background:#fff;color:var(--tp-ink);font-size:12px;line-height:1.65;box-shadow:none}
.tp-jade .flat-fidelity-option.selected{background:#edf5f1;border-color:#7fb5a6;box-shadow:inset 3px 0 #287965}
.tp-jade .flat-extra-prompt textarea{height:68px;min-height:68px}
.tp-jade :is(.upscale-913-model-choice,.decoration-prompt-mode-choice){gap:8px}
.tp-jade :is(.upscale-model-card,.decoration-mode-card){min-height:54px;padding:7px 9px;border:1px solid var(--tp-line);border-radius:6px;background:#fff;box-shadow:none;color:var(--tp-ink);gap:2px}
.tp-jade :is(.upscale-model-card,.decoration-mode-card).selected{border-color:#7fb5a6;background:#edf5f1;box-shadow:none}
.tp-jade :is(.upscale-model-card,.decoration-mode-card) :is(span,strong,small){color:var(--tp-ink);background:none;box-shadow:none}
.tp-jade :is(.upscale-model-card,.decoration-mode-card) small{display:none}
.tp-jade .decoration-prompt-field textarea{height:122px;min-height:122px}
.tp-jade .generic-setting-group{border:0;padding:0;background:none;border-radius:0}
.tp-jade .generic-setting-group-body{gap:10px}
.tp-jade .generic-setting-group-title{color:var(--tp-ink);font-size:14px}
.tp-jade .setting-group-tabs{border:0;padding:3px;background:#f1f6f3;border-radius:6px;gap:4px}
.tp-jade .setting-group-tabs button{background:none;border:0;color:var(--tp-muted);box-shadow:none}
.tp-jade .setting-group-tabs button.active{background:white;color:var(--tp-accent)}
.tp-jade .run-area{flex:none;position:relative;box-sizing:border-box;height:140px;min-height:140px;margin:0 20px;padding:17px 0 40px;border-top:1px solid var(--tp-line);background:white;border-radius:0 0 12px 12px;overflow:visible}
.tp-jade .run-command-row{gap:0}
.tp-jade .run-button{height:48px;min-height:48px;max-height:48px;background:var(--tp-accent);font-size:16px;font-weight:700;padding:8px 12px;border-radius:6px;box-shadow:none}
.tp-jade .run-button:disabled{background:#e0e9e4;color:#708078;opacity:1}
.tp-jade .result-feedback-actions{position:absolute;bottom:17px;right:0;gap:14px}
.tp-jade .result-feedback-actions button{font-size:11px;color:var(--tp-muted);line-height:1.5}
.tp-jade .tp-footer-copy{position:absolute;bottom:14px;left:0;margin:0;max-width:100%}
.tp-jade .tp-billing{font-size:11px}
.tp-jade .tp-billing summary{color:var(--tp-muted);list-style:none}
.tp-jade .tp-billing summary::after{content:'⌄';margin-left:5px}
.tp-jade .tp-billing-details{position:absolute;bottom:30px;left:0;width:360px;max-width:calc(100vw - 64px);background:#fff;border:1px solid var(--tp-line);border-radius:8px;padding:14px;box-shadow:0 8px 30px #2445391a;z-index:8;font-size:12px}
.tp-jade .progress-summary{position:absolute;top:76px;left:0;right:0;margin:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-jade .tp-form-error{position:absolute;bottom:34px;left:0;width:330px;background:#fff6f6;padding:7px;border-radius:5px}
@media(max-width:600px){.tp-jade .tool-section{padding:14px 16px 0}.tp-jade #setting-card{padding:12px 16px}.tp-jade .run-area{margin-left:16px;margin-right:16px}.tp-jade #selected-tool-name{font-size:19px}.tp-jade #change-tool-button{font-size:14px;padding:10px}.tp-jade .tp-intro{gap:8px}}
@media(max-height:800px){
 .tp-jade .run-area{height:116px;min-height:116px;padding-top:14px}
 .tp-jade .tp-intro{margin-bottom:12px;padding-bottom:12px}
 .tp-jade .tp-form{gap:14px}
 .tp-jade .tp-form textarea{height:84px;min-height:84px}
 .tp-jade #setting-card{padding-top:10px;padding-bottom:10px}
 .tp-jade .tp-label{margin-bottom:7px}
}
.workspace.tool-panel-jade{height:var(--tp-workspace-height,calc(100dvh - 120px))!important;min-height:0!important}
.workspace.tool-panel-jade .control-panel.tp-jade{position:relative;height:100%!important;min-height:0!important;max-height:none!important}
.tp-jade .control-body{padding-bottom:140px!important;flex:none!important;overflow:visible!important}
.tp-jade .run-area{position:absolute;bottom:0;left:20px;right:20px;margin:0!important;width:auto!important}
.tp-jade #setting-options{overflow:visible!important;max-height:none!important;height:auto!important}
.tp-jade .tp-ratios{padding:7px 10px}
.tp-jade .tp-form{gap:10px}
.tp-jade :is(.layering-overview,.advanced-upscale-overview){grid-column:1/-1;width:100%;min-width:0}
.tp-jade .layering-overview{gap:12px;padding:0;background:none;border:0;box-shadow:none}
.tp-jade .layering-hero{min-height:0;padding:14px;background:#edf5f1;border:0;border-radius:7px;color:var(--tp-ink);box-shadow:none}
.tp-jade .layering-hero small,.tp-jade .layering-stack{display:none}
.tp-jade .layering-hero strong{font-size:17px;color:var(--tp-ink)}
.tp-jade .layering-hero em{font-size:12px;color:var(--tp-muted)}
.tp-jade .layering-ratio{padding:10px;background:#f3f7f5;border:0}
.tp-jade .layering-flow{gap:6px}
.tp-jade .layering-flow span{padding:8px 4px;border-radius:5px;background:#f3f7f5;color:var(--tp-muted);font-weight:500}
.tp-jade .layering-flow i{color:var(--tp-accent)}
.tp-jade .layering-promise span{border:0;border-radius:4px;background:#edf5f1;color:var(--tp-accent)}
.tp-jade .setting-option.decoration-prompt-field textarea{height:122px!important;min-height:122px!important;border:1px solid var(--tp-line)!important;border-radius:6px;box-shadow:none;resize:none;line-height:1.7}
.tp-jade .setting-card:has(.decoration-prompt-mode-field) .setting-options{overflow:visible!important}
@media(max-height:800px){.tp-jade .control-body{padding-bottom:116px!important}}
@media(max-width:600px){.tp-jade .run-area{left:16px;right:16px}}
.tp-jade #setting-options .setting-option{padding:0!important;background:none;border:0;box-shadow:none;margin:0;gap:6px;min-height:0!important}
.tp-jade #setting-options .setting-option textarea{height:86px;min-height:86px;padding:9px 11px;resize:none}
.tp-jade #setting-options .required-missing{padding:7px!important;background:#fff3f4;border:1px solid #df3346;border-radius:6px}
.tp-jade #setting-options .poster-output-control{padding:0!important}
.tp-jade .poster-output-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.tp-jade .poster-output-mode{display:contents!important}
.tp-jade .poster-output-mode>label{grid-row:1;padding:8px 2px;border:1px solid var(--tp-line);border-radius:5px;font-size:11px;white-space:nowrap;background:white}
.tp-jade .poster-output-mode.active>label{border-color:#7fb5a6;background:#edf5f1}
.tp-jade .poster-output-mode>div{grid-column:1/-1;grid-row:2}
.tp-jade .poster-output-mode:not(.active)>div{display:none!important}
.tp-jade .poster-output-mode>label input{accent-color:#287965}
.tp-jade .advanced-upscale-overview{padding:10px;background:#f3f7f5;border:1px solid var(--tp-line);border-radius:6px;gap:6px;font-size:12px;box-shadow:none}
.tp-jade .advanced-upscale-overview strong{font-size:13px;color:var(--tp-ink)}
.tp-jade .advanced-upscale-overview small{font-size:11px;color:var(--tp-muted);line-height:1.6}
.tp-jade #setting-card.flat-design-compact{padding:10px 20px!important}
.tp-jade #setting-card-slot:has(.flat-design-compact){flex:none!important;min-height:0!important}
.tp-jade .poster-output-control [data-original-ratio]{display:flex;flex-wrap:wrap;gap:3px 10px;font-size:12px;line-height:1.5}
.tp-jade .poster-output-control [data-original-ratio] p{margin:2px 0}
.tp-jade #setting-options{align-items:stretch!important}
.tp-jade #setting-options>.setting-option{width:100%;box-sizing:border-box}
.tp-jade #setting-options .setting-option.decoration-prompt-field textarea{width:100%!important;max-width:none!important}
.tp-jade #setting-options .setting-option[data-option-key="transparent_background"]{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
.tp-jade #setting-options .setting-option[data-option-key="transparent_background"] select{width:160px;flex:none}
.tp-jade #setting-options .setting-option textarea{height:80px;min-height:80px}
.tp-jade #setting-options .setting-option.decoration-prompt-field textarea{height:122px!important;min-height:122px!important}
.tp-jade .poster-output-control>strong{margin-bottom:6px}
.tp-jade .poster-output-control [data-original-ratio]{gap:2px 7px;font-size:11px}
.tp-jade .poster-output-control [data-original-ratio] p{display:inline;margin:0}
.tp-jade[data-panel-tool="background_extract"] .tp-original-ratio p{display:inline;margin:0 8px 0 0}
@media(max-height:800px){.tp-jade #setting-options{gap:8px!important}.tp-jade .tp-intro{margin-bottom:10px}.tp-jade .poster-output-control>strong{margin-bottom:5px}}
.tp-jade .run-button.tp-run-long{font-size:14px;line-height:1.3;padding:5px 8px}
.tp-jade .selected-tool-bar #selected-tool-name::before{content:'';display:block;position:absolute;left:0;top:4px;bottom:3px;width:4px;height:auto;margin:0;padding:0;border:0;border-radius:2px;background:#54a58e;box-shadow:none;transform:none}

/* Readable panel extension — source: tool-panel-readable.css */
/* Fixed-width workbench: title 20, group 16, parameter 15/700, value 14, help 13. */
.workspace.workspace-readable{grid-template-columns:minmax(170px,.65fr) minmax(420px,460px) minmax(280px,1.65fr);gap:16px}
.control-panel.tp-readable{
  --tp-heading:#08745c;--tp-ink:#343a40;--tp-muted:#46505a;--tp-line:#c3d4cb;--tp-accent:#146b52;--tp-surface:#f2f7f4;
  color:var(--tp-ink);font-size:14px;line-height:1.5;border:1px solid #c3d4cb;border-radius:14px;
}
.tp-readable ::selection{background:#c1e8d4;color:#15382e}
.tp-readable :is(input,textarea){caret-color:#146b52}
.tp-readable .tool-section{padding:16px 22px 0}
.tp-readable .selected-tool-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;min-height:44px;gap:10px;align-items:center}
.tp-readable .selected-tool-bar #selected-tool-name{padding-left:0;font-size:20px;line-height:1.4;font-weight:700;color:#173f34!important}
.tp-readable .selected-tool-bar #selected-tool-name::before{display:none}
.tp-readable #change-tool-button{
  font-size:15px;font-weight:700;min-height:40px;padding:8px 14px;letter-spacing:.01em;
  border:1px solid #075b43;border-top-color:#439b7c;border-radius:8px;
  background:linear-gradient(180deg,#197b5e,#106047);color:#fff;
  box-shadow:0 3px 2px #0c48394d,0 5px 9px #163f3026,inset 0 1px 0 #ffffff4d;
}
.tp-readable #change-tool-button::after{content:none}
.tp-readable #change-tool-button:hover{background:#0c5941}
.tp-readable #change-tool-button:active{transform:translateY(1px);box-shadow:0 1px 2px #0c48394d}
.tp-readable #setting-card{padding:10px 22px 0!important}
.tp-readable .tp-intro{display:block;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid #c3d4cb}
.tp-readable #setting-card #setting-description{margin:0!important;color:var(--tp-muted);font-size:13px;font-weight:400;line-height:1.6}
.tp-readable .tp-tutorial{
  min-width:72px;min-height:40px;padding:8px 10px;font-size:15px;font-weight:700;color:#fff;
  border:1px solid #9e1231;border-top-color:#db647d;border-radius:7px;
  background:linear-gradient(180deg,#c52547,#af1737);box-shadow:0 2px 3px #87102940;
  animation:none;
}
.tp-readable .tp-tutorial:hover{background:#98112f}
@keyframes readable-tutorial-breathe{0%,100%{box-shadow:0 2px 3px #87102940}50%{box-shadow:0 3px 9px #b91d3e59}}
@media(prefers-reduced-motion:no-preference){.tp-readable .tp-tutorial{animation:readable-tutorial-breathe 3s ease-in-out infinite}}
.tp-readable #setting-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important;margin:0}
.tp-readable[data-panel-tool="background_extract"] #setting-options,.tp-readable[data-panel-tool="decoration_split"] #setting-options{display:block;gap:0!important}
.tp-readable .tp-form{gap:14px;font-size:14px;line-height:1.5}
.tp-readable .tp-form .tp-label{font-size:15px;line-height:1.4;font-weight:700;margin-bottom:8px;color:var(--tp-heading)}
.tp-readable .tp-form .tp-field>legend{font-size:15px;font-weight:700;color:var(--tp-heading);margin-bottom:8px}
.tp-readable .tp-help,.tp-readable .tp-required{font-size:13px;line-height:1.5;color:#42594f}
.tp-readable .tp-required{color:#a51d35;font-weight:600}
.tp-readable .tp-three-columns{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tp-readable .tp-choice{
  min-height:40px;padding:8px 6px;border:1px solid #b6c9bd;border-radius:6px;background:#fff;
  color:#183a30;cursor:pointer;transition:background-color 150ms ease,border-color 150ms ease;
}
.tp-readable .tp-choice-title{font-size:14px;font-weight:500;line-height:1.4;color:inherit}
.tp-readable .tp-choice:hover{background:#f0f7f3;border-color:#146b52}
.tp-readable .tp-choice:has(input:checked){background:#146b52;color:white;border-color:#146b52;box-shadow:none}
.tp-readable .tp-choice:has(input:focus-visible){outline:3px solid #146b52;outline-offset:3px}
.tp-readable .tp-ratios{margin-top:10px;padding:8px;background:#f2f7f4;border-radius:8px}
.tp-readable .tp-ratio-row{margin:0;gap:8px;align-items:center;min-height:36px}
.tp-readable .tp-ratio-row+.tp-ratio-row{margin-top:4px}
.tp-readable .tp-row-label{flex:0 0 30px;font-size:13px;font-weight:600;color:#42594f}
.tp-readable .tp-ratio-choices{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
.tp-readable .tp-ratio-choices .tp-choice{height:34px;min-height:34px;padding:4px 0;border:1px solid transparent;border-radius:5px}
.tp-readable .tp-ratio-choices .tp-choice-title{font-size:14px;font-weight:500;font-variant-numeric:tabular-nums;color:inherit}
.tp-readable .tp-ratio-choices .tp-choice:hover{background:#e0ede5;border-color:#a8c3b1}
.tp-readable .tp-ratio-choices .tp-choice:has(input:checked){background:#146b52;color:#fff;border-color:#146b52}
.tp-readable .tp-form :is(textarea,input[type=number]){font-size:14px;font-weight:400;line-height:1.55;color:var(--tp-ink);border:1px solid #9bb9a7;background:#fff;border-radius:7px}
.tp-readable .tp-form textarea{height:72px;min-height:72px;padding:10px 12px;resize:none}
.tp-readable :is(textarea,input)::placeholder{color:#50665b;opacity:1;font-weight:400}
.tp-readable .tp-form .tp-number-field>.tp-label{font-size:15px;font-weight:700;color:var(--tp-heading)}
.tp-readable .tp-form input[type=number]{height:40px;margin-bottom:0}
.tp-readable .tp-form .tp-two-columns{margin-top:12px}
.tp-readable .tp-form .tp-two-columns+.tp-help{margin-top:8px}
.tp-readable .tp-original-ratio{font-size:14px;color:#42594f}
.tp-readable .control-body{padding-bottom:118px!important}
.tp-readable .run-area{
  left:22px;right:22px;bottom:0;height:112px;min-height:112px;padding:14px 0 42px;
  border-top:1px solid #c3d4cb;border-radius:0 0 14px 14px;background:#fff;
}
.tp-readable .run-button,.tp-readable .run-button.tp-run-long{height:48px;min-height:48px;max-height:48px;font-size:16px;line-height:1.35;font-weight:700;color:#fff;background:#146b52;border-radius:7px;padding:8px 12px}
/* Payment explanations must wrap inside the button, never beneath the footer. */
.control-panel.tp-hierarchy .run-button.tp-run-long{height:auto;min-height:48px;max-height:none;font-size:14px;line-height:1.35;padding:4px 10px;white-space:normal;overflow-wrap:break-word}
.tp-readable:has(.run-button.tp-run-long) .run-area{height:auto;padding-bottom:51px}
.tp-readable .run-button:disabled{background:#e1eae5;color:#42594f;opacity:1}
.tp-readable .result-feedback-actions{bottom:13px;right:0;gap:12px}
.tp-readable .result-feedback-actions button{font-size:14px;line-height:1.5;font-weight:600;color:#264f3c;opacity:1;background:transparent;padding:2px 0}
.tp-readable .tp-footer-copy{bottom:13px;left:0;right:0;pointer-events:none}
.tp-readable .tp-footer-copy :is(summary,.tp-billing-details){pointer-events:auto}
.tp-readable .tp-billing{position:static}
.tp-readable .tp-billing summary{width:max-content}
.tp-readable .tp-billing,.tp-readable .tp-billing summary{font-size:14px;font-weight:600;color:#264f3c;line-height:1.5}
.tp-readable .tp-billing summary{padding:2px 0}
.tp-readable .tp-billing-details{box-sizing:border-box;font-size:16px;font-weight:400;color:#183a30;line-height:1.75;bottom:36px;left:0;right:0;width:100%;max-width:none;white-space:normal;word-break:normal;overflow-wrap:break-word;border:1px solid #9bb9a7}
.tp-readable .tp-form-error{font-size:14px;font-weight:600;color:#a51d35;bottom:34px}
.tp-readable :is(button,input,textarea,summary):focus-visible{outline:3px solid #146b52;outline-offset:3px}
.tp-readable .tp-tutorial:focus-visible{outline-color:#b91d3e}
.tp-readable #setting-options .decoration-prompt-mode-field{display:block;width:100%;padding:0!important;border:0;background:transparent}
.tp-readable #setting-options .decoration-prompt-mode-field>span{font-size:15px;line-height:1.4;font-weight:700;color:var(--tp-heading);margin-bottom:8px}
.tp-readable .setting-required-badge{font-size:14px;font-weight:600;color:#a51d35;background:#fff0f3;box-shadow:none;border:0}
.tp-readable .decoration-prompt-mode-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tp-readable .decoration-prompt-mode-choice>p{grid-column:1/-1;margin:0 0 8px;color:#a51d35;font-size:14px;font-weight:500}
.tp-readable .decoration-mode-card{
  min-height:78px;border:1px solid #afc6b8;border-radius:7px;background:#fff;box-shadow:none;padding:12px 10px;gap:4px;
}
.tp-readable .decoration-mode-card span{font-size:16px;line-height:1.5;font-weight:700;color:#183a30;background:transparent}
.tp-readable .decoration-mode-card strong{font-size:14px;line-height:1.5;font-weight:500;color:#42594f}
.tp-readable .decoration-mode-card.selected{background:#146b52;border-color:#146b52;box-shadow:none}
.tp-readable .decoration-mode-card.selected :is(span,strong){color:#fff}
.tp-readable .decoration-mode-card{min-height:52px}
.tp-readable .decoration-mode-card span{display:none}
.tp-readable .decoration-mode-card strong{font-weight:600}
.tp-readable .decoration-mode-card:hover:not(.selected){background:#f0f7f3;border-color:#146b52}
.tp-readable #setting-options .setting-option.decoration-prompt-field{margin-top:16px;gap:8px}
.tp-readable #setting-options .setting-option.decoration-prompt-field>span{font-size:15px;line-height:1.4;font-weight:700;color:var(--tp-heading)}
.tp-readable #setting-options .setting-option.decoration-prompt-field textarea{
  height:144px!important;min-height:144px!important;font-size:14px;line-height:1.6;font-weight:400;color:var(--tp-ink);
  padding:12px 14px;border:1px solid #9bb9a7!important;border-radius:7px;background:#fff;
}
@media(min-height:820px){
 .tp-readable .tool-section{padding-top:18px}
 .tp-readable #setting-card{padding-top:12px!important}
 .tp-readable .tp-intro{margin-bottom:18px;padding-bottom:12px}
 .tp-readable .tp-form{gap:18px}
 .tp-readable .tp-ratios{padding:12px}
 .tp-readable .tp-ratio-row{min-height:44px}
 .tp-readable .tp-ratio-choices .tp-choice{height:42px}
 .tp-readable .tp-form textarea{height:96px;min-height:96px}
 .tp-readable #setting-options .setting-option.decoration-prompt-field textarea{height:168px!important;min-height:168px!important}
}
@media(prefers-reduced-motion:reduce){.tp-readable *{transition:none!important;animation:none!important}}

/* Shared legacy-renderer fields retain their handlers and visibility rules. */
.tp-readable #setting-options .setting-option>span{font-size:15px;font-weight:700;color:var(--tp-heading)}
.tp-readable #setting-options .setting-option :is(select,input,textarea){font-size:14px;font-weight:400;color:var(--tp-ink)}
.tp-readable #setting-options .setting-option :is(select,input:not([type=checkbox]):not([type=radio])){height:40px}
.tp-readable #setting-options .setting-option textarea{height:72px;min-height:72px;line-height:1.55;background:#fff;border-color:#9bb9a7}
.tp-readable .poster-output-control>strong{font-size:15px;font-weight:700;color:var(--tp-heading)}
.tp-readable .generic-setting-group-title{font-size:16px;font-weight:700;color:#173f34}
.tp-readable .generic-setting-group-title{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.tp-readable .generic-setting-group-title::after{content:'';flex:1;height:1px;background:var(--tp-line)}
.tp-readable .poster-output-mode>label{font-size:14px;padding:8px 4px;white-space:normal;line-height:1.4}
.tp-readable .poster-output-mode :is(b,strong){font-size:14px;font-weight:500}
.tp-readable :is(.poster-size-body,.poster-ratio-body){margin-top:0}
.tp-readable .poster-output-control :is(select,input[type=number]){font-size:14px;min-height:40px}
.tp-readable .poster-output-control [data-original-ratio]{font-size:14px;color:var(--tp-muted)}
.tp-readable :is([data-original-ratio],.tp-original-ratio):has(>p:nth-child(4)){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 8px;font-size:13px;line-height:1.5}
.tp-readable :is([data-original-ratio],.tp-original-ratio):has(>p:nth-child(7)){grid-template-columns:repeat(5,minmax(0,1fr));column-gap:4px}
.tp-readable :is([data-original-ratio],.tp-original-ratio)>p{min-width:0;margin:0;font-size:inherit;line-height:inherit;overflow-wrap:anywhere}
.tp-readable .setting-group-tabs button{font-size:14px;font-weight:600;min-height:40px;color:var(--tp-ink)}
.tp-readable .setting-group-tabs button.active{background:var(--tp-accent);color:white}
.tp-readable .generic-setting-group-body{gap:12px}
.tp-readable .advanced-upscale-overview strong{font-size:16px}
.tp-readable .advanced-upscale-overview small,.tp-readable .layering-hero em{font-size:14px;color:var(--tp-muted)}
.tp-readable .layering-flow span,.tp-readable .layering-promise span{font-size:14px}
.tp-readable .progress-summary{font-size:14px;color:var(--tp-ink)}
.tp-readable .poster-ratio-trigger :is(span,em),.tp-readable .poster-size-body :is(span,input){font-size:16px}
.tp-readable .layering-ratio small{font-size:14px;color:var(--tp-muted)}
.tp-readable .processing-mask-field :is(b,strong,button){font-size:16px}
.tp-readable .processing-mask-field small{font-size:14px;color:var(--tp-muted)}
.tp-readable :is(.processing-mask-field>span>b,.upscale-engine-section>strong){font-size:15px;font-weight:700;color:var(--tp-heading)}
.tp-readable .cmyk-preview-control{padding:10px;background:var(--tp-surface);border:1px solid var(--tp-line);box-shadow:none}
.tp-readable .cmyk-preview-control button{font-size:14px;min-height:42px;color:var(--tp-ink);background:#fff;border:1px solid #9bb9a7}
.tp-readable .cmyk-preview-control p{font-size:14px;line-height:1.5;color:var(--tp-muted);margin:6px 0 0}

/* Dense tools use the same width and type scale, not a wider workspace. */
.tp-readable[data-panel-tool=cutout] #setting-options{display:block}
.tp-readable[data-panel-tool=cutout] .tp-intro{margin-bottom:12px}
.tp-readable[data-panel-tool=cutout] .tp-form{display:flex;flex-direction:column;gap:14px}
.tp-readable .tp-model-select{width:100%;height:40px;padding:0 12px;border:1px solid #9bb9a7;border-radius:6px;background:#fff;color:var(--tp-ink);font-size:14px}
.tp-readable[data-panel-tool=cutout] .tp-field>.tp-label{margin-bottom:6px}
.tp-readable[data-panel-tool=cutout] .tp-two-columns{gap:16px;margin-top:0}
.tp-readable[data-panel-tool=cutout] .tp-number-field{display:grid;grid-template-columns:1fr 70px;gap:4px 6px;align-items:center}
.tp-readable[data-panel-tool=cutout] .tp-number-field .tp-label{margin:0}
.tp-readable[data-panel-tool=cutout] .tp-number-field .tp-help{grid-column:1/-1;font-size:14px;line-height:1.4;margin:0}
.tp-readable .tp-edge-toggles{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:8px}
.tp-readable[data-panel-tool=cutout] .tp-toggle{gap:6px;margin:0;align-items:start}
.tp-readable[data-panel-tool=cutout] .tp-toggle .tp-label{margin:0}
.tp-readable[data-panel-tool=cutout] .tp-toggle .tp-help{font-size:14px;line-height:1.4;margin-top:2px}
.tp-readable[data-panel-tool=cutout] .tp-color{margin-top:8px;gap:8px}
.tp-readable[data-panel-tool=cutout] .tp-color .tp-help{font-size:14px}
.tp-readable:is([data-panel-tool=normal_upscale],[data-panel-tool=extreme_upscale],[data-panel-tool=upscale_913]) .setting-group-tabs{display:none}
.tp-readable:is([data-panel-tool=normal_upscale],[data-panel-tool=extreme_upscale],[data-panel-tool=upscale_913]) .tp-intro{margin-bottom:4px}
.tp-readable .generic-setting-group-body{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}
.tp-readable:is([data-panel-tool=normal_upscale],[data-panel-tool=extreme_upscale],[data-panel-tool=upscale_913]) .setting-option[data-option-key=custom_dpi]{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:center}
.tp-readable .advanced-upscale-mode-label br{display:none}
.tp-readable .advanced-upscale-overview{font-size:14px;line-height:1.5;padding:8px;margin-top:6px}
.tp-readable .advanced-upscale-overview>strong{font-size:15px;font-weight:600;color:var(--tp-ink)}
.tp-readable .advanced-upscale-overview small{color:var(--tp-muted)}
.tp-readable .advanced-upscale-overview>small{font-size:13px;line-height:1.5}
.tp-readable .advanced-upscale-physical{gap:12px;margin:4px 0}
.tp-readable .advanced-upscale-physical span{padding:0;border:0;background:none}
.tp-readable .advanced-upscale-physical small{font-size:13px;line-height:1.5}
.tp-readable .advanced-upscale-physical b{font-size:14px;line-height:1.5;font-weight:500;color:var(--tp-ink)}
.tp-readable #setting-description{color:var(--tp-muted)}
.tp-readable .poster-output-mode>label,.tp-readable .poster-output-mode :is(b,strong),.tp-readable .poster-output-control :is(select,input[type=number]),.tp-readable .poster-ratio-trigger :is(span,em),.tp-readable .poster-size-body :is(span,input){font-size:14px}
.tp-readable :is(button,input,textarea,select,summary):focus-visible{outline:3px solid var(--tp-accent);outline-offset:3px}
.tp-readable[data-panel-tool=upscale_913] .upscale-model-card{min-height:42px;display:flex;flex-direction:row;justify-content:center;gap:10px}
.tp-readable[data-panel-tool=upscale_913] .upscale-model-card :is(span,strong){font-size:15px;font-weight:500}
.tp-readable[data-panel-tool=upscale_913] .upscale-model-card.selected{background:var(--tp-accent)}
.tp-readable[data-panel-tool=upscale_913] .upscale-model-card.selected :is(span,strong){color:#fff}
.tp-readable[data-panel-tool=upscale_913] #setting-options .required-missing{padding:0!important;border:0;background:none}
.tp-readable[data-panel-tool=upscale_913] #setting-options .required-missing input{border-color:#bd2943;background:#fff6f7}
.tp-readable .upscale-913-overview{font-size:14px;line-height:1.5;padding:8px;margin-top:0;border:1px solid var(--tp-line);background:var(--tp-surface);color:var(--tp-muted);box-shadow:none}
.tp-readable .upscale-913-target-line{font-size:15px;font-weight:600;color:var(--tp-ink)}
.tp-readable .upscale-913-dpi{font-size:14px}
.tp-readable .upscale-913-output-line{font-size:14px;font-weight:400;color:var(--tp-muted)}
.tp-readable .flat-fidelity-choice{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:6px 8px}
.tp-readable .flat-fidelity-choice>strong{grid-column:1/-1;margin:0}
.tp-readable .flat-fidelity-option{font-size:14px;line-height:1.5;margin:0;padding:8px;min-height:44px}
.tp-readable .flat-fidelity-option.selected{background:var(--tp-accent);color:#fff;box-shadow:none}
.tp-readable[data-panel-tool=flat_design] #setting-options :is(.flat-fidelity-choice>strong,.setting-option>span,.poster-output-control>strong){font-size:15px;font-weight:700;line-height:1.5;color:var(--tp-heading)}
.tp-readable[data-panel-tool=flat_design] #setting-options .flat-extra-prompt textarea{width:100%;height:60px;min-height:60px;box-sizing:border-box;padding:6px 10px}
.tp-readable[data-panel-tool=flat_design] #setting-options .setting-option[data-option-key=transparent_background]{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
.tp-readable[data-panel-tool=flat_design] #setting-options .setting-option[data-option-key=transparent_background] select{width:160px}
.tp-readable[data-panel-tool=flat_design] #setting-options .flat-extra-prompt{grid-column:1/-1}
.tp-readable[data-panel-tool=flat_design] #setting-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;margin:0}
@media(max-height:800px){
 .tp-readable[data-panel-tool=flat_design] .tp-intro{margin-bottom:10px;padding-bottom:8px}
 .tp-readable[data-panel-tool=flat_design] #setting-options{gap:10px!important}
 .tp-readable[data-panel-tool=flat_design] .flat-fidelity-option{padding:6px 8px}
 .tp-readable[data-panel-tool=flat_design] #setting-options .flat-extra-prompt textarea{height:56px;min-height:56px}
}
.tp-readable:is([data-panel-tool=normal_upscale],[data-panel-tool=extreme_upscale]) .generic-setting-group-title{margin-bottom:6px}
.tp-readable:is([data-panel-tool=normal_upscale],[data-panel-tool=extreme_upscale]) .generic-setting-group-body{gap:8px 16px}
.tp-readable[data-panel-tool=images_to_pdf] .generic-setting-group-title{display:none}
.tp-readable[data-panel-tool=images_to_pdf] .generic-setting-group-body{gap:8px 16px}
.tp-readable[data-panel-tool=images_to_pdf] #setting-options .setting-option[data-option-key=fit_mode]{grid-column:1/-1;display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center}

/* Grouped tools retain their current navigation and geometry, as approved. */
.tp-hierarchy:not(.tp-readable){--tp-ink:#343a40;--tp-muted:#46505a;--tp-heading:#08745c}
.tp-hierarchy:not(.tp-readable) #selected-tool-name{font-size:20px;font-weight:700;color:#173f34}
.tp-hierarchy:not(.tp-readable) :is(.generic-setting-group-title,.id-photo-group-title){font-size:16px;font-weight:700;color:var(--tp-heading)}
.tp-hierarchy:not(.tp-readable) :is(.setting-option,.id-photo-compact-field,.id-photo-range-field,.id-photo-color-field)>span{font-size:15px;font-weight:700;color:var(--tp-heading)}
.tp-hierarchy:not(.tp-readable) #setting-options :is(input,select,textarea){font-size:14px;color:var(--tp-ink)}
.tp-hierarchy:not(.tp-readable) :is(#setting-description,.id-photo-style-note,.id-photo-consistency-note){font-size:14px;color:var(--tp-muted)}
.tp-hierarchy:not(.tp-readable) :is(#change-tool-button,.run-button){color:#fff;background:linear-gradient(180deg,#197b5e,#106047);border:1px solid #075b43;border-radius:8px;font-size:16px;font-weight:700}
.tp-hierarchy:not(.tp-readable) #change-tool-button{box-shadow:0 3px 2px #0c48394d,0 5px 9px #163f3026,inset 0 1px 0 #ffffff4d}
.tp-hierarchy:not(.tp-readable) .run-button:disabled{background:#e1eae5;color:#42594f;border-color:#c3d4cb;opacity:1}
.tp-hierarchy:not(.tp-readable) #tutorial-button{background:#b91d3e;color:white;font-size:16px;font-weight:700;border-radius:7px}
.tp-hierarchy:not(.tp-readable) .setting-group-tabs button.active{background:#146b52;color:white}

/* The generation prompt is the primary workspace, not a supplementary field. */
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt]{position:relative;isolation:isolate;gap:9px}
.tp-prompt-silk{display:none}
.tp-prompt-studio #setting-options .tp-prompt-silk{
 display:block;position:absolute;inset:30px -3px -3px;width:calc(100% + 6px);height:calc(100% - 27px);z-index:2;pointer-events:none;overflow:visible;
}
.tp-prompt-silk rect{fill:none;vector-effect:non-scaling-stroke;stroke:var(--tp-silk-color);stroke-width:3.8px;stroke-dasharray:120 480;stroke-dashoffset:var(--tp-silk-phase);animation:tp-prompt-silk 14s linear infinite;animation-play-state:paused}
.tp-prompt-silk-core{filter:blur(1px)}
.tp-prompt-silk-halo{filter:blur(3px);opacity:.6}
.tp-prompt-silk-halo rect{stroke-width:5.8px}
.tp-prompt-studio.tp-prompt-motion .tp-prompt-silk rect{animation-play-state:running}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt] textarea{
 width:100%;box-sizing:border-box;height:200px;min-height:120px;resize:none;padding:15px 16px;
 border:1px solid #c5d3df;border-radius:9px;background:#fff;color:#273746;font-size:14px;line-height:1.8;
 box-shadow:none;caret-color:#365ac4;scrollbar-color:#7b90b4 #eef3fa;
}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt] textarea::placeholder{color:#52647a;opacity:1}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt] textarea::selection{background:#dce5ff;color:#223252}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt] textarea:focus-visible{outline:2px solid #365ac4;outline-offset:-3px}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt]:has(textarea:disabled) .tp-prompt-silk{opacity:.35}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt]:has(textarea:disabled) .tp-prompt-silk rect{animation:none}
.tp-prompt-studio #setting-options .setting-option[data-option-key=prompt] textarea:disabled{opacity:1;color:#46566b;background:#f5f7fb}
.tp-prompt-studio:not(.tp-readable) #setting-options .tp-prompt-silk{inset:43px 11px 11px;width:calc(100% - 22px);height:calc(100% - 54px)}
.tp-prompt-studio.tp-readable .control-body{flex:1!important;padding-bottom:140px!important}
.tp-prompt-studio.tp-readable .setting-card-slot{display:flex;flex:1;min-height:0}
.tp-prompt-studio.tp-readable #setting-card{display:flex;flex-direction:column;flex:1;min-height:0}
.tp-prompt-studio.tp-readable #setting-options{display:flex!important;flex-direction:column;align-items:stretch;flex:1;min-height:0}
.tp-prompt-studio.tp-readable #setting-options> :not([data-option-key=prompt]){flex:none}
.tp-prompt-studio.tp-readable #setting-options .setting-option[data-option-key=prompt]{display:flex!important;flex-direction:column;align-items:stretch;flex:1;min-height:129px!important;max-height:373px;margin-bottom:4px}
.tp-prompt-studio.tp-readable #setting-options .setting-option[data-option-key=prompt] textarea{flex:1;height:0;min-height:96px}
@keyframes tp-prompt-silk{to{stroke-dashoffset:calc(var(--tp-silk-phase) - 600px)}}
@media(prefers-reduced-motion:reduce){.tp-prompt-silk rect{animation:none!important}}
