:root {
    /* Default (Eyelash) */
    --primary-color: #e8b4b8;
    --primary-dark: #d4999e;
    --secondary-color: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --success-color: #4caf50;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Themes */
.theme-eyelash {
    --primary-color: #e8b4b8;
    --primary-dark: #d4999e;
}

.theme-chiropractic {
    --primary-color: #88c9a1;
    --primary-dark: #6ba882;
}

.theme-hair-removal {
    --primary-color: #89c3eb;
    --primary-dark: #6fa3c7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    background-color: #fafafa;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Header */
.header {
    background: white;
    padding: 24px 20px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(232, 180, 184, 0.2);
}

.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 12px;
}

.salon-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

/* Customer ID Section */
.customer-id-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow);
}

.id-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.customer-id {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

.id-mode-switch {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.id-mode-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.id-mode-label input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: white;
}

.id-input-container {
    margin-top: 10px;
}

.id-input {
    width: 160px;
    padding: 8px;
    font-size: 24px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 2px;
}

.id-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    letter-spacing: normal;
}

.id-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.hidden {
    display: none !important;
}

/* ID Validation Message */
.id-validation-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.id-validation-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.id-validation-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Form */
.form {
    padding: 24px 20px;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
}

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

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 600;
}

/* Input Styles */
input[type="text"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    transition: all 0.3s ease;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 180, 184, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Postal Code Group */
.postal-code-group {
    display: flex;
    gap: 8px;
}

.postal-code-group input {
    flex: 1;
}

.search-address-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.search-address-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.search-address-btn:active {
    transform: translateY(0);
}

.search-address-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

input[readonly] {
    background-color: #f9f9f9;
    cursor: default;
}


/* Checkbox and Radio Styles */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.checkbox-label:hover,
.radio-label:hover {
    background: #efefef;
}

.checkbox-label:has(input:checked),
.radio-label:has(input:checked) {
    background: #fef5f6;
    border-color: var(--primary-color);
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span,
.radio-label span {
    font-size: 15px;
    color: var(--text-dark);
}

/* Submit Section */
.submit-section {
    margin-top: 32px;
    padding-top: 24px;
}

.submit-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    letter-spacing: 1px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.success-content {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    font-size: 36px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.success-content h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.success-content p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.success-id {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 16px 0;
}

.success-id span {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 2px;
}

.success-note {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 480px) {
    .header {
        padding: 20px 16px;
    }

    .logo {
        max-width: 150px;
    }

    .salon-name {
        font-size: 16px;
    }

    .customer-id {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .form {
        padding: 20px 16px;
    }

    .section-title {
        font-size: 16px;
    }
}

/* Landing Page Styles */
.terms-container {
    padding: 24px 20px;
}

.terms-box {
    height: 200px;
    overflow-y: scroll;
    border: 1px solid var(--border-color);
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-dark);
}

.terms-box h3 {
    font-size: 15px;
    margin-bottom: 10px;
    margin-top: 15px;
}

.terms-box h3:first-child {
    margin-top: 0;
}

.agreement-section {
    margin-bottom: 32px;
    padding: 16px;
    background: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    justify-content: center;
}

.service-selection {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px 40px;
}

.service-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.service-btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.service-info p {
    font-size: 13px;
    color: var(--text-light);
}

.service-arrow {
    font-size: 20px;
    color: var(--border-color);
}

.service-btn:hover .service-arrow {
    color: var(--primary-color);
}

/* Theme-specific button accents */
.service-btn[data-theme="eyelash"]:hover {
    border-color: #e8b4b8;
}

.service-btn[data-theme="eyelash"]:hover .service-arrow {
    color: #e8b4b8;
}

.service-btn[data-theme="chiropractic"]:hover {
    border-color: #88c9a1;
}

.service-btn[data-theme="chiropractic"]:hover .service-arrow {
    color: #88c9a1;
}

.service-btn[data-theme="hair-removal"]:hover {
    border-color: #89c3eb;
}

.service-btn[data-theme="hair-removal"]:hover .service-arrow {
    color: #89c3eb;
}

/* Notice Boxes */
.notice-section {
    background: #fffbf5;
}

.notice-box {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.notice-box h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.notice-box p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-light);
}

.notice-highlight {
    background: #fff3cd;
    border-left: 4px solid #f0ad4e;
    padding: 12px;
    margin-bottom: 16px;
}

.notice-highlight p {
    color: #856404;
    margin: 0;
}

/* Form Select */
.form-select {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 180, 184, 0.1);
}