/* 既存ページに影響させず、このプラグインの一覧だけに適用。 */
.top-pdf.tpdf-block {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}
.tpdf-block .top-pdf-item {
    width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: 0 0 25%;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.tpdf-block .top-pdf-item--movie {
    flex-direction: column;
}
/* A4縦の枠。画像の実寸比率に合わせ、片方の辺を枠いっぱいにする。 */
.tpdf-block .tpdf-image-frame {
    display: flex;
    width: 164px;
    height: calc(164px * 297 / 210);
    aspect-ratio: 210 / 297;
    flex: none;
    align-items: center;
    justify-content: center;
    margin-top: 7%;
}
.tpdf-block .tpdf-image-link {
    display: block;
    width: 164px;
    flex: none;
}
.tpdf-block .tpdf-image-window {
    display: block;
    position: relative;
    flex: none;
    overflow: hidden;
    box-shadow: 3px 4px 2px rgba(0, 0, 0, 0.3);
}
.tpdf-block .top-pdf-cyousei {
    display: block;
    position: absolute;
    flex: none;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.tpdf-block .tpdf-no-shadow .tpdf-image-window {
    box-shadow: none;
}
.tpdf-block .top-pdf-movie-link {
    margin-top: 12px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}
/* 文字の色・行高・余白は既存テーマと既存CSSを引き継ぐ。 */
@media (max-width: 767px) {
    .tpdf-block .top-pdf-item {
        width: 33%;
        flex-basis: 33%;
    }
}
/* 以下は編集画面専用。公開ページの列構造には影響しない。 */
.tpdf-editor-list {
    border: 1px dashed #aaa;
    padding: 16px;
}
.tpdf-editor-heading {
    margin: 0 0 12px;
    font-weight: 600;
}
.tpdf-editor-card {
    border: 1px solid #ddd;
    padding: 12px;
    box-sizing: border-box;
    min-width: 0;
}
.tpdf-editor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}
.tpdf-editor-grid > .wp-block {
    width: 100%;
    max-width: none;
    margin: 0;
}
.tpdf-editor-grid > .block-list-appender {
    position: relative;
    grid-column: 1 / -1;
}
.tpdf-editor-preview {
    pointer-events: none;
}
.tpdf-editor-preview .top-pdf-item {
    width: 100%;
    flex-basis: 100%;
}
.tpdf-editor-hint {
    font-size: 12px;
    color: #666;
}
