:root {
    --ink: #26323f;
    --muted: #627080;
    --paper: #fffaf1;
    --panel: #ffffff;
    --teal: #1daaa2;
    --coral: #ff6f61;
    --yellow: #ffd166;
    --green: #72c472;
    --blue: #4d8df7;
    --violet: #8e6bd8;
    --shadow: 0 18px 50px rgba(38, 50, 63, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff4dc 0%, #edf8ff 42%, #fffaf1 100%);
}

button,
a {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px clamp(18px, 4vw, 54px);
    background: #fffaf1;
    border-bottom: 2px solid rgba(38, 50, 63, 0.08);
    min-height: 62px;
}

.brand,
.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    color: var(--ink);
    font-weight: 850;
    min-width: 0;
}

.brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.child-top-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.child-top-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.78);
    border: 2px solid rgba(38, 50, 63, 0.08);
    min-height: 50px;
    white-space: nowrap;
}

.child-top-links img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: 0 0 auto;
}

.notification-enable {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.notification-enable:disabled {
    cursor: not-allowed;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

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

.hero {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 30px;
    align-items: center;
    padding: 52px 0 24px;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 0.95;
}

.hero p {
    max-width: 610px;
    color: var(--muted);
    font-size: 1.16rem;
}

.eyebrow {
    margin: 0 0 8px;
    color: #0b817b;
    text-transform: uppercase;
    letter-spacing: 0;
    font-weight: 900;
    font-size: 0.78rem;
}

.hero-board img {
    width: 100%;
    filter: drop-shadow(0 24px 30px rgba(38, 50, 63, 0.2));
}

.family-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 24px;
}

.family-shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: 0 6px 16px rgba(38, 50, 63, 0.06);
}

.family-shortcut img {
    width: 30px;
    height: 30px;
}

.kids-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 28px;
}

.kid-card,
.quest-card,
.reward-card,
.activity {
    background: var(--panel);
    border: 2px solid rgba(38, 50, 63, 0.09);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.kid-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    overflow: hidden;
}

.kid-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.kid-actions form {
    margin: 0;
}

.kid-actions button {
    min-height: 36px;
    padding: 8px 12px;
}

.kid-card-zac {
    border-color: rgba(29, 170, 162, 0.35);
}

.kid-card-victoria {
    border-color: rgba(255, 111, 97, 0.35);
}

.kid-portrait {
    min-height: 190px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.45), rgba(77, 141, 247, 0.18));
}

.kid-portrait img {
    width: min(150px, 100%);
}

.kid-info h2,
.section-heading h2,
.map-layout h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.kid-info p {
    color: var(--muted);
}

.meters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.meters div {
    padding: 10px;
    border-radius: 8px;
    background: #f4fbff;
}

.meters strong {
    display: block;
    font-size: 1.35rem;
}

.meters span,
.quest-owner {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.progress {
    height: 12px;
    margin-top: 14px;
    border-radius: 999px;
    background: #e8edf1;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral));
}

.status-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.kid-alert-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #614200;
    background: #fff4d8;
    font-weight: 850;
}

.kid-alert-strip strong {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--coral);
}

.streak-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.streak-mini span {
    padding: 6px 9px;
    border-radius: 999px;
    color: #31516b;
    background: #eaf3ff;
    font-size: 0.78rem;
    font-weight: 900;
}

