:root {
    --sf-bg: #f7fbff;
    --sf-ink: #1f2937;
    --sf-muted: #64748b;
    --sf-line: #d8e3ee;
    --sf-card: rgba(255, 255, 255, 0.92);
    --sf-blue: #2f8eed;
    --sf-teal: #14b8a6;
    --sf-yellow: #facc15;
    --sf-coral: #fb7185;
    --sf-shadow: 0 18px 42px rgba(30, 64, 175, 0.12);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--sf-ink);
    background:
        radial-gradient(circle at 12% 18%, rgba(250, 204, 21, 0.18), transparent 28%),
        radial-gradient(circle at 86% 8%, rgba(20, 184, 166, 0.18), transparent 24%),
        linear-gradient(135deg, #f8fbff 0%, #eef8ff 46%, #f7fff9 100%);
}

.hidden {
    display: none !important;
}

.secret-friend-guard {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.secret-friend-guard__card {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: var(--sf-card);
    box-shadow: var(--sf-shadow);
    text-align: center;
}

.secret-friend-guard__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sf-teal), var(--sf-blue));
    color: white;
    font-size: 2rem;
}

.secret-friend-guard__card h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

.secret-friend-guard__card p {
    margin: 0 0 18px;
    color: var(--sf-muted);
    line-height: 1.55;
}

.secret-friend-guard__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.secret-friend-root,
.secret-friend-student-root {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 40px;
}

.secret-friend-workspace {
    display: grid;
    gap: 16px;
}

.secret-friend-hero,
.secret-friend-student-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--sf-shadow);
}

.secret-friend-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(47, 142, 237, 0.18);
    border-radius: 999px;
    background: #eef8ff;
    color: #0f6fb8;
    font-size: 0.78rem;
    font-weight: 800;
}

.secret-friend-hero h1,
.secret-friend-student-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
}

.secret-friend-hero p,
.secret-friend-student-hero p {
    max-width: 760px;
    margin: 0;
    color: #475569;
    font-size: 1.02rem;
    line-height: 1.65;
}

.secret-friend-hero__meta {
    min-width: 220px;
    padding: 18px;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: white;
    display: grid;
    gap: 6px;
}

