#prompt_dictionary_panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 12px 28px;
}

#pd_edit_bridge_txt2img,
#pd_edit_bridge_img2img {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

#prompt_dictionary_panel .pd-header {
    margin-bottom: 12px;
}

#prompt_dictionary_panel .pd-header h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    line-height: 1.3;
}

#prompt_dictionary_panel .pd-header p {
    margin: 0;
    color: var(--body-text-color-subdued);
}

#pd_notice {
    display: none;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-secondary);
}

#pd_notice.pd-notice-visible {
    display: block;
}

#pd_notice.pd-notice-error {
    border-color: #b45353;
    color: #b45353;
}

#prompt_dictionary_panel .pd-search-row,
#prompt_dictionary_panel .pd-button-row {
    gap: 8px;
}

#prompt_dictionary_panel .pd-status {
    margin: 10px 0;
    padding: 9px 10px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-secondary);
}

#prompt_dictionary_panel .pd-status-source {
    display: inline-block;
    margin-left: 10px;
    color: var(--body-text-color-subdued);
}

#prompt_dictionary_panel .pd-warning {
    margin-top: 6px;
    color: #b45353;
}

#prompt_dictionary_panel .pd-empty {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed var(--border-color-primary);
    border-radius: 6px;
    color: var(--body-text-color-subdued);
}

#prompt_dictionary_panel .pd-results-heading {
    margin: 12px 0 8px;
    font-weight: 600;
}

#prompt_dictionary_panel .pd-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 10px;
}

#prompt_dictionary_panel .pd-result-card {
    border: 1px solid var(--border-color-primary);
    border-radius: 8px;
    background: var(--background-fill-secondary);
    padding: 12px;
}

#prompt_dictionary_panel .pd-result-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

#prompt_dictionary_panel .pd-tag-link,
#prompt_dictionary_panel .pd-tag-button {
    font-family: var(--font-mono, monospace) !important;
    font-size: 1.14rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: var(--body-text-color, #111827) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1.5px !important;
}

#prompt_dictionary_panel .pd-tag-button {
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    text-align: left;
}

#prompt_dictionary_panel .pd-tag-link:hover,
#prompt_dictionary_panel .pd-tag-button:hover {
    color: var(--body-text-color, #111827) !important;
    text-decoration: underline;
}

#prompt_dictionary_panel .pd-tag-link:visited,
#prompt_dictionary_panel .pd-tag-link:focus,
#prompt_dictionary_panel .pd-tag-button:focus,
.pd-inline-tag:focus,
.pd-inline-tag:hover {
    color: var(--body-text-color, #111827) !important;
}

#prompt_dictionary_panel .pd-ja {
    font-weight: 600;
}

#prompt_dictionary_panel .pd-score {
    margin-left: auto;
    color: var(--body-text-color-subdued);
    font-size: 0.86rem;
}

#prompt_dictionary_panel .pd-description {
    margin: 8px 0;
    line-height: 1.55;
}

#prompt_dictionary_panel .pd-aliases {
    color: var(--body-text-color-subdued);
    font-size: 0.92rem;
    line-height: 1.45;
}

#prompt_dictionary_panel .pd-related {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

#prompt_dictionary_panel .pd-related span {
    color: var(--body-text-color-subdued);
    font-size: 0.86rem;
}

#prompt_dictionary_panel .pd-related a,
#prompt_dictionary_panel .pd-related button {
    border: 1px solid var(--button-secondary-border-color, var(--border-color-primary));
    border-radius: 6px;
    background: var(--button-secondary-background-fill, var(--background-fill-secondary));
    color: var(--button-secondary-text-color, var(--body-text-color));
    cursor: pointer;
    padding: 2px 7px;
    text-decoration: none;
}

#prompt_dictionary_panel .pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

#prompt_dictionary_panel .pd-actions button,
#prompt_dictionary_panel .pd-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #9aa4b2 !important;
    border-radius: 6px;
    background: #e6eaf0 !important;
    color: #111827 !important;
    cursor: pointer;
    font-weight: 700;
    min-height: 32px;
    padding: 5px 10px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%), 0 1px 2px rgb(0 0 0 / 22%);
    text-decoration: none;
    text-shadow: none;
}