.section-band,
.map-layout {
    margin: 28px 0;
    padding: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

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

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

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

.kid-quest-column {
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.kid-reward-column {
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.kid-quest-column-zac {
    background: rgba(231, 247, 246, 0.72);
}

.kid-quest-column-victoria {
    background: rgba(255, 232, 228, 0.72);
}

.kid-reward-column-zac {
    background: rgba(231, 247, 246, 0.72);
}

.kid-reward-column-victoria {
    background: rgba(255, 232, 228, 0.72);
}

.kid-column-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.kid-column-heading img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.kid-column-heading h3 {
    margin: 0;
    font-size: 1.5rem;
}

.kid-quest-list {
    display: grid;
    gap: 12px;
}

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

.quest-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 10px;
    position: relative;
}

.quest-card form {
    grid-column: 1 / -1;
    margin: 0;
}

.quest-card.is-done {
    opacity: 0.68;
}

.quest-status-pending {
    border-color: rgba(255, 193, 7, 0.55);
    background: #fffaf0;
}

.quest-status-approved {
    border-color: rgba(114, 196, 114, 0.55);
}

.quest-status-redo {
    border-color: rgba(255, 111, 97, 0.55);
    background: #fff0ed;
}

.quest-icon,
.reward-card > img {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fff4d8;
}

.quest-icon img,
.reward-card > img {
    padding: 7px;
}

.quest-card h3,
.reward-card h3,
.activity h3 {
    margin: 2px 0 4px;
}

.quest-card p,
.reward-card p,
.map-copy,
.activity p {
    color: var(--muted);
}

.quest-card p {
    margin: 4px 0;
    font-size: 0.92rem;
    line-height: 1.28;
}

.pill {
    display: inline-flex;
    margin: 3px 4px 3px 0;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e7f7f6;
    color: #0b817b;
    font-weight: 800;
    font-size: 0.82rem;
}

.schedule-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 3px 4px 3px 0;
    padding: 4px 9px;
    border-radius: 999px;
    color: #31516b;
    background: #eaf3ff;
    font-weight: 900;
    font-size: 0.78rem;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 4px 4px 0 0;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eaf3ff;
    color: #31516b;
    font-size: 0.78rem;
    font-weight: 900;
}

.time-badge img {
    width: 16px;
    height: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin: 3px 4px 3px 0;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.78rem;
}

.status-new {
    background: var(--blue);
}

.status-pending {
    color: #614200;
    background: var(--yellow);
}

.status-approved {
    background: var(--green);
}

.status-redo {
    background: var(--coral);
}

.status-reward-pending {
    color: #614200;
    background: var(--yellow);
}

.status-reward-approved {
    background: var(--green);
}

.status-reward-denied {
    background: var(--coral);
}

button,
.icon-button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

.quest-card button {
    min-height: 34px;
    padding: 7px 10px;
}

button:disabled {
    cursor: default;
    background: var(--green);
}

.icon-button {
    width: 46px;
    padding: 10px;
}

.icon-button img {
    width: 100%;
}

.reward-card {
    padding: 16px;
}

.builder-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding: 16px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px dashed rgba(38, 50, 63, 0.18);
}

.admin-panel {
    padding: 32px 0 0;
}

.admin-panel > .section-heading {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.96);
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.admin-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.login-form,
.danger-form,
.admin-lists article {
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: var(--shadow);
}

.login-form {
    display: grid;
    gap: 12px;
    max-width: 420px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

.login-form input {
    min-height: 42px;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    padding: 8px 10px;
}

.form-error {
    margin: 0;
    color: #b9352b;
    font-weight: 800;
}

.form-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #0b817b;
    background: #e7f7f6;
    font-weight: 850;
}

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

.admin-scoreboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.admin-alerts {
    display: grid;
    grid-template-columns: minmax(220px, 0.38fr) 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 8px;
    background: #26323f;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.admin-alerts h2,
.admin-alerts p {
    margin: 0;
}

.admin-alerts .eyebrow {
    color: #ffd166;
}

.admin-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.admin-alert-grid span {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.admin-alert-grid strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
}

.completed-jump-panel {
    display: grid;
    grid-template-columns: minmax(170px, 0.26fr) 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: 0 8px 20px rgba(38, 50, 63, 0.07);
}

.completed-jump-panel h2,
.completed-jump-panel p {
    margin: 0;
}

.completed-jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.completed-jump-links a {
    display: grid;
    gap: 2px;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    background: #fffaf1;
    border: 2px solid rgba(38, 50, 63, 0.08);
    font-weight: 900;
}

.completed-jump-links a:hover,
.completed-jump-links a:focus {
    border-color: rgba(29, 170, 162, 0.55);
    outline: none;
}

.completed-jump-links span {
    color: var(--muted);
    font-size: 0.82rem;
}

.score-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: var(--shadow);
}

.score-card img {
    width: 84px;
    border-radius: 8px;
    background: #fffaf1;
}

.score-card h2,
.score-card p {
    margin: 0;
}

.score-card p:not(.eyebrow) {
    color: var(--muted);
}

.admin-form {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
}

.danger-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0;
}

.danger-form h3,
.danger-form p,
.admin-lists h2 {
    margin: 0;
}

.danger-form button {
    background: #b9352b;
}

.admin-lists p {
    color: var(--muted);
}

.muted-text {
    color: var(--muted);
    font-weight: 800;
}

.admin-table form {
    margin: 0;
}

.admin-table button {
    min-height: 32px;
    padding: 6px 10px;
}

.admin-table .button-warn {
    margin-top: 6px;
    background: var(--coral);
}

.button-danger {
    background: #b9352b;
}

.table-note-input {
    width: min(170px, 100%);
    min-height: 32px;
    margin-top: 6px;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    padding: 5px 8px;
}

.proof-thumb {
    width: 84px;
    height: 64px;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.14);
    background: #fffaf1;
}