.secret-friend-hero__meta span,
.secret-friend-stat span,
.secret-friend-panel label span {
    color: var(--sf-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.secret-friend-hero__meta strong {
    font-size: 1.1rem;
}

.secret-friend-hero__meta small {
    color: var(--sf-muted);
}

.secret-friend-status-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.secret-friend-stat,
.secret-friend-panel,
.secret-friend-setup {
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: var(--sf-card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.secret-friend-stat {
    min-height: 78px;
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 4px;
}

.secret-friend-stat strong {
    font-size: 1.25rem;
}

.secret-friend-stat--sync strong[data-tone="ok"] {
    color: #047857;
}

.secret-friend-stat--sync strong[data-tone="warn"] {
    color: #b45309;
}

.secret-friend-stat--sync strong[data-tone="error"] {
    color: #be123c;
}

.secret-friend-setup {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.55fr) minmax(140px, 0.55fr) minmax(280px, 1.4fr);
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.secret-friend-setup label,
.secret-friend-panel label {
    display: grid;
    gap: 7px;
}

.secret-friend-setup input,
.secret-friend-panel input,
.secret-friend-panel select,
.secret-friend-panel textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: white;
    color: var(--sf-ink);
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
}

.secret-friend-panel textarea {
    resize: vertical;
    min-height: 128px;
}

.secret-friend-setup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.secret-friend-primary-btn,
.secret-friend-primary-link,
.secret-friend-secondary-btn,
.secret-friend-ghost-btn {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.secret-friend-primary-btn,
.secret-friend-primary-link {
    background: linear-gradient(135deg, var(--sf-yellow), #fb923c);
    color: #1f2937;
    box-shadow: 0 12px 22px rgba(251, 146, 60, 0.22);
}

.secret-friend-primary-link {
    display: inline-grid;
    place-items: center;
    width: max-content;
    max-width: 100%;
    text-decoration: none;
}

.secret-friend-secondary-btn {
    background: white;
    border-color: var(--sf-line);
    color: #24364b;
}

.secret-friend-ghost-btn {
    background: #eef8ff;
    border-color: rgba(47, 142, 237, 0.2);
    color: #0f6fb8;
    text-decoration: none;
    display: inline-grid;
    place-items: center;
}

.secret-friend-primary-btn:disabled,
.secret-friend-secondary-btn:disabled,
.secret-friend-ghost-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.secret-friend-grid,
.secret-friend-student-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(460px, 1.45fr) minmax(280px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.secret-friend-panel {
    padding: 18px;
}

.secret-friend-panel--wide {
    min-width: 0;
}

.secret-friend-section-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.secret-friend-section-head--compact {
    margin-top: 20px;
}

.secret-friend-section-head h2 {
    margin: 0 0 4px;
    font-size: 1.18rem;
}

.secret-friend-section-head h3,
.secret-friend-dashboard-cols h3 {
    margin: 0 0 8px;
    font-size: 0.96rem;
}

.secret-friend-section-head p {
    margin: 0;
    color: var(--sf-muted);
    line-height: 1.45;
}

.secret-friend-dashboard-cols {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
}

.secret-friend-list,
.secret-friend-public-feed,
.secret-friend-mission-list {
    display: grid;
    gap: 9px;
}

.secret-friend-empty {
    padding: 16px;
    border: 1px dashed #b8c8d8;
    border-radius: 8px;
    color: var(--sf-muted);
    background: rgba(248, 250, 252, 0.8);
    line-height: 1.5;
}

.secret-friend-row,
.secret-friend-post,
.secret-friend-board-link-card,
.secret-friend-mission-row,
.secret-friend-target-card,
.secret-friend-reveal-card {
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: white;
    padding: 13px;
}

.secret-friend-row,
.secret-friend-board-link-card {
    display: grid;
    gap: 5px;
}

.secret-friend-row strong,
.secret-friend-post strong,
.secret-friend-board-link-card strong,
.secret-friend-target-card strong,
.secret-friend-reveal-card strong {
    color: #172033;
}

.secret-friend-row small,
.secret-friend-post small,
.secret-friend-board-link-card small,
.secret-friend-target-card small,
.secret-friend-reveal-card small {
    color: var(--sf-muted);
    line-height: 1.45;
}

.secret-friend-row p,
.secret-friend-post p,
.secret-friend-board-link-card p {
    margin: 4px 0 0;
    line-height: 1.55;
}

.secret-friend-tag {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 800;
}

.secret-friend-tag--public {
    background: #fff7ed;
    color: #c2410c;
}

.secret-friend-tag--private {
    background: #eef2ff;
    color: #4338ca;
}

.secret-friend-mission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.secret-friend-mission-row p {
    margin: 3px 0 0;
    color: var(--sf-muted);
    line-height: 1.45;
}

.secret-friend-mission-row button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    font-weight: 900;
    cursor: pointer;
}

.secret-friend-mission-add {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr auto;
    gap: 8px;
    margin-top: 12px;
}

.secret-friend-log-form {
    display: grid;
    gap: 12px;
}

.secret-friend-public-toggle {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-weight: 700;
}

.secret-friend-public-toggle input {
    width: 18px;
    min-height: 18px;
}

.secret-friend-target-card {
    min-height: 120px;
    display: grid;
    align-content: center;
    gap: 8px;
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.12), transparent 52%),
        white;
}

.secret-friend-target-card .secret-friend-target-name {
    font-size: clamp(1.8rem, 7vw, 3.8rem);
    line-height: 1;
}

.secret-friend-reveal-card {
    margin-top: 12px;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.24), transparent 46%),
        white;
}

.secret-friend-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10030;
    max-width: min(420px, calc(100vw - 36px));
    padding: 12px 14px;
    border-radius: 8px;
    background: #172033;
    color: white;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
    font-weight: 800;
}

@media (max-width: 1180px) {
    .secret-friend-status-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .secret-friend-setup,
    .secret-friend-grid,
    .secret-friend-student-grid {
        grid-template-columns: 1fr;
    }

    .secret-friend-setup__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .secret-friend-root,
    .secret-friend-student-root {
        width: min(100% - 20px, 1480px);
        padding-top: 10px;
    }

    .secret-friend-hero,
    .secret-friend-student-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .secret-friend-hero__meta {
        min-width: 0;
    }

    .secret-friend-status-row,
    .secret-friend-dashboard-cols,
    .secret-friend-mission-add {
        grid-template-columns: 1fr;
    }

    .secret-friend-setup__actions > *,
    .secret-friend-primary-btn,
    .secret-friend-primary-link,
    .secret-friend-secondary-btn,
    .secret-friend-ghost-btn {
        width: 100%;
    }
}

body.secret-friend-student-page {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(209, 240, 255, 0.92) 0%, rgba(235, 249, 255, 0.82) 38%, rgba(255, 250, 236, 0.8) 100%),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.95) 0 8%, transparent 18%),
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.88) 0 10%, transparent 22%),
        #fdf6e8;
    color: #162033;
}

.secret-friend-student-root.secret-friend-student-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    margin: 0;
    padding: 0;
}

.secret-friend-student-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 34px 16px 24px;
    border-right: 1px solid rgba(190, 211, 230, 0.68);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 10px 0 28px rgba(80, 112, 150, 0.08);
    backdrop-filter: blur(18px);
}

