/* ==========================================================================
   1. Base & Global Styles
   ========================================================================== */
body {
    font-family: "맑은 고딕", Arial, sans-serif;
    margin: 20px;
    background: #f5f7fb;
    color: #333;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    margin-bottom: 15px;
}

canvas {
    max-width: 100%;
}

/* ==========================================================================
   2. Layout & Navigation (3번 개선 반영)
   ========================================================================== */
nav {
    text-align: center;
    margin-bottom: 20px;
}

nav a {
    display: inline-block;
    padding: 10px 18px;
    margin: 4px;
    background: #ffffff;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    background: #e7efff;
    color: #1a73e8;
    box-shadow: 0 3px 8px rgba(26, 115, 232, .15);
    transform: translateY(-1px);
}

.section {
    background: #fff;
    padding: 20px 20px 20px 20px;  /* ← [상, 우, 하, 좌] 순서대로 지정 (하단만 12px로 축소) */
    margin-bottom: 16px;          /* ← 카드와 카드 사이 간격도 약간 줄이고 싶다면 15px로 조절 */
    border-radius: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .1);
}
/* ==========================================================================
   3. Start Screen & Profile & Menu Cards
   ========================================================================== */
.title-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.input-link {
    background: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    font-size: 16px;
}

/* PC에서는 링크 클릭 불가 */
.rainbow-link {
    text-decoration: none;
    pointer-events: none;
}

.profile-photo-link {
    display: block;
    width: fit-content;
    margin: 0 auto;
    pointer-events: none;
}

.profile-photo {
    width: 130px;
    height: 130px;
    margin: 20px auto 25px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px auto;
}

.menu-card {
    width: 220px;
    height: 160px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 26px;
    font-weight: bold;
    line-height: 1.5;
}

.menu-card:hover {
    transform: translateY(-5px);
    transition: .2s;
}

/* ==========================================================================
   4. Form & Inputs
   ========================================================================== */