.proof-view-button {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.proof-lightbox[hidden] {
    display: none;
}

.proof-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(38, 50, 63, 0.72);
}

.proof-lightbox-inner {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 36px);
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    overflow: auto;
}

.proof-lightbox-inner h2 {
    margin: 0 0 12px;
}

.proof-lightbox-inner img {
    width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 8px;
    background: #fffaf1;
}

.proof-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.admin-quests {
    display: grid;
    gap: 16px;
}

.admin-table-block h3 {
    margin: 0 0 8px;
}

.configured-quest-cards {
    display: grid;
    gap: 12px;
}

.configured-quest-card {
    display: grid;
    gap: 12px;
    scroll-margin-top: 86px;
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.09);
    box-shadow: 0 8px 20px rgba(38, 50, 63, 0.07);
}

.configured-quest-card:target,
.configured-quest-card:focus {
    border-color: rgba(255, 209, 102, 0.92);
    box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.2), 0 12px 24px rgba(38, 50, 63, 0.1);
    outline: none;
}

.configured-quest-card-pending {
    border-color: rgba(255, 209, 102, 0.7);
}

.configured-quest-card-approved {
    background: #f4fbff;
}

.configured-quest-card-redo {
    border-color: rgba(255, 111, 97, 0.48);
}

.configured-quest-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.configured-quest-main h4,
.configured-quest-main p {
    margin: 0;
}

.configured-quest-main p {
    color: var(--muted);
    font-weight: 750;
}

.configured-quest-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.configured-quest-meta span {
    display: grid;
    align-content: start;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    color: var(--ink);
    background: #fffaf1;
    font-size: 0.9rem;
    font-weight: 850;
}

.configured-quest-meta strong {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.configured-quest-meta em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.78rem;
}

.configured-quest-meta .status-badge {
    width: fit-content;
}

.configured-quest-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.configured-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.configured-actions form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.configured-actions button {
    min-height: 34px;
    padding: 7px 10px;
}

.configured-actions .button-warn {
    background: var(--coral);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(38, 50, 63, 0.1);
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    background: #fff4d8;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.admin-table td span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-table td .status-badge {
    display: inline-flex;
    margin: 0;
    color: #ffffff;
}

.admin-table td .status-pending {
    color: #614200;
}

.admin-completed {
    margin-top: 18px;
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.admin-completed h2 {
    margin: 0 0 12px;
}

.completed-chore-cards {
    display: grid;
    gap: 12px;
}

.completed-chore-card {
    display: grid;
    gap: 12px;
    scroll-margin-top: 86px;
    padding: 12px;
    border-radius: 8px;
    background: #f7fffb;
    border: 2px solid rgba(29, 170, 162, 0.22);
    box-shadow: 0 8px 20px rgba(38, 50, 63, 0.06);
}

.completed-chore-card:target,
.completed-chore-card:focus {
    border-color: rgba(29, 170, 162, 0.88);
    box-shadow: 0 0 0 4px rgba(29, 170, 162, 0.16), 0 12px 24px rgba(38, 50, 63, 0.1);
    outline: none;
}

.completed-chore-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.completed-chore-main h3,
.completed-chore-main p {
    margin: 0;
}

.completed-chore-main p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 750;
}

.completed-chore-proof {
    min-height: 38px;
}

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

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.settings-card {
    grid-template-columns: 1fr;
    align-content: start;
}

.settings-card h3 {
    margin: 0;
}

.checkbox-label {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
    min-height: 42px;
    padding: 8px 0;
    color: var(--ink) !important;
}

.checkbox-label input {
    width: 20px;
    min-height: 20px;
}

.balance-card {
    grid-template-columns: 1fr 120px 100px 1fr auto;
    align-items: end;
}

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

.weekly-chest-card {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.1);
    background: #fffaf1;
}

.weekly-chest-card.is-ready {
    border-color: rgba(255, 209, 102, 0.95);
    background: #fff4d8;
}

.weekly-chest-card.is-awarded {
    border-color: rgba(114, 196, 114, 0.65);
    background: #f2fff2;
}

.weekly-chest-card img {
    width: 104px;
    image-rendering: pixelated;
}

.weekly-chest-card h3,
.weekly-chest-card p {
    margin: 0 0 8px;
}

.weekly-chest-card form {
    margin: 10px 0 0;
}

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

.backup-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.1);
    background: #f4fbff;
}

.backup-card h3,
.backup-card p {
    margin: 0;
}

.backup-card p {
    color: var(--muted);
    font-weight: 700;
}

.backup-card form {
    margin: 0;
}

.chest-progress {
    margin: 8px 0;
}

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

