* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background: #0b0e17;
    color: #d6deee;
    font-family: 'Segoe UI', 'PingFang SC', sans-serif;
    padding: 16px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    align-items: center;
}
.card {
    max-width: 960px;
    width: 100%;
    background: #141c2b;
    border-radius: 36px;
    padding: 22px 20px 26px;
    border: 1px solid #2b3750;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}
.main-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #f5c542;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.main-title .symbol {
    display: inline-block;
    font-size: 28px;
    margin-right: 4px;
}

.tab-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}
.tab-btn {
    background: transparent;
    border: 1px solid #2f3d5a;
    color: #7a8aa8;
    padding: 8px 28px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s;
    min-width: 120px;
    text-align: center;
}
.tab-btn.active {
    background: #f5c542;
    border-color: #f5c542;
    color: #0b0e17;
    box-shadow: 0 0 16px rgba(245, 197, 66, 0.25);
}
.tab-btn:hover {
    border-color: #f5c542;
    color: #f5c542;
}
.tab-btn.active:hover {
    color: #0b0e17;
}

.mode-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.mode-btn {
    background: transparent;
    border: 1px solid #2f3d5a;
    color: #7a8aa8;
    padding: 4px 22px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.mode-btn.active {
    background: #f5c542;
    border-color: #f5c542;
    color: #0b0e17;
}
.mode-btn:hover {
    border-color: #f5c542;
    color: #f5c542;
}
.mode-btn.active:hover {
    color: #0b0e17;
}

.manual-panel {
    display: none;
    justify-content: center;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.manual-panel.show {
    display: flex;
}
.manual-panel input {
    background: #0b0e17;
    border: 1px solid #2f3d5a;
    color: #d6deee;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 14px;
    outline: none;
    width: 230px;
}
.manual-panel input:focus {
    border-color: #f5c542;
}
.manual-panel .btn-ju {
    background: #f5c542;
    border: none;
    color: #0b0e17;
    font-weight: 700;
    padding: 6px 22px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
}
.manual-panel .btn-ju:hover {
    background: #d9a832;
}
.manual-panel .hint-text {
    color: #5a6a8a;
    font-size: 13px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.phase-badge {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 40px;
    background: #1a2238;
    border: 2px solid #f5c542;
    line-height: 1.4;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.phase-badge .phase-num {
    color: #f5c542;
}
.phase-badge .phase-label {
    color: #d6deee;
    font-size: 16px;
}
.phase-badge .current-label {
    color: #8a9ab8;
    font-size: 14px;
    font-weight: 400;
}
.time-display {
    font-size: 16px;
    color: #8a9ab8;
    font-weight: 500;
    text-align: right;
    background: #0f1625;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid #253040;
}

.module-content {
    border-radius: 16px;
    border: 1px solid #1a2335;
    background: #0a0f1a;
    padding: 12px 14px;
    margin-top: 4px;
    min-height: 200px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 8px 0 10px 0;
}
.info-card {
    background: #0f1625;
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid #1a2335;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.info-card .label {
    font-size: 12px;
    color: #7a8aaa;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}
.info-card .value {
    font-size: 20px;
    font-weight: 700;
}
.info-card .sub {
    font-size: 14px;
    color: #8a9ab8;
    margin-top: 2px;
}

.reading-box {
    padding: 14px 18px;
    background: #0f1625;
    border-radius: 14px;
    border: 1px solid #1a2335;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 6px 0 10px 0;
}
.reading-box .reading-title {
    font-weight: 600;
    color: #f5c542;
    font-size: 14px;
    margin-bottom: 2px;
}
.reading-box .reading-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #c0cee8;
}
.reading-box .reading-desc .highlight {
    color: #f5c542;
    font-weight: 600;
}

.notice-box {
    margin-top: 10px;
    padding: 12px 16px;
    background: #0f1625;
    border-radius: 14px;
    border: 1px solid #1a2335;
    border-left: 4px solid #f5c542;
    color: #bcc8e0;
    font-size: 14px;
    line-height: 1.8;
}
.notice-box .notice-title {
    display: block;
    font-weight: 600;
    color: #f5c542;
    font-size: 14px;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}
.notice-box p {
    margin: 0 0 2px 0;
    padding-left: 4px;
}
.notice-box p:last-child {
    margin-bottom: 0;
}

.motive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 6px 0 6px 0;
}
.motive-cell {
    background: #0f1625;
    border-radius: 12px;
    padding: 8px 4px 6px;
    text-align: center;
    border: 2px solid #1a2335;
    transition: all 0.25s ease;
    cursor: default;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.motive-cell .num {
    font-size: 14px;
    font-weight: 700;
    color: #5a6a8a;
}
.motive-cell .name {
    font-size: 13px;
    font-weight: 600;
    color: #8a9ab8;
    margin-top: 1px;
}
.motive-cell .action {
    font-size: 10px;
    font-weight: 600;
    color: #5a6a8a;
    margin-top: 2px;
    letter-spacing: 0.3px;
}
.motive-cell .cell-progress {
    width: 100%;
    height: 3px;
    background: #1a2238;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.motive-cell.active .cell-progress { opacity: 1; }
.cell-progress .fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s;
}
.star {
    position: absolute;
    font-size: 14px;
    color: #f5c542;
    opacity: 0;
    transition: opacity 0.3s;
    filter: drop-shadow(0 0 6px #f5c54266);
    line-height: 1;
    pointer-events: none;
}
.star-tl { top: -4px; left: -2px; }
.star-tr { top: -4px; right: -2px; }
.star-bl { bottom: -4px; left: -2px; }
.star-br { bottom: -4px; right: -2px; }
.motive-cell.active .star { opacity: 1; }
.motive-cell.rank-s {
    border-color: #FFD700;
    background: #FFD70011;
    box-shadow: 0 0 20px #FFD70044;
}
.motive-cell.rank-s .num,
.motive-cell.rank-s .name,
.motive-cell.rank-s .action { color: #FFD700; }
.motive-cell.rank-s .cell-progress .fill { background: #FFD700; }
.motive-cell.rank-a {
    border-color: #FF4444;
    background: #FF444411;
    box-shadow: 0 0 20px #FF444444;
}
.motive-cell.rank-a .num,
.motive-cell.rank-a .name,
.motive-cell.rank-a .action { color: #FF4444; }
.motive-cell.rank-a .cell-progress .fill { background: #FF4444; }
.motive-cell.rank-b {
    border-color: #44DDFF;
    background: #44DDFF11;
    box-shadow: 0 0 20px #44DDFF44;
}
.motive-cell.rank-b .num,
.motive-cell.rank-b .name,
.motive-cell.rank-b .action { color: #44DDFF; }
.motive-cell.rank-b .cell-progress .fill { background: #44DDFF; }
.motive-cell.rank-c {
    border-color: #BB66FF;
    background: #BB66FF11;
    box-shadow: 0 0 20px #BB66FF44;
}
.motive-cell.rank-c .num,
.motive-cell.rank-c .name,
.motive-cell.rank-c .action { color: #BB66FF; }
.motive-cell.rank-c .cell-progress .fill { background: #BB66FF; }
.motive-cell.rank-d {
    border-color: #2a3348;
    background: transparent;
    box-shadow: none;
    opacity: 0.55;
}
.motive-cell.rank-d .num,
.motive-cell.rank-d .name,
.motive-cell.rank-d .action { color: #5a6a8a; }
.motive-cell.rank-d .cell-progress .fill { background: #5a6a8a; }
.motive-cell.active {
    background: #000000 !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15) !important;
    transform: scale(1.03);
    transition: transform 0.2s ease, border-color 0.3s ease;
}
.motive-cell.active .num,
.motive-cell.active .name,
.motive-cell.active .action { color: #ffffff !important; }
.motive-cell.active .cell-progress .fill { background: #ffffff !important; }

.priority-hint {
    text-align: center;
    font-size: 13px;
    color: #7a8aaa;
    padding: 4px 0 2px 0;
    letter-spacing: 0.3px;
    border-top: 1px solid #1a2335;
    margin-top: 4px;
}
.priority-hint .tag-s { color: #FFD700; font-weight: 700; }
.priority-hint .tag-a { color: #FF4444; font-weight: 700; }
.priority-hint .tag-b { color: #44DDFF; font-weight: 700; }
.priority-hint .tag-c { color: #BB66FF; font-weight: 700; }

.global-progress {
    width: 100%;
    height: 4px;
    background: #1a2238;
    border-radius: 4px;
    margin: 10px 0 0 0;
    overflow: hidden;
}
.global-progress .fill {
    height: 100%;
    width: 0%;
    background: #f5c542;
    border-radius: 4px;
    transition: width 0.3s;
}

@media (max-width: 700px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
    .motive-grid { grid-template-columns: repeat(4, 1fr); }
    .tab-btn { min-width: 90px; padding: 6px 16px; font-size: 14px; }
}
@media (max-width: 500px) {
    .motive-grid { grid-template-columns: repeat(3, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .tab-btn { min-width: 70px; padding: 5px 10px; font-size: 13px; }
    .phase-badge { font-size: 16px; padding: 6px 14px; min-height: 44px; }
    .time-display { font-size: 13px; padding: 4px 10px; }
    .main-title { font-size: 20px; }
    .module-content { padding: 8px 10px; }
}
@media (max-width: 380px) {
    .motive-grid { grid-template-columns: repeat(2, 1fr); }
    .tab-bar { gap: 6px; }
    .tab-btn { min-width: 60px; padding: 4px 8px; font-size: 12px; }
}