ul, ol {
    margin: 1em 0 1em 1.5em;
    padding: 0;
}
li { margin-bottom: 0.5em; }
a { color: #64b5f6; text-decoration: underline; }
hr {
    border: none;
    border-top: 1.5px solid #444;
    margin: 2.5em 0 2em 0;
}
.viewer-embed {
    margin: 0;
    text-align: center;
}
/* PC用 */
.viewer-embed iframe {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 7/9;
    height: auto;
    max-height: 100vh;
    border: none;
    border-radius: 8px;
    background: #111;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: #fff;
    color: #222;
    font-size: 1em;
}
th, td {
    border: 1px solid #444;
    padding: 0.6em 0.4em;
    text-align: center;
}
th {
    background: #fff;
    color: #222;
}
@media (max-width: 600px) {
    main.article {
        padding: 3vw 2vw 7vw 2vw;
        border-radius: 0;
    }
    h1 { font-size: 1.3em; }
    h2 { font-size: 1.1em; }
    h3 { font-size: 1em; }
    .viewer-embed iframe {
        /* width: 100vw; */
        max-width: 100vw;
        aspect-ratio: 2/3;
        height: auto;
        min-height: 220px;
        max-height: none;
    }
    table, th, td { font-size: 0.95em; }
    /* 前後プレビュー画像を非表示 */
    .side-preview {
        display: none !important;
    }
    #main-image {
        max-width: 100vw;
        max-height: 100dvh;
    }
}
}
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.viewer-no-scroll body, .viewer-no-scroll html {
    overflow: hidden !important;
    height: 100vh !important;
}

#viewer-container {
    height: 100vh;
}

#ui-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 20px;
}

#folder-input {
    margin-top: 20px;
    padding: 10px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
}

#viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: manipulation; /* スワイプ/ドラッグ遷移は無効、タップ操作のみ許可 */
}

.hidden {
    display: none !important;
}

#main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 3;
    user-select: none; /* 選択防止 */
    -webkit-user-drag: none; /* ドラッグ防止 */
}

.side-preview {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    filter: brightness(0.88);
    user-select: none;
    -webkit-user-drag: none;
}

#image-counter {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 20px 20px 0 0;
    font-size: 14px;
    z-index: 10;
}

#viewer-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(90vw, 960px);
    padding: 6px 16px;
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 0 0 20px 20px;
    font-size: 18px;
    line-height: 1.4;
    text-align: center;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.nav-hint {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

#left-arrow-hint {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}
#left-arrow-hint:hover {
    opacity: 1;
}

#hint-text {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0.7;
}
