.title-poster-header,
.title-poster-preview,
.title-poster-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.title-poster-header,
.title-poster-toolbar {
    justify-content: space-between;
}

.title-poster-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.title-poster-title {
    margin: 4px 0 8px;
    color: #cbbfb2;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.title-poster-copy {
    flex: 1;
    min-width: 0;
}

.title-poster-copy .title-poster-title {
    margin: 0;
    color: #f5ede7;
    font-size: 14px;
}

.title-poster-metadata {
    margin: 3px 0;
    color: #a99b8d;
    font-size: 12px;
    text-align: right;
}

.title-poster-default,
.title-poster-retry {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.045);
    color: #e9ddd4;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    touch-action: manipulation;
}

.title-poster-change {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 8px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #f5ede7;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.title-poster-change svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.title-poster-change-arrow {
    margin-inline-start: auto;
}

.title-poster-change:hover {
    background: rgba(255, 255, 255, 0.06);
}

.title-poster-thumbnail {
    width: 56px;
    height: 84px;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
}

.title-poster-empty {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.045);
    font-size: 10px;
    text-align: center;
}

.title-poster-default[aria-pressed="true"] {
    border-color: rgba(242, 90, 0, 0.5);
    background: rgba(242, 90, 0, 0.12);
    color: #ff9a58;
}

.title-poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    min-height: 0;
    max-height: min(48dvh, 400px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 122, 26, 0.48) rgba(255, 255, 255, 0.04);
    padding: 3px;
}

.title-poster-grid::-webkit-scrollbar {
    width: 6px;
}

.title-poster-grid::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.title-poster-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 122, 26, 0.48);
}

.title-poster-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 122, 26, 0.72);
}

.title-poster-grid::-webkit-scrollbar-button {
    display: none;
}

.title-poster-option {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
}

.title-poster-option img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-poster-option.is-selected {
    border-color: #f25a00;
}

.title-poster-status {
    flex: 1;
    min-width: 0;
}

.title-poster-message {
    margin: 0;
    color: #a99b8d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.title-poster-message.is-success {
    color: #88dcaa;
}

.title-poster-message.is-error {
    color: #ffb0a0;
}

.title-poster-grid-message,
.title-poster-retry {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13px;
}

.title-poster-status .title-poster-retry {
    margin-top: 6px;
}

.title-poster-modal button:disabled {
    opacity: 0.55;
}

.title-poster-option:not(:disabled):hover,
.title-poster-default:not(:disabled):hover,
.title-poster-retry:not(:disabled):hover {
    border-color: rgba(242, 90, 0, 0.6);
}

.title-poster-grid:focus-visible {
    outline: 2px solid #ff7a2a;
    outline-offset: 2px;
}

@media (min-width: 480px) {
    .title-poster-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (pointer: coarse) {
    .title-poster-change {
        min-height: 44px;
    }
}
