* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f4f4f4;
    color: #222222;
}

button {
    font: inherit;
}

.logo{
    font-family: "Pacifico", cursive;
}

.app-header {
    padding: 22px 20px;
    background: #ffffff;
    border-bottom: 1px solid #dddddd;
}

.app-header h1 {
    margin: 0;
    font-size: 28px;
}

.app-header p {
    margin: 8px 0 0;
    color: #666666;
}

.app-main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px;
}

.status-message {
    margin: 0 0 16px;
    color: #666666;
}

.status-message.error {
    color: #b00020;
}

.folder-list {
    display: grid;
    gap: 12px;
}

.folder-list[hidden] {
    display: none;
}

.folder-button {
    width: 100%;
    padding: 18px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
}

.folder-button:active {
    transform: scale(0.99);
    background: #eeeeee;
}

.folder-icon {
    margin-right: 10px;
}

.viewer-section {
    width: 100%;
}

.viewer-section[hidden] {
    display: none;
}

.viewer-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.viewer-header h2 {
    margin: 0;
    min-width: 0;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.back-button {
    flex-shrink: 0;
    padding: 10px 14px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    background: #ffffff;
    color: #222222;
    cursor: pointer;
}

.image-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    max-height: 70vh;
    overflow: hidden;
    border-radius: 14px;
    background: #111111;
}

.viewer-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.image-counter {
    margin: 14px 0;
    color: #555555;
    font-size: 17px;
    text-align: center;
}

.viewer-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.navigation-button {
    min-height: 56px;
    border: 1px solid #cccccc;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 26px;
    cursor: pointer;
}

.navigation-button:active:not(:disabled) {
    transform: scale(0.98);
    background: #eeeeee;
}

.navigation-button:disabled {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 480px) {
    .app-main {
        padding: 14px;
    }

    .app-header {
        padding: 18px 14px;
    }

    .viewer-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .image-viewer {
        min-height: 220px;
    }
}1~* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f4f4f4;
    color: #222222;
}

button {
    font: inherit;
}

.app-header {
    padding: 22px 20px;
    background: #ffffff;
    border-bottom: 1px solid #dddddd;
}

.app-header h1 {
    margin: 0;
    font-size: 28px;
}

.app-header p {
    margin: 8px 0 0;
    color: #666666;
}

.app-main {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px;
}

.status-message {
    margin: 0 0 16px;
    color: #666666;
}

.status-message.error {
    color: #b00020;
}

.folder-list {
    display: grid;
    gap: 12px;
}

.folder-list[hidden] {
    display: none;
}

.folder-button {
    width: 100%;
    padding: 18px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
}

.folder-button:active {
    transform: scale(0.99);
    background: #eeeeee;
}

.folder-icon {
    margin-right: 10px;
}

.viewer-section {
    width: 100%;
}

.viewer-section[hidden] {
    display: none;
}

.viewer-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.viewer-header h2 {
    margin: 0;
    min-width: 0;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.back-button {
    flex-shrink: 0;
    padding: 10px 14px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    background: #ffffff;
    color: #222222;
    cursor: pointer;
}

.image-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    max-height: 70vh;
    overflow: hidden;
    border-radius: 14px;
    background: #111111;
}

.viewer-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.image-counter {
    margin: 14px 0;
    color: #555555;
    font-size: 17px;
    text-align: center;
}

.viewer-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.navigation-button {
    min-height: 56px;
    border: 1px solid #cccccc;
    border-radius: 12px;
    background: #ffffff;
    color: #222222;
    font-size: 26px;
    cursor: pointer;
}

.navigation-button:active:not(:disabled) {
    transform: scale(0.98);
    background: #eeeeee;
}

.navigation-button:disabled {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 480px) {
    .app-main {
        padding: 14px;
    }

    .app-header {
        padding: 18px 14px;
    }

    .viewer-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .image-viewer {
        min-height: 220px;
    }
}

.image-viewer {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.viewer-image {
    -webkit-user-drag: none;
}

.comment-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #dddddd;
}

.comment-section h3 {
    margin: 0 0 16px;
    font-size: 20px;
}

.comment-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-item {
    padding: 12px 14px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
}

.comment-text {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-date {
    display: block;
    margin-top: 8px;
    color: #777777;
    font-size: 12px;
}

.empty-comment {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #eeeeee;
    color: #666666;
}

.empty-comment.error {
    color: #b00020;
}

.comment-form {
    display: grid;
    gap: 10px;
}

.comment-form label {
    font-weight: 600;
}

.comment-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 10px;
    background: #ffffff;
    color: #222222;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: 2px solid #777777;
    outline-offset: 1px;
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#commentLength {
    color: #777777;
    font-size: 13px;
}

#commentSubmitButton {
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
}

#commentSubmitButton:disabled {
    opacity: 0.5;
    cursor: default;
}

.comment-message {
    min-height: 24px;
    margin: 10px 0 0;
    color: #555555;
}

.comment-message.error {
    color: #b00020;
}

.like-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 18px;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid #cccccc;
    border-radius: 999px;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
}

.like-button.liked {
    border-color: #d83b57;
    color: #d83b57;
}

#likeIcon {
    font-size: 24px;
    line-height: 1;
}

#likeCount {
    min-width: 1em;
    font-weight: 600;
}

.like-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.like-message {
    margin: 0;
    color: #666666;
    font-size: 13px;
}

.like-message.error {
    color: #b00020;
}

.app-main {
    padding-top: 8px;
}

.status-message {
    margin-bottom: 6px;
}

.viewer-header {
    margin-bottom: 6px;
}

.app-header {
    padding-top: 12px;
    padding-bottom: 12px;
}

.home-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #222222;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Pacifico', cursive;
}

.home-button:active {
    opacity: 0.55;

}

.viewer-header {
    margin: 0 0 6px;
}

.viewer-header h2 {
    margin: 0;
    font-size: 18px;
}


