/* YoseMovie Step3 Edit Page Styles */

/**
 * IMPORTANT DEVELOPMENT RULE:
 * When user asks questions with "?" - ALWAYS respond first and get approval before making code changes
 * 
 * YoseMovie Design System - CSS Architecture
 * 
 * Design System Reference: /assets/css/yosemovie-design-system.css
 * Color Palette: #ffcc02 (primary yellow), #1d1d1f (black), #2d3436 (title), #636e72 (subtitle)
 * Border Radius: 20px (cards), 25px (buttons), 16px (small elements)
 * 
 * Main Layout Classes:
 * - .phone-container: Main mobile container
 * - .app-header: Top navigation bar
 * - .main-content: Primary content area
 * 
 * Component Classes:
 * - .sample-movie-*: Video preview components
 * - .project-title-*: Project information display
 * - .organizer-message: Message from organizer
 * - .deadline-notice: Submission deadline info
 * - .participation-flow: Step-by-step guide
 * - .about-accordion: Collapsible info section
 * - .login-section: Authentication options
 * - .footer: Site footer
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: #f0f1f3;
    color: #1d1d1f;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/**
 * Main Container
 * Mobile-first responsive container for all page content
 * Related: .main-content, .app-header
 */
.phone-container {
    width: 100%;
    min-height: 100vh;
    background: white;
    overflow: visible;
    position: relative;
}

/**
 * App Header
 * Top navigation bar with back button, title, and menu
 * Variants: .app-header.index (yellow background for index page)
 * Related: .header-title, .header-back, .header-help
 */
.app-header {
    background: white;
    color: #1d1d1f;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: relative;
}

.header-back {
    cursor: pointer;
    font-size: 36px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.header-help {
    cursor: pointer;
    font-size: 20px;
    width: 24px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.header-help {
    position: relative;
}

.header-help span {
    width: 18px;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
}

.progress-container {
    padding: 16px 20px;
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ffcc02;
    border-radius: 2px;
    width: 60%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-weight: 600;
}

.main-content {
    padding: 24px 20px 160px;
    background: #f0f1f3;
    min-height: 100vh;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    position: relative;
    z-index: 2;
}

.main-content.index {
    margin-top: -20px;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 8px;
    margin-top: 10px;
}

.step-subtitle {
    font-size: 14px;
    color: #636e72;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ヒーロー画像エリア */
.hero-image-container {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    background: #f0f0f2;
    margin-bottom: 8px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
}

.hero-project-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.hero-project-subtitle {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
}

/* プレビューエリア */
.preview-container {
    background: #1d1d1f;
    border-radius: 20px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.preview-slideshow {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-size: 32px;
}

.preview-slide.active {
    opacity: 1;
}

.preview-slide.photo {
    background: #2d2d2f;
}

.preview-slide.video {
    background: #2d2d2f;
}

.preview-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-dots {
    display: flex;
    gap: 4px;
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.preview-dot.active {
    background: white;
    transform: scale(1.2);
}

.preview-play-btn {
    background: #ffcc02;
    border: none;
    border-radius: 25px;
    color: #1d1d1f;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.3);
}

.preview-play-btn:hover {
    background: #e6b800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

.edit-hint {
    background: #f8f7ff;
    border: 1px solid #e5e2ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #6c5ce7;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
}

.image-item {
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: scale(1.02);
}

.image-item.selected {
    border-color: #ffcc02;
    box-shadow: 0 0 0 4px rgba(255, 204, 2, 0.3);
    z-index: 10;
}

.image-item.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffcc02, #ffd93d, #ffcc02);
    border-radius: 10px;
    z-index: -1;
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.image-item.selected .image-number {
    background: #ffcc02;
    color: #1d1d1f;
    font-weight: 700;
    animation: numberBounce 0.5s ease-out;
}

@keyframes numberBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.image-item.selected .image-content {
    filter: brightness(1.1) contrast(1.1);
}

.image-item.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4caf50;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    animation: checkmarkPop 0.3s ease-out;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.image-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.image-item.draggable {
    border: 2px dashed #ffc107;
    cursor: grab;
    animation: draggableShake 0.5s ease-in-out;
}

.image-item.draggable:hover {
    border-color: #ffab00;
    transform: scale(1.02);
}

.image-item.draggable:active {
    cursor: grabbing;
}

@keyframes draggableShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.image-number {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffcc02;
    color: #1d1d1f;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
}

.image-content {
    width: 100%;
    height: calc(100% - 30px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    font-size: 16px;
    color: #666;
    text-align: center;
    padding: 4px;
    position: relative;
    overflow: hidden;

    /* contain表示の余白が白飛びしないようグレー背景 */
    background: #d5dade;
}

.sample-image {
    width: 100%;
    height: 100%;
    /* 画像を切り抜かず(cover)、全体が枠内に収まるように表示する */
    object-fit: contain;
    border-radius: 14px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.content-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.photo-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/></svg>') no-repeat center;
    background-size: contain;
}

.video-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>') no-repeat center;
    background-size: contain;
}

.image-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 10px;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filename-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-duration {
    flex-shrink: 0;
    margin-left: 4px;
    color: #ffcc02;
    font-weight: 600;
}

.image-photo {
    background: white;
}

.image-video {
    background: white;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

/* step2-upload.html用：ボタンフォントサイズ調整 */
.action-buttons .btn-action {
    font-size: 12px !important;
}

.btn-action {
    flex: 1;
    background: white;
    color: #1d1d1f;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-action:hover {
    background: #ffcc02;
    border-color: #ffcc02;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.3);
}

.btn-action:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-action.delete {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.btn-action.delete:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.btn-action.delete:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Circle Delete Button */
.btn-action-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    color: #e74c3c;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-action-circle svg {
    width: 16px;
    height: 16px;
    color: #e74c3c;
}

.btn-action-circle:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.btn-action-circle.delete:disabled {
    background: #f8f9fa;
    color: #bdc3c7;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
}

.btn-action-circle.delete:disabled svg {
    color: #bdc3c7 !important;
    stroke: #bdc3c7 !important;
}

.btn-action-circle.delete::before,
.btn-action-circle::before {
    display: none !important;
}

/* step2-upload.htmlの削除ボタン専用修正 */
#deleteSelectedButton::before,
#deleteSelectedButton::after,
.upload-header .btn-action-circle::before,
.upload-header .btn-action-circle::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

#reorderHintButton {
    position: relative;
}

#reorderHintButton::before {
    content: '☰ ';
    position: relative;
    top: -1px;
}

#reorderHintButton.completed::before {
    content: '';
}

.fixed-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #e9ecef;
    color: #666;
}

.btn:hover {
    transform: translateY(-1px);
}

.add-item {
    aspect-ratio: 1;
    background: #e9ecef;
    border: 2px dashed #adb5bd;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #6c757d;
}

.add-item::before {
    content: '+';
    transform: translateY(-3px);
    display: block;
    position: relative;
}

/* 全ての疑似要素競合を防ぐ */
.add-item::after {
    display: none !important;
}

.add-item:hover {
    background: #dee2e6;
    border-color: #ffcc02;
    color: #ffcc02;
    transform: scale(1.02);
}

.file-input {
    display: none;
}

.btn-primary {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.2);
}

.btn-primary:hover {
    background: #2d2d2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.3);
}

.edit-hint {
    background: white;
    border-radius: 16px;
    padding: 16px;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.edit-hint span::first-letter {
    font-weight: 900;
    font-size: 16px;
}

.edit-hint.reorder-mode {
    background: #fff8e1;
    border: 2px solid #ffcc02;
    color: #1d1d1f;
    animation: reorderPulse 2s ease-in-out infinite;
}

@keyframes reorderPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 2, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 204, 2, 0.2);
    }
}

