:root {
    --sky-top: #7ec8f5;
    --sky-mid: #b8e4ff;
    --sky-bottom: #fff6c8;
    --grass: #6bcB4A;
    --coral: #ff6b4a;
    --sun: #ffd166;
    --berry: #ef476f;
    --ocean: #118ab2;
    --mint: #06d6a0;
    --ink: #2b2d42;
    --cream: #fffdf5;
    --frame1: #ff8c42;
    --frame2: #4cc9f0;
    --shadow: rgba(43, 45, 66, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Nunito", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-bottom) 78%, var(--grass) 78%, #57b03a 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

.sky {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 12%, rgba(255, 209, 102, 0.9) 0 4.5rem, transparent 4.6rem),
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.85) 0 2.2rem, transparent 2.3rem),
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.75) 0 3rem, transparent 3.1rem),
        radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.7) 0 2.4rem, transparent 2.5rem);
    z-index: 0;
    animation: drift 18s ease-in-out infinite alternate;
}

.blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.35;
}

.b1 {
    width: 10rem;
    height: 10rem;
    background: #ffd166;
    top: 55%;
    left: -2rem;
    animation: bob 7s ease-in-out infinite;
}

.b2 {
    width: 8rem;
    height: 8rem;
    background: #ff8fab;
    top: 30%;
    right: -1rem;
    animation: bob 9s ease-in-out infinite reverse;
}

.b3 {
    width: 6rem;
    height: 6rem;
    background: #90e0ef;
    bottom: 12%;
    right: 20%;
    animation: bob 6s ease-in-out infinite;
}

.top,
.stage,
.foot,
.flash {
    position: relative;
    z-index: 1;
}

.top {
    text-align: center;
    padding: 0.85rem 0.75rem 0.25rem;
}

.top-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    width: min(1280px, 100%);
    margin: 0 auto;
}

.top-title {
    grid-column: 2;
    text-align: center;
    min-width: 0;
}

.top-row > .brand {
    grid-column: 2;
    justify-self: center;
    text-align: center;
}

.top-row > .user-bar {
    grid-column: 3;
    justify-self: end;
}

.brand {
    font-family: "Baloo 2", cursive;
    font-weight: 800;
    font-size: clamp(2.3rem, 6vw, 3.5rem);
    margin: 0;
    letter-spacing: 0.02em;
    color: var(--berry);
    text-shadow:
        2px 2px 0 #fff,
        4px 4px 0 rgba(239, 71, 111, 0.25);
    animation: pop-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tagline {
    font-size: 0.92rem;
    margin: 0.2rem 0 0;
    color: var(--ocean);
    font-weight: 800;
}

.flash {
    max-width: 40rem;
    margin: 1rem auto;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    text-align: center;
    font-weight: 800;
}

.flash.ok {
    background: #d8f3dc;
    color: #1b4332;
}

.flash.bad {
    background: #ffccd5;
    color: #7f1d1d;
}

.stage {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem 0.65rem 1.5rem;
}

.scoreboard {
    background: var(--cream);
    border: 4px solid var(--sun);
    border-radius: 1rem;
    padding: 0.45rem 0.55rem 0.55rem;
    text-align: center;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.08);
    animation: pop-in 0.8s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.player .scoreboard {
    margin: 0;
}

.scoreboard.member-1 {
    border-color: var(--frame1);
}

.scoreboard.member-2 {
    border-color: var(--frame2);
}

.center-save {
    text-align: center;
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
}

.stars {
    color: var(--sun);
    font-size: 0.95rem;
    letter-spacing: 0.25rem;
    animation: twinkle 1.6s ease-in-out infinite;
}

.score-label {
    display: block;
    font-family: "Baloo 2", cursive;
    font-size: 0.92rem;
    color: var(--ocean);
}

.score-value {
    display: block;
    font-family: "Baloo 2", cursive;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--berry);
}

.score-value.bump {
    animation: score-bump 0.35s ease;
}

.score-hint {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    opacity: 0.8;
}

