:root {
    --ink: #18213a;
    --muted: #5d6684;
    --paper: #fff8ee;
    --panel: #ffffff;
    --line: #eadfca;
    --blue: #2978ff;
    --blue-dark: #1554bf;
    --pink: #ff5c9a;
    --yellow: #ffd166;
    --green: #31b67a;
    --purple: #7b61ff;
    --shadow: 0 18px 50px rgba(24, 33, 58, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(24, 33, 58, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(24, 33, 58, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #fff8ee 0%, #eef7ff 48%, #fff5fa 100%);
    background-size: 34px 34px, 34px 34px, auto;
    font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px clamp(18px, 5vw, 70px);
    border-bottom: 2px solid rgba(234, 223, 202, 0.8);
    background: rgba(255, 249, 237, 0.94);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 900;
}

.brand::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--pink), var(--yellow));
    box-shadow: 14px 0 0 var(--blue), 28px 0 0 var(--green);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 800;
}

nav a {
    padding: 8px 12px;
    border-radius: 999px;
}

nav a:hover,
nav a[aria-current],
.admin-link {
    color: #fff;
    background: var(--blue);
}

main {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.hero {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: clamp(36px, 6vw, 60px) 0 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--pink);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
    max-width: 820px;
    margin-bottom: 22px;
    font-size: clamp(2.35rem, 6.2vw, 4.6rem);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.hero-copy > p:not(.eyebrow),
.contact-band p,
.admin-header p,
.login-card p,
.muted {
    color: var(--muted);
    font-size: 1.08rem;
}

.child-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.child-facts span {
    padding: 9px 12px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--blue-dark);
    font-weight: 900;
}

.child-intro-list {
    display: grid;
    gap: 8px;
    margin-top: 20px;
    max-width: 760px;
}

.child-intro-list p {
    margin: 0;
    padding-left: 16px;
    border-left: 4px solid var(--yellow);
    color: var(--muted);
}

.child-intro-list strong { color: var(--ink); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.button.primary {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 10px 22px rgba(41, 120, 255, 0.28);
}

.button.primary:hover { background: var(--blue-dark); }

.button.secondary {
    color: var(--blue-dark);
    border-color: var(--blue);
    background: #fff;
}

.hero-world {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    max-height: 430px;
    border: 5px solid #fff;
    border-radius: 32px;
    background: #dff3ff;
    box-shadow: var(--shadow);
}

.hero-world img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    max-height: 430px;
    object-fit: cover;
}

