.script-save-dialog {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.script-save-dialog.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.script-save-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 35px 65px rgba(15, 23, 42, .35);
    padding: 24px;
    width: min(420px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.script-save-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.script-save-card header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.script-save-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #475569;
}

.script-save-card label {
    font-weight: 600;
    font-size: .9rem;
    color: #1f2937;
}

.script-save-card input {
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: .95rem;
    font-family: inherit;
}

.script-save-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.script-shell {
    margin-top: 12px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 24px 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: calc(100% + 56px);
    margin-left: -28px;
    margin-right: -28px;
    align-self: stretch;
}

.script-layout {
    display: grid;
    grid-template-columns:minmax(220px, 320px) 1fr;
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

.script-conversation-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    align-self: stretch;
}

#script-conversation {
    flex: 1;
    min-height: 260px;
    border: 1px dashed #d5dcf2;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#script-conversation > .cytoscape-container,
#script-conversation > div {
    width: 100% !important;
    height: 100% !important;
}

#script-conversation.is-hidden {
    display: none;
}

.script-conversation-empty {
    margin: 0;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.script-conversation-empty.hidden {
    display: none;
}

.script-main-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.script-shell h2 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.script-header-title {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    min-width: 240px;
    min-height: 42px;
    margin-bottom: 4px;
}

.script-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.script-status {
    font-size: .9rem;
    color: #4b5563;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.script-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.script-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: 0 0 6px rgba(107, 114, 128, .5);
}

.script-status-dot.is-active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, .7);
}

.script-status-dot.is-busy {
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, .7);
}

.script-status-dot.is-error {
    background: #f87171;
    box-shadow: 0 0 10px rgba(248, 113, 113, .7);
}

.script-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.script-toolbar .toolbar-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.script-toolbar .toolbar-center {
    flex: 1 1 400px;
    justify-content: center;
}

.script-toolbar .toolbar-right {
    justify-content: flex-end;
}

.script-toolbar .toolbar-left,
.script-toolbar .toolbar-right {
    flex: 1 1 0;
    min-width: 0;
}

.script-toolbar button {
    border: 1px solid #cbd5f5;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .9rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.script-toolbar button {
    display: flex;
    align-items: center;
    gap: 6px;
}

.script-toolbar-icon {
    width: 24px;
    height: 24px;
}

#script-play-btn .script-toolbar-icon,
#script-record-btn .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

.script-toolbar button.secondary {
    background: #f8fafc;
}

.script-toolbar button.ghost {
    background: transparent;
}

.script-toolbar button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.script-toolbar button.primary {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

#script-generate-btn {
    position: relative;
    overflow: hidden;
    --generation-progress: 0%;
}

#script-generate-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #8ebbffa0, #8ebbffa0);
    transform: translateX(-100%);
    transition: transform .15s ease, opacity .15s ease;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

#script-generate-btn.is-generating::before {
    opacity: 1;
    transform: translateX(calc(-100% + var(--generation-progress)));
}

#script-generate-btn > * {
    position: relative;
    z-index: 1;
}

#script-generate-btn.is-generating {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

#script-generate-btn.is-generating .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

#char-appraisal-query {
    position: relative;
    overflow: hidden;
    --theory-progress: 0%;
}

#char-appraisal-query::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #8ebbffa0, #8ebbffa0);
    transform: translateX(calc(-100% + var(--theory-progress, 0%)));
    transition: transform .15s ease, opacity .15s ease;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

#char-appraisal-query.is-busy::before {
    opacity: 1;
}

#char-appraisal-query > * {
    position: relative;
    z-index: 1;
}

#char-appraisal-query.is-busy {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

#char-appraisal-query.is-busy .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

#char-appraisal-query.is-complete {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
}

#char-appraisal-query.is-complete .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

#char-appraisal-weights {
    position: relative;
    overflow: hidden;
    --weights-progress: 0%;
}

#char-appraisal-weights::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #8ebbffa0, #8ebbffa0);
    transform: translateX(calc(-100% + var(--weights-progress, 0%)));
    transition: transform .15s ease, opacity .15s ease;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

#char-appraisal-weights.is-busy::before {
    opacity: 1;
}

#char-appraisal-weights > * {
    position: relative;
    z-index: 1;
}

#char-appraisal-weights.is-busy {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

#char-appraisal-weights.is-busy .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

#char-appraisal-weights.is-complete {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
}

#char-appraisal-weights.is-complete .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

.doi-check-status {
    font-size: 0.85em;
    color: #475569;
    margin: 0 0 8px 0;
}
#char-appraisal-query.is-complete {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
}

#char-appraisal-query.is-complete .script-toolbar-icon {
    filter: brightness(0) invert(1);
}

