:root {
    --bg-1: #edf6ff;
    --bg-2: #f7fbff;
    --text-main: #1f2a3d;
    --text-secondary: #607086;
    --card-white: rgba(255, 255, 255, 0.88);
    --shadow-main: 0 12px 30px rgba(80, 120, 160, 0.12);
    --blue-1: #8fd0ff;
    --blue-2: #74c3ff;
    --blue-3: #56b6ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
    color: var(--text-main);
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.hero {
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 18px;
}

.card {
    background: var(--card-white);
    backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow-main);
    margin-bottom: 28px;
}

.intro-card p {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.8;
}

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

h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.week {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
}

.week::-webkit-scrollbar {
    height: 8px;
}

.week::-webkit-scrollbar-thumb {
    background: rgba(116, 195, 255, 0.45);
    border-radius: 999px;
}

.day-card {
    min-width: 320px;
    max-width: 320px;
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 24px rgba(80, 120, 160, 0.10);
    flex-shrink: 0;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.day-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.inner-info-card {
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.inner-info-card:last-child {
    margin-bottom: 0;
}

.inner-info-card h4 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
}

.inner-info-card p {
    margin: 8px 0;
    line-height: 1.7;
    font-size: 15px;
}

.food-card {
    background: linear-gradient(180deg, #f8fcff 0%, #edf7ff 100%);
}

.exercise-card {
    background: linear-gradient(180deg, #eef8ff 0%, #e3f3ff 100%);
}

.weight-card {
    background: linear-gradient(180deg, #e6f4ff 0%, #d8eeff 100%);
}

.weight-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.chart-card {
    overflow: hidden;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 340px;
    margin-top: 18px;
}

.btn,
.small-btn {
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(180deg, var(--blue-1) 0%, var(--blue-2) 100%);
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 18px rgba(86, 182, 255, 0.22);
    font-weight: 700;
}

.btn:hover,
.small-btn:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

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

.small-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.btn-secondary {
    background: linear-gradient(180deg, #c8d8e8 0%, #b5c8da 100%);
    box-shadow: none;
}

.empty-box {
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f7fbff 0%, #eff7ff 100%);
    color: var(--text-secondary);
    line-height: 1.8;
}

.empty-text {
    color: var(--text-secondary);
}

/* modal */
.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 999;
}

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(24, 38, 56, 0.35);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    width: min(680px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 22px 60px rgba(30, 60, 90, 0.22);
    z-index: 2;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-header h2 {
    margin-bottom: 6px;
}

.modal-desc {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.icon-btn {
    border: none;
    background: #eef6ff;
    color: #37506a;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 24px;
    cursor: pointer;
}

.record-form {
    display: block;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid #d9e8f5;
    background: #f9fcff;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #83cfff;
    box-shadow: 0 0 0 4px rgba(131, 207, 255, 0.18);
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 14px 32px;
    }

    .hero h1 {
        font-size: 34px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .card {
        padding: 20px;
        border-radius: 22px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 24px;
    }

    .day-card {
        min-width: 280px;
        max-width: 280px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        width: calc(100vw - 16px);
        margin: 8px auto;
        border-radius: 22px;
        padding: 18px;
        max-height: calc(100vh - 16px);
    }

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

    .btn,
    .btn-secondary {
        width: 100%;
    }
}
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1200;
    min-width: 220px;
    max-width: 320px;
    padding: 14px 18px;
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: linear-gradient(180deg, #ff8a8a 0%, #ff6b6b 100%);
}

.toast.success {
    background: linear-gradient(180deg, #7fd6a3 0%, #57c785 100%);
}

.toast.hidden {
    display: none;
}

.hero-card {
    margin-bottom: 24px;
}

.hero {
    margin: 0;
}

.hero h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-subtitle {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 18px;
}

.intro-text {
    white-space: pre-wrap;
    line-height: 1.9;
    font-size: 18px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar input[type="month"] {
    border: 1px solid #d9e8f5;
    background: #f9fcff;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--text-main);
}

.month-tip {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.weekday {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.future-day {
    opacity: 0.72;
    filter: grayscale(0.12);
}

.card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.plan-tag {
    background: #eef3f7;
    color: #6b7280;
}

.chart-note {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 34px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .toolbar {
        width: 100%;
    }

    .toolbar input[type="month"] {
        width: 100%;
    }
}

.today-card {
    border: 2px solid #7cc7ff;
    box-shadow:
        0 10px 28px rgba(86, 182, 255, 0.18),
        0 0 0 6px rgba(124, 199, 255, 0.10);
    position: relative;
}

.today-card::before {
    content: "今日";
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #2b5b7f;
    background: linear-gradient(180deg, #dff2ff 0%, #c9eaff 100%);
    box-shadow: 0 4px 12px rgba(124, 199, 255, 0.18);
}

.today-card .day-header {
    padding-top: 22px;
}
