@import url("base.css");

/* ---------- Dashboard: welcome and rank ---------- */
.hero {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

.welcome {
    flex: 1;
    padding-top: 6px;
}

.welcome .kicker {
    color: var(--teal);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.hello {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.welcome h1 {
    margin: 0;
    color: var(--ink-900);
    font-size: 2.6rem;
    line-height: 1.05;
}

.next-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #eeeaff;
    border-radius: 18px;
    padding: 14px 16px;
    margin-top: 16px;
    text-align: left;
}

.next-row > div {
    flex: 1;
}

.play-mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--teal);
    color: #ffffff;
    text-align: center;
    line-height: 48px;
    font-size: 16px;
}

.next-row #next-step-text {
    margin: 0;
    font-weight: 700;
    color: var(--ink-900);
    font-size: 1.05rem;
}

.next-row .hint {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.next-row .btn-big {
    width: auto;
    margin-left: auto;
    min-height: 48px;
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 12px;
    white-space: nowrap;
}

.hero-art {
    width: 96px;
    height: 96px;
    margin: 0;
}

#overall-label {
    display: inline-block;
    margin-top: 14px;
    padding: 6px 10px;
    background-color: #f3f0ff;
    color: var(--teal);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.section-note {
    margin: -4px 0 14px;
    color: var(--muted);
}

.rank-card {
    width: 300px;
    background-color: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(60, 40, 120, 0.06);
}

.rank-card .kicker {
    color: var(--amber);
    font-size: 0.8rem;
}

.rank-card h2 {
    color: var(--ink-900);
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.rank-card p {
    color: var(--muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.xp-line {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1;
    margin: 6px 0 8px;
}

.rank-card .bar {
    width: 100%;
    margin: 8px 0;
    background-color: #ece8f8;
}

.overall-bar {
    display: none;
}

/* ---------- Section titles ---------- */
main > section:not(.panel) > h2 {
    margin: 32px 0 14px;
    font-size: 1.25rem;
}

.panel h2 {
    font-size: 1.2rem;
}

.panel p:last-child {
    margin-bottom: 0;
}

/* ---------- Case cards ---------- */
.progress-row {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.case-grid {
    display: flex;
    gap: 14px;
    flex: 3;
    min-width: 0;
}

.skill-grid {
    display: grid;
    gap: 18px;
}

.two-grid {
    margin-top: 22px;
}

.case-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 16px;
    box-shadow: none;
    padding: 16px;
}

.tone-1 { background-color: #f3f0ff; }
.tone-2 { background-color: #e8f8ef; }
.tone-3 { background-color: #fff3e8; }
.tone-4 { background-color: #e8f3ff; flex: 1; }

.tone-1 .bar span { background-color: #6d5ef5; }
.tone-2 .bar span { background-color: #22a06b; }
.tone-3 .bar span { background-color: #f5a524; }
.tone-4 .bar span { background-color: #3b82f6; }

.case-card .bar {
    background-color: #ffffff;
}

.info-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    max-width: 360px;
}

.case-card img, .info-card img {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
}

.case-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.case-card h3, .info-card h2 {
    font-size: 1.2rem;
}

.case-card p, .info-card p {
    margin-bottom: 10px;
}

.case-card .best {
    margin-top: auto;
    margin-bottom: 0;
}

.case-card .bar {
    margin: 8px 0 12px;
}

.lock-note {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.case-card .btn, .info-card .btn {
    margin-top: 6px;
    width: 100%;
}

.case-card .text-link {
    align-self: center;
    margin-top: 6px;
}

.case-card .pill-lock {
    background-color: #ffffff;
}

.info-card {
    gap: 0;
}

.info-card .btn {
    margin-top: auto;
}

/* ---------- Skills ---------- */
.skill-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 6px;
}

.skill-grid h3 {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 600;
}

.skill-grid p {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.skill-grid .bar {
    margin-bottom: 0;
}

/* ---------- Badges ---------- */
.badge-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 520px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border: none;
    border-bottom: 1px solid var(--line);
    background-color: transparent;
    border-radius: 0;
    font-weight: 600;
}

.badge-item::before {
    content: "\2713";
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--success);
    color: #ffffff;
    font-size: 0.9rem;
}

.badge-wait {
    background-color: transparent;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 500;
}

.badge-wait::before {
    content: "";
    background-color: transparent;
    border: 2px solid var(--line-strong);
}

#later-title {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 4px;
}

#no-badges {
    color: var(--muted);
}

/* ---------- Panels spacing ---------- */
main > .panel {
    margin-top: 20px;
}

.note-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    background-color: transparent;
    box-shadow: none;
}

.note-panel h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.note-panel p {
    color: var(--muted);
    max-width: 60ch;
    margin-bottom: 0;
    font-size: 0.98rem;
}

.note-panel .btn {
    flex-shrink: 0;
}

/* Collapsible stats */
.details-panel {
    padding: 0;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

.details-panel summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    cursor: pointer;
    border-radius: var(--radius-lg);
}

.details-panel summary::-webkit-details-marker {
    display: none;
}

.details-panel summary h2 {
    margin: 0;
    font-size: 1.1rem;
}

.details-panel summary::after {
    content: "Show";
    color: var(--teal-dark);
    font-weight: 700;
    font-size: 0.95rem;
}

.details-panel[open] summary::after {
    content: "Hide";
}

.details-panel summary:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.details-panel .skill-grid {
    padding: 0 24px 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .progress-row, .case-grid {
        flex-direction: column;
    }

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

@media (max-width: 720px) {
    .hero {
        flex-direction: column;
    }

    .hero-art {
        display: none;
    }

    .rank-card {
        width: 100%;
    }

    .next-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .next-row .btn-big {
        margin-left: 0;
        width: 100%;
    }

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

    .note-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .details-panel summary {
        padding: 16px 18px;
    }

    .details-panel .skill-grid {
        padding: 0 18px 18px;
    }
}