.save-status {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ocean);
    min-height: 1rem;
}

.frames {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
}

.player {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    animation: pop-in 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.player:nth-child(2) {
    animation-delay: 0.12s;
}

.frame-wrap {
    background: var(--cream);
    border-radius: 1.1rem;
    padding: 0.55rem;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.frame-wrap.color-1 {
    border: 8px solid var(--frame1);
}

.frame-wrap.color-2 {
    border: 8px solid var(--frame2);
}

.frame {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 0.55rem;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            45deg,
            #ffe8cc,
            #ffe8cc 12px,
            #fff4e0 12px,
            #fff4e0 24px
        );
    border: 3px solid rgba(43, 45, 66, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.frame:hover img {
    transform: scale(1.04);
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: #8a6a3d;
    font-weight: 800;
}

.placeholder .face {
    font-size: 2.1rem;
    line-height: 1;
    animation: wiggle 2.5s ease-in-out infinite;
}

.upload-form {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.photo-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-btn {
    flex: 1;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    border: 2px solid var(--ink);
    cursor: pointer;
    border-radius: 999px;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
    background: var(--mint);
    color: #053b2e;
    text-align: center;
    box-shadow: 0 3px 0 #053b2e;
}

.upload-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #053b2e;
}

.watch-panel {
    background: var(--cream);
    border-radius: 1rem;
    padding: 0.55rem;
    border: 3px solid var(--ink);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1);
}

.watch-face {
    background: linear-gradient(160deg, #2b2d42, #4a4e69);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0.5rem 0.35rem;
    text-align: center;
    margin-bottom: 0.45rem;
}

.clock-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex-wrap: nowrap;
}

.digit-block {
    min-width: 2.15rem;
    background: rgba(0, 0, 0, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.55rem;
    padding: 0.2rem 0.12rem 0.15rem;
}

.digit-value {
    display: block;
    font-family: "Baloo 2", cursive;
    font-size: clamp(1.05rem, 2.8vw, 1.45rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
}

.hour-block {
    min-width: 2.2rem;
    background: rgba(76, 201, 240, 0.16);
    border-color: rgba(76, 201, 240, 0.5);
}

.hour-block .digit-value {
    color: #4cc9f0;
}

.minute-block .digit-value {
    color: var(--sun);
}

.minute-block {
    min-width: 2.4rem;
    background: rgba(255, 209, 102, 0.18);
    border-color: rgba(255, 209, 102, 0.45);
}

.moment-block {
    min-width: 2.2rem;
    background: rgba(6, 214, 160, 0.16);
    border-color: rgba(6, 214, 160, 0.45);
}

.moment-block .digit-value {
    color: var(--mint);
}

.digit-label {
    display: block;
    margin-top: 0.05rem;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.digit-colon {
    font-family: "Baloo 2", cursive;
    font-size: 1rem;
    line-height: 1;
    padding-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.55);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.watch-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.watch-stats .stat {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.55rem;
    padding: 0.25rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.watch-stats strong {
    font-family: "Baloo 2", cursive;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--sun);
}

.watch-stats em {
    font-style: normal;
    font-size: 0.65rem;
    font-weight: 800;
    opacity: 0.85;
    margin-top: 0.1rem;
}

.play-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.watch-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.btn {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    border: 2px solid var(--ink);
    border-radius: 0.65rem;
    padding: 0.4rem 0.2rem;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    font-size: 0.85rem;
}

.btn:active,
.btn.running {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--ink);
}

.btn.study,
.btn.start {
    background: var(--mint);
    font-size: 0.9rem;
    padding: 0.45rem 0.2rem;
}

.btn.game {
    background: var(--coral);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.45rem 0.2rem;
}

.clock-bar {
    background: linear-gradient(160deg, #2b2d42, #4a4e69);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0.45rem 0.55rem;
    text-align: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
    display: grid;
    grid-template-columns: minmax(3.5rem, 1fr) auto minmax(3.5rem, 1fr);
    align-items: center;
    gap: 0.45rem;
}

.clock-bar .clock-digits {
    flex: 0 0 auto;
    justify-content: center;
    justify-self: center;
}

.clock-bar .points-block {
    justify-self: end;
    margin-left: 0;
}

.clock-bar.member-1 {
    box-shadow: 0 4px 0 rgba(255, 140, 66, 0.45);
}

.clock-bar.member-2 {
    box-shadow: 0 4px 0 rgba(76, 201, 240, 0.45);
}

.player.rewinding .clock-bar {
    background: linear-gradient(160deg, #7f1d1d, #ef476f);
}

.points-block {
    flex-shrink: 0;
    margin-left: auto;
    width: 3.55rem;
    height: 3.55rem;
    min-width: 3.55rem;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    position: relative;
    background:
        radial-gradient(circle at 32% 28%, #fff6c2 0%, #ffd166 28%, #f0b429 58%, #c68600 100%);
    border: 3px solid #a16207;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.65),
        inset 0 -3px 4px rgba(120, 53, 15, 0.35),
        0 3px 0 #78350f,
        0 4px 8px rgba(0, 0, 0, 0.25);
}

.points-block::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(161, 98, 7, 0.45);
    pointer-events: none;
}

.points-block .digit-value {
    position: relative;
    z-index: 1;
    color: #78350f;
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 246, 194, 0.8);
}

.points-block .digit-label {
    position: relative;
    z-index: 1;
    margin-top: 0.02rem;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #92400e;
    opacity: 1;
}

.scoreboard {
    display: none !important;
}

.btn.pause {
    background: var(--sun);
}

.btn.reset {
    background: #ffadad;
}

.member-game-msg {
    min-height: 1rem;
    margin: 0.35rem 0 0;
    text-align: center;
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--ocean);
}

.reward-box {
    background: linear-gradient(160deg, #fff9e6, #e8fff6);
    border: 3px solid var(--mint);
    border-radius: 0.75rem;
    padding: 0.35rem 0.4rem 0.4rem;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.reward-box.member-1 {
    border-color: var(--frame1);
    background: linear-gradient(160deg, #fff4ea, #fff9e6);
}

.reward-box.member-2 {
    border-color: var(--frame2);
    background: linear-gradient(160deg, #eaf9ff, #e8fff6);
}

.reward-box h3 {
    font-family: "Baloo 2", cursive;
    margin: 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--berry);
    line-height: 1.1;
}

.reward-intro {
    margin: 0.05rem 0 0.3rem;
    text-align: center;
    font-weight: 800;
    font-size: 0.62rem;
    color: var(--ocean);
}

.reward-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}

.reward-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
    width: 100%;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    border: 2px solid var(--ink);
    border-radius: 0.5rem;
    padding: 0.25rem 0.3rem;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--ink);
    text-align: left;
    min-height: 0;
}

.reward-btn:active,
.reward-btn.pop {
    transform: translateY(1px) scale(1.02);
    box-shadow: 0 1px 0 var(--ink);
}

.reward-name {
    flex: 1;
    font-size: 0.65rem;
    line-height: 1.15;
}

.reward-pts {
    flex-shrink: 0;
    background: var(--sun);
    border: 1px solid var(--ink);
    border-radius: 999px;
    padding: 0.05rem 0.28rem;
    font-family: "Baloo 2", cursive;
    font-size: 0.72rem;
    color: var(--ink);
}

.reward-msg {
    min-height: 0.85rem;
    margin: 0.25rem 0 0;
    text-align: center;
    font-weight: 800;
    font-size: 0.65rem;
    color: #1b4332;
}

.parent-assign {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding-top: 0.3rem;
    border-top: 2px dashed rgba(43, 45, 66, 0.15);
    flex-wrap: wrap;
}

.parent-assign label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 800;
    font-size: 0.68rem;
    color: var(--ocean);
}

.assign-points {
    width: 2.6rem;
    border: 2px solid var(--ink);
    border-radius: 0.4rem;
    text-align: center;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.15rem 0.1rem;
}

.assign-btn {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--sun);
    padding: 0.25rem 0.55rem;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--ink);
}

.reduce-btn {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: #ffadad;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--ink);
}

.assign-btn:active,
.reduce-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 var(--ink);
}