.admin-child-card {
    padding: 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.09);
}

.admin-child-card-zac {
    background: rgba(231, 247, 246, 0.75);
}

.admin-child-card-victoria {
    background: rgba(255, 232, 228, 0.75);
}

.admin-child-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.admin-child-summary img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.admin-child-summary h4,
.admin-child-summary span {
    margin: 0;
}

.admin-child-summary span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.toggle-panel {
    position: relative;
    margin-top: 12px;
    padding-top: 38px;
}

.toggle-panel[hidden] {
    display: none;
}

.panel-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    border: 2px solid rgba(38, 50, 63, 0.16);
}

.balance-card h3 {
    margin: 0;
}

.manage-list,
.admin-rewards {
    display: grid;
    gap: 12px;
}

.manage-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #fffaf1;
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.manage-row-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manage-row label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.manage-row input,
.manage-row select {
    min-height: 38px;
    width: 100%;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    padding: 7px 9px;
    color: var(--ink);
    background: #ffffff;
}

.manage-actions {
    display: flex;
    align-items: end;
    gap: 8px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(38, 50, 63, 0.55);
    animation: fade-in 180ms ease-out;
}

.celebration-modal {
    position: relative;
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    border: 3px solid rgba(38, 50, 63, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    animation: modal-pop 420ms cubic-bezier(.17, .89, .32, 1.28);
}

.celebration-modal h2 {
    position: relative;
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1;
}

.celebration-modal p,
.celebration-modal strong,
.celebration-modal form {
    position: relative;
}

.celebration-modal p {
    color: var(--muted);
    font-size: 1.05rem;
}

.celebration-modal strong {
    display: inline-flex;
    margin: 6px 0 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e7f7f6;
    color: #0b817b;
}

.proof-upload-form {
    position: relative;
    display: grid;
    gap: 8px;
    margin: 10px 0 14px;
}

.modal-proof-preview {
    position: relative;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid rgba(38, 50, 63, 0.12);
    box-shadow: 0 10px 28px rgba(38, 50, 63, 0.18);
}

.photo-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 900;
    cursor: pointer;
}

.photo-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-hint {
    margin: 0;
    font-size: 0.9rem;
}

.modal-burst {
    position: absolute;
    inset: -80px;
    opacity: 0.28;
    background:
        radial-gradient(circle at 18% 24%, var(--yellow) 0 10px, transparent 11px),
        radial-gradient(circle at 82% 24%, var(--coral) 0 12px, transparent 13px),
        radial-gradient(circle at 24% 82%, var(--teal) 0 12px, transparent 13px),
        radial-gradient(circle at 80% 78%, var(--blue) 0 10px, transparent 11px);
    animation: burst-spin 7s linear infinite;
}

.modal-quest {
    background: linear-gradient(135deg, #ffffff, #fff4d8);
}

.modal-reward {
    background: linear-gradient(135deg, #ffffff, #e7f7f6);
}

.modal-treasure {
    background: linear-gradient(135deg, #ffffff, #fff4d8);
    border-color: rgba(255, 209, 102, 0.72);
}

.treasure-reveal {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 12px;
    margin: 12px 0 18px;
}

.treasure-stage {
    position: relative;
    width: min(260px, 76vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 54%, rgba(255, 209, 102, 0.34), rgba(231, 247, 246, 0.9));
    overflow: hidden;
}

.treasure-chest-art {
    position: relative;
    z-index: 2;
    width: 48%;
    transform-origin: 50% 82%;
    filter: drop-shadow(0 16px 18px rgba(38, 50, 63, 0.22));
}

.treasure-glow {
    position: absolute;
    width: 42%;
    height: 42%;
    border-radius: 999px;
    background: rgba(255, 209, 102, 0.78);
    opacity: 0;
    transform: scale(0.2);
}

.treasure-prize-icon {
    position: absolute;
    z-index: 3;
    width: 26%;
    opacity: 0;
    transform: translateY(34px) scale(0.4);
    filter: drop-shadow(0 12px 16px rgba(38, 50, 63, 0.2));
}

.treasure-reveal.is-open .treasure-chest-art {
    animation: chest-open-pop 760ms ease both;
}

.treasure-reveal.is-open .treasure-glow {
    animation: treasure-glow-pop 900ms ease both;
}

.treasure-reveal.is-open .treasure-prize-icon {
    animation: treasure-prize-pop 880ms cubic-bezier(.17, .89, .32, 1.28) 220ms both;
}

.open-chest-button {
    min-width: 128px;
}

.treasure-prize {
    position: relative;
    text-align: center;
}

.treasure-prize h3,
.treasure-prize p {
    margin: 0 0 8px;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes burst-spin {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.04); }
}

@keyframes chest-open-pop {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    34% { transform: translateY(-5px) scale(1.08) rotate(-4deg); }
    58% { transform: translateY(4px) scale(0.96) rotate(4deg); }
    100% { transform: translateY(8px) scale(1.02) rotate(0deg); }
}

@keyframes treasure-glow-pop {
    0% { opacity: 0; transform: scale(0.2); }
    45% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.76; transform: scale(1.55); }
}

@keyframes treasure-prize-pop {
    0% { opacity: 0; transform: translateY(34px) scale(0.4) rotate(-12deg); }
    64% { opacity: 1; transform: translateY(-38px) scale(1.16) rotate(8deg); }
    100% { opacity: 1; transform: translateY(-24px) scale(1) rotate(0deg); }
}

.builder-form h3 {
    grid-column: 1 / -1;
    margin: 0;
}

.builder-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.82rem;
}

