* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
}

.site-header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
}

.header-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 24px;
}

.top-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 28px;
    align-items: stretch;
}

.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.small-title,
.eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #86868b;
}

h1 {
    margin: 0;
    font-size: 38px;
}

.subtitle {
    margin: 8px 0 0;
    color: #86868b;
}

main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 24px 80px;
}

.summary-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f7f7f9;
    border-radius: 16px;
    padding: 18px 12px;
    margin: 28px 0 0;
}

.summary-card div {
    text-align: center;
}

.summary-number {
    display: block;
    font-size: 26px;
    font-weight: 600;
}

.summary-label {
    font-size: 12px;
    color: #86868b;
}

.calendar-card {
    background: #f7f7f9;
    border: 1px solid #ececef;
    border-radius: 20px;
    padding: 20px;
}

.calendar-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.calendar-date {
    font-size: 28px;
    font-weight: 650;
}

.calendar-day,
.calendar-week,
.week-task-heading span {
    color: #86868b;
    font-size: 13px;
}

.calendar-week {
    text-align: right;
    line-height: 1.6;
}

.week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 18px 0;
}

.week-day {
    text-align: center;
    padding: 8px 3px;
    border-radius: 10px;
    background: white;
}

.week-day .dow {
    display: block;
    font-size: 10px;
    color: #86868b;
    margin-bottom: 4px;
}

.week-day .dom {
    font-size: 13px;
    font-weight: 500;
}

.week-day.today {
    background: #1d1d1f;
    color: white;
}

.week-day.today .dow {
    color: rgba(255,255,255,0.7);
}

.week-task-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.week-task-list {
    display: grid;
    gap: 7px;
}

.week-task-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.45;
}

.week-task-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1d1d1f;
    margin-top: 5px;
    flex: 0 0 auto;
}

.week-task-item.done {
    color: #86868b;
    text-decoration: line-through;
}

.compact-section {
    margin-bottom: 18px;
}

.compact-section details {
    background: white;
    border-radius: 16px;
    border: 1px solid #ececef;
    overflow: hidden;
}

.compact-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    cursor: pointer;
}

.compact-summary strong {
    display: block;
    font-size: 17px;
}

.compact-summary small {
    display: block;
    margin-top: 4px;
    color: #86868b;
    font-size: 12px;
    font-weight: 400;
}

.summary-count {
    color: #86868b;
    font-size: 13px;
    white-space: nowrap;
}

.compact-body {
    padding: 0 16px 16px;
}

.review-main {
    margin: 34px 0 24px;
}

.section-title {
    margin-top: 38px;
    margin-bottom: 18px;
}

.section-title h2 {
    margin: 0 0 5px;
}

.section-title p {
    margin: 0;
    font-size: 14px;
    color: #86868b;
}

.review-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
    border: 1px solid #eeeeef;
}

.task-card.overdue {
    border-left: 4px solid #1d1d1f;
}

.task-info {
    flex: 1;
}

.task-module {
    margin-bottom: 6px;
    font-size: 12px;
    color: #86868b;
}

.task-name {
    font-size: 16px;
    font-weight: 500;
}

.task-week {
    margin-top: 7px;
    font-size: 12px;
    color: #86868b;
}

.status-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f0f0f2;
    font-size: 11px;
    color: #666;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: #1d1d1f;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

button.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

button:disabled {
    opacity: 0.65;
    cursor: default;
}

.review-card {
    background: #eef6ff;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
}

.review-card strong {
    display: block;
    margin-bottom: 5px;
}

.review-card span {
    font-size: 13px;
    color: #667085;
}

.option-btn {
    width: 100%;
    text-align: left;
}

.empty-message {
    background: white;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    color: #86868b;
    border: 1px solid #eeeeef;
}

/* ==================================================
   机考科学计算器
   ================================================== */

[hidden] {
    display: none !important;
}

.calculator-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    min-width: 88px;
    border-radius: 999px;
    padding: 11px 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

.calculator-panel {
    position: fixed;
    right: 24px;
    bottom: 82px;
    z-index: 1000;
    width: min(520px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 110px));
    overflow: auto;
    background: #e8eef5;
    border: 1px solid #9caabd;
    border-radius: 12px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    color: #17202a;
}

.calculator-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px 8px 14px;
    background: #d7e2ed;
    border-bottom: 1px solid #aebaca;
    cursor: move;
    user-select: none;
}

.calculator-titlebar strong {
    font-size: 14px;
}

.calculator-title-note {
    margin-right: auto;
    color: #657386;
    font-size: 11px;
}

.calculator-window-button {
    width: 32px;
    height: 28px;
    padding: 0;
    border-radius: 5px;
    background: #f4f7fa;
    color: #253240;
    border: 1px solid #aebaca;
    font-size: 20px;
    line-height: 1;
}

.calculator-body {
    padding: 12px;
}

.calculator-display-wrap {
    background: #fbfdff;
    border: 1px solid #8d9bab;
    border-radius: 6px;
    padding: 7px 10px 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.calculator-history {
    min-height: 17px;
    text-align: right;
    color: #748092;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calculator-display {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111820;
    text-align: right;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 26px;
    font-weight: 500;
}

.calculator-mode-row {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 36px;
    padding: 8px 2px 4px;
    color: #425064;
    font-size: 12px;
}

.calculator-mode-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.calculator-memory-indicator {
    margin-left: auto;
    font-weight: 600;
    color: #33475d;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.calculator-grid button {
    min-width: 0;
    min-height: 41px;
    padding: 7px 4px;
    border: 1px solid #aebaca;
    border-radius: 5px;
    background: linear-gradient(#fbfdff, #e7edf4);
    color: #18212c;
    font-family: Arial, sans-serif;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.calculator-grid button:hover {
    background: #ffffff;
}

.calculator-grid button:active,
.calculator-grid button.active {
    background: #d2deea;
}

.calculator-grid .calculator-equals {
    background: #dbe8f5;
    font-size: 18px;
    font-weight: 700;
}

@media (max-width: 800px) {
    .top-dashboard {
        grid-template-columns: 1fr;
    }

    .calendar-card {
        order: -1;
    }
}

@media (max-width: 600px) {
    .header-content,
    main {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 30px;
    }

    .review-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .review-title-row button {
        width: 100%;
    }

    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-card button {
        width: 100%;
    }

    .week-strip {
        gap: 4px;
    }

    .week-day {
        padding: 7px 1px;
    }

    .calculator-launcher {
        right: 14px;
        bottom: 14px;
    }

    .calculator-panel {
        right: 12px;
        bottom: 70px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 92px);
    }

    .calculator-grid {
        gap: 4px;
    }

    .calculator-grid button {
        min-height: 38px;
        font-size: 12px;
    }
}