.penalty-box {
    margin-top: 0.4rem;
    padding-top: 0.3rem;
    border-top: 2px dashed rgba(239, 71, 111, 0.35);
}

.penalty-box h4 {
    font-family: "Baloo 2", cursive;
    margin: 0;
    text-align: center;
    font-size: 0.88rem;
    color: #9a3412;
    line-height: 1.1;
}

.penalty-btn {
    background: #fff5f5;
}

.penalty-pts {
    background: #ffadad !important;
}

.parent-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(43, 45, 66, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.parent-modal[hidden] {
    display: none !important;
}

.parent-modal-card {
    width: min(100%, 20rem);
    background: var(--cream);
    border: 5px solid var(--ocean);
    border-radius: 1.2rem;
    padding: 1rem 1rem 1.1rem;
    text-align: center;
    box-shadow: 0 12px 0 rgba(0, 0, 0, 0.15);
}

.parent-modal-card h3 {
    font-family: "Baloo 2", cursive;
    margin: 0;
    font-size: 1.5rem;
    color: var(--berry);
}

.parent-modal-card p {
    margin: 0.35rem 0 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.parent-pin-input {
    width: 8rem;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.35em;
    text-align: center;
    border: 3px solid var(--ink);
    border-radius: 0.75rem;
    padding: 0.4rem 0.5rem;
}

.parent-pin-error {
    min-height: 1.1rem;
    margin: 0.45rem 0 0.55rem;
    font-weight: 800;
    font-size: 0.85rem;
    color: #9a3412;
}

.parent-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.parent-cancel,
.parent-ok {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    border: 3px solid var(--ink);
    border-radius: 999px;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
}

.parent-cancel {
    background: #ffadad;
}

.parent-ok {
    background: var(--mint);
}

.game-zone {
    margin-top: 1rem;
    background: linear-gradient(135deg, #fff1e6, #ffe0f0);
    border: 4px solid var(--berry);
    border-radius: 1.1rem;
    padding: 0.75rem 0.85rem 0.9rem;
    text-align: center;
    box-shadow: 0 8px 0 rgba(239, 71, 111, 0.25);
    animation: pop-in 0.9s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.game-zone h2 {
    font-family: "Baloo 2", cursive;
    margin: 0;
    font-size: 1.35rem;
    color: var(--berry);
}

.game-zone p {
    margin: 0.3rem auto 0;
    max-width: 36rem;
    font-weight: 700;
    font-size: 0.88rem;
}

.foot {
    text-align: center;
    padding: 0 1rem 2rem;
    font-weight: 800;
    color: #1b4332;
}

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

@keyframes bob {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-18px);
    }
}

@keyframes drift {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-12px);
    }
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.08);
    }
}

