* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    overflow: hidden;
}

.container {
    height: 100vh;
    width: 100vw;
    border: 12px solid #FF7B41;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-wrapper {
    width: 100%;
    max-width: 800px;
    padding: 15px 20px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #FF7B41;
    text-align: center;
    margin-bottom: 15px;
}

.project-image {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 0 auto 15px auto;
    border: 2px solid #FF7B41;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-description {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: center;
}

.project-description p {
    color: #333;
    font-size: 0.95em;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.action-button {
    padding: 12px 25px;
    font-size: 0.95em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: white;
}

.download-btn {
    background-color: #FF7B41;
}

.download-btn:hover {
    background-color: #E66A30;
    transform: translateY(-2px);
}

.privacy-btn {
    background-color: #FF7B41;
}

.privacy-btn:hover {
    background-color: #E66A30;
    transform: translateY(-2px);
}

.footer-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0 5px 0;
}

.back-button {
    padding: 10px 20px;
    background-color: #FF7B41;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #E66A30;
}

.home-button {
    padding: 10px 20px;
    background-color: #FF7B41;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.home-button:hover {
    background-color: #E66A30;
}

.footer {
    font-size: 0.75em;
    color: #888;
    text-align: center;
    margin-top: auto;
    padding-bottom: 5px;
}

/* タブレット対応 */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .content-wrapper {
        padding: 20px 15px;
    }

    .project-description {
        padding: 15px;
    }

    .button-group {
        gap: 10px;
    }

    .action-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* ===== Download Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal-overlay.is-open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: #f5f5f5;
    border: 5px solid #FF7B41;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    position: relative;
    padding: 22px 18px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: white;
    color: #FF7B41;
    font-size: 22px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
    transition: transform 0.2s, background-color 0.2s;
}

.modal-close:hover {
    background-color: #fff3ed;
    transform: translateY(-1px);
}

.modal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.modal-title {
    font-size: 1.15em;
    font-weight: bold;
    color: #000;
    margin-top: 8px;
}

.modal-button-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-action-button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: #FF7B41;
    color: white;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.modal-action-button:hover {
    background-color: #E66A30;
    transform: translateY(-1px);
}

.modal-note {
    font-size: 0.85em;
    color: #666;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .content-wrapper {
        padding: 15px 10px;
    }

    .project-image {
        margin-bottom: 20px;
    }

    .project-description {
        padding: 12px;
        margin-bottom: 15px;
    }

    .button-group {
        gap: 8px;
    }

    .action-button {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .footer-buttons {
        gap: 10px;
        margin: 15px 0 8px 0;
    }

    .modal {
        padding: 18px 14px;
        border-radius: 14px;
    }
}