#prompt_dictionary_panel .pd-actions button:hover,
#prompt_dictionary_panel .pd-actions a:hover {
    filter: brightness(1.05);
}

@media (max-width: 720px) {
    #prompt_dictionary_panel {
        padding-left: 6px;
        padding-right: 6px;
    }

    #prompt_dictionary_panel .pd-results {
        grid-template-columns: 1fr;
    }

    #prompt_dictionary_panel .pd-score {
        margin-left: 0;
    }
}

.pd-inline-panel {
    box-sizing: border-box;
    position: relative;
    margin: 8px 0 0;
    border: 1px solid var(--border-color-primary);
    border-radius: 8px;
    background: var(--background-fill-secondary);
    overflow: visible;
    z-index: 20;
}

.pd-inline-panel.pd-open {
    z-index: 2000;
}

.pd-inline-head {
    box-sizing: border-box !important;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 34px;
    padding: 0 18px 0 12px !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--body-text-color);
    cursor: pointer;
    column-gap: 7px;
    font-weight: 700;
    line-height: 1;
    text-align: left;
}

.pd-inline-head:hover {
    background: var(--background-fill-primary);
}

.pd-inline-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 34px;
    margin-left: 0;
    color: var(--body-text-color-subdued);
    font-size: 0.86rem;
    line-height: 1;
}

.pd-inline-label {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 34px;
    line-height: 1;
}

.pd-inline-status {
    display: flex;
    align-items: center;
    height: 34px;
    margin-right: 2px;
    color: var(--body-text-color-subdued);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.pd-inline-body {
    box-sizing: border-box;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    height: min(500px, calc(100vh - 235px));
    min-height: 320px;
    padding: 9px;
    border: 1px solid var(--border-color-primary);
    border-radius: 8px;
    background: var(--background-fill-secondary);
    box-shadow: 0 12px 24px rgb(0 0 0 / 35%);
}

.pd-inline-body[hidden] {
    display: none;
}

.pd-inline-query-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin: 0 0 8px;
}

.pd-inline-query-wrap {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.pd-inline-query {
    flex: 1 1 auto;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 6px 34px 6px 8px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary) !important;
    color: var(--body-text-color) !important;
    caret-color: var(--body-text-color);
}

.pd-inline-query::placeholder {
    color: var(--body-text-color-subdued);
    opacity: 1;
}

.pd-inline-query-clear {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    min-width: 21px;
    min-height: 21px;
    padding: 0 !important;
    border: 1px solid var(--border-color-primary) !important;
    border-radius: 999px !important;
    background: var(--background-fill-secondary) !important;
    color: var(--body-text-color) !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.82;
    transform: translateY(-50%);
}

.pd-inline-query-clear[hidden] {
    display: none !important;
}