.play-board {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: min(360px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 3px solid #fff;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 34px rgba(24, 33, 58, 0.18);
    backdrop-filter: blur(10px);
}

.play-board span {
    display: grid;
    min-height: 54px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.play-board span:nth-child(1) { background: var(--purple); }
.play-board span:nth-child(2) { background: var(--green); }
.play-board span:nth-child(3) { background: var(--blue); }
.play-board span:nth-child(4) { background: var(--pink); }
.play-board span:nth-child(5) { color: var(--ink); background: var(--yellow); }
.play-board span:nth-child(6) { background: #ff8a3d; }

.section,
.contact-band {
    padding: 62px 0;
    border-top: 2px dashed rgba(24, 33, 58, 0.18);
}

.interest-hub {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 20px;
    align-items: stretch;
    margin: 10px 0 32px;
}

.hub-main {
    padding: 30px;
    border: 3px solid #fff;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.5), rgba(255, 255, 255, 0.9)),
        #fff;
    box-shadow: var(--shadow);
}

.hub-main h2 {
    max-width: 760px;
    margin-bottom: 14px;
}

.hub-main p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    font-weight: 800;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-stats article {
    display: grid;
    min-height: 120px;
    align-content: center;
    padding: 18px;
    border: 3px solid #fff;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.mini-stats article:nth-child(1) { background: #eef5ff; }
.mini-stats article:nth-child(2) { background: #fff0f6; }
.mini-stats article:nth-child(3) { background: #ecfff6; }
.mini-stats article:nth-child(4) { background: #fff8df; }

.mini-stats strong {
    color: var(--blue-dark);
    font-size: 2.2rem;
    line-height: 1;
}

.mini-stats span {
    color: var(--muted);
    font-weight: 900;
}

.mission-section {
    padding-top: 48px;
}

.mission-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mission-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 22px;
    border: 3px solid #fff;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(24, 33, 58, 0.1);
}

.mission-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 100px;
    height: 100px;
    border: 16px solid rgba(41, 120, 255, 0.12);
    border-radius: 28px;
    transform: rotate(18deg);
}

.mission-card span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--blue);
    font-size: 0.85rem;
    font-weight: 900;
}

.mission-card:nth-child(2) span { background: var(--green); }
.mission-card:nth-child(3) span { background: var(--pink); }
.mission-card:nth-child(4) span { color: var(--ink); background: var(--yellow); }

.mission-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.discovery-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.badge-wall,
.curiosity-notes {
    display: grid;
    gap: 14px;
}

.badge-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.badge-card {
    display: grid;
    min-height: 150px;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border: 3px solid #fff;
    border-radius: 22px;
    color: #fff;
    background: var(--purple);
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.1);
}

.badge-card:nth-child(2) { background: var(--green); }
.badge-card:nth-child(3) { background: var(--pink); }
.badge-card:nth-child(4) { color: var(--ink); background: var(--yellow); }

.badge-card strong {
    font-size: 1.25rem;
    line-height: 1.15;
}

.badge-card span {
    font-weight: 800;
}

.curiosity-notes article {
    padding: 20px;
    border-left: 8px solid var(--blue);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.curiosity-notes article:nth-child(2) { border-left-color: var(--pink); }
.curiosity-notes article:nth-child(3) { border-left-color: var(--green); }

.curiosity-notes span {
    color: var(--blue-dark);
    font-weight: 900;
}

.curiosity-notes p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.section-heading {
    max-width: 650px;
    margin-bottom: 26px;
}

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

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.page-carousel {
    --carousel-gap: 22px;
    overflow: hidden;
}

.page-carousel .carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    transition: transform 650ms ease;
    will-change: transform;
}

.page-carousel .page-card {
    flex: 0 0 100%;
    position: relative;
    display: flex;
    min-height: 360px;
    align-items: flex-end;
    padding: 0;
    background: #dcecff;
}

.page-carousel .page-card img,
.page-carousel .page-card .image-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
}

.page-carousel .page-card > .page-card-content {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 44px), 620px);
    margin: 22px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(24, 33, 58, 0.14);
}

.page-card {
    display: grid;
    gap: 16px;
    overflow: hidden;
    min-height: 210px;
    padding: 22px;
    border: 2px solid rgba(123, 97, 255, 0.2);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.page-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    background: #eef5ff;
}

.text-link {
    display: inline-flex;
    margin-top: 8px;
    color: var(--blue-dark);
    font-weight: 900;
}

.topic-card {
    min-height: 190px;
    padding: 24px;
    border: 2px solid #fff;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.topic-card:nth-child(odd) { border-color: rgba(41, 120, 255, 0.28); }
.topic-card:nth-child(even) { border-color: rgba(255, 92, 154, 0.28); }

.topic-card p,
.post p { color: var(--muted); }

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

.poll-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 3px solid #fff;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(238, 245, 255, 0.92), rgba(255, 240, 246, 0.92)),
        #fff;
    box-shadow: var(--shadow);
}

.poll-heading span {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #fff;
    font-size: 0.86rem;
    font-weight: 900;
}

.poll-heading strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.15;
}

.poll-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.poll-options {
    display: grid;
    gap: 10px;
}

.poll-options button {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 2px solid rgba(41, 120, 255, 0.22);
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.poll-options button:hover {
    border-color: var(--blue);
    background: #fff;
    transform: translateY(-1px);
}

.poll-options small {
    flex: 0 0 auto;
    color: var(--blue-dark);
    font-size: 0.88rem;
    font-weight: 900;
}

.post-carousel {
    --carousel-gap: 22px;
    overflow: hidden;
}

.carousel-viewport {
    overflow: hidden;
    margin: -4px;
    padding: 4px;
}

.post-carousel .carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    transition: transform 650ms ease;
    will-change: transform;
}