.script-toolbar button.danger {
    background: #dc2626;
    color: #fff;
    border-color: #b91c1c;
}

#script-play-btn {
    background: #065f46;
    border-color: #064e3b;
}

#script-play-btn.is-stop {
    background: #7f1d1d;
    border-color: #7f1d1d;
}

#script-record-btn {
    background: #374151;
    border-color: #111827;
}

#script-record-btn.is-recording {
    background: #7f1d1d;
    border-color: #7f1d1d;
}

.script-appraisal-control {
    display: flex;
    align-items: center;
}

.script-appraisal-control select {
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    height: 40px;
    padding: 8px 12px;
    background: #fff;
    font-weight: 700;
    font-size: .95rem;
    color: #1f2937;
    min-width: 40px;
    cursor: pointer;
}

.script-appraisal-control select:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.script-editor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.script-editor-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.script-editor-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 35px 65px rgba(15, 23, 42, .35);
    width: min(640px, calc(90vw - 32px));
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.script-dialog-draggable {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
}

.script-dialog-draggable.is-custom-position {
    transform: none;
}

.script-dialog-reset {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: .85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.script-drag-handle {
    flex: 1;
    height: 18px;
    margin: 0 6px;
    background-image:
        radial-gradient(#e2e8f0 1px, transparent 1px),
        radial-gradient(#e2e8f0 1px, transparent 1px),
        radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 6px 6px, 6px 6px, 6px 6px;
    background-position: center 0px, center 6px, center 12px;
    background-repeat: repeat-x;
    opacity: .85;
    pointer-events: none;
}

.script-dialog-reset:hover,
.script-dialog-reset:focus-visible {
    color: #111827;
    background: #f3f4f6;
    outline: none;
}

.script-dialog-resize {
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    border-radius: 4px;
    background: linear-gradient(135deg, transparent 50%, #cbd5e1 50%);
    opacity: .85;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    z-index: 2;
}

.script-dialog-footer {
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 6px;
}

.script-dialog-footer-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.script-editor-dialog:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.script-editor-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 24px 14px;
    height: 100%;
    box-sizing: border-box;
}

.script-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
}

.script-editor-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.script-editor-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: #475569;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.script-dialog-body {
    flex: 1;
    overflow: auto;
    padding: 16px 0;
}

.script-editor-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.script-context-grid {
    grid-template-columns: 1fr;
}
.script-editor-signal-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.script-editor-raw-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .9rem;
    color: #1f2937;
}

.script-editor-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.script-editor-field label {
    font-weight: 600;
    font-size: .9rem;
    color: #1f2937;
}

.script-editor-field input,
.script-editor-field textarea {
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: .95rem;
    font-family: inherit;
}

.script-editor-field textarea {
    resize: vertical;
    min-height: 80px;
}

.script-editor-field textarea[readonly] {
    background: #f3f4f6;
    cursor: default;
}

.script-editor-field-context {
    grid-column: 1 / -1;
}

.script-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 10px;
}

.script-editor-btn {
    border: 1px solid #cbd5f5;
    background: #fff;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.script-editor-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
}

.script-editor-btn:disabled .script-toolbar-icon {
    filter: none;
}

