/* CSS Variables for customization */
:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97bc62;
    --accent-color: #ff6b35;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

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

html {
    overflow-y: visible;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
    /* height 제거 - 스크롤 차단 원인! */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #e8f5e9 100%);
    background-attachment: scroll;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    /* overflow 제거 - 기본값 사용 */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: visible;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 30px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
    margin-bottom: 30px;
}

/* Header Action - Status Check Button */
.header-action {
    margin-top: 30px;
}

.btn-status-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 20px 30px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.btn-status-check:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    background: var(--white);
}

.btn-status-check > i:first-child {
    font-size: 2.5rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

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

.btn-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.btn-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.btn-status-check > i:last-child {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-status-check:hover > i:last-child {
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    padding: 40px 30px;
}

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Notice Section */
/* A/S Duration Section */
.duration-section {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease;
}

.duration-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    max-width: 400px;
    margin: 0 auto;
}

.duration-title {
    background: linear-gradient(135deg, #1976d2, #2196f3);
    color: white;
    padding: 8px 12px;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.duration-title i {
    font-size: 1.2rem;
}

.duration-date {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 5px;
}

.duration-content {
    padding: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.duration-item {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.duration-item.sewing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.duration-item.pole {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.duration-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.duration-label i {
    font-size: 1rem;
    margin-right: 3px;
}

.duration-info {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.duration-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 3px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 5px;
}

.duration-value {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    line-height: 1;
}

.duration-unit {
    font-size: 1.5rem;
    font-weight: 600;
}

.duration-divider {
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #2196f3, transparent);
}

.duration-notice {
    padding: 15px 25px;
    background: rgba(33, 150, 243, 0.1);
    border-top: 2px solid #2196f3;
    color: #1976d2;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.duration-notice i {
    font-size: 1.1rem;
}

/* Notice Section */
.notice-section {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.notice-card {
    background: #fff3e0;
    border: 3px solid #ff9800;
    border-radius: 15px;
    overflow: visible; /* Android 스크롤 호환성 */
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

.notice-title {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 20px 25px;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notice-title i {
    font-size: 1.5rem;
}

.notice-content {
    padding: 25px;
    background: white;
    color: #333;
    font-size: 1rem;
    line-height: 1.8;
    min-height: 100px;
    max-height: 400px; /* 최대 높이 제한 */
    overflow-y: auto; /* 내부 스크롤 */
    -webkit-overflow-scrolling: touch;
}

.notice-content:empty::before {
    content: "주의사항이 설정되지 않았습니다.";
    color: #999;
    font-style: italic;
}

/* Rich text content styling */
.notice-content h1,
.notice-content h2,
.notice-content h3 {
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 10px;
}

.notice-content h1 { font-size: 1.5rem; }
.notice-content h2 { font-size: 1.3rem; }
.notice-content h3 { font-size: 1.1rem; }

.notice-content p {
    margin-bottom: 10px;
}

.notice-content ul,
.notice-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.notice-content strong {
    color: var(--accent-color);
    font-weight: 700;
}

.notice-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.notice-agreement {
    padding: 20px 25px;
    background: #fff8e1;
    border-top: 2px solid #ffb74d;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.notice-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #e65100;
}

/* Form Styles */
.as-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: opacity 0.3s ease;
}

.form-disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.5);
}

/* 주소 검색 버튼은 form-disabled 상태에서도 클릭 가능 (아이폰 대응) */
.form-disabled .btn-address {
    pointer-events: auto !important;
    opacity: 1 !important;
    filter: none !important;
    cursor: pointer !important;
}

/* Form Category */
.form-category {
    background: #fafafa;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-category:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.1);
}

.category-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 15px 20px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--white);
}

/* Info Notice */
.info-notice {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.info-notice i {
    color: #2196f3;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-notice p {
    margin: 0;
    color: #1565c0;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Address Input Group */
.address-input-group {
    display: flex;
    gap: 10px;
}

.address-input-group input {
    flex: 1;
}

.btn-address {
    padding: 12px 20px;
    background: var(--accent-color);
    color: var(--white);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-address:hover {
    background: #e55a25;
}

/* Photo Upload */
.photo-hint {
    color: #999;
    font-weight: 400;
    font-size: 0.9rem;
}

.photo-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
}

.photo-upload-area:hover {
    border-color: var(--primary-color);
    background: #f5fef5;
}

.btn-upload {
    padding: 12px 30px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-upload:hover {
    background: #7da84c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.upload-hint {
    margin-top: 10px;
    color: #666;
    font-size: 0.85rem;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    aspect-ratio: 1;
    background: #f5f5f5;
    /* 성능 최적화 */
    contain: layout style paint;
    will-change: auto;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 이미지 렌더링 최적화 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* 지연 로딩 속성 */
    content-visibility: auto;
}

.photo-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--error-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.photo-remove:hover {
    background: #c62828;
    transform: scale(1.1);
}

/* Photo Loading Indicator */
.photo-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 2px dashed #2196f3;
    border-radius: 10px;
    color: #1976d2;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.photo-loading i {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.success-message.hidden {
    display: none;
}

.success-content {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

.success-content i {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.success-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.success-content p {
    color: #666;
    margin-bottom: 10px;
}

.request-id {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.95rem;
}

.request-id strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.success-content .btn {
    margin-top: 10px;
    padding: 10px 24px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
}

.success-content .btn i {
    font-size: 1rem;
    margin: 0;
}

/* Error Message Modal */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.error-message.hidden {
    display: none;
}

.error-content {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.error-content i.fa-exclamation-triangle {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.error-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.error-detail {
    background: #fff5f5;
    border: 2px solid #ffdddd;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.error-title {
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 10px;
    font-size: 1rem;
}

.error-description {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
    margin: 0;
    word-break: break-word;
}

.error-detail-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0 0 0;
    text-align: left;
}

.error-detail-title {
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-detail-title i {
    color: #2196F3;
}

.error-detail-content {
    color: #555;
    line-height: 1.8;
    font-size: 0.85rem;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #2196F3;
    word-break: break-word;
}

.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.error-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.error-help {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.error-help p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.error-help i {
    color: #2196f3;
    font-size: 1rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Footer */
.footer {
    background: #f8f8f8;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Version Info */
.version-info {
    color: #999 !important;
    font-size: 0.75rem !important;
    margin-top: 8px !important;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.version-info:hover {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        /* 기본값 사용 - 아무것도 설정하지 않음 */
    }
    
    body {
        padding: 10px;
        min-height: 100vh;
        /* 기본값 사용 - overflow, position 설정 안 함 */
    }
    
    /* 모달이 열릴 때 body 스크롤 방지 */
    body.modal-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100%;
        height: 100vh;
        touch-action: none !important;
    }

    .container {
        border-radius: 15px;
        overflow: visible;
        min-height: auto;
        position: relative;
        /* z-index 제거 - 터치 차단 방지 */
    }
    
    /* 모바일에서 애니메이션 간소화 */
    .duration-section,
    .notice-section,
    .as-form {
        animation: none;
    }
    
    /* 모바일 스크롤 최적화 */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Android Chrome 스크롤 보장 */
    .main-content {
        overflow: visible;
        position: relative;
    }
    
    /* GPU 가속 및 transform 제거 - Android 터치 이슈 방지 */

    .header {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .btn-status-check {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }

    .btn-status-check > i:first-child {
        font-size: 2rem;
    }

    .btn-content {
        text-align: center;
    }

    .btn-title {
        font-size: 1.1rem;
    }

    .btn-subtitle {
        font-size: 0.85rem;
    }

    .btn-status-check > i:last-child {
        display: none;
    }

    .duration-content {
        flex-direction: column;
        gap: 25px;
        padding: 25px 20px;
    }

    .duration-item {
        width: 100%;
        min-width: auto;
    }

    .duration-divider {
        width: 80%;
        height: 2px;
        background: linear-gradient(to right, transparent, #2196f3, transparent);
    }

    .duration-value {
        font-size: 2rem;
    }

    .duration-unit {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 30px 20px;
    }

    .notice-title {
        font-size: 1.1rem;
        padding: 15px 20px;
    }

    .notice-content {
        padding: 20px;
        font-size: 0.95rem;
        max-height: 300px; /* 모바일에서 더 작게 */
    }
    
    /* 주소 검색 버튼 모바일 최적화 */
    .address-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-input-group input {
        width: 100%;
    }
    
    .btn-address {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .checkbox-text {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .success-content {
        margin: 20px;
        padding: 30px 20px;
    }

    .category-title {
        font-size: 1rem;
        padding: 12px 15px;
    }

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

    .photo-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .info-notice {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .info-notice i {
        font-size: 1rem;
    }

    .info-notice p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ==================== 주소 검색 레이어 (v7.9.43 모바일 최적화) ==================== */

/* 레이어 배경 오버레이 (v7.9.46 iframe 환경 최적화) */
.address-layer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    /* iframe 환경: 터치 이벤트 차단 */
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

/* 레이어 컨테이너 (v7.9.47 iframe 환경 + 스크롤 위치 개선) */
.address-layer-container {
    position: fixed; /* absolute → fixed: 뷰포트 기준 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: 85vh;
    max-height: 700px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* iframe 환경 최적화 */
    isolation: isolate;
    /* Android: 터치 이벤트 허용 (내부에서만) */
    touch-action: pan-y pinch-zoom;
}

/* 레이어 헤더 */
.address-layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-color);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.address-layer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 닫기 버튼 */
.address-layer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 1.2rem;
}

.address-layer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.address-layer-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Daum Postcode 임베드 영역 (v7.9.49 모바일 검색창 위치 해결) */
.address-embed {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    /* 모바일: 추가 설정 */
    display: flex;
    flex-direction: column;
}

/* Daum API iframe - 모든 환경에서 스크롤 가능하도록 */
.address-embed > * {
    width: 100% !important;
    height: 100% !important;
}

.address-embed iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    /* iframe이 스크롤 담당 */
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    /* Android iframe 환경: 강제 스크롤 활성화 */
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
}

/* 모바일 최적화 (v7.9.49 iframe 환경 완전 해결) */
@media (max-width: 768px) {
    /* iframe 환경: 레이어 배경도 absolute */
    .address-layer {
        position: absolute;
    }
    
    .address-layer-container {
        position: absolute; /* fixed → absolute (iframe 환경) */
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    /* 헤더 고정 */
    .address-layer-header {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* 검색 영역: 헤더 제외 나머지 공간 */
    .address-embed {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .address-layer-header {
        padding: 14px 16px;
    }
    
    .address-layer-header h3 {
        font-size: 1.1rem;
    }
    
    .address-layer-close {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

/* 작은 모바일 화면 (v7.9.45 안드로이드 스크롤 재설계) */
@media (max-width: 480px) {
    .address-layer-container {
        width: 100%;
        height: 100vh; /* 전체 화면 */
        height: 100dvh; /* 동적 뷰포트 높이 */
        max-height: none;
        border-radius: 0; /* 모서리 제거 */
        top: 0;
        left: 0;
        transform: none;
    }
    
    .address-layer-header {
        padding: 12px 16px;
        flex-shrink: 0; /* 헤더 크기 고정 */
    }
    
    .address-layer-header h3 {
        font-size: 1rem;
    }
    
    /* 안드로이드: embed 영역 명확한 높이 계산 */
    .address-embed {
        flex: 1 1 auto;
        min-height: 0;
        max-height: calc(100vh - 48px); /* 전체 - 헤더 */
        max-height: calc(100dvh - 48px);
        overflow: visible !important;
    }
}
