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

:root {
    --primary: #FF6B6B;
    --primary-light: #FFE8E8;
    --secondary: #4ECDC4;
    --dark: #1a1a1a;
    --gray-600: #555;
    --gray-400: #999;
    --gray-200: #e8e8e8;
    --gray-100: #f7f7f7;
    --white: #ffffff;
    --success: #4ECDC4;
    --radius: 16px;
    --radius-sm: 12px;
}

html {
    font-size: 16px;
}

body {
    font-family: "Pretendard Variable", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

body::before {
    width: 300px;
    height: 300px;
    background: var(--primary);
    opacity: 0.08;
    top: -100px;
    left: -100px;
}

body::after {
    width: 400px;
    height: 400px;
    background: var(--primary);
    opacity: 0.08;
    bottom: -150px;
    right: -150px;
}

/* 헤더 */
.header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.header h1 {
    font-size: 1.125rem;
    font-weight: 700;
}

.header h1 span {
    color: var(--primary);
}

.header-info-btn {
    position: absolute;
    right: 16px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-family: inherit;
}

.header-info-btn:active {
    background: var(--gray-200);
}


/* 컨테이너 */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
}

form {
    width: 100%;
}

/* 날짜 입력 */
.date-section {
    margin-bottom: 24px;
}

.date-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary-light);
}

.date-display-text {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.date-display-text strong {
    color: var(--dark);
    font-weight: 600;
}

.date-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

/* 현재 상태 카드 */
.status-card {
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    text-align: center;
    border: 2px solid var(--primary-light);
}

.status-card.active {
    background: linear-gradient(135deg, #FFF0F0 0%, #FFE8E8 100%);
}

.status-card.peaceful {
    background: linear-gradient(135deg, #E8FFF5 0%, #E0F7EF 100%);
}

.status-emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

.status-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.status-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.status-date {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.status-week {
    display: inline-block;
    padding: 6px 16px;
    background: var(--white);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}

.status-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-top: 16px;
    padding: 0 8px;
}

.status-more {
    margin-top: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.status-card.active {
    cursor: pointer;
}

.status-card.active:active {
    transform: scale(0.98);
}

/* 도약기 달력 */
.leap-calendar {
    background: var(--white);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
}

.calendar-header {
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.calendar-dates {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.calendar-date {
    text-align: center;
    min-width: 60px;
}

.calendar-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--gray-400);
    margin-bottom: 2px;
}

.calendar-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--dark);
}

.calendar-progress {
    flex: 1;
    text-align: center;
}

.progress-bar {
    position: relative;
    height: 8px;
    background: var(--gray-200);
    border-radius: 100px;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 100px;
}

.progress-today {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid var(--white);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.progress-text {
    display: block;
    font-size: 0.6875rem;
    color: var(--primary);
    margin-top: 6px;
}

.calendar-peak {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.calendar-peak strong {
    color: var(--primary);
}

/* 모달 내 달력 */
.modal-calendar {
    margin: 16px 0 24px;
    border: none;
    background: var(--gray-100);
    border: 2px solid var(--primary-light);
}

/* 원더윅스란? 모달 콘텐츠 */
.info-content {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.info-content p {
    margin-bottom: 16px;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 20px 0 10px;
}

.info-content ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.info-content li {
    margin-bottom: 8px;
}

.info-content strong {
    color: var(--dark);
}

.info-note {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

/* 다음 도약기 */
.next-leap {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    cursor: pointer;
    border: 2px solid var(--primary-light);
}

.next-leap-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.next-leap-text strong {
    color: var(--dark);
}

.next-leap-date {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.next-leap-days {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.next-leap-days span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray-400);
}

/* 타임라인 */
.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    /*border: 2px solid transparent;*/
    border: 2px solid var(--primary-light);
}

.timeline-item:active {
    transform: scale(0.98);
}

.timeline-item.completed {
    opacity: 0.5;
}

.timeline-item.current {
    background: var(--primary-light);
    border-color: var(--primary);
}

.timeline-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--gray-600);
    flex-shrink: 0;
}

.timeline-item.completed .timeline-num {
    background: var(--success);
    color: var(--white);
}

.timeline-item.current .timeline-num {
    background: var(--primary);
    color: var(--white);
}

.timeline-info {
    flex: 1;
    min-width: 0;
}

.timeline-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--dark);
}

.timeline-item.completed .timeline-name {
    color: var(--gray-600);
}

.timeline-week {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.timeline-arrow {
    color: var(--gray-400);
    font-size: 1rem;
}

/* 빈 상태 */
.empty-section {
    text-align: center;
    padding: 60px 20px;
}

.empty-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 24px;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.form-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 56px;
    padding: 16px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    text-align: center;
    color: var(--dark);
    background: var(--white);
}

.form-input::-webkit-date-and-time-value {
    text-align: center;
    color: var(--dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-400);
    margin-top: 8px;
}

/* 푸터 */
.footer {
    text-align: center;
    padding: 32px 20px;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* 모달 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 101;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
}

.modal-backdrop.open + .modal-sheet,
.modal-sheet.open {
    transform: translateY(0);
}

.modal-handle {
    display: none;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

.modal-close:active {
    background: var(--gray-200);
}

.modal-close svg {
    display: block;
}

/* 도약기 상세 모달 */
.leap-detail-header {
    text-align: center;
    margin-bottom: 24px;
}

.leap-detail-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.leap-detail-num.completed {
    background: var(--success);
}

.leap-detail-num.upcoming {
    background: var(--gray-200);
    color: var(--gray-600);
}

.leap-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.leap-detail-theme {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.leap-detail-week {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 12px;
}

.leap-detail-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.leap-date-label {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.leap-date-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.leap-detail-desc {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
    padding: 0 8px;
}

.leap-section {
    margin-bottom: 20px;
}

.leap-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.leap-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.leap-tag {
    padding: 8px 14px;
    background: var(--gray-100);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--dark);
}

.leap-tag.skill {
    background: #E8FFF5;
    color: #00A67E;
}

.leap-tag.symptom {
    background: #FFF5E8;
    color: #E8850A;
}

/* 추천 상품 섹션 */
.product-section {
    margin: 24px 0;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 2px solid var(--primary-light);
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--gray-100);
    overflow: hidden;
}

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

.rocket-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: #00a0e0;
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 0.8125rem;
    color: var(--dark);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-price-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.product-original-price {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-discount {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.product-disclaimer {
    margin-top: 16px;
    font-size: 0.6875rem;
    color: var(--gray-400);
    /*text-align: center;*/
    line-height: 1.4;
}

/* 반응형 */
@media (min-width: 768px) {
    .container {
        padding: 32px;
    }

    .modal-sheet {
        position: fixed;
        max-width: 500px;
        width: calc(100% - 40px);
        inset: auto;
        left: 50%;
        top: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        border-radius: 24px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        padding-bottom: 24px;
    }

    .modal-backdrop.open + .modal-sheet,
    .modal-sheet.open {
        transform: translate(-50%, -50%);
        opacity: 1;
        visibility: visible;
    }

    .modal-handle {
        display: none;
    }

    .hide-mobile {
        display: block;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
}

/* 모달 내 상품 섹션 */
.modal-product-section {
    margin-top: 24px;
}

.modal-product-section .product-grid {
    margin-top: 12px;
}

.modal-product-section .product-card {
    background: var(--gray-100);
}

.modal-product-section .product-disclaimer {
    margin-top: 12px;
}