.post-carousel .post {
    flex: 0 0 calc((100% - (var(--carousel-gap) * 3)) / 4);
}

.post-carousel[data-count="1"] .post { flex-basis: 100%; }
.post-carousel[data-count="2"] .post { flex-basis: calc((100% - var(--carousel-gap)) / 2); }
.post-carousel[data-count="3"] .post { flex-basis: calc((100% - (var(--carousel-gap) * 2)) / 3); }

.post {
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

.post img,
.image-fallback {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--green));
    font-size: 4rem;
    font-weight: 900;
    background-color: #eef5ff;
}

.post-body { padding: 22px; }

.post-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 2px dashed rgba(24, 33, 58, 0.14);
    color: var(--muted);
    font-weight: 900;
}

.post-footer .text-link {
    margin-top: 0;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--blue-dark);
    font-size: 0.95rem;
    font-weight: 900;
}

details { margin-top: 14px; }

summary {
    color: var(--pink);
    font-weight: 900;
    cursor: pointer;
}

.feedback-box {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px dashed rgba(24, 33, 58, 0.16);
}

.like-form button,
.comment-form button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    background: var(--pink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.comment-form {
    display: grid;
    gap: 12px;
}

.comment-form label {
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
}

.comment-form textarea { min-height: 92px; }

.feedback-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.feedback-actions button { min-height: 48px; }

.button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.like-button { background: var(--blue) !important; }

.comments {
    display: grid;
    gap: 8px;
}

.comments p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff8df;
    color: var(--ink);
}

.empty-state {
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.contact-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.admin-body main {
    width: min(1040px, calc(100% - 36px));
}

.admin-shell { padding: 42px 0 72px; }

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px 0;
}

.login-card {
    width: min(460px, 100%);
}

.login-card h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 6vw, 3rem);
}

.admin-header { margin-bottom: 24px; }

.admin-tabs {
    position: sticky;
    top: 74px;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
    backdrop-filter: blur(12px);
}

.admin-tabs a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #eef5ff;
    font-weight: 900;
}

.admin-tabs a.active {
    color: #fff;
    background: var(--blue);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: grid;
}

.notice {
    padding: 14px 16px;
    border: 2px solid rgba(49, 182, 122, 0.32);
    border-radius: 18px;
    color: #12643f;
    background: #e8fff4;
    font-weight: 900;
}

.notice.error {
    color: #9d174d;
    border-color: rgba(255, 92, 154, 0.36);
    background: #fff0f6;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.lower-grid {
    margin-top: 22px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
}

.admin-form,
.admin-side {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 2px solid #fff;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.settings-form { margin-top: 22px; }

.admin-image-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-image-strip img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: #eef5ff;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 900;
}

input,
textarea,
select {
    width: 100%;
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    color: var(--ink);
    background: #fffdf8;
    font: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(41, 120, 255, 0.22);
    border-color: var(--blue);
}

textarea { resize: vertical; }

.form-section-title,
.admin-side h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.3rem;
    font-weight: 900;
}

.idea-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    font-weight: 800;
}

.small-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 800;
}

.admin-posts { padding-bottom: 0; }

.mini-post-list {
    display: grid;
    gap: 12px;
}

.mini-post-list article {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
}