@keyframes wiggle {
    0%,
    100% {
        transform: rotate(-6deg);
    }
    50% {
        transform: rotate(6deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes score-bump {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.18);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== One-page side-by-side layout ===== */
body {
    min-height: 100vh;
}

.top {
    padding: 0.45rem 0.75rem 0.2rem;
}

.brand {
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    text-align: center;
}

.user-bar {
    margin-bottom: 0;
    gap: 0.4rem;
    font-size: 0.8rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.home-link,
.logout-link {
    padding: 0.12rem 0.5rem;
    font-size: 0.72rem;
    border-width: 2px;
}

.stage {
    max-width: 1280px;
    padding: 0.25rem 0.5rem 0.5rem;
}

.center-save,
.save-status {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    min-height: 0.9rem;
}

.frames {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: stretch;
}

.player {
    gap: 0.35rem;
    background: rgba(255, 253, 245, 0.35);
    border-radius: 0.9rem;
    padding: 0.35rem;
}

.scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.3rem 0.55rem;
    border-width: 3px;
    border-radius: 0.75rem;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.stars,
.score-hint {
    display: none;
}

.score-label {
    font-size: 0.85rem;
    margin: 0;
}

.score-value {
    font-size: 1.55rem;
    margin: 0;
}

.score-unit {
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--ocean);
}

.player-main {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 0.4rem;
    align-items: stretch;
}

.frame-wrap {
    padding: 0.35rem;
    border-radius: 0.85rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
}

.frame-wrap.color-1,
.frame-wrap.color-2 {
    border-width: 5px;
}

.frame {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-height: none;
    border-radius: 0.45rem;
    border-width: 2px;
}

.placeholder {
    font-size: 0.75rem;
    gap: 0.15rem;
}

.placeholder .face {
    font-size: 1.6rem;
}

.upload-form {
    margin-top: 0.3rem;
}

.upload-btn {
    padding: 0.28rem 0.4rem;
    font-size: 0.72rem;
    box-shadow: 0 2px 0 #053b2e;
}

.watch-panel {
    padding: 0.35rem;
    border-width: 2px;
    border-radius: 0.75rem;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.watch-face {
    padding: 0.35rem 0.25rem;
    margin-bottom: 0.3rem;
    border-radius: 0.55rem;
    flex-shrink: 0;
}

.clock-bar.watch-face {
    margin-bottom: 0;
}

.sticker-zone {
    flex: 1 1 auto;
    min-height: 7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    background: rgba(255, 255, 255, 0.65);
    border: 2px dashed rgba(43, 45, 66, 0.18);
    border-radius: 0.55rem;
    padding: 0.3rem;
}

.sticker-board {
    flex: 1 1 auto;
    min-height: 2.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-content: flex-start;
    align-items: center;
}

.sticker-empty {
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #8a6a3d;
    opacity: 0.8;
}

.sticker-item {
    font-size: 1.25rem;
    line-height: 1;
    animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sticker-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sticker-dropdown-wrap {
    flex: 1;
    min-width: 0;
}

.sticker-dropdown {
    width: 100%;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    border: 2px solid var(--ink);
    border-radius: 0.45rem;
    background: #fff;
    padding: 0.28rem 0.35rem;
    cursor: pointer;
}

.sticker-give,
.sticker-clear {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.65rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 0 var(--ink);
    white-space: nowrap;
}

.sticker-give {
    background: var(--sun);
}

.sticker-clear {
    background: #ffe0e0;
}

.sticker-give:active,
.sticker-clear:active,
.sticker-give.pop,
.sticker-clear.pop {
    transform: translateY(1px);
    box-shadow: none;
}

.watch-bottom {
    margin-top: auto;
    flex-shrink: 0;
}

.watch-controls.all-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.22rem;
}

.watch-face {
    padding: 0.35rem 0.25rem;
    margin-bottom: 0.3rem;
    border-radius: 0.55rem;
}

.clock-digits {
    gap: 0.1rem;
}

.digit-block {
    min-width: 2.6rem;
    padding: 0.3rem 0.2rem 0.22rem;
    border-radius: 0.5rem;
}

.hour-block,
.minute-block,
.moment-block {
    min-width: 2.6rem;
}

.digit-value {
    font-size: clamp(1.45rem, 3.2vw, 2.1rem);
}

.digit-label {
    font-size: 0.55rem;
}

.digit-colon {
    font-size: 1.35rem;
    padding-bottom: 0.55rem;
}

.watch-stats {
    display: none;
}

.watch-controls.all-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.22rem;
}

.play-row {
    display: none;
}

.btn {
    padding: 0.32rem 0.1rem;
    font-size: 0.72rem;
    border-width: 2px;
    border-radius: 0.45rem;
    box-shadow: 0 2px 0 var(--ink);
}

.btn.study,
.btn.start,
.btn.game {
    font-size: 0.72rem;
    padding: 0.32rem 0.1rem;
}

.member-game-msg {
    min-height: 0.85rem;
    margin: 0.2rem 0 0;
    font-size: 0.65rem;
}

.reward-box {
    padding: 0.3rem;
    border-width: 2px;
    border-radius: 0.65rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.reward-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.reward-box h3 {
    font-size: 0.85rem;
    margin: 0;
}

.reward-intro {
    display: none;
}

.reward-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
}

.reward-btn {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.2rem 0.25rem;
    border-radius: 0.4rem;
    border-width: 1px;
    box-shadow: 0 1px 0 var(--ink);
}

.reward-name {
    font-size: 0.58rem;
    line-height: 1.1;
}

.reward-pts {
    font-size: 0.65rem;
    padding: 0.02rem 0.22rem;
    align-self: flex-end;
}

.parent-assign {
    margin: 0;
    padding: 0;
    border: 0;
    gap: 0.2rem;
    flex-wrap: nowrap;
}

.assign-points {
    width: 2.1rem;
    font-size: 0.7rem;
    padding: 0.1rem;
}

.assign-btn,
.reduce-btn {
    font-size: 0.65rem;
    padding: 0.18rem 0.4rem;
    box-shadow: 0 1px 0 var(--ink);
}

.penalty-box {
    margin-top: 0.25rem;
    padding-top: 0.2rem;
}

.penalty-box h4 {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
}

.penalty-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reward-msg {
    min-height: 0.75rem;
    margin: 0.15rem 0 0;
    font-size: 0.6rem;
}

.game-zone {
    margin-top: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-width: 2px;
    border-radius: 0.65rem;
    box-shadow: 0 3px 0 rgba(239, 71, 111, 0.2);
}

.game-zone h2 {
    display: none;
}

.game-zone p {
    margin: 0;
    font-size: 0.72rem;
}

.foot {
    padding: 0.2rem 0.5rem 0.4rem;
    font-size: 0.7rem;
}

.foot p {
    margin: 0;
}

@media (max-width: 900px) {
    .player-main {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .frames {
        grid-template-columns: 1fr;
    }

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

.save-status.ok {
    color: #1b4332;
}

.save-status.busy {
    color: #9a3412;
}

.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0;
    margin-left: auto;
    font-size: 0.85rem;
}

.user-bar .hello {
    font-weight: 800;
    color: var(--ocean);
    font-size: 0.95rem;
}

.home-link,
.logout-link {
    font-weight: 800;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
}

.logout-link {
    background: #ffadad;
}

@media (max-width: 700px) {
    .top-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .top-row > .brand,
    .top-title {
        grid-column: 1;
    }

    .top-row > .user-bar {
        grid-column: 1;
        justify-self: center;
    }

    .brand {
        text-align: center;
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .top-title {
        text-align: center;
    }

    .user-bar {
        justify-content: center;
    }
}

.foot {
    text-align: center;
    padding: 0 1rem 1.2rem;
    font-weight: 800;
    color: #1b4332;
    font-size: 0.85rem;
}

.auth-page .auth-wrap {
    position: relative;
    z-index: 1;
    max-width: 28rem;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

.auth-card {
    background: var(--cream);
    border: 6px solid var(--ocean);
    border-radius: 1.6rem;
    padding: 1.2rem 1.1rem 1.4rem;
    box-shadow: 0 12px 0 rgba(17, 138, 178, 0.2);
    animation: pop-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.auth-tab {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    border: 3px solid var(--ink);
    border-radius: 999px;
    padding: 0.55rem 0.4rem;
    background: #fff;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--sun);
    box-shadow: 0 3px 0 var(--ink);
}

.auth-form .field {
    display: block;
    margin-bottom: 0.85rem;
}

.auth-form .field span {
    display: block;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--ocean);
}

.auth-form input {
    width: 100%;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    border: 3px solid var(--ink);
    border-radius: 0.9rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
}

.pin-input {
    letter-spacing: 0.45em;
    text-align: center;
    font-size: 1.6rem !important;
}

.auth-hint {
    margin: 0 0 1rem;
    font-weight: 700;
    color: #4a4e69;
    text-align: center;
}

.auth-submit,
.link-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-family: "Baloo 2", cursive;
    font-size: 1.35rem;
    border: 4px solid var(--ink);
    background: var(--mint);
    color: #053b2e;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 5px 0 var(--ink);
}

.auth-submit:active,
.link-btn:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 var(--ink);
}

.welcome-card {
    text-align: center;
}

.welcome-text {
    font-weight: 800;
    font-size: 1.15rem;
    margin: 0.2rem 0 1rem;
}

.center-logout {
    display: inline-block;
    margin-top: 1rem;
}

.shared-reward {
    margin-top: 0.55rem;
}

.shared-reward .reward-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.member-pick {
    display: flex;
    gap: 0.25rem;
}

.member-tab {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    padding: 0.22rem 0.55rem;
    cursor: pointer;
}

.member-tab.active {
    background: var(--sun);
    box-shadow: 0 2px 0 var(--ink);
}

.shared-reward.for-member-1 {
    border-color: var(--frame1);
}

.shared-reward.for-member-2 {
    border-color: var(--frame2);
}

.reward-target {
    margin: 0 0 0.35rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--ocean);
}

.shared-reward .reward-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shared-reward .penalty-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .shared-reward .reward-list,
    .shared-reward .penalty-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.member-name-label {
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    color: #fff;
    font-family: "Baloo 2", cursive;
    font-weight: 800;
    font-size: clamp(1.45rem, 3.2vw, 2.1rem);
    line-height: 1;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    padding: 0 0.15rem;
}

.activity-title {
    margin: 0.35rem 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.penalty-box h4 {
    margin: 0.45rem 0 0.25rem;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Parent settings page */
.settings-wrap {
    width: min(720px, calc(100% - 1.5rem));
    margin: 0 auto 1.5rem;
    display: grid;
    gap: 0.85rem;
}

.settings-card {
    background: rgba(255, 255, 255, 0.92);
    border: 3px solid var(--ink);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 0 rgba(43, 45, 66, 0.12);
}

.settings-card h2 {
    margin: 0 0 0.35rem;
    font-family: "Baloo 2", sans-serif;
    font-size: 1.35rem;
}

.settings-hint {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #445;
}

.settings-pin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.settings-section {
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px dashed rgba(43, 45, 66, 0.15);
}

.settings-section:last-of-type {
    border-bottom: 0;
}

.settings-names {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.settings-names .field {
    display: grid;
    gap: 0.25rem;
}

.settings-names .field span,
.settings-editor .field span {
    font-weight: 800;
    font-size: 0.8rem;
}

.settings-names input,
.activity-row input[type="text"],
.activity-row input[type="number"] {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--ink);
    border-radius: 0.45rem;
    padding: 0.4rem 0.5rem;
}

.activity-editor {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.activity-row {
    display: grid;
    grid-template-columns: 1fr 4rem auto;
    gap: 0.35rem;
    align-items: center;
}

.activity-remove {
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    border: 2px solid var(--ink);
    border-radius: 0.45rem;
    background: #ffadad;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.settings-empty {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #667;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
}

.settings-status {
    margin: 0.55rem 0 0;
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--ocean);
}

.settings-status.error {
    color: #c1121f;
}

.add-activity-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    margin: 0.35rem 0 0.45rem;
}

.add-activity-row input[type="text"] {
    flex: 1 1 8rem;
    min-width: 0;
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    border: 2px solid var(--ink);
    border-radius: 0.45rem;
    padding: 0.28rem 0.45rem;
}

.add-activity-row input[type="number"] {
    width: 3.2rem;
    font-family: "Nunito", sans-serif;
    font-weight: 800;
    font-size: 0.78rem;
    border: 2px solid var(--ink);
    border-radius: 0.45rem;
    padding: 0.28rem 0.25rem;
    text-align: center;
}


@media (max-width: 600px) {
    .settings-names {
        grid-template-columns: 1fr;
    }

    .activity-row {
        grid-template-columns: 1fr 3.5rem;
    }

    .activity-remove {
        grid-column: 1 / -1;
    }
}