.builder-form input,
.builder-form select {
    width: 100%;
    min-height: 42px;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--ink);
    background: #fffaf1;
}

.reward-card strong {
    display: block;
    margin: 12px 0;
    font-size: 1.4rem;
}

.secondary-button {
    margin: 4px 0 8px;
    background: var(--blue);
}

.minute-stepper {
    display: grid;
    grid-template-columns: 38px 64px 38px;
    gap: 6px;
    align-items: center;
    width: max-content;
    margin: 8px 0;
}

.minute-stepper button {
    min-height: 38px;
    padding: 0;
}

.minute-stepper input {
    min-height: 38px;
    width: 64px;
    text-align: center;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    font-weight: 900;
}

.snack-picker-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 70;
    width: min(520px, calc(100vw - 24px));
    max-height: min(620px, calc(100vh - 32px));
    overflow: auto;
    margin: 0;
    padding: 42px 14px 14px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background: #ffffff;
    border: 3px solid rgba(38, 50, 63, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.snack-picker-panel h3 {
    margin: 0 0 10px;
}

.snack-choice {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.snack-picker-panel .snack-choice {
    margin: 0 0 8px;
}

.snack-choice img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
}

.snack-choice input {
    width: 18px;
    height: 18px;
}

label.snack-choice {
    grid-template-columns: auto 58px minmax(0, 1fr);
}

.snack-buy-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 6px;
    align-items: center;
}

.snack-buy-actions form {
    margin: 0;
}

.snack-buy-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 9px;
    white-space: nowrap;
}

.snack-buy-button img {
    width: 18px;
    height: 18px;
}

.snack-buy-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.5);
}

.snack-choice span {
    display: grid;
    gap: 2px;
    font-weight: 900;
}

.snack-choice small {
    color: var(--muted);
    font-weight: 800;
}

.snack-choice.is-out {
    opacity: 0.52;
}

.mystery-box-panel {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.18), rgba(142, 107, 216, 0.16)),
        #ffffff;
    border: 2px solid rgba(142, 107, 216, 0.22);
}

.mystery-box-panel > img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.mystery-box-panel p,
.mystery-box-panel small {
    margin: 0;
    font-weight: 850;
}

.mystery-box-panel small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.mystery-box-panel.is-locked {
    opacity: 0.74;
    filter: grayscale(0.2);
}

.mystery-buy-actions {
    margin-top: 8px;
}

.snack-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.snack-admin-card {
    display: grid;
    grid-template-columns: 96px repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #fffaf1;
    border: 2px solid rgba(38, 50, 63, 0.08);
}

.snack-admin-card img {
    grid-row: span 3;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
}

.snack-admin-card label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.snack-admin-card input {
    min-height: 38px;
    border: 2px solid rgba(38, 50, 63, 0.14);
    border-radius: 8px;
    padding: 7px 9px;
}

.child-dashboard {
    padding: 32px 0 0;
}

.dashboard-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    padding: 22px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.1);
    background: rgba(255, 255, 255, 0.7);
    margin: 22px 0;
}

.dashboard-title-row h1,
.child-page-heading h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 0.98;
}

.dashboard-title-row p:not(.eyebrow) {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.08rem;
}

.character-stage {
    display: grid;
    place-items: center;
    min-height: 320px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.character-stage img {
    width: min(260px, 86%);
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 18px;
    margin: 22px 0;
}

.streak-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
    border-radius: 8px;
    background: #26323f;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.streak-card h2,
.streak-card h3,
.streak-card p {
    margin: 0 0 8px;
}

.streak-card .eyebrow {
    color: #ffd166;
}

.streak-card p {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 750;
}

.notification-board {
    margin: 22px 0;
    padding: 18px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.1);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
}

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