.video-limit-hint {
    background: white;
    border-radius: 16px;
    padding: 16px;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 390px) {
    .video-limit-hint {
        font-size: 12px;
        padding: 12px 14px;
    }
}

@media (max-width: 350px) {
    .video-limit-hint {
        font-size: 11px;
        padding: 10px 12px;
    }
}

.hint-btn {
    background: #ffcc02;
    color: #1d1d1f;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 390px) {
    .hint-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 350px) {
    .hint-btn {
        font-size: 10px;
        padding: 5px 10px;
    }
}

.hint-btn:hover {
    background: #e6b800;
    transform: translateY(-1px);
}

/* モーダル */

.modal-content {
    width: 100%;
    max-width: 95vw;
    height: 100vh;
    background: #f0f0f2;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.modal-header-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: white;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px 20px 120px;
    flex: 1;
    overflow-y: hidden;
    background: #f0f0f2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05);
    z-index: 1001;
}

.modal-subtitle {
    margin-bottom: 24px;
    color: #636e72;
    text-align: center;
    width: 100%;
}

.crop-notice {
    background: white;
    border: 2px solid #ffcc02;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.15);
}

.video-preview-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: calc(100vh - 220px);
    overflow: hidden;
}


#photoPreview {
    aspect-ratio: 4/3; /* iPhone写真の比率 */
    max-width: 300px;
    margin: 0 auto 24px;
}

.video-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* クロップ機能 */
.crop-selector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.crop-frame {
    position: absolute;
    background: transparent;
    border: 3px dashed #fff;
    border-radius: 4px;
    pointer-events: none;
    /* 縦長動画の場合：16:9の枠を中央に配置 */
    top: 50%;
    left: 0;
    width: 100%;
    aspect-ratio: 16/9;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.crop-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffcc02;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.4);
    pointer-events: auto;
}

.crop-handle svg {
    width: 20px;
    height: 20px;
}

.photo-edit-controls {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 24px;
}

.photo-edit-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.photo-edit-btn:hover {
    background: #ffcc02;
    color: #1d1d1f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 2, 0.3);
}

.photo-edit-btn:active {
    transform: translateY(0);
}

.photo-edit-btn::after {
    content: attr(data-label);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.btn-icon {
    font-size: 24px;
}

/* 新しい写真編集モーダルのスタイル */
.photo-modal-card {
    background: white;
    border-radius: 20px;
    width: 450px;
    height: 630px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.photo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.photo-modal-content {
    padding: 24px 24px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px);
}

.photo-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.photo-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.4;
}

.photo-preview {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    aspect-ratio: 4/3;
    max-width: 380px !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-modal-footer {
    padding: 24px;
    margin-top: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* トリミングUIのスタイル */
.photo-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.photo-crop-grid {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    border: 2px solid white;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
}

.crop-line.horizontal {
    left: 0;
    right: 0;
    height: 1px;
}

.crop-line.vertical {
    top: 0;
    bottom: 0;
    width: 1px;
}

.crop-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    background: transparent;
}

.crop-corner.top-left {
    top: calc(10% - 2px);
    left: calc(10% - 2px);
    border-right: none;
    border-bottom: none;
}

.crop-corner.top-right {
    top: calc(10% - 2px);
    right: calc(10% - 2px);
    border-left: none;
    border-bottom: none;
}

.crop-corner.bottom-left {
    bottom: calc(10% - 2px);
    left: calc(10% - 2px);
    border-right: none;
    border-top: none;
}

.crop-corner.bottom-right {
    bottom: calc(10% - 2px);
    right: calc(10% - 2px);
    border-left: none;
    border-top: none;
}

.photo-save-btn {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.3);
}