input {
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

button {
    padding: 12px 8px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #e7efff;
}

button:hover {
    opacity: .8;
}

.selected {
    background: #9fc5ff;
}

/* 행동 상태 버튼 */
.behavior-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.behavior-btn {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
}

.behavior-btn.selected {
    background: #9fc5ff;
}

.save {
    width: 100%;
    background: #d8f5d8;
    font-size: 18px;
}

/* ==========================================================================
   5. Calendar (4번, 5번 개선 반영 / 1, 2번 구조 보존)
   ========================================================================== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 5px;
}

.calendar-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #1a202c;
}

.calendar-header button {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    color: #4a5568;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    transition: all 0.2s ease;
}

.calendar-header button:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
    opacity: 1;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.day-name {
    text-align: center;
    font-weight: bold;
    padding: 8px;
}

/* 기존 유지 (1번, 2번 건드리지 않음) */
.calendar-day {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    min-height: 150px;
    padding: 8px;
    font-size: 11px;
    line-height: 1.4;
    overflow: hidden;
    word-break: break-word;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* 휴강 날짜 강조 스타일 (4번 반영) */
.calendar-day.holiday {
    background-color: #fff5f5;
    border-color: #feb2b2;
}

.calendar-day strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.calendar-day div {
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 1. 오전 영역 (이모지 아래 내어쓰기) */
.calendar-day div:first-of-type {
    height: 32px; /* 오전 3줄 */
    white-space: pre-line;
    overflow: hidden;

    padding-left: 1.4em;
    text-indent: -1.4em;
}

/* 2. 점심 영역 (내용이 있을 때만 음영 적용) */
.calendar-day div:nth-of-type(2):not(:empty) {
    background-color: #fff8f0;
    margin-left: -8px;
    margin-right: -8px;
    padding: 2px 8px;
    font-size: 10.5px;
    text-indent: 0;
    border-radius: 0;
}

/* 3. 오후 영역 (이모지 아래 내어쓰기) */
.calendar-day div:nth-of-type(3) {
    height: 32px; /* 오후 3줄 */
    white-space: pre-line;
    overflow: hidden;

    padding-left: 1.4em;
    text-indent: -1.4em;
}

/* 4. 런닝 영역 (내용이 있을 때만 음영 적용) */
.calendar-day div:nth-of-type(4):not(:empty) {
    background-color: #f0f7ff;
    margin-left: -8px;
    margin-right: -8px;
    padding: 2px 8px;
    font-weight: 600;
    color: #1e40af;
    text-indent: 0;
    border-radius: 0;
}



.sunday strong {
    color: red;
}

.saturday strong {
    color: blue;
}

.holiday-text {
    color: #e53e3e;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
}

/* ==========================================================================
   6. Board & Tables
   ========================================================================== */
.table-wrap {
    width: 100%;
    overflow: hidden;
}

.difficult-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    background: #fff;
}

.difficult-table th {
    background: #f1f3f8;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.difficult-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.difficult-table tr:hover {
    background: #f8faff;
}

.difficult-table th:nth-child(2),
.difficult-table td:nth-child(2) {
    width: 35px;
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.difficult-content {
    cursor: pointer;
    text-align: left !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.difficult-content:hover {
    text-decoration: underline;
}

.level-warning {
    color: #d99b00;
    font-weight: bold;
}

.level-hard {
    color: red;
    font-weight: bold;
}

.edit-btn {
    background: #e7efff;
    padding: 8px 14px;
    font-size: 14px;
}

.delete-btn {
    background: #ffe5e5;
    padding: 8px 14px;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: #4caf50;
    color: white;
}

.pagination button:hover {
    background: #43a047;
}

.pagination button:disabled {
    background: #ccc;
    cursor: default;
}

#pageInfo {
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

/* ==========================================================================
   7. Information, Detail & View Tabs
   ========================================================================== */
.small-info {
    padding: 5px 10px;
}

.small-info h2 {
    margin: 0 0 3px 0;
    font-size: 16px;
}

.small-info p {
    margin: 0;
    font-size: 15px;
}

.content-box {
    min-height: 300px;
}

.content-box p {
    line-height: 1.7;
    white-space: pre-wrap;
}

.plan-box {
    max-width: 700px;
    margin: 20px auto;
    padding: 10px;
}

.plan-image {
    width: 100%;
    border-radius: 12px;
    display: block;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 체중 월간 / 연간 탭 */
.view-tabs {
    display: flex;
    justify-content: center;
    margin: 15px auto 20px;
}

.view-tab {
    width: 110px;
    height: 42px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.view-tab:first-child {
    border-radius: 9px 0 0 9px;
}

.view-tab:last-child {
    border-radius: 0 9px 9px 0;
}

.view-tab.active {
    background: #f1f1f1;
    border-color: #bbb;
    font-weight: bold;
}

.view-tab:active {
    transform: scale(0.97);
}

/* ==========================================================================
   8. Reports & Summary Components
   ========================================================================== */
.report-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-title h2 {
    margin: 0;
}

.report-link {
    display: inline-block;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .15);
    transition: 0.2s;
}

.report-link:hover {
    transform: translateY(-2px);
    opacity: .85;
}

.running-link {
    background: #cfefff;
}

.behavior-link {
    background: #d8f5d8;
}

.weight-link {
    background: #fff3cd;
}

.weight-link:hover {
    background: #ffe69c;
}

/* 월간 리포트 미니 달력 */
.behavior-summary {
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 18px;
}

.mini-calendar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.mini-header {
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 14px;
}

.mini-day {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin: 0 auto;
    background: #eee;
}

.mini-good {
    background: #4caf50;
}

.mini-normal {
    background: #ffc107;
}

.mini-hard {
    background: #f44336;
}

.mini-empty {
    background: transparent;
}

/* ==========================================================================
   9. Input Page PC Optimization
   ========================================================================== */
.input-page {
    max-width: 750px;
    margin: 0 auto;
}

.input-page .section {
    padding: 25px;
}

.input-page input {
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    font-size: 18px;
}

.input-page textarea {
    width: 100%;
    height: 70px;
    box-sizing: border-box;
    padding: 15px;
    font-size: 17px;
    line-height: 1.6;
    border-radius: 10px;
    border: 1px solid #ccc;
    resize: none;
}

.input-page h1 {
    margin-top: 20px;
}

.input-page .behavior-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
}

.input-page .behavior-btn {
    flex: 1;
    height: 55px;
    font-size: 18px;
    min-width: 0;
}

.input-page .save {
    height: 60px;
    font-size: 22px;
    font-weight: bold;
}

.record-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.record-row input[type="date"] {
    flex: 1;
    min-width: 0;
    font-size: 20px;
}

.record-row select {
    flex: 1;
    height: 45px;
    font-size: 18px;
}

.record-row .save {
    flex: 0.7;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.difficult-link {
    display: block;
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* ==========================================================================
   10. Media Queries (Responsive Design for Mobile)
   ========================================================================== */
@media (max-width: 600px) {
    body {
        margin: 10px;
    }

    h1 {
        font-size: 24px;
    }

    nav a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .input-link {
        display: none;
    }

    /* 스마트폰에서만 링크 클릭 가능 */
    .rainbow-link,
    .profile-photo-link {
        pointer-events: auto;
    }

    .menu-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .menu-card {
        width: 75%;
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: bold;
        padding: 0 20px;
        margin: 0 auto;
    }

    .section {
        padding: 15px;
        border-radius: 12px;
    }

    .calendar-header h2 {
        font-size: 18px;
    }

    #calendar {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }

    .calendar-day {
        min-height: 120px;
        font-size: 9px;
        padding: 4px;
    }

    .calendar-day strong {
        font-size: 12px;
    }

    .calendar-day div {
        margin-bottom: 2px;
    }

    .calendar-day div:first-of-type {
        height: 35px; /* 오전 2줄 */
        white-space: pre-line;
        overflow: hidden;
    }

    .calendar-day div:nth-of-type(3) {
        height: 35px; /* 오후 2줄 */
        white-space: pre-line;
        overflow: hidden;
    }

    /* Mobile Table */
    .difficult-table {
        width: 100%;
        table-layout: fixed;
        font-size: 13px;
    }

    .difficult-table th,
    .difficult-table td {
        padding: 6px 2px;
        text-align: center;
    }

    .difficult-table th:nth-child(1),
    .difficult-table td:nth-child(1) {
        width: 65px;
        white-space: nowrap;
        text-align: left;
        font-size: 12px;
    }

    .difficult-table th:nth-child(1) {
        text-align: center;
    }

    .difficult-table th:nth-child(2),
    .difficult-table td:nth-child(2) {
        width: 30px;
        padding: 0;
        text-align: center;
        vertical-align: middle;
    }

    .difficult-table th:nth-child(3),
    .difficult-table td:nth-child(3) {
        width: auto;
    }

    .difficult-table th:nth-child(4) {
        width: 90px;
        white-space: nowrap;
        text-align: center;
    }

    .difficult-table td:nth-child(4) {
        width: 90px;
        white-space: nowrap;
        text-align: right;
    }

    .difficult-content {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .difficult-table button {
        font-size: 13px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .edit-btn,
    .delete-btn {
        padding: 6px 8px;
        font-size: 11px;
    }

    .behavior-buttons {
        display: flex;
        gap: 10px;
    }

    .behavior-btn {
        flex: 1;
        height: 60px;
        font-size: 18px;
    }

    .record-row {
        gap: 5px;
    }

    .record-row input[type="date"] {
        flex: none;
        width: 145px;
        font-size: 17px;
    }

    .record-row select {
        width: 88px;
        font-size: 15px;
    }

    .record-row .save {
        width: 88px;
        font-size: 15px;
    }
}

/* 모바일 브라우저의 임의 글자 확대 방지 */
html, body {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ==========================================================================
   11. Weight Records List Layout (월간 / 연간 / 전체 통일)
   ========================================================================== */
#weightList, 
#yearWeightList, 
#allWeightList {
  padding-left: 0 !important;
  margin-left: 0 !important;
  list-style: none;
}

/* 리스트 항목 한 줄 유지 및 줄바꿈 방지 */
#weightList li, 
#yearWeightList li, 
#allWeightList li {
  display: grid;
  grid-template-columns: max-content 15px 65px auto;
  justify-content: start;
  align-items: center;
  padding: 6px 0;
  white-space: nowrap;
}

/* 전체 뷰 연도 헤더 */
#allWeightList .record-year-header {
  display: block;
  grid-column: 1 / -1;
  font-size: 1.05em;
  font-weight: bold;
  color: #1a202c;
  padding: 12px 0 4px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
  text-align: left;
}

#allWeightList .record-year-header:first-child {
  padding-top: 0;
}

/* 날짜, 콜론, 값 스타일 (월간/연간/전체 폰트 통일) */
#weightList .record-date,
#yearWeightList .record-date,
#allWeightList .record-date {
  text-align: left;
  font-weight: 500;
  color: #666666;
}

#weightList .record-colon,
#yearWeightList .record-colon,
#allWeightList .record-colon {
  text-align: center;
  color: #888888;
}

/* 수치 및 폰트 스타일 강제 통일 */
#weightList .record-value,
#yearWeightList .record-value,
#allWeightList .record-value {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #222222;
}

/* 뱃지 스타일 (통일 적용) */
#weightList .record-badge,
#yearWeightList .record-badge,
#allWeightList .record-badge,
.record-badge {
  padding-left: 6px;
  font-size: 0.85em;
  font-weight: bold;
  color: #e53e3e;
  white-space: nowrap;
}

/* 스마트폰(600px 이하) 전용: 컨테이너 좌우 여백을 미세하게 축소 */
@media (max-width: 600px) {
  /* 차트 감싸는 컨테이너 여백 축소 */
  .chart-container,
  .section {
    padding-left: 4px !important;  /* 기존 12~16px에서 4px로 축소 */
    padding-right: 4px !important;
  }

  /* 캔버스 자체 여백 제거 */
  canvas {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 체중 요약 상단 텍스트 */
.weight-summary-header {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

/* 스펙트럼 카드 전체 */
.spectrum-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin-top: 6px;
}

/* 최저 / 최고 라벨 */
.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
}

.label-min { color: #2563eb; } /* 파란색 계열 */
.label-max { color: #dc2626; } /* 빨간색 계열 */

/* 스펙트럼 막대 래퍼 */
.spectrum-bar-wrapper {
    position: relative;
    height: 10px;
    margin: 28px 0 16px 0;
}

/* 그라데이션 트랙 */
.spectrum-bar {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 50%, #ef4444 100%);
}

/* 평균 포인터 */
.spectrum-pointer {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border: 3px solid #1e293b;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 평균 툴팁 (말풍선) */
.pointer-tooltip {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: #1e293b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.pointer-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

/* 하단 진폭 안내 */
.spectrum-footer {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    border-top: 1px dashed #dee2e6;
    padding-top: 10px;
    margin-top: 8px;
}

.spectrum-footer strong {
    color: #0f172a;
}

/* 행동 요약 피드백 박스 스타일 (깨짐 방지 처리) */
.habit-feedback-box {
    margin: 8px 0 12px 0;
    padding: 10px 14px;
    background-color: #f1f8e9;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
    box-sizing: border-box;
    line-height: 1.4;
}

/* ==========================================
   이번 달 점심 인기 메뉴
========================================== */

.top-lunch-box {
    margin: 10px 10px 0;
    padding: 13px 16px;

    background: #fff7ed;
    border-left: 3px solid #ff9800;
    border-radius: 8px;

    box-sizing: border-box;

    font-size: 15px;
    font-weight: 600;
    color: #e65100;
}

/* 리포트 상단 바 흰색 카드의 내부 아래 여백을 줄임 */
.report-month-bar {
    padding-bottom: 1.3px; /* 기본값(보통 20px 등)에서 원하는 만큼 줄여보세요 (예: 6px, 8px, 10px) */
}


/* 체중 스펙트럼 상자와 흰색 카드 테두리 사이 좌우 간격 */
.spectrum-container {
  margin-left: 10px;
  margin-right: 10px;
}



/* 스마트폰 모바일에서 달력 카드의 아래 여백을 좌우(4px)와 동일하게 맞춤 */
@media (max-width: 600px) {
  .section:has(#calendar) {
    padding-bottom: 4px !important;
  }
}





/* ==========================================
   체중 그래프 네온 효과
   ========================================== */

@keyframes weightChartNeon {
    0% {
        box-shadow:
            0 3px 8px rgba(0, 0, 0, .1);
    }

    15% {
        box-shadow:
            0 0 6px rgba(54, 162, 235, 0.9),
            0 0 14px rgba(54, 162, 235, 0.7),
            0 0 25px rgba(54, 162, 235, 0.45);
    }

    35% {
        box-shadow:
            0 0 8px rgba(54, 162, 235, 1),
            0 0 18px rgba(54, 162, 235, 0.8),
            0 0 30px rgba(54, 162, 235, 0.5);
    }

    55% {
        box-shadow:
            0 0 6px rgba(54, 162, 235, 0.9),
            0 0 15px rgba(54, 162, 235, 0.7),
            0 0 25px rgba(54, 162, 235, 0.4);
    }

    75% {
        box-shadow:
            0 0 4px rgba(54, 162, 235, 0.6),
            0 0 10px rgba(54, 162, 235, 0.4);
    }

    100% {
        box-shadow:
            0 3px 8px rgba(0, 0, 0, .1);
    }
}

.weight-chart-section.neon-active {
    animation: weightChartNeon 2s ease-out;
}




/* ==========================================
   체중 변화 - 통합 스펙트럼
   ========================================== */

.integrated-weight {
    width: 100%;
}


/* ==========================================
   시작 → 현재 영역
   ========================================== */

.weight-journey {
    position: relative;
    width: calc(100% - 54px);
    height: 58px;
    margin: 2px 27px 3px;
    box-sizing: border-box;
}


/* ==========================================
   체중 변화 - 세로형 스펙트럼
   ========================================== */

.vertical-weight-spectrum {
    width: auto;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 16px 12px;
    margin: 6px 10px 0;
    box-sizing: border-box;
}


/* ------------------------------------------
   전체 영역
   ------------------------------------------ */

.vertical-spectrum-area {
    position: relative;
    width: 100%;
    height: 270px;
}


/* ------------------------------------------
   세로 스펙트럼
   ------------------------------------------ */

.spectrum-vertical {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 100%;
    overflow: visible;
}


/* ------------------------------------------
   스펙트럼 바
   ------------------------------------------ */

.spectrum-bar {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);

    width: 10px;
    height: 100%;
    border-radius: 5px;

    background: linear-gradient(
        180deg,
        #ef4444 0%,
        #06b6d4 50%,
        #3b82f6 100%
    );
}


/* ==========================================
   최고 / 평균 / 최저 포인트
   ========================================== */

.spectrum-point {
    position: absolute;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 5;
}


/* 포인트 동그라미 */

.point-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 11px;
    height: 11px;

    background: #ffffff;
    border: 3px solid #1e293b;
    border-radius: 50%;
    box-sizing: border-box;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.2);
}


/* ------------------------------------------
   최고 / 최저 라벨
   ------------------------------------------ */

.spectrum-side-label {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);

    width: 72px;

    text-align: right;
    white-space: nowrap;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.spectrum-side-label strong {
    display: block;
    font-size: 11px;
}

.spectrum-side-label span {
    display: block;
    font-size: 11px;
    font-weight: 600;
}


/* 최고 */

.spectrum-max .spectrum-side-label {
    color: #dc3545;
}

.spectrum-max .point-dot {
    border-color: #dc3545;
}


/* 최저 */

.spectrum-min .spectrum-side-label {
    color: #0d6efd;
}

.spectrum-min .point-dot {
    border-color: #0d6efd;
}


/* ==========================================
   평균
   ========================================== */

.spectrum-average .point-dot {
    border-color: #eab308;
}

.spectrum-average-label {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);

    width: 72px;

    text-align: right;
    white-space: nowrap;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;

    color: #eab308;
}

.spectrum-average-label strong {
    display: block;
    margin-left: 0;

    font-size: 11px;
    font-weight: 600;

    color: #ca8a04;
}


/* ==========================================
   변동 진폭
   ========================================== */

.spectrum-amplitude {
    position: absolute;
    left: calc(50% - 115px);
    top: 0;

    width: 70px;
    height: 100%;

    z-index: 2;
}

.amplitude-line,
.amplitude-arrow {
    display: none;
}

.amplitude-label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);

    width: 70px;

    text-align: center;
    white-space: nowrap;

    color: #64748b;
}

.amplitude-label span {
    display: block;

    font-size: 10px;
    font-weight: 600;
}

.amplitude-label span::before {
    content: "↕ ";
}

.amplitude-label strong {
    display: block;
    margin-top: 2px;

    font-size: 11px;

    color: #1e293b;
}


/* ==========================================
   시작 → 현재 연결선
   ========================================== */

.weight-journey-vertical {
    position: absolute;
    left: 49.94%;
    width: 2px;
    background: #22c55e;
    z-index: 3;
    overflow: visible;
}

/* 모바일 */
@media (max-width: 768px) {
    .weight-journey-vertical {
        left: 49.7%;
    }
}


/* ==========================================
   시작 / 현재 포인트
   ========================================== */

.journey-point {
    position: absolute;

    left: 50%;

    width: 0;
    height: 0;

    z-index: 6;
}


/* 동그라미 */

.journey-dot {
    position: absolute;

    left: 0;
    top: 0;

    transform: translate(-50%, -50%);

    width: 10px;
    height: 10px;

    background: #ffffff;

    border: 3px solid #ef4444;
    border-radius: 50%;

    box-sizing: border-box;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.15);
}