.pd-inline-query-clear:hover,
.pd-inline-query-clear:focus-visible {
    opacity: 1;
    border-color: var(--link-text-color, #2563eb) !important;
}

.pd-inline-nav-button {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 !important;
    border: 1px solid var(--border-color-primary) !important;
    border-radius: 6px !important;
    background: var(--background-fill-primary) !important;
    color: var(--body-text-color) !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.pd-inline-nav-button[hidden] {
    display: none !important;
}

.pd-inline-nav-button:hover,
.pd-inline-nav-button:focus-visible {
    border-color: var(--link-text-color, #2563eb) !important;
    color: var(--link-text-color, #2563eb) !important;
}

.pd-inline-query-groups {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
}

.pd-inline-query-groups[hidden] {
    display: none;
}

.pd-inline-query-groups button,
.pd-inline-tag-group-chip {
    min-height: 30px;
    padding: 4px 8px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary);
    color: var(--body-text-color);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.pd-inline-query-groups button:hover,
.pd-inline-tag-group-chip:hover {
    border-color: var(--link-text-color, #2563eb);
    color: var(--link-text-color, #2563eb);
}

.pd-inline-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary);
}

.pd-inline-empty {
    padding: 10px;
    color: var(--body-text-color-subdued);
}

.pd-inline-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    font-weight: 700;
    text-align: center;
}

.pd-inline-result {
    padding: 11px 10px;
    border-bottom: 1px solid var(--border-color-primary);
}

.pd-inline-result:last-child {
    border-bottom: 0;
}

.pd-inline-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.3;
}

.pd-inline-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.pd-inline-tag {
    appearance: none !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: var(--font-mono, monospace) !important;
    font-size: 1.16rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: var(--body-text-color, #111827) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1.5px !important;
    overflow-wrap: anywhere;
    cursor: pointer;
    text-align: left;
}

.pd-inline-tag-group-chip {
    min-height: 24px;
    padding: 2px 7px;
    background: var(--background-fill-secondary);
    font-size: 0.74rem;
}

.pd-inline-tag:hover {
    color: var(--body-text-color, #111827) !important;
    text-decoration: underline !important;
}

.pd-inline-ja {
    color: var(--body-text-color-subdued);
    font-size: 0.86rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.pd-inline-dictionary-badge,
.pd-dictionary-badge,
.pd-inline-deprecated-badge,
.pd-deprecated-badge {
    margin-left: 0.35em;
    color: var(--body-text-color);
    font-weight: 700;
}

.pd-inline-section-link,
.pd-section-link {
    margin-left: 0.35em;
    color: var(--link-text-color, #8ab4f8);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-inline-section-link:hover,
.pd-section-link:hover {
    text-decoration: underline;
}

.pd-inline-section-link-missing,
.pd-section-link-missing,
.pd-inline-section-link-missing:hover,
.pd-section-link-missing:hover {
    color: var(--body-text-color-subdued);
    text-decoration: none;
    cursor: default;
}

.pd-inline-deprecated-badge,
.pd-deprecated-badge {
    color: #f59e0b;
}

.pd-inline-description {
    margin-top: 7px;
    color: var(--body-text-color);
    font-size: 0.9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: normal;
}

.pd-alt-tag,
.pd-inline-alt-tag {
    appearance: none !important;
    display: inline !important;
    min-height: 0 !important;
    margin: 0 0.2em !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--link-text-color, #8ab4f8) !important;
    cursor: pointer;
    font-family: var(--font-mono, monospace);
    font-size: inherit;
    font-weight: 700;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-alt-tag:hover,
.pd-alt-tag:focus,
.pd-inline-alt-tag:hover,
.pd-inline-alt-tag:focus {
    color: var(--link-text-color, #8ab4f8) !important;
    text-decoration: underline;
}

.pd-inline-related {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: var(--body-text-color-subdued);
    font-size: 0.8rem;
    line-height: 1.35;
}

.pd-inline-related span {
    margin-right: 2px;
}

.pd-inline-related button {
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid var(--button-secondary-border-color, var(--border-color-primary));
    border-radius: 6px;
    background: var(--button-secondary-background-fill, var(--background-fill-secondary));
    color: var(--button-secondary-text-color, var(--body-text-color));
    cursor: pointer;
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
}

.pd-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.pd-inline-tag-group {
    margin-top: 10px;
    border: 1px solid var(--border-color-primary);
    border-radius: 7px;
    background: var(--background-fill-primary);
    color: var(--body-text-color);
    overflow: hidden;
}

.pd-inline-tag-group-view {
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.pd-inline-tag-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-bottom: 1px solid var(--border-color-primary);
    background: var(--background-fill-secondary);
    font-size: 0.82rem;
    font-weight: 800;
}

.pd-inline-tag-group-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    color: var(--body-text-color);
    background: var(--button-secondary-background-fill, var(--background-fill-primary));
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.pd-inline-tag-group-body {
    max-height: 310px;
    overflow: auto;
    padding: 8px 9px 10px;
}

.pd-inline-tag-group-view .pd-inline-tag-group-body {
    max-height: none;
    overflow: visible;
    padding: 0 10px 12px;
}

.pd-inline-tag-group-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px 0 8px;
    border-bottom: 1px solid var(--border-color-primary);
    background: var(--background-fill-primary);
}

.pd-inline-tag-group-nav button {
    appearance: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 2px 6px !important;
    border: 1px solid var(--border-color-primary) !important;
    border-radius: 999px !important;
    background: var(--background-fill-secondary) !important;
    color: var(--body-text-color-subdued) !important;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.pd-inline-tag-group-nav button:hover,
.pd-inline-tag-group-nav button:focus {
    border-color: var(--link-text-color, #2563eb) !important;
    color: var(--body-text-color) !important;
}

.pd-inline-tag-group-index {
    padding: 10px;
}

.pd-inline-tag-group-index-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--body-text-color);
}

.pd-inline-tag-group-index-head strong {
    font-size: 0.92rem;
    font-weight: 900;
}

.pd-inline-tag-group-index-head span {
    color: var(--body-text-color-subdued);
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.pd-inline-tag-group-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.pd-inline-tag-group-index-item {
    appearance: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    border: 1px solid var(--border-color-primary) !important;
    border-radius: 6px !important;
    background: var(--background-fill-secondary) !important;
    color: var(--body-text-color) !important;
    cursor: pointer;
    text-align: left;
}

.pd-inline-tag-group-index-item span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.84rem;
    font-weight: 850;
    line-height: 1.25;
}

.pd-inline-tag-group-index-item small {
    color: var(--body-text-color-subdued);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.pd-inline-tag-group-index-item[data-pd-adult-group="1"] {
    border-color: rgb(244 114 182 / 36%) !important;
    background: linear-gradient(0deg, rgb(244 114 182 / 14%), rgb(244 114 182 / 14%)), var(--background-fill-secondary) !important;
}

.pd-inline-tag-group-index-item:hover,
.pd-inline-tag-group-index-item:focus {
    border-color: var(--link-text-color, #2563eb) !important;
    filter: brightness(1.05);
}

.pd-inline-tag-group-section {
    margin-top: 15px;
}

.pd-inline-tag-group-section:first-child {
    margin-top: 2px;
}

.pd-inline-tag-group-section h4 {
    margin: 0 0 8px;
    color: var(--body-text-color);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0;
}

.pd-inline-tag-group-section h4::before {
    content: "【";
}

.pd-inline-tag-group-section h4::after {
    content: "】";
}

.pd-inline-tag-group-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.pd-inline-tag-group-item {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr) auto;
    align-items: baseline;
    gap: 7px;
    min-height: 24px;
    padding: 3px 5px;
    border-radius: 5px;
}

.pd-inline-tag-group-item-active {
    background: rgb(37 99 235 / 12%);
}

.pd-inline-tag-group-tag {
    appearance: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--body-text-color) !important;
    cursor: pointer;
    font-family: var(--font-mono, monospace);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-inline-tag-group-tag:hover,
.pd-inline-tag-group-tag:focus {
    color: var(--link-text-color, #2563eb) !important;
    text-decoration: underline;
}

.pd-inline-tag-group-ja {
    color: var(--body-text-color-subdued);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pd-inline-tag-group-edit-button,
.pd-inline-tag-group-insert-button {
    appearance: none !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 2px 7px !important;
    border: 1px solid var(--border-color-primary) !important;
    border-radius: 5px !important;
    background: var(--button-secondary-background-fill, var(--background-fill-primary)) !important;
    box-shadow: none !important;
    color: var(--body-text-color-subdued) !important;
    cursor: pointer;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
}

.pd-inline-tag-group-edit-button:hover,
.pd-inline-tag-group-edit-button:focus,
.pd-inline-tag-group-insert-button:hover,
.pd-inline-tag-group-insert-button:focus {
    color: var(--body-text-color) !important;
    border-color: var(--button-primary-border-color, var(--border-color-accent)) !important;
}

.pd-inline-tag-group-edit-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 7px;
    width: 100%;
}

.pd-inline-tag-group-edit-form label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    color: var(--body-text-color-subdued);
    font-size: 0.72rem;
    font-weight: 800;
}

.pd-inline-tag-group-edit-form label span {
    font-family: var(--font-mono, monospace);
    overflow-wrap: anywhere;
}

.pd-inline-tag-group-edit-form input {
    box-sizing: border-box;
    width: 100%;
    min-height: 30px;
    padding: 5px 7px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary) !important;
    color: var(--body-text-color) !important;
    font: inherit;
}

.pd-inline-tag-group-edit-actions {
    display: flex;
    gap: 5px;
}

.pd-inline-tag-group-edit-actions button {
    min-height: 30px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border: 1px solid #9aa4b2 !important;
    border-radius: 6px !important;
    background: #e6eaf0 !important;
    color: #111827 !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.pd-inline-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-inline-edit-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--body-text-color);
    font-weight: 800;
}

.pd-inline-edit-head code {
    color: var(--body-text-color-subdued);
    font-size: 0.82rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pd-inline-edit label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--body-text-color-subdued);
    font-size: 0.78rem;
    font-weight: 700;
}

.pd-inline-edit input,
.pd-inline-edit textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary) !important;
    color: var(--body-text-color) !important;
    font: inherit;
    line-height: 1.45;
}

.pd-inline-edit textarea {
    resize: vertical;
}

.pd-inline-edit-note {
    color: var(--body-text-color-subdued);
    font-size: 0.76rem;
    line-height: 1.35;
}

.pd-inline-related-validation {
    padding: 6px 8px;
    border: 1px solid var(--border-color-primary);
    border-radius: 6px;
    background: var(--background-fill-primary);
    color: var(--body-text-color-subdued);
    font-size: 0.76rem;
    line-height: 1.4;
}

.pd-inline-related-validation .pd-related-valid {
    color: var(--body-text-color);
}

.pd-inline-related-validation .pd-related-invalid {
    color: #f87171;
    font-weight: 700;
}

.pd-inline-related-validation.pd-related-validation-error {
    border-color: #f87171;
}

.pd-inline-edit-actions {
    margin-top: 2px;
}

.pd-inline-actions button,
.pd-inline-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #9aa4b2 !important;
    border-radius: 6px;
    background: #e6eaf0 !important;
    color: #111827 !important;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%), 0 1px 2px rgb(0 0 0 / 22%);
    text-decoration: none;
    text-shadow: none;
}

#prompt_dictionary_panel .pd-actions button,
#prompt_dictionary_panel .pd-actions a,
.pd-inline-actions button,
.pd-inline-actions a {
    position: relative;
    overflow: hidden;
    transition: transform 140ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

#prompt_dictionary_panel .pd-actions button::after,
#prompt_dictionary_panel .pd-actions a::after,
.pd-inline-actions button::after,
.pd-inline-actions a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0%, rgb(255 255 255 / 0%) 30%, rgb(255 255 255 / 22%) 50%, rgb(255 255 255 / 0%) 70%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 420ms ease;
    pointer-events: none;
}

#prompt_dictionary_panel .pd-actions button:hover,
#prompt_dictionary_panel .pd-actions a:hover,
.pd-inline-actions button:hover,
.pd-inline-actions a:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    border-color: #697386 !important;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), 0 0 0 1px rgb(105 115 134 / 22%), 0 0 12px rgb(68 91 135 / 18%);
}

#prompt_dictionary_panel .pd-actions button:hover::after,
#prompt_dictionary_panel .pd-actions a:hover::after,
.pd-inline-actions button:hover::after,
.pd-inline-actions a:hover::after {
    transform: translateX(120%);
}

#prompt_dictionary_panel .pd-actions button:focus-visible,
#prompt_dictionary_panel .pd-actions a:focus-visible,
.pd-inline-actions button:focus-visible,
.pd-inline-actions a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

#prompt_dictionary_panel .pd-actions button:active,
#prompt_dictionary_panel .pd-actions a:active,
.pd-inline-actions button:active,
.pd-inline-actions a:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%), 0 0 0 1px rgb(105 115 134 / 18%);
}