.script-editor-btn.primary {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.script-editor-btn.ghost {
    background: transparent;
}

.script-body {
    display: block;
    width: 100%;
}

.script-table-shell {
    border: 1px solid #dbe1f1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

.script-table-shell table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.script-action-header {
    width: 32px;
    vertical-align: bottom;
}

.script-action-cell {
    width: 32px;
    text-align: center;
    padding: 0;
}

.script-row-delete,
.script-clear-all,
.script-row-edit {
    border: none;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    width: 32px;
    height: 24px;
}

.script-row-delete:focus-visible,
.script-clear-all:focus-visible,
.script-row-edit:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 1px;
}

.script-row-edit {
    color: #374151;
}

.script-row-icon {
    width: 16px;
    height: 16px;
}

.script-time-header {
    width: 95px;
    max-width: 95px;
}

.script-table-shell thead {
    background: #eef2ff;
    color: #1f2937;
}

.script-table-shell thead th {
    vertical-align: bottom;
}

.script-table-shell th,
.script-table-shell td {
    padding: 2px 6px;
    border-bottom: 1px solid #e5e7f5;
    text-align: left;
    vertical-align: top;
}
.script-table-shell th:nth-child(2),
.script-table-shell td:nth-child(2),
.script-table-shell th:nth-child(8),
.script-table-shell td:nth-child(8) {
    max-width: 80px;
    width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.script-table-shell th:nth-child(5),
.script-table-shell td:nth-child(5) {
    max-width: 50px;
    width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.script-table-shell tbody tr.is-selected {
    background: #dbeafe;
}

.script-table-shell tbody tr.signal-reset .script-column-signal,
.script-table-shell tbody tr.signal-context .script-column-signal {
    font-weight: 700;
    color: #374151;
}

.script-table-shell tbody tr.signal-basic .script-column-signal {
    font-weight: 700;
    color: var(--color-appraisal-tag-blue);
}

.script-table-shell tbody tr.signal-act .script-column-signal {
    font-weight: 700;
    color: var(--color-act-tag-violett);
}

.script-table-shell tbody tr.is-raw .script-column-signal {
    font-weight: 700;
    color: #0f172a;
}

.script-table-shell td.script-participant-invalid {
    color: #7f1d1d;
    font-weight: 600;
}

.script-table-empty {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.script-context {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.script-table-shell .script-context {
    padding: 16px;
    border-bottom: 1px solid #dbe1f1;
    background: #f9fafb;
}

#script-prompts-toggle,
#script-context-toggle {
    border: 1px solid #cbd5f5;
    background: #fff;
    color: #1f2937;
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#script-prompts-toggle:hover,
#script-context-toggle:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

#script-prompts-toggle.is-active,
#script-context-toggle.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #1d4ed8;
}

.script-context textarea {
    width: 100%;
    min-height: 44px;
    resize: vertical;
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    padding: 12px;
    font-size: .9rem;
    font-family: inherit;
}

.script-prompts-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.script-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.script-prompts-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.script-prompts-item label {
    font-weight: 600;
    font-size: .85rem;
    color: #1f2937;
}

.script-prompts-item textarea {
    width: 100%;
    min-height: 44px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    font-size: .9rem;
    font-family: inherit;
    background: #fff;
}

.script-prompts-empty {
    margin: 4px 0 0 0;
    color: #6b7280;
    font-size: .9rem;
}

.script-keys-panel {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    margin-top: 8px;
}

.script-keys-header {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.script-keys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.script-keys-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.script-keys-row {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px;
    align-items: start;
}

.script-keys-cell {
    font-size: .95rem;
    color: #1f2937;
}

.script-keys-key {
    font-weight: 700;
    white-space: nowrap;
}

.script-keys-value {
    font-weight: 400;
    white-space: pre-wrap;
}

.script-generation-panel {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.script-generation-header {
    font-weight: 700;
    color: #1f2937;
}

.script-generation-text {
    width: 100%;
    min-height: 44px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    font-size: .9rem;
    font-family: inherit;
    background: #fff;
}

.script-roles-panel {
    border: 1px solid #dbe1f1;
    border-radius: 12px;
    background: #f9fafb;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.script-roles-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #111827;
}

.script-roles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

#script-context-dialog #script-roles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#script-context-dialog .script-role-entry textarea {
    min-height: 80px;
}

#script-context-dialog .script-roles-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#script-context-dialog #script-role-add {
    padding: 6px 10px;
    min-width: 42px;
}

.script-role-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-role-name-row input {
    flex: 1;
}

.script-role-remove {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: .9rem;
    cursor: pointer;
    color: #ef4444;
    min-width: 36px;
    line-height: 1;
}

.script-role-remove:hover,
.script-role-remove:focus-visible {
    background: #fef2f2;
    border-color: #fecdd3;
    outline: none;
}

#script-prompts-dialog .script-prompts-panel {
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    background: transparent;
}

#script-prompts-dialog .script-prompts-list {
    gap: 10px;
}

#script-prompts-dialog .script-prompts-item textarea {
    min-height: calc(1.5em * 5);
}

#script-prompts-dialog .script-keys-panel {
    border: none;
    padding: 0;
    margin-top: 12px;
}

#script-prompts-dialog .script-keys-header {
    margin-bottom: 4px;
}

#script-prompts-dialog .script-generation-panel {
    border: none;
    padding: 0;
    margin-top: 12px;
}

.script-role-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.script-role-card.is-collapsed {
    padding-bottom: 6px;
}
.script-role-card.is-collapsed .script-prompts-panel,
.script-prompts-panel.is-hidden {
    display: none !important;
}

.script-role-title {
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.script-role-text {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    font-size: .9rem;
    font-family: inherit;
    background: #fff;
}

.script-role-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
}
.script-role-card-header .ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    background: #eef2ff;
    color: #1f2937;
    font-size: .85rem;
    cursor: pointer;
}
.script-role-card-header .ghost:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}
#script-roles-panel {
    border: none;
    background: #f9fafb;
    padding: 10px;
    box-shadow: none;
}
.script-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: .85rem;
    color: #4b5563;
}

.script-file-name {
    font-weight: 600;
    color: #111827;
}

@media (max-width: 900px) {
    .script-layout {
        grid-template-columns:1fr;
    }
}