.notification-card {
    position: relative;
    min-height: 112px;
    padding: 14px;
    padding-right: 42px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.1);
    background: #ffffff;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    border: 2px solid rgba(38, 50, 63, 0.12);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 900;
    line-height: 1;
}

.notification-close:hover,
.notification-close:focus {
    color: var(--ink);
    background: #ffffff;
}

.notification-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.notification-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.notification-pending {
    border-color: rgba(255, 209, 102, 0.9);
    background: #fffaf0;
}

.notification-approved {
    border-color: rgba(114, 196, 114, 0.7);
    background: #f2fff2;
}

.notification-redo,
.notification-denied {
    border-color: rgba(255, 111, 97, 0.75);
    background: #fff0ed;
}

.minecraft-chest,
.sparkle-bank,
.inventory-grid {
    padding: 20px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.1);
    box-shadow: var(--shadow);
}

.minecraft-chest {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 18px;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(38, 50, 63, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(38, 50, 63, 0.08) 1px, transparent 1px),
        #dff3d2;
    background-size: 24px 24px;
}

.minecraft-chest img {
    width: 126px;
    image-rendering: pixelated;
}

.minecraft-chest h2,
.sparkle-bank h2,
.inventory-grid h2 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.inventory-grid h2 {
    grid-column: 1 / -1;
}

.inventory-grid div {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    border-radius: 4px;
    background: #8b5a2b;
    color: #ffffff;
    border: 4px solid #5c3518;
    box-shadow: inset 0 -8px rgba(0, 0, 0, 0.16);
}

.inventory-grid span {
    font-size: 0.7rem;
    font-weight: 900;
    color: #ffd166;
}

.inventory-grid strong {
    font-size: 1.2rem;
}

.inventory-grid small {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.mini-map-tile {
    background-image: linear-gradient(180deg, rgba(38, 50, 63, 0.15), rgba(38, 50, 63, 0.42)), var(--tile-bg) !important;
    background-size: cover !important;
    background-position: center !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
}

.theme-minecraft .dashboard-title-row {
    background:
        linear-gradient(90deg, rgba(38, 50, 63, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(38, 50, 63, 0.08) 1px, transparent 1px),
        #cbe8b8;
    background-size: 28px 28px;
}

.theme-minecraft button {
    border-radius: 4px;
    background: #4d7d35;
    box-shadow: inset 0 -4px rgba(0, 0, 0, 0.18);
}

.sparkle-bank {
    background: linear-gradient(135deg, #fff0ed, #ffffff 48%, #fff4d8);
}

.theme-sparkle {
    position: relative;
}

.theme-sparkle::before {
    content: "🌈";
    position: fixed;
    right: 4vw;
    top: 96px;
    z-index: -1;
    font-size: clamp(5rem, 14vw, 12rem);
    opacity: 0.16;
}

.theme-sparkle .dashboard-title-row,
.theme-sparkle .child-page-heading,
.theme-sparkle .notification-board,
.theme-sparkle .section-band {
    background:
        radial-gradient(circle at 92% 14%, rgba(255, 209, 102, 0.7), transparent 16%),
        radial-gradient(circle at 12% 18%, rgba(255, 111, 197, 0.24), transparent 18%),
        linear-gradient(135deg, #fff0fb, #eaf3ff 44%, #fff4d8);
    border-color: rgba(255, 111, 197, 0.28);
}

.theme-sparkle .dashboard-title-row h1::after,
.theme-sparkle .child-page-heading h1::after {
    content: "  🦄 👑";
    font-size: 0.46em;
}

.theme-sparkle button {
    background: linear-gradient(135deg, #ff6fc5, #8e6bd8);
}

.theme-sparkle .sparkle-bank {
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.95), transparent 14%),
        linear-gradient(135deg, #ffddf3, #e5d7ff 48%, #fff4d8);
    border-color: rgba(255, 111, 197, 0.38);
}

.theme-sparkle .sparkle-grid div {
    background: linear-gradient(135deg, #ff6fc5, #8e6bd8);
    border-color: #ffd166;
}

.sparkle-grid div {
    background: #8e6bd8;
    border-color: #6042a7;
}

.theme-sparkle button {
    background: var(--coral);
}

.solo-quest-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 30px;
}

.map-layout {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    align-items: start;
    gap: 22px;
}

.map-action {
    margin: 14px 0 0;
}

.path-stats {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.path-stat-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.09);
    overflow: visible;
    box-shadow: none;
}

.path-stat-card-zac {
    background: #f5fbfb;
    border-color: rgba(29, 170, 162, 0.24);
}

.path-stat-card-victoria {
    background: #fff6fb;
    border-color: rgba(255, 111, 178, 0.24);
}

.path-stat-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--teal);
    font-weight: 900;
    line-height: 1;
}

.path-stat-card-victoria .path-stat-icon {
    background: #ff6fb2;
}

.path-stat-card h3,
.path-stat-card p {
    margin: 0;
}

.path-stat-card p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
}