.secret-friend-student-brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
    color: #2a74da;
    text-decoration: none;
    font-weight: 900;
    line-height: 0.96;
}

.secret-friend-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 45%, #fff7ad 0 18%, transparent 19%),
        conic-gradient(from 0deg, #ffca2c, #ffea83, #ffc13b, #ffca2c);
    box-shadow: 0 8px 16px rgba(255, 193, 59, 0.24);
}

.secret-friend-student-nav {
    display: grid;
    align-content: start;
    gap: 12px;
    margin-top: 8px;
}

.secret-friend-student-nav button,
.secret-friend-student-logout {
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #314056;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.secret-friend-student-nav button {
    min-height: 72px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 10px 4px;
}

.secret-friend-student-nav button span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f5f7fb;
    color: #52627a;
    font-size: 1.15rem;
}

.secret-friend-student-nav button strong {
    font-size: 0.82rem;
    font-weight: 800;
}

.secret-friend-student-nav button.is-active {
    background: linear-gradient(180deg, #5e8eff, #4f79ed);
    color: #fff;
    box-shadow: 0 12px 22px rgba(79, 121, 237, 0.26);
}

.secret-friend-student-nav button.is-active span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.secret-friend-student-logout {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-color: #d6e2ef;
    background: rgba(255, 255, 255, 0.76);
    font-weight: 800;
}

.secret-friend-student-main {
    min-width: 0;
    padding: 20px 34px 34px;
}

.secret-friend-student-hero-v2 {
    position: relative;
    min-height: 206px;
    overflow: hidden;
    border: 1px solid rgba(205, 226, 242, 0.75);
    border-radius: 8px;
    background:
        radial-gradient(circle at 47% 80%, rgba(255, 255, 255, 0.86) 0 10%, transparent 21%),
        linear-gradient(135deg, rgba(220, 243, 255, 0.94), rgba(255, 251, 236, 0.78));
    box-shadow: 0 20px 48px rgba(75, 103, 135, 0.12);
}

.secret-friend-student-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 20px 26px 0;
}

.secret-friend-student-pill,
.secret-friend-profile-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(178, 206, 232, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 22px rgba(50, 85, 123, 0.08);
}

.secret-friend-student-pill {
    padding: 0 15px;
    color: #2871d1;
    font-weight: 900;
}

.secret-friend-profile-chip {
    gap: 10px;
    padding: 6px 12px 6px 8px;
}

.secret-friend-profile-chip img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.secret-friend-profile-chip small,
.secret-friend-profile-chip strong {
    display: block;
    line-height: 1.15;
}

.secret-friend-profile-chip small {
    color: #66758a;
    font-weight: 700;
}

.secret-friend-profile-chip strong {
    color: #1d2a3c;
    font-weight: 900;
}

.secret-friend-student-hero-content {
    position: relative;
    z-index: 1;
    min-height: 150px;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) auto minmax(260px, 360px);
    align-items: center;
    gap: 22px;
    padding: 6px 26px 18px;
}

.secret-friend-student-hero-content h1 {
    margin: 8px 0 10px;
    color: #111c31;
    font-size: 3.1rem;
    line-height: 1.04;
    font-weight: 900;
}

.secret-friend-student-hero-content p {
    margin: 0;
    color: #3d536d;
    font-size: 1.04rem;
    line-height: 1.6;
}

.secret-friend-student-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(122px, 1fr));
    gap: 12px;
}

.secret-friend-student-hero-stats article {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 13px 17px;
    border: 1px solid #d9e5f1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 26px rgba(63, 90, 119, 0.08);
}

.secret-friend-student-hero-stats span {
    color: #53647a;
    font-size: 0.86rem;
    font-weight: 800;
}

.secret-friend-student-hero-stats strong {
    color: #2473ec;
    font-size: 1.36rem;
    font-weight: 900;
}

.secret-friend-hero-art {
    width: min(330px, 26vw);
    max-height: 150px;
    object-fit: contain;
    justify-self: end;
    filter: drop-shadow(0 20px 20px rgba(120, 90, 70, 0.12));
}

.secret-friend-student-dashboard {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(430px, 1.32fr) minmax(330px, 1.02fr);
    gap: 14px;
    align-items: start;
    margin-top: 18px;
}

.secret-friend-student-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.secret-friend-card {
    border: 1px solid rgba(215, 226, 238, 0.88);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(54, 75, 100, 0.1);
    padding: 18px;
}

.secret-friend-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
}

.secret-friend-card-head h2 {
    margin: 0;
    color: #18233a;
    font-size: 1.18rem;
    font-weight: 900;
}

.secret-friend-card-head h3,
.secret-friend-letter-grid h3 {
    margin: 0 0 8px;
    color: #23314a;
    font-size: 0.92rem;
}