/* 현재 */

.journey-current .journey-dot {
    border-color: #3b82f6;
}


/* ------------------------------------------
   시작 / 현재 라벨
   ------------------------------------------ */

.journey-label {
    position: absolute;

    left: 16px;
    top: 50%;

    transform: translateY(-50%);

    white-space: nowrap;

    font-size: 11px;
    line-height: 1.3;
}

.journey-label span {
    display: inline;

    margin-left: 4px;

    color: #ef4444;
    font-weight: 600;
}

.journey-current .journey-label span {
    color: #3b82f6;
}

.journey-label strong {
    display: inline;

    color: #1e293b;
    font-size: 12px;
}


/* 시작 */

.journey-start .journey-label {
    top: 10px;
    transform: translateY(-100%);
}


/* 현재 */

.journey-current .journey-label {
    top: -8px;
    transform: translateY(0);
}


/* ==========================================
   시작 → 현재 방향 화살표
   ========================================== */


/* 현재가 위에 있는 경우 → 위쪽 화살표 */

.weight-journey-vertical.arrow-up::before {
    content: "";

    position: absolute;

    left: 50%;
    top: -1px;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #22c55e;

    z-index: 20;
}


/* 현재가 아래에 있는 경우 → 아래쪽 화살표 */

.weight-journey-vertical.arrow-down::before {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -1px;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #22c55e;

    z-index: 20;
}


/* ==========================================
   변화량
   ========================================== */

.journey-diff {
    position: absolute;

    left: calc(50% + 18px);

    transform: translateY(-50%);

    z-index: 8;

    white-space: nowrap;

    font-size: 11px;
    font-weight: 700;
}


/* 감소 */

.journey-diff.weight-down {
    color: #2563eb;
}


/* 증가 */

.journey-diff.weight-up {
    color: #dc3545;
}


/* 변화 없음 */

.journey-diff.weight-same {
    color: #64748b;
}


/* ==========================================
   현재 체중 아래쪽을 비우는 영역
   ========================================== */

.spectrum-current-fill {
    position: absolute;

    left: 50%;

    transform: translateX(-50%);

    width: 10px;

    background: #f8f9fa;

    z-index: 1;
}


/* ==========================================
   화살표 숨기기
   ========================================== */

.weight-journey-vertical.hide-arrow::before {
    display: none;
}