.family-current-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.family-tile-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    overflow: hidden;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.09);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(38, 50, 63, 0.08);
}

.family-tile-art {
    position: relative;
    min-height: 136px;
    overflow: hidden;
    border-radius: 8px;
    background: #edf8ff;
}

.family-tile-bg {
    width: 100%;
    height: 100%;
    min-height: 136px;
    display: block;
    object-fit: cover;
}

.family-tile-initial {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--teal);
    border: 2px solid rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.family-tile-initial-victoria {
    background: #ff6fb2;
}

.family-tile-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    background: #fffaf1;
}

.family-tile-card h3,
.family-tile-card p {
    margin: 0;
}

.family-tile-card h3 {
    font-size: 1.15rem;
}

.family-tile-card p:not(.eyebrow),
.family-tile-card small {
    color: var(--muted);
    font-weight: 850;
}

.activity {
    padding: 16px;
    margin-top: 20px;
}

.mini-tokens {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.mini-token {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    box-shadow: 0 3px 8px rgba(38, 50, 63, 0.18);
}

.mini-token-zac {
    background: var(--teal);
}

.mini-token-victoria {
    background: var(--coral);
}

.game-board-page {
    padding: 32px 0 0;
}

.game-board-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.map-space {
    position: relative;
    min-height: 168px;
    padding: 14px;
    border-radius: 8px;
    border: 3px solid rgba(38, 50, 63, 0.14);
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-space.has-tile-bg {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(38, 50, 63, 0.34)), var(--tile-bg);
    background-size: cover;
    background-position: center;
}

.map-space.has-tile-bg h2,
.map-space.has-tile-bg p,
.map-space.has-tile-bg small,
.map-space.has-tile-bg .space-number,
.map-space.has-tile-bg .space-tokens,
.map-space.has-tile-bg .space-trails {
    position: relative;
    z-index: 1;
}

.map-space h2 {
    margin: 28px 0 4px;
    font-size: 1.35rem;
}

.map-space.has-tile-bg h2 {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
}

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

.map-space.has-tile-bg p,
.map-space.has-tile-bg small {
    width: fit-content;
    max-width: 100%;
    padding: 5px 7px;
    border-radius: 8px;
    color: #26323f;
    background: rgba(255, 255, 255, 0.76);
}

.map-space small,
.tile small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.25;
}

.map-space-bonus {
    background: #fff4d8;
}

.map-space-challenge {
    background: #e7f7f6;
}

.map-space-reward {
    background: #ffe8e4;
}

.space-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--ink);
    font-weight: 900;
}

.space-tokens {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 8px;
}

.kid-token {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    border: 3px solid rgba(38, 50, 63, 0.14);
    box-shadow: 0 8px 20px rgba(38, 50, 63, 0.18);
    animation: token-bounce 1.7s ease-in-out infinite;
}

.kid-token img {
    width: 48px;
    height: 48px;
    border-radius: 999px;
}

.kid-token-victoria {
    animation-delay: 220ms;
}

.kid-token.is-moving {
    animation: token-land 760ms cubic-bezier(.17, .89, .32, 1.28), token-bounce 1.7s ease-in-out infinite 760ms;
}

.space-trails {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    gap: 6px;
}

.kid-trail {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    opacity: 0.46;
    border: 2px dashed rgba(255, 255, 255, 0.82);
}

.kid-trail-zac {
    background: var(--teal);
}

.kid-trail-victoria {
    background: var(--coral);
}

.board-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0 30px;
}

.board-summary {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background: #ffffff;
    border: 2px solid rgba(38, 50, 63, 0.09);
    box-shadow: var(--shadow);
}

.board-summary img {
    width: 104px;
    border-radius: 8px;
    background: #fffaf1;
}

.board-summary h2 {
    margin: 0;
}

.board-summary p {
    color: var(--muted);
}

.move-forward-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

@keyframes token-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes token-land {
    0% { transform: translateX(-42px) scale(0.82); opacity: 0.24; }
    70% { transform: translateX(0) scale(1.1); opacity: 1; }
    100% { transform: translateX(0) scale(1); opacity: 1; }
}

.board-path {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.tile {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid rgba(38, 50, 63, 0.12);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(38, 50, 63, 0.1);
}

.tile span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--ink);
    font-weight: 900;
}

