/* ===========================
   Partner Application Page
   =========================== */

/* Page hero */
.partner-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    text-align: center;
    padding: 120px 24px 60px;
}
.partner-hero h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    margin-bottom: 12px;
}
.partner-hero p {
    font-size: 16px;
    opacity: 0.9;
}

/* Application section */
.partner-app-section {
    padding: 48px 24px 120px;
    background: var(--bg-light);
    min-height: 60vh;
}
.partner-app-inner {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
}

/* Progress bar */
.progress-bar {
    margin-bottom: 32px;
}
.progress-bar-track {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.progress-bar-segment {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #E0E0E0;
    transition: background 0.3s;
}
.progress-bar-segment.active {
    background: var(--primary);
}
.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-sub);
}
.progress-bar-info .step-label {
    font-weight: 700;
    color: var(--primary-dark);
}

/* Form steps */
.form-step {
    display: none;
}
.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step header */
.step-header {
    margin-bottom: 24px;
}
.step-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}
.step-header p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* Benefits box */
.benefits-box {
    background: rgba(240, 168, 72, 0.08);
    border: 1px solid rgba(240, 168, 72, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
}
.benefits-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
}
.benefits-list li .icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #c87830);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.benefits-list li .icon svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Form fields */
.form-field {
    margin-bottom: 20px;
}
.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.form-field label .required {
    color: #E53935;
    font-size: 12px;
    margin-left: 4px;
}
.form-field label .optional {
    color: var(--text-light);
    font-size: 12px;
    margin-left: 4px;
    font-weight: 400;
}
.form-field .helper-text {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fff;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240, 168, 72, 0.15);
}
.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Category selector (segmented control) */
.category-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}
.category-option {
    position: relative;
}
.category-option input[type="radio"] {
    display: none;
}
.category-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    transition: all 0.2s;
    text-align: center;
    background: #fff;
}
.category-option input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: rgba(240, 168, 72, 0.08);
    color: var(--primary-dark);
    font-weight: 700;
}
.category-option label:hover {
    border-color: var(--primary-light);
}

/* Mountain selector */
.mountain-selector-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    color: var(--text-light);
    transition: border-color 0.2s;
}
.mountain-selector-btn.has-selection {
    color: var(--text-main);
}
.mountain-selector-btn:hover {
    border-color: var(--primary);
}
.mountain-selector-btn .chevron {
    font-size: 12px;
    color: var(--text-light);
}

/* Selected mountain tags */
.mountain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.mountain-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(240, 168, 72, 0.15);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.mountain-tag .remove-tag {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
    background: none;
    border: none;
    color: var(--primary-dark);
    padding: 0 0 0 2px;
}
.mountain-tag .remove-tag:hover {
    opacity: 1;
}

/* Image upload areas */
.image-upload-area {
    border: 2px dashed var(--primary-light);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(240, 168, 72, 0.03);
    margin-bottom: 8px;
}
.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(240, 168, 72, 0.06);
}
.image-upload-area.uploaded {
    border-style: solid;
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.03);
    padding: 8px;
}
.image-upload-area .upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
    color: var(--primary);
}
.image-upload-area .upload-text {
    font-size: 14px;
    color: var(--text-sub);
}
.image-upload-area .preview-img {
    max-height: 200px;
    max-width: 100%;
    border-radius: 8px;
    object-fit: contain;
}

/* Shop photos grid */
.shop-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.shop-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #4CAF50;
}
.shop-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.shop-photo-item .main-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.shop-photo-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.shop-photo-add {
    aspect-ratio: 1;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    gap: 4px;
    font-size: 13px;
    color: var(--text-sub);
}
.shop-photo-add:hover {
    border-color: var(--primary);
}
.shop-photo-add .add-icon {
    font-size: 24px;
    color: var(--primary);
}
.photo-counter {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
    text-align: right;
}

/* Notice box */
.notice-box {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}
.notice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-sub);
    padding: 4px 0;
}
.notice-item .notice-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Confirmation section (Step 4) */
.confirmation-box {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}
.confirmation-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.confirmation-row {
    display: flex;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.confirmation-row:last-child {
    border-bottom: none;
}
.confirmation-row .conf-label {
    width: 140px;
    flex-shrink: 0;
    color: var(--text-sub);
    font-weight: 500;
}
.confirmation-row .conf-value {
    color: var(--text-main);
    word-break: break-all;
}
.confirmation-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Terms agreement */
.terms-agreement {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
    cursor: pointer;
}
.terms-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 14px;
    color: #fff;
}
.terms-agreement.checked .terms-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}
.terms-agreement .terms-text {
    font-size: 14px;
    color: var(--text-main);
}
.terms-link {
    color: var(--primary-dark);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}
.terms-link:hover {
    color: var(--primary);
}
.submit-note {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Navigation buttons */
.form-nav {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.btn-back {
    flex: 1;
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: #fff;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-back:hover {
    background: var(--bg-light);
}
.btn-next,
.btn-submit {
    flex: 2;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-next:hover,
.btn-submit:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(240, 168, 72, 0.3);
}
.btn-next:disabled,
.btn-submit:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-submit {
    flex: 2;
}

/* Mountain modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-sub);
    padding: 4px;
}
.modal-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    box-sizing: border-box;
}
.modal-search input:focus {
    outline: none;
    border-color: var(--primary);
}
.modal-tags {
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 80px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
}
.modal-tags:empty {
    display: none;
    padding: 0;
    border: none;
}
.modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.prefecture-group h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    padding: 10px 20px 6px;
    background: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 1;
}
.mountain-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.mountain-item:hover {
    background: rgba(240, 168, 72, 0.06);
}
.mountain-item.selected {
    background: rgba(240, 168, 72, 0.1);
}
.mountain-item .mt-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    transition: all 0.2s;
}
.mountain-item.selected .mt-check {
    background: var(--primary);
    border-color: var(--primary);
}
.mountain-item .mt-name {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}
.mountain-item .mt-elevation {
    font-size: 13px;
    color: var(--text-sub);
    margin-left: auto;
}
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-footer .selection-count {
    font-size: 13px;
    color: var(--text-sub);
}
.modal-done-btn {
    padding: 10px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-done-btn:hover {
    background: var(--primary-dark);
}

/* Terms modal */
.terms-modal-content {
    max-width: 640px;
    max-height: 80vh;
}
.terms-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
}
.terms-modal-body h3 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 8px;
}

/* Success message */
.success-message {
    text-align: center;
    padding: 48px 24px;
}
.success-message .success-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}
.success-message h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}
.success-message p {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 8px;
}
.success-message .btn-home {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
}
.success-message .btn-home:hover {
    background: var(--primary-dark);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .partner-app-inner {
        padding: 24px 16px;
        border-radius: 0;
        box-shadow: none;
    }
    .partner-app-section {
        padding: 24px 0 100px;
    }
    .category-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .confirmation-row {
        flex-direction: column;
        gap: 2px;
    }
    .confirmation-row .conf-label {
        width: auto;
        font-size: 12px;
    }
    .modal-content {
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }
    .modal-overlay {
        padding: 0;
    }
}
@media (max-width: 480px) {
    .partner-hero {
        padding: 100px 16px 40px;
    }
    .shop-photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-nav {
        flex-direction: column-reverse;
    }
    .btn-back, .btn-next, .btn-submit {
        flex: none;
        width: 100%;
    }
}