.secret-friend-card-head p {
    margin: 6px 0 0;
    color: #617086;
    line-height: 1.48;
}

.secret-friend-help-dot {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eef3f8;
    color: #687789;
    font-weight: 900;
}

.secret-friend-card--target .secret-friend-target-card {
    min-height: 184px;
    border: 0;
    background:
        radial-gradient(circle at 82% 55%, rgba(255, 204, 225, 0.55), transparent 23%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 250, 244, 0.92));
}

.secret-friend-target-card .secret-friend-target-name {
    color: #121b2f;
    font-size: 3rem;
    font-weight: 900;
}

.secret-friend-card--privacy {
    min-height: 108px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: center;
    gap: 12px;
}

.secret-friend-card--privacy strong {
    display: block;
    margin-bottom: 6px;
}

.secret-friend-card--privacy p {
    margin: 0;
    color: #617086;
    line-height: 1.48;
}

.secret-friend-card--privacy img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.secret-friend-today-mission {
    margin-bottom: 12px;
    padding: 13px 14px;
    border: 1px solid #dbe7f5;
    border-radius: 8px;
    background: #f8fbff;
    color: #26344b;
    font-weight: 800;
}

.secret-friend-log-form--student textarea,
.secret-friend-cheer-form textarea {
    min-height: 112px;
}

.secret-friend-log-form--student .secret-friend-primary-btn {
    width: 100%;
    min-height: 44px;
    background: linear-gradient(135deg, #ffbe18, #ff7b39);
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 123, 57, 0.25);
}

.secret-friend-board-open {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid #cfe0f3;
    border-radius: 8px;
    background: #f8fbff;
    color: #2367ca;
    font-size: 0.84rem;
    font-weight: 900;
    text-decoration: none;
}

.secret-friend-public-feed .secret-friend-row,
.secret-friend-public-feed .secret-friend-post {
    padding: 12px;
    border-color: #e0e8f1;
    box-shadow: 0 8px 18px rgba(49, 77, 110, 0.05);
}

.secret-friend-letter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.secret-friend-letter-list,
.secret-friend-event-list {
    display: grid;
    gap: 8px;
}

.secret-friend-letter-card,
.secret-friend-event-card {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #e1e9f3;
    border-radius: 8px;
    background: #fbfdff;
}

.secret-friend-letter-card p,
.secret-friend-event-card p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
}

.secret-friend-letter-card small,
.secret-friend-event-card small {
    color: #6b7a90;
    line-height: 1.35;
}

.secret-friend-cheer-form {
    display: grid;
    gap: 10px;
}

.secret-friend-cheer-art {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 10px 12px rgba(185, 88, 128, 0.12));
}

.secret-friend-cheer-form label {
    display: grid;
    gap: 7px;
}

.secret-friend-cheer-form span {
    color: var(--sf-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.secret-friend-card--cheer {
    background:
        linear-gradient(135deg, rgba(255, 240, 247, 0.78), rgba(255, 255, 255, 0.92)),
        #fff;
}

.secret-friend-card--events {
    background:
        linear-gradient(135deg, rgba(239, 248, 255, 0.82), rgba(255, 255, 255, 0.92)),
        #fff;
}

@media (max-width: 1260px) {
    .secret-friend-student-dashboard {
        grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    }

    .secret-friend-student-dashboard > aside:last-child {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .secret-friend-student-root.secret-friend-student-shell {
        grid-template-columns: 1fr;
    }

    .secret-friend-student-sidebar {
        position: static;
        height: auto;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: none;
        align-items: center;
        padding: 12px;
    }

    .secret-friend-student-nav {
        grid-auto-flow: column;
        grid-auto-columns: minmax(74px, 1fr);
        overflow-x: auto;
        margin-top: 0;
    }

    .secret-friend-student-nav button {
        min-height: 62px;
    }

    .secret-friend-student-main {
        padding: 14px;
    }

    .secret-friend-student-hero-content,
    .secret-friend-student-dashboard,
    .secret-friend-student-dashboard > aside:last-child {
        grid-template-columns: 1fr;
    }

    .secret-friend-hero-art {
        width: min(300px, 72vw);
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .secret-friend-student-sidebar {
        grid-template-columns: 1fr;
    }

    .secret-friend-student-logout {
        width: 100%;
    }

    .secret-friend-student-topbar,
    .secret-friend-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .secret-friend-student-hero-content h1 {
        font-size: 2.4rem;
    }

    .secret-friend-student-hero-stats,
    .secret-friend-letter-grid,
    .secret-friend-card--privacy {
        grid-template-columns: 1fr;
    }

    .secret-friend-card--privacy img {
        justify-self: end;
    }
}