.tile-bonus {
    background: #fff4d8;
}

.tile-challenge {
    background: #e7f7f6;
}

.tile-reward {
    background: #ffe8e4;
}

.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0 42px;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 900px) {
    .hero,
    .kids-grid,
    .map-layout,
    .dashboard-title-row,
    .dashboard-widgets,
    .admin-grid,
    .admin-lists,
    .admin-scoreboard,
    .admin-alerts,
    .board-summary-grid,
    .balance-grid,
    .completed-jump-panel,
    .admin-child-tools,
    .settings-grid,
    .chest-grid,
    .streak-card,
    .balance-card,
    .weekly-chest-card,
    .snack-admin-grid,
    .snack-admin-card,
    .manage-row,
    .manage-row-wide {
        grid-template-columns: 1fr;
    }

    .quest-grid,
    .reward-grid,
    .notification-list,
    .admin-alert-grid,
    .kid-reward-list,
    .family-current-tiles,
    .configured-quest-meta,
    .game-board-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav {
        display: none;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        padding: 8px 10px;
        min-height: 58px;
    }

    .brand {
        flex: 1 1 auto;
        gap: 8px;
        min-width: 0;
    }

    .brand img {
        width: 28px;
        height: 28px;
    }

    .brand span {
        font-size: 0.96rem;
    }

    .child-top-links {
        display: flex;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 6px;
        width: auto;
    }

    .child-top-links a {
        width: 42px;
        height: 42px;
        justify-content: center;
        min-width: 0;
        min-height: 0;
        padding: 3px;
        border-radius: 999px;
    }

    .child-top-links span {
        overflow: hidden;
        position: absolute;
        width: 1px;
        height: 1px;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .child-top-links img {
        width: 32px;
        height: 32px;
    }

    .notification-enable {
        width: 100%;
        min-height: 34px;
        padding: 6px 8px;
        font-size: 0.78rem;
    }

    main,
    .footer {
        width: min(100% - 20px, 1180px);
    }

    .admin-panel {
        padding-top: 14px;
    }

    .admin-panel > .section-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
        padding: 12px;
    }

    .admin-panel > .section-heading form,
    .admin-panel > .section-heading button {
        width: 100%;
    }

    .admin-scoreboard {
        margin-top: 0;
    }

    .kid-card {
        grid-template-columns: 1fr;
    }

    .quest-grid,
    .reward-grid,
    .family-shortcuts,
    .board-path,
    .family-current-tiles,
    .quest-columns,
    .reward-columns,
    .notification-list,
    .admin-alert-grid,
    .kid-reward-list,
    .solo-quest-list,
    .configured-quest-meta,
    .configured-quest-footer,
    .game-board-track {
        grid-template-columns: 1fr;
    }

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

    .board-summary {
        grid-template-columns: 1fr;
    }

    .completed-chore-main {
        grid-template-columns: 1fr;
    }

    .section-band,
    .map-layout {
        padding: 16px;
    }

    .danger-form {
        align-items: stretch;
        flex-direction: column;
    }

    .backup-card {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-child-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-child-summary button {
        grid-column: 1 / -1;
    }

    .snack-admin-card img {
        grid-row: auto;
    }

    .snack-picker-panel {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        padding: 42px 10px 12px;
    }

    .snack-picker-panel .snack-choice,
    label.snack-choice {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .snack-buy-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .snack-buy-button {
        width: 100%;
    }

    label.snack-choice input {
        grid-column: 1 / -1;
    }

    .snack-choice img {
        width: 46px;
        height: 46px;
    }

    .family-tile-card {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
        min-height: 0;
    }

    .family-tile-art,
    .family-tile-bg {
        min-height: 112px;
    }

    .family-tile-copy {
        padding: 9px;
    }

    .family-tile-initial {
        width: 28px;
        height: 28px;
        right: 6px;
        bottom: 6px;
        font-size: 0.82rem;
    }

    .family-tile-card h3 {
        font-size: 1rem;
    }

    .path-stat-card {
        grid-template-columns: 38px minmax(0, 1fr);
        min-height: 72px;
        padding: 10px;
    }

    .path-stat-icon {
        width: 34px;
        height: 34px;
    }

    .path-stat-card h3 {
        font-size: 1rem;
    }

    .family-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin: 10px 0 14px;
    }

    .family-shortcut {
        min-height: 44px;
        gap: 4px;
        padding: 6px 4px;
        font-size: 0.78rem;
        box-shadow: none;
    }

    .family-shortcut img {
        width: 24px;
        height: 24px;
    }
}