.photo-save-btn:hover {
    background: #2d2d2f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

/* 動画編集モーダルのスタイル */
.video-modal-card {
    background: #f0f0f2;
    border-radius: 20px;
    width: 450px;
    height: 630px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.video-modal-content {
    padding: 24px 24px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100% - 120px);
}

.video-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.video-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.4;
}

.video-modal-footer {
    padding: 24px;
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    background: #f0f0f2;
    height: 80px;
}

.video-save-btn {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.3);
}

.video-save-btn:hover {
    background: #2d2d2f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

.crop-handle:hover {
    background: #e6b800;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

.crop-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

.edit-controls {
    background: #d1d5db;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.control-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.control-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 16px;
}

.range-slider {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    margin: 16px 0;
}

.range-fill {
    position: absolute;
    height: 100%;
    background: #6c5ce7;
    left: 20%;
    width: 60%;
    border-radius: 4px;
}

.video-timeline {
    margin: 65px 0 20px 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 12px 16px;
    border-radius: 12px;
}

.usage-time-display {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.timeline-labels-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: -16px !important;
    margin-top: 0px !important;
    padding: 0 30px !important;
}

.timeline-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.timeline-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.timeline-label {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-time-input {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: #2d3436;
}

.timeline-time-input:focus {
    outline: none;
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.15);
}

.timeline-track {
    position: relative;
    height: 8px;
    background: #1d1d1f;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.timeline-time-label {
    font-size: 12px;
    color: white;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-background {
    width: 100%;
    height: 100%;
    background: #1d1d1f;
    border-radius: 4px;
}

.timeline-selected {
    position: absolute;
    top: 0;
    height: 100%;
    background: #ffcc02;
    border-radius: 4px;
    left: 0%;
    width: 100%;
}

.timeline-handle {
    position: absolute;
    top: -8px;
    width: 16px;
    height: 24px;
    background: #fff;
    border: 2px solid #ffcc02;
    border-radius: 8px;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(255, 204, 2, 0.3);
    /* iPhone/タッチデバイス対応 */
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.timeline-handle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 204, 2, 0.4);
}

.timeline-handle:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.start-handle {
    left: 0%;
    transform: translateX(-50%);
}

.end-handle {
    left: 100%;
    transform: translateX(-50%);
}

.timeline-labels {
    display: none;
}

.timeline-handle-label {
    display: none;
}

.edit-controls {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 80px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    white-space: nowrap;
}

.usage-time-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.usage-time-group label {
    font-size: 11px;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* フルスクリーン対応 */
.phone-container {
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* ================================
   Index Page Specific Styles
   ================================ */

/* Index Header Override */
.app-header.index {
    background: #ffcc02;
    color: #1d1d1f;
    box-shadow: none;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    padding-bottom: 50px;
}

.app-header.index::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: #ffcc02;
    z-index: -1;
}

.app-header.index .header-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    text-align: center;
    margin-top: 10px;
}

.app-header.index .header-back,
.app-header.index .header-help {
    display: none;
}

.app-header.index .header-logo {
    height: 40px;
    width: auto;
    display: block;
    margin-top: 15px;
}

.app-header.index .header-menu {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    margin-right: 0;
    margin-top: 15px;
}

.app-header.index .header-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #1d1d1f;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffcc02;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #1d1d1f;
}

.loading-logo {
    width: 200px;
    height: auto;
    margin-bottom: 40px;
    animation: logoFadeIn 0.8s ease-out;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(29, 29, 31, 0.2);
    border-top: 4px solid #1d1d1f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes logoFadeIn {
    0% { 
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Scroll Animation Styles */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Index Page Content Styles */
.project-title-card {
    text-align: center;
    margin-bottom: 20px;
}

.project-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 800;
    color: #1d1d1f;
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

.project-organizer-badge {
    display: inline-block;
    background: white;
    color: #636e72;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/**
 * Organizer Message Card
 * Displays message from event organizer with icon
 * Related: .message-header, .message-icon, .message-from, .message-content
 * Design: White card with message bubble icon
 */
.organizer-message {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.message-icon {
    width: 20px;
    height: 20px;
    color: #ffcc02;
    flex-shrink: 0;
}

.message-icon svg {
    width: 100%;
    height: 100%;
}

.message-from {
    font-size: 14px;
    font-weight: 600;
    color: #636e72;
}

.message-content {
    font-size: 16px;
    line-height: 1.6;
    color: #2d3436;
    margin: 0;
}

/**
 * Sample Movie Preview
 * Video preview container with slideshow and play controls
 * Related: .sample-movie-preview, .sample-bg-image, .play-button, .btn-sample-movie
 * JavaScript: playSample() function handles playback
 */
.sample-movie-container {
    margin-bottom: 24px;
    cursor: pointer;
}

.sample-movie-preview {
    background: #1d1d1f;
    border-radius: 20px;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sample-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.sample-bg-image.active {
    opacity: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.play-button svg {
    width: 24px;
    height: 24px;
    color: #1d1d1f;
    margin-left: 2px;
}

.play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.btn-sample-movie {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffcc02;
    color: #1d1d1f;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-sample-movie:hover {
    background: #e6b800;
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


/**
 * Participation Flow Guide
 * Step-by-step participation instructions
 * Related: .flow-title, .flow-steps, .flow-step, .step-number, .step-icon, .step-content
 * Design: White card with numbered steps and emoji icons
 */
.participation-flow {
    background: white;
    border-radius: 20px;
    padding: 28px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.flow-title {
    font-size: 23px;
    font-weight: 700;
    color: #2d3436;
    text-align: center;
    margin-bottom: 22px;
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

/* 縦積み・中央寄せ（fade-inアニメJSが inline display:block を付与するため !important で確定） */
.flow-step {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 24px 16px;
    background: #e9ecef;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.flow-step:hover {
    background: #dee2e6;
    transform: translateX(4px);
}

.flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 2px;
    height: 14px;
    background: #e9ecef;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #ffcc02;
    color: #1d1d1f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

/* 参加の流れ ステップ内テキストの拡大（.step-item 用の後続定義より優先させる） */
.flow-step .step-number {
    width: 42px;
    height: 42px;
    font-size: 18px;
}
.flow-step .step-label {
    font-size: 20px;
}
.flow-step .step-description {
    font-size: 15px;
}
.flow-step .step-optional {
    font-size: 13px;
    font-weight: 600;
    color: #8a94a0;
    margin-left: 2px;
}

.step-label {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
}

.step-description {
    font-size: 14px;
    color: #636e72;
    line-height: 1.4;
}

.flow-arrow {
    display: none;
}

.flow-time {
    text-align: center;
    font-size: 15px;
    color: #636e72;
    background: #f8f9fa;
    padding: 14px;
    border-radius: 12px;
}

/* Deadline Notice */
/**
 * Deadline Notice
 * Submission deadline display with countdown
 * Related: .deadline-icon, .deadline-text, .deadline-label, .deadline-date
 * JavaScript: updateDeadline() calculates and displays deadline
 * Design: Yellow accent background (#fff8e1) with clock icon
 */
.deadline-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.deadline-icon {
    width: 20px;
    height: 20px;
    color: #ffcc02;
    flex-shrink: 0;
}

.deadline-icon svg {
    width: 100%;
    height: 100%;
}

.deadline-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.deadline-label {
    font-size: 12px;
    font-weight: 600;
    color: #636e72;
    text-transform: uppercase;
}

.deadline-date {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
}

/* About Accordion */
/**
 * About Accordion
 * Collapsible YoseMovie information section
 * Related: .accordion-header, .accordion-title, .accordion-icon, .accordion-content
 * JavaScript: toggleAccordion() handles expand/collapse
 * Design: Yellow header (#ffcc02) with + / × toggle icon
 */
.about-accordion {
    background: white;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background: #ffcc02;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background: #ffb800;
}

.accordion-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
}

.accordion-icon {
    font-size: 20px;
    font-weight: 300;
    color: #1d1d1f;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.accordion-content.active {
    max-height: 500px;
    padding: 0 20px 20px;
}

.about-catchphrase {
    font-size: 18px;
    font-weight: 700;
    color: #2d3436;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 16px;
}

.accordion-logo {
    width: 280px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.about-description {
    font-size: 14px;
    line-height: 1.5;
    color: #636e72;
    text-align: center;
    margin-bottom: 20px;
}

.movie-container {
    background: #1d1d1f;
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.movie-container:hover {
    transform: scale(1.02);
}

.movie-play-icon {
    font-size: 32px;
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Login Section */
/**
 * Login Section
 * Authentication options including email and social login
 * Related: .login-title, .email-login-section, .social-login-container, .btn-social-circle
 * JavaScript: emailLogin(), socialLogin(), continueWithoutLogin() functions
 * Design: White card with multiple login options
 */
.login-section {
    background: white;
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
    text-align: center;
    margin-bottom: 24px;
}

/* Video Preview */
.video-preview {
    background: #1d1d1f;
    border-radius: 20px;
    aspect-ratio: 16/9;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffcc02;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: none;
}

.project-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.project-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2d3436;
}

.project-organizer {
    font-size: 14px;
    color: #636e72;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.feature-item {
    text-align: center;
    padding: 20px 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-label {
    font-size: 12px;
    color: #636e72;
    font-weight: 600;
}

/* Hint Section */
.hint {
    background: white;
    border: 2px solid #ffcc02;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1d1d1f;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.15);
}

/* Form Elements */
.email-login-section {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.15);
}

.form-input::placeholder {
    color: #adb5bd;
}

/* Social Login */
.social-login-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.social-item {
    text-align: center;
}

.btn-social-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.btn-social-circle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-social-circle.x {
    background: #000;
    color: white;
}

.btn-social-circle.facebook {
    background: #1877f2;
    color: white;
}

.btn-social-circle.google {
    background: white;
    color: #4285f4;
    border: 2px solid #e9ecef;
}

.btn-social-circle.line {
    background: #00c300;
    color: white;
}

.btn-social-circle.apple {
    background: #000;
    color: white;
}

.social-label {
    font-size: 12px;
    color: #636e72;
    font-weight: 600;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #636e72;
    font-size: 14px;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    padding: 0 16px;
}

/* Button Overrides for Index */
.btn-secondary.index {
    background: white;
    color: #1d1d1f;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-secondary.index:hover {
    background: #f8f9fa;
    border-color: #ffcc02;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.3);
}

/**
 * Site Footer
 * Multi-column footer with company info, service links, and support
 * Related: .footer-container, .footer-section, .footer-links, .footer-bottom
 * Design: Dark background (#1d1d1f) with yellow accent headings (#ffcc02)
 * Layout: Responsive grid layout, 4 columns on desktop, 2 on mobile
 */
.footer {
    background: #1d1d1f;
    color: #ddd;
    padding: 48px 0 24px;
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer-section h4 {
    color: #ffcc02;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.5;
    color: #b2bec3;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffcc02;
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

@media (max-width: 768px) {
    .footer {
        padding: 32px 0 16px;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 0 16px;
    }
    
    .footer-section h4 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .footer-section p,
    .footer-links a {
        font-size: 12px;
        line-height: 1.5;
    }
}

/**
 * Upload Page Styles
 * File upload interface with grid layout for media items
 * Related: .upload-buttons, .btn-upload, .upload-section, .image-grid, .image-item
 * JavaScript: handleFileSelect(), addFile(), removeFile(), updateDisplay()
 * Design: Unified design system with yellow accents and card layouts
 */

/* File Format Info */
.file-format-info {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.file-format-info p {
    margin: 0;
    font-size: 12px;
    color: #636e72;
    text-align: center;
    line-height: 1.4;
}

/* Upload Page Header */
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

.upload-count {
    font-weight: 600;
    color: #2d3436;
    font-size: 16px;
    flex: 1;
}

.upload-count .count {
    color: #ffcc02;
}


/* Upload Page Selection Styles */
.image-item.selected {
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.2);
    transform: translateY(-2px);
}

.image-item.selected .image-number {
    background: #ffcc02;
    color: #1d1d1f;
}

/* Upload Page - Force delete button size to match step3-edit */
.upload-header .btn-action-circle {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    background: white;
    color: #e74c3c;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ドラッグ&ドロップ写真並び替え関連スタイル */
.image-item.drag-over {
    border-color: #4caf50 !important;
    background-color: rgba(76, 175, 80, 0.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.2s ease;
}

.image-item.dragging {
    opacity: 0.7;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: none;
    transform: none !important;
    scale: none !important;
}

.image-grid.reorder-mode {
    gap: 12px;
}

.image-grid.reorder-mode .image-item {
    cursor: grab;
    transition: all 0.2s ease;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.image-grid.reorder-mode .image-item:active {
    cursor: grabbing;
}

.reorder-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    pointer-events: none;
}

.upload-header .btn-action-circle svg {
    width: 16px !important;
    height: 16px !important;
    color: #e74c3c;
}

.upload-header .btn-action-circle:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.upload-header .btn-action-circle.delete:disabled {
    background: #f8f9fa;
    color: #bdc3c7;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
}

.upload-header .btn-action-circle.delete:disabled svg {
    color: #bdc3c7 !important;
    stroke: #bdc3c7 !important;
}

/* Fixed Bottom Navigation */
.fixed-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

/* Fixed Bottom Buttons (shared with step3-edit) */
.fixed-bottom .btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.fixed-bottom .btn-secondary {
    background: #e9ecef;
    color: #1d1d1f;
    border: none;
}

.fixed-bottom .btn-secondary:hover {
    background: #dfe4e7;
    transform: translateY(-1px);
}

.fixed-bottom .btn-primary {
    background: #1d1d1f;
    color: #ffcc02;
    box-shadow: 0 4px 12px rgba(29, 29, 31, 0.3);
}

.fixed-bottom .btn-primary:hover {
    background: #333333;
    color: #ffcc02;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

.fixed-bottom .btn-primary:disabled,
.fixed-bottom .btn-primary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* File Input */
.file-input {
    display: none;
}

/* Progress Container (same as step3-edit) */
.progress-container {
    padding: 16px 20px;
    background: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ffcc02;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #636e72;
    white-space: nowrap;
}

/* Step4 Message Page Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    display: block;
}

.form-label .required,
.required {
    color: #e74c3c;
}

.form-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: none;
    min-height: 120px;
    background: white;
}

.form-textarea:focus {
    outline: none;
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.1);
}

.textarea-container {
    position: relative;
}

.char-count {
    font-size: 12px;
    color: #636e72;
    text-align: right;
    margin-top: 4px;
}

.message-examples {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.examples-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.examples-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
}

.examples-shuffle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.examples-shuffle-btn:hover {
    border-color: #ffcc02;
    background: #fff8e1;
    transform: rotate(180deg);
}

.examples-shuffle-btn svg {
    width: 18px;
    height: 18px;
    color: #636e72;
}

.examples-shuffle-btn:hover svg {
    color: #1d1d1f;
}

.example-item {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.example-item:hover {
    background: #fff8e1;
    border-color: #ffcc02;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-text {
    font-size: 14px;
    color: #2d3436;
    line-height: 1.4;
}

.examples-content {
    transition: opacity 0.3s ease;
}

/* Step5 Preview Page Styles */
.preview-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #ffcc02;
}

.edit-button {
    background: none;
    border: 2px solid #ffcc02;
    color: #1d1d1f;
    border-radius: 16px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-button:hover {
    background: #fff8e1;
    border-color: #ffcc02;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffcc02, #ffd633);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #2d3436;
}

.profile-affiliation {
    font-size: 14px;
    color: #636e72;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.media-item {
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .sample-image {
    width: 100%;
    height: 100%;
    /* 画像を切り抜かず(cover)、全体が枠内に収まるように表示する */
    object-fit: contain;
}

.media-item .content-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
}

.media-item .photo-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/></svg>') no-repeat center;
    background-size: contain;
}

.media-item .video-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>') no-repeat center;
    background-size: contain;
}

.media-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.media-photo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.media-video {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.media-count {
    font-size: 14px;
    color: #636e72;
    text-align: center;
}

.message-preview {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px;
    border: 2px solid #e9ecef;
}

.message-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ffcc02;
    font-weight: 600;
}

.message-content {
    font-size: 16px;
    line-height: 1.5;
    color: #2d3436;
}

.notice-card {
    background: #fff8e1;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.notice-icon {
    width: 24px;
    height: 24px;
    background: #ffcc02;
    color: #1d1d1f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 24px;
    min-height: 24px;
}

.notice-icon svg {
    width: 16px;
    height: 16px;
    stroke: #1d1d1f;
    stroke-width: 2;
}

.notice-content {
    flex: 1;
}

.notice-content p {
    font-size: 14px;
    color: #2d3436;
    line-height: 1.5;
    margin: 0;
}

/* iPhone向けのnotice-card改善 */
@media (max-width: 390px) {
    .notice-card {
        padding: 12px;
        gap: 10px;
    }
    
    .notice-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        min-width: 20px;
        min-height: 20px;
    }
    
    .notice-content p {
        font-size: 12px;
        line-height: 1.4;
    }
}

@media (max-width: 350px) {
    .notice-card {
        padding: 10px;
        gap: 8px;
    }
    
    .notice-icon {
        width: 18px;
        height: 18px;
        font-size: 11px;
        min-width: 18px;
        min-height: 18px;
    }
    
    .notice-content p {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Step1 Name Page Styles */
.avatar-upload-section {
    margin-bottom: 32px;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffcc02;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 600;
    overflow: hidden;
    position: relative;
}

.default-avatar-icon {
    width: 40px;
    height: 40px;
    color: #1d1d1f;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
    background: #fff8e1;
    border-color: #ffcc02;
}

.avatar-upload-btn svg {
    width: 16px;
    height: 16px;
    color: #ffcc02;
}

.avatar-note {
    font-size: 12px;
    color: #636e72;
    text-align: center;
    line-height: 1.4;
}

.form-section {
    margin-bottom: 32px;
}

.form-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.1);
}

.preview-card-section {
    margin-bottom: 24px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 12px;
}

.name-preview-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.preview-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffcc02, #ffd633);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.preview-name {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 2px;
}

.preview-affiliation {
    font-size: 14px;
    color: #636e72;
}

/* Complete Page Styles */
.main-content.complete {
    padding: 32px 20px;
    text-align: center;
    background: #f9f9fb;
}

.success-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 32px;
    background: linear-gradient(135deg, #00d4aa, #00c9a7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    animation: bounceSuccess 0.6s ease-out;
    box-shadow: 0 8px 32px rgba(0, 212, 170, 0.3);
    position: relative;
}

@keyframes bounceSuccess {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}


.complete-title {
    font-size: 26px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.complete-subtitle {
    font-size: 16px;
    color: #636e72;
    margin-bottom: 32px;
    line-height: 1.5;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-info-card {
    background: linear-gradient(135deg, #ffcc02, #ffd633);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #1d1d1f;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.event-icon {
    width: 48px;
    height: 48px;
    background: rgba(29, 29, 31, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-icon svg {
    width: 24px;
    height: 24px;
}

.event-details {
    text-align: left;
    flex: 1;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.completion-info {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: #f9f9fb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #636e72;
}

.info-icon svg {
    width: 20px;
    height: 20px;
}

.info-content {
    flex: 1;
    text-align: left;
}

.info-label {
    font-size: 14px;
    color: #636e72;
    margin-bottom: 2px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
}

.next-steps-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.8s ease-out 1s both;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 20px;
    text-align: center;
}

.step-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffcc02;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-label {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 2px;
}

.step-description {
    font-size: 14px;
    color: #636e72;
}

.user-benefits {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: #fff8e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffcc02;
}

.benefit-icon svg {
    width: 20px;
    height: 20px;
}

.benefit-text {
    flex: 1;
}

.benefit-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 2px;
}

.benefit-desc {
    font-size: 14px;
    color: #636e72;
    line-height: 1.4;
}

.registration-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.registration-subtitle {
    font-size: 14px;
    color: #636e72;
    text-align: center;
    margin-bottom: 20px;
}

.email-form {
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #636e72;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.divider span {
    padding: 0 16px;
}

.social-login-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-social-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    font-size: 20px;
    font-weight: bold;
}

.btn-social-circle:hover {
    transform: scale(1.05);
}

.btn-social-circle.x {
    background: #000;
    color: white;
}

.btn-social-circle.facebook {
    background: #1877f2;
    color: white;
}

.btn-social-circle.google {
    background: white;
    color: #4285f4;
    border: 2px solid #e9ecef;
}

.btn-social-circle.line {
    background: #00c300;
    color: white;
}

.btn-social-circle.apple {
    background: #000;
    color: white;
}

.social-label {
    font-size: 12px;
    color: #636e72;
}

.complete-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 1.4s both;
}

.complete-action-buttons .button-horizontal {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.complete-action-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.complete-action-buttons .btn svg {
    width: 18px;
    height: 18px;
}

.footer-actions {
    margin-top: 32px;
    animation: fadeInUp 0.8s ease-out 1.6s both;
}

.btn-text {
    background: none;
    border: none;
    color: #636e72;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.btn-text:hover {
    background: #f1f3f4;
    color: #2d3436;
}

.btn-text svg {
    width: 16px;
    height: 16px;
}

.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #00d4aa;
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.notification-banner.show {
    transform: translateY(0);
}

.notification-banner svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    .main-content.complete {
        padding: 24px 16px;
    }
    
    .success-animation {
        width: 80px;
        height: 80px;
        font-size: 32px;
        margin-bottom: 24px;
    }
    
    .complete-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .complete-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .event-info-card {
        padding: 20px;
        gap: 12px;
    }
    
    .event-icon {
        width: 40px;
        height: 40px;
    }
    
    .event-title {
        font-size: 16px;
    }
    
    .event-subtitle {
        font-size: 12px;
    }
    
    .social-login-container {
        gap: 16px;
    }
    
    .btn-social-circle {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* Outline Button Style */
.btn-outline {
    background: white;
    color: #636e72;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-outline:hover {
    background: #ffcc02;
    border-color: #ffcc02;
    color: #1d1d1f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.2);
}

.btn-outline svg {
    width: 18px;
    height: 18px;
}

/* Button Row Layout */
.button-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.button-row .btn {
    flex: 1;
}

/* Compact Primary Button */
.btn-primary-compact {
    background: #ffcc02;
    color: #1d1d1f;
    border: 2px solid #ffcc02;
    border-radius: 25px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
}

.btn-primary-compact:hover {
    background: #ffd633;
    border-color: #ffd633;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.3);
}

.btn-primary-compact svg {
    width: 18px;
    height: 18px;
}

/* Horizontal Button Layout */
.button-horizontal {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

/* Reset button styles for horizontal layout */
.button-horizontal .btn {
    height: 48px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-sizing: border-box;
    margin: 0;
}

/* Compact Button (for Edit) */
.btn-compact {
    flex: 1;
}

/* Auto-width Button (for Invite) */
.btn-auto {
    flex: 1;
}

/* タッチデバイス対応：粗いポインタ（指）の場合にハンドルサイズを拡大 */
@media (pointer: coarse) {
    .timeline-handle {
        width: 24px;
        height: 32px;
        top: -12px;
    }
}
/* ================================
   Step3 Edit Page Specific Styles
   ================================ */
/* プレビューエリア */
.preview-container {
    background: #1d1d1f;
    border-radius: 20px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.preview-slideshow {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-size: 32px;
}

.preview-slide.active {
    opacity: 1;
}

.preview-slide.photo {
    background: #2d2d2f;
}

.preview-slide.video {
    background: #2d2d2f;
}

.preview-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-dots {
    display: flex;
    gap: 4px;
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.preview-dot.active {
    background: white;
    transform: scale(1.2);
}

.preview-play-btn {
    background: #ffcc02;
    border: none;
    border-radius: 25px;
    color: #1d1d1f;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.3);
}

.preview-play-btn:hover {
    background: #e6b800;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

.edit-hint {
    background: #f8f7ff;
    border: 1px solid #e5e2ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #6c5ce7;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
}

.image-item {
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: scale(1.02);
}

.image-item.selected {
    border-color: #ffcc02;
    box-shadow: 0 0 0 4px rgba(255, 204, 2, 0.3);
    z-index: 10;
}

.image-item.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffcc02, #ffd93d, #ffcc02);
    border-radius: 10px;
    z-index: -1;
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.image-item.selected .image-number {
    background: #ffcc02;
    color: #1d1d1f;
    font-weight: 700;
    animation: numberBounce 0.5s ease-out;
}

@keyframes numberBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.image-item.selected .image-content {
    filter: brightness(1.1) contrast(1.1);
}

.image-item.selected::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4caf50;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    animation: checkmarkPop 0.3s ease-out;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.image-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.image-item.draggable {
    border: 2px dashed #ffc107;
    cursor: grab;
    animation: draggableShake 0.5s ease-in-out;
}

.image-item.draggable:hover {
    border-color: #ffab00;
    transform: scale(1.02);
}

.image-item.draggable:active {
    cursor: grabbing;
}

@keyframes draggableShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.image-number {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffcc02;
    color: #1d1d1f;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 1;
}

.image-content {
    width: 100%;
    height: calc(100% - 30px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    font-size: 16px;
    color: #666;
    text-align: center;
    padding: 4px;
    position: relative;
    overflow: hidden;

    /* contain表示の余白が白飛びしないようグレー背景 */
    background: #d5dade;
}

.sample-image {
    width: 100%;
    height: 100%;
    /* 画像を切り抜かず(cover)、全体が枠内に収まるように表示する */
    object-fit: contain;
    border-radius: 14px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.content-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.photo-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/></svg>') no-repeat center;
    background-size: contain;
}

.video-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231d1d1f" stroke-width="2"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>') no-repeat center;
    background-size: contain;
}

.image-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 10px;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filename-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-duration {
    flex-shrink: 0;
    margin-left: 4px;
    color: #ffcc02;
    font-weight: 600;
}

.image-photo {
    background: white;
}

.image-video {
    background: white;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-action {
    flex: 1;
    background: white;
    color: #1d1d1f;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-action:hover {
    background: #ffcc02;
    border-color: #ffcc02;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.3);
}

.btn-action:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-action.delete {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.btn-action.delete:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.btn-action.delete:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border-color: #e9ecef;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#reorderHintButton {
    position: relative;
}

#reorderHintButton::before {
    content: '☰ ';
    position: relative;
    top: -1px;
}

#reorderHintButton.completed::before {
    content: '';
}

.fixed-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #e9ecef;
    color: #666;
}

.btn:hover {
    transform: translateY(-1px);
}


.file-input {
    display: none;
}

.btn-primary {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.2);
}

.btn-primary:hover {
    background: #2d2d2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.3);
}

.edit-hint {
    background: white;
    border-radius: 16px;
    padding: 16px;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.edit-hint span::first-letter {
    font-weight: 900;
    font-size: 16px;
}

.edit-hint.reorder-mode {
    background: #fff8e1;
    border: 2px solid #ffcc02;
    color: #1d1d1f;
    animation: reorderPulse 2s ease-in-out infinite;
}

@keyframes reorderPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 2, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 204, 2, 0.2);
    }
}

.video-limit-hint {
    background: white;
    border-radius: 16px;
    padding: 16px;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hint-btn {
    background: #ffcc02;
    color: #1d1d1f;
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-btn:hover {
    background: #e6b800;
    transform: translateY(-1px);
}


/* モーダル */

.modal-content {
    width: 100%;
    max-width: 95vw;
    height: 100vh;
    background: #f0f0f2;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


.modal-header-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

.modal-close {
    cursor: pointer;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: white;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px 20px 120px;
    flex: 1;
    overflow-y: hidden;
    background: #f0f0f2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.05);
    z-index: 1001;
}

.modal-subtitle {
    margin-bottom: 24px;
    color: #636e72;
    text-align: center;
    width: 100%;
}

.crop-notice {
    background: white;
    border: 2px solid #ffcc02;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.15);
}

.video-preview-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: calc(100vh - 220px);
    overflow: hidden;
}


#photoPreview {
    aspect-ratio: 4/3; /* iPhone写真の比率 */
    max-width: 300px;
    margin: 0 auto 24px;
}

.video-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}


/* クロップ機能 */
.crop-selector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.crop-frame {
    position: absolute;
    background: transparent;
    border: 3px dashed #fff;
    border-radius: 4px;
    pointer-events: none;
    /* 縦長動画の場合：16:9の枠を中央に配置 */
    top: 50%;
    left: 0;
    width: 100%;
    aspect-ratio: 16/9;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.crop-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffcc02;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(255, 204, 2, 0.4);
    pointer-events: auto;
}

.crop-handle svg {
    width: 20px;
    height: 20px;
}

.photo-edit-controls {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 24px;
}

.photo-edit-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.photo-edit-btn:hover {
    background: #ffcc02;
    color: #1d1d1f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 2, 0.3);
}

.photo-edit-btn:active {
    transform: translateY(0);
}

.photo-edit-btn::after {
    content: attr(data-label);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.btn-icon {
    font-size: 24px;
}

/* 新しい写真編集モーダルのスタイル */
.photo-modal-card {
    background: white;
    border-radius: 20px;
    width: 450px;
    height: 630px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.photo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.photo-modal-content {
    padding: 24px 24px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px);
}

.photo-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.photo-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.4;
}

.photo-preview {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    aspect-ratio: 4/3;
    max-width: 380px !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-modal-footer {
    padding: 24px;
    margin-top: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* トリミングUIのスタイル */
.photo-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.photo-crop-grid {
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    border: 2px solid white;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
}

.crop-line.horizontal {
    left: 0;
    right: 0;
    height: 1px;
}

.crop-line.vertical {
    top: 0;
    bottom: 0;
    width: 1px;
}

.crop-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    background: transparent;
}

.crop-corner.top-left {
    top: calc(10% - 2px);
    left: calc(10% - 2px);
    border-right: none;
    border-bottom: none;
}

.crop-corner.top-right {
    top: calc(10% - 2px);
    right: calc(10% - 2px);
    border-left: none;
    border-bottom: none;
}

.crop-corner.bottom-left {
    bottom: calc(10% - 2px);
    left: calc(10% - 2px);
    border-right: none;
    border-top: none;
}

.crop-corner.bottom-right {
    bottom: calc(10% - 2px);
    right: calc(10% - 2px);
    border-left: none;
    border-top: none;
}

.photo-save-btn {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.3);
}

.photo-save-btn:hover {
    background: #2d2d2f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

/* 動画編集モーダルのスタイル */
.video-modal-card {
    background: #f0f0f2;
    border-radius: 20px;
    width: 450px;
    height: 630px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

.video-modal-content {
    padding: 24px 24px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: calc(100% - 120px);
}

.video-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.video-modal-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.4;
}

.video-modal-footer {
    padding: 24px;
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    background: #f0f0f2;
    height: 80px;
}

.video-save-btn {
    background: #1d1d1f;
    color: #ffcc02;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(29, 29, 31, 0.3);
}

.video-save-btn:hover {
    background: #2d2d2f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 29, 31, 0.4);
}

.crop-handle:hover {
    background: #e6b800;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 204, 2, 0.4);
}

.crop-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}



.edit-controls {
    background: #d1d5db;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.control-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.control-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 16px;
}

.range-slider {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    margin: 16px 0;
}

.range-fill {
    position: absolute;
    height: 100%;
    background: #6c5ce7;
    left: 20%;
    width: 60%;
    border-radius: 4px;
}


.video-timeline {
    margin: 65px 0 20px 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 12px 16px;
    border-radius: 12px;
}

.usage-time-display {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.timeline-labels-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: -16px !important;
    margin-top: 0px !important;
    padding: 0 30px !important;
}

.timeline-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.timeline-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.timeline-label {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-time-input {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: #2d3436;
}

.timeline-time-input:focus {
    outline: none;
    border-color: #ffcc02;
    box-shadow: 0 0 0 3px rgba(255, 204, 2, 0.15);
}


.timeline-track {
    position: relative;
    height: 8px;
    background: #1d1d1f;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.timeline-time-label {
    font-size: 12px;
    color: white;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-background {
    width: 100%;
    height: 100%;
    background: #1d1d1f;
    border-radius: 4px;
}

.timeline-selected {
    position: absolute;
    top: 0;
    height: 100%;
    background: #ffcc02;
    border-radius: 4px;
    left: 0%;
    width: 100%;
}

.timeline-handle {
    position: absolute;
    top: -8px;
    width: 16px;
    height: 24px;
    background: #fff;
    border: 2px solid #ffcc02;
    border-radius: 8px;
    cursor: grab;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(255, 204, 2, 0.3);
}

.timeline-handle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 204, 2, 0.4);
}

.timeline-handle:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.start-handle {
    left: 0%;
    transform: translateX(-50%);
}

.end-handle {
    left: 100%;
    transform: translateX(-50%);
}

.timeline-labels {
    display: none;
}

.timeline-handle-label {
    display: none;
}

.edit-controls {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 80px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    white-space: nowrap;
}






.usage-time-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.usage-time-group label {
    font-size: 11px;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


