.tool-widget:has(.par-app) { padding: 0; overflow: hidden; background: transparent; border: 0; box-shadow: none; }
.par-app {
    --par-accent: #38bdf8;
    --par-accent-dark: #0284c7;
    --par-border: rgba(148, 163, 184, .18);
    --par-card: rgba(15, 23, 42, .78);
    --par-muted: #94a3b8;
    width: 100%;
}
.par-shell {
    padding: 1.15rem;
    border: 1px solid var(--par-border);
    border-radius: 20px;
    background: radial-gradient(circle at 0 0, rgba(14, 165, 233, .15), transparent 34%), linear-gradient(180deg, #111827, #0b1220);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.par-toolbar, .par-pane-head, .par-pane-foot, .par-bottom-actions, .par-toolbar-actions, .par-inline-actions {
    display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap;
}
.par-toolbar { margin-bottom: 1rem; }
.par-eyebrow { margin: 0 0 .2rem; color: var(--par-accent); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.par-toolbar h2 { margin: 0; color: #f8fafc; font-size: 1.2rem; }
.par-link { border: 0; padding: .25rem 0; background: transparent; color: #7dd3fc; font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; }
.par-link:hover { color: #e0f2fe; }
.par-link--danger { color: #fca5a5; }
.par-controls {
    display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end;
    margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid var(--par-border); border-radius: 14px; background: rgba(2, 8, 20, .35);
}
.par-mode-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.par-mode-group legend, .par-strength span { display: block; margin-bottom: .45rem; color: #cbd5e1; font-size: .76rem; font-weight: 750; }
.par-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.par-chip {
    padding: .4rem .75rem; border: 1px solid var(--par-border); border-radius: 999px;
    background: rgba(30, 41, 59, .72); color: #cbd5e1; font-size: .75rem; font-weight: 750; cursor: pointer;
}
.par-chip:hover { border-color: rgba(56, 189, 248, .5); color: #f0f9ff; }
.par-chip.is-active { border-color: rgba(56, 189, 248, .65); background: rgba(14, 165, 233, .2); color: #7dd3fc; }
.par-strength select {
    min-width: 125px; padding: .48rem 2rem .48rem .7rem; border: 1px solid var(--par-border); border-radius: 10px;
    background: #111827; color: #e2e8f0; font: inherit; font-size: .8rem;
}
.par-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .75rem; align-items: stretch; }
.par-pane { min-width: 0; padding: 1rem; border: 1px solid var(--par-border); border-radius: 16px; background: var(--par-card); }
.par-pane--output { border-color: rgba(52, 211, 153, .2); }
.par-pane-head { margin-bottom: .65rem; }
.par-pane-head label { color: #f1f5f9; font-size: .88rem; font-weight: 800; }
.par-pane-head span, .par-pane-foot { color: var(--par-muted); font-size: .7rem; }
.par-pane textarea {
    display: block; width: 100%; min-height: 275px; max-height: 520px; resize: vertical; padding: .9rem;
    border: 1px solid var(--par-border); border-radius: 12px; background: rgba(2, 8, 20, .65); color: #f8fafc;
    font: inherit; font-size: .9rem; line-height: 1.65;
}
.par-pane--output textarea { background: linear-gradient(180deg, rgba(6, 78, 59, .12), rgba(2, 8, 20, .65)); }
.par-pane textarea:focus { outline: 0; border-color: rgba(56, 189, 248, .58); box-shadow: 0 0 0 3px rgba(14, 165, 233, .14); }
.par-pane-foot { margin-top: .6rem; min-height: 1.35rem; }
.par-run-wrap { display: flex; align-items: center; justify-content: center; min-width: 78px; }
.par-run-btn {
    width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; position: relative;
    display: grid; place-items: center; cursor: pointer; color: #fff;
    background: linear-gradient(145deg, var(--par-accent-dark), var(--par-accent)); box-shadow: 0 10px 25px rgba(14, 165, 233, .32);
}
.par-run-btn span { position: absolute; top: calc(100% + .35rem); left: 50%; transform: translateX(-50%); color: #7dd3fc; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.par-run-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.par-status { margin-top: .8rem; padding: .7rem .85rem; border: 1px solid var(--par-border); border-radius: 10px; color: #cbd5e1; font-size: .8rem; }
.par-status.is-success { color: #86efac; border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .08); }
.par-status.is-error { color: #fca5a5; border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }
.par-status.is-info { color: #7dd3fc; border-color: rgba(56, 189, 248, .3); background: rgba(56, 189, 248, .08); }
.par-bottom-actions { justify-content: flex-start; margin-top: 1rem; }
.par-bottom-actions .btn { min-height: 42px; }
.par-app button:focus-visible, .par-app textarea:focus-visible, .par-app select:focus-visible { outline: 3px solid rgba(56, 189, 248, .45); outline-offset: 3px; }
@media (max-width: 900px) {
    .par-editor-grid { grid-template-columns: 1fr; }
    .par-run-wrap { min-width: 0; }
    .par-run-btn { width: min(100%, 320px); height: 48px; border-radius: 12px; display: inline-flex; gap: .5rem; }
    .par-run-btn svg { transform: rotate(90deg); }
    .par-run-btn span { position: static; transform: none; color: #fff; font-size: .8rem; }
}
@media (max-width: 600px) {
    .par-shell { padding: .85rem; border-radius: 16px; }
    .par-controls { grid-template-columns: 1fr; }
    .par-strength select { width: 100%; }
    .par-pane textarea { min-height: 210px; }
    .par-bottom-actions { display: grid; grid-template-columns: 1fr; }
    .par-bottom-actions .btn { width: 100%; min-height: 48px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .par-app *, .par-app *::before, .par-app *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