.content-row {
    align-items: center;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.row-actions form { margin: 0; }

.small-button,
.danger-button {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.9rem;
}

.small-button {
    color: var(--blue-dark);
    border-color: rgba(41, 120, 255, 0.28);
    background: #eef5ff;
}

.danger-button {
    color: #9d174d;
    border-color: rgba(255, 92, 154, 0.28);
    background: #fff0f6;
}

.edit-section {
    margin-top: 22px;
}

.activity-section {
    padding-top: 36px;
}

.activity-list {
    display: grid;
    gap: 8px;
}

.activity-row {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.activity-row span { color: var(--muted); }

.activity-row time {
    color: var(--blue-dark);
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
}

.mini-post-list span {
    color: var(--muted);
    font-weight: 800;
}

.page-shell {
    width: min(880px, calc(100% - 36px));
}

.reading-page {
    padding: clamp(42px, 8vw, 84px) 0;
}

.reading-page h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.detail-meta {
    margin-bottom: 16px;
}

.lead {
    color: var(--muted);
    font-size: 1.22rem;
    font-weight: 800;
}

.reading-image {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    margin: 0;
    border: 4px solid #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.image-gallery {
    display: grid;
    gap: 14px;
    margin: 24px 0;
}

.featured-image {
    aspect-ratio: 16 / 9;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gallery-thumbs img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 3px solid #fff;
    border-radius: 18px;
    background: #eef5ff;
    box-shadow: 0 10px 24px rgba(24, 33, 58, 0.08);
}

.reading-content {
    padding: 26px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.reading-content p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.post-detail .image-fallback {
    max-height: 360px;
    border: 4px solid #fff;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-feedback {
    margin-top: 24px;
    padding: 24px;
    border: 3px solid #fff;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.learning-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.learning-map article {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 3px solid #fff;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.learning-map span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--blue);
    font-size: 1.2rem;
    font-weight: 900;
}

.learning-map article:nth-child(2) span { background: var(--pink); }
.learning-map article:nth-child(3) span { background: var(--green); }

.learning-map strong {
    font-size: 1.15rem;
}

.learning-map p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.detail-highlights,
.detail-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.detail-card,
.detail-item {
    padding: 20px;
    border: 2px solid #fff;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 33, 58, 0.08);
}

.detail-number {
    display: block;
    margin-bottom: 8px;
    color: var(--pink);
    font-size: 1.8rem;
    font-weight: 900;
}

.detail-card h2,
.detail-item h2 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.detail-card p,
.detail-item p { margin-bottom: 0; color: var(--muted); }

.detail-item-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.detail-item-heading span {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #eaf2ff;
    font-size: 0.82rem;
    font-weight: 900;
}

.site-footer {
    width: 100%;
    margin: 0;
    padding: 34px max(18px, calc((100% - 1120px) / 2)) 24px;
    border-top: 2px solid rgba(24, 33, 58, 0.12);
    color: var(--muted);
    font-weight: 800;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr;
    gap: 28px;
    padding-bottom: 24px;
}

.site-footer p {
    margin: 0;
}

.footer-grid p + p { margin-top: 8px; }

.footer-title {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 18px;
    border-top: 2px dashed rgba(24, 33, 58, 0.12);
}

.site-footer a {
    color: var(--blue-dark);
    font-weight: 900;
}

/* Only the selected admin tab should occupy the page. */
.admin-grid.tab-panel,
.section.tab-panel,
.edit-section.tab-panel {
    display: none;
}

.admin-grid.tab-panel.active,
.section.tab-panel.active,
.edit-section.tab-panel.active {
    display: grid;
}

@media (max-width: 860px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-tabs {
        top: 112px;
    }

    .hero,
    .admin-grid,
    .interest-hub,
    .discovery-grid {
        grid-template-columns: 1fr;
    }

    .hero { min-height: auto; }

    .topic-grid,
    .poll-grid,
    .page-grid,
    .gallery-thumbs,
    .detail-highlights,
    .detail-items,
    .mission-track,
    .learning-map {
        grid-template-columns: 1fr;
    }

    .post-carousel .post {
        flex-basis: calc((100% - var(--carousel-gap)) / 2);
    }

    .feedback-actions,
    .footer-grid { grid-template-columns: 1fr; }

    .row-actions { margin-left: 0; }

    .activity-row { grid-template-columns: 1fr; gap: 3px; }

    .contact-band {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .post-carousel .post {
        flex-basis: 100%;
    }
}

@media (max-width: 520px) {
    main,
    .admin-body main {
        width: min(100% - 24px, 1120px);
    }

    .play-board {
        position: static;
        width: 100%;
        margin-top: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-world,
    .hero-world img { min-height: 280px; }

    h1 { font-size: 2.25rem; }
}